X-Plane plugin that determines the aircraft's phase of flight using a finite-state machine