Testing flight algorithm with Q lookup