def landed_check(coordinate_list, r):
'''Check if the plane has not moved fast enough recently to be airborne.'''
# first do naive check - two points distance / time
naive_distance = great_circle(coordinate_list[0][0:1], coordinate_list[-1][0:1]).meters
time_delta = coordinate_list[-1][3] - coordinate_list[0][3]
if time_delta < 200:
return 0
elif (naive_distance / time_delta) < 8.94:
# logger.debug("Something is moving too slow to be flying!")
return airport_proximity_check((coordinate_list[-1][0], coordinate_list[-1][1]), r)
else:
return 0
评论列表
文章目录