Skip to content

Accessing the Flight Plan

falcon71 edited this page Jan 9, 2025 · 2 revisions

Note

This feature is only available with 1.5 beta 7 or later

The real KLN 90B transmits basic flight plan data via RS-232. This data can be used to display the flight plan on external moving maps. To access the flight plan of this KLN, your code needs to be written in Javascript and you will need to use the MSFS Avionics Framework.

Use this code to retrieve the flight plan:

const flightplanner = FlightPlanner.getPlanner("kln90b", bus, { calculator: calculator });
//Only the active flight plan (0) is transmitted
const plan = this.getFlightPlan(0);
//Iterate over the legs
for (const leg of plan.legs()) {
}
//Get the active leg index
const activeIdx = plan.activeLateralLeg;

For further details, see the API documentation.

This flight plan must only be read. Any changes made by you may get overwritten again with the actual internal flight plan of the KLN 90B.

Please note, that just like the real KLN, only the name and the coordinates will be available for waypoints, most other fields will be empty.

Just like the real KLN, the missed approach path will not be transmitted, before reaching the MAP. Also, waypoints before or after an arc will not be available.