functional criteria to identify flights. fixed equation incorrectly computing distance.