In the previous chapter we computed a trajectory of the expected flight path all the way from the departure waypoint to the arrival waypoint. The trajectory was stored into a pandas dataframe that looks like this:
The pilot doesn't need 494 rows of trajectory data, so we need to summarize it into a navigation log. We can use the remark and wpt_name fields to select only rows where the trajectory is at a waypoint or at top of climb or at top of descent. Once we have selected only these rows, we will add a few more formatting steps in order to produce a navigation log dataframe. The coded process is shown below:
The resulting navigation log dataframe looks like this:
Note that for waypoints, we have replaced computed trajectory coordinates with the actual waypoint coordinates from the navigation database. We took this step so that when we export our flight plan to X-Plane, there will be no discrepancy between the waypoint positions from the flight plan vs. the plane's FMS.
In the next section we will export this flight plan into an .fms file that X-Plane 11 can read.