I’m creating a fantasy plane for the 2024 sim and along with it, all the displays. Pertinent to this question being the navigation display and FMC. For those to be able to show and edit the flight route, I will need, as a bare minimum, the lat, long and altitude for each waypoint, along with any speed or altitude restrictions.
Now, after registering the apropriate listeners and event handlers, I can use the GET_EFB_ROUTE Coherent call which will return the current flightplan from the EFB (for example EFHK-EFIV in the FlightPlanRoute example.log, rename it to .json which it actually is).
The returned route will give me the departure and arrival airport ICAOs and runways and any SID or STAR to use, as well as enroute waypoints. But, neither the airports or enroute waypoints contain lat or long or altitude info and the SID or STAR waypoints are not listed at all, just the name of the procedure.
My questions are as follows:
Is there any easier way to get the waypoints of a SID or STAR other than making two LOAD_AIRPORT_FROM_STRUCT Coherent calls and supplying the route.departureAirport and route.destinationAirport as a parameter? It does get me information for a given facility (Facility example below for EFHK), for example the lat and long. But, even with the waypoint names for the SIDs and STARs, I’m not sure how to get the lat and long from them? There seem to be some polar coordinate stuff in there (theta and rho), but not sure I should use those?
For the enroute waypoints, there is the type and ident for each, but lat and long are 0 and altitude seems to be null. How can I query the latlongalt for these? Do I need to get them one call at a time or is there any way to query multiple at one time?
I plan to get the flight plan at the FMC startup which gives me either the plan from the EFB or an empty plan if there’s not one there yet. After that I was thinking I could modify the JS route object according to what the user does from the FMC and then finally when EFB asks to sync the route, just send the edited object back. Does this make sense or is this there an easier way?
FlightPlanRoute example.log (9.1 KB)
Facility example.log (315.6 KB)