How to find flight phases on a trajectory?