Q on the TS/JS MSFS Avionics SDK.
Is it possible to create a simple flight plan on the fly (with no UI per se, just feeding it a start ICAO and a finish ICAO) using Class: FlightPlan | MSFS Avionics Frameworks and Instruments and send it to whatever FMC is available?
Use case is a location/map tool bar addon I have, thinking of adding a flight plan generator based on user request. Just scoping it out. Not interested in adding complex flight planning (as EFB already does that well!), just some basic direct flights to create on the fly in flight mode and load them. Or can I create one in code and send it to the EFB for further work?
Thanks!
The docs on both AF and SDK are a little thin in this area, which is why I’m asking.
Class: FlightPlan | MSFS Avionics Frameworks and Instruments
A flight plan managed by the flight plan system.
JS_LISTENER_FLIGHTPLAN
The 2024 msfs-sdk docs are here: MSFS Avionics Framework | MSFS Avionics Frameworks and Instruments
JS_LISTENER_FLIGHTPLAN is the legacy FS2020 listener provided for backward compatibility; JS_LISTENER_PLANNEDROUTE is the FS2024 replacement.
Have you considered an EFB app? Electronic Flight Bag API
The EFB is the central point for flight plans, and from there they can be filed with ATC or sent to the avionics.
Thanks for the quick reply and clarifications.
Have you considered an EFB app? Electronic Flight Bag API
I have considered an EFB app but the form factor doesn’t work for my addon Location Manager 2 for MSFS 2024 - Sonicviz and the user use cases it aims to assist with. The EFB is fantastic, but it’s not a hammer for every nail. Toolbar apps/addons have their own utility and use cases.
My addon is complementary to the EFB and serves a different purpose (I would describe it as a Free Flight activity tool & training aid) so needs to be a little more flexible in window arrangement (see examples below). But I’d like to programmatically create some Flight Plans on the fly. Not as a replacement to EFB/Simbrief/NG, it’s more to hook up the saved locations to the flight planning system in a more useful way in cockpit, as well as generate some random activities on the fly using them.
If I’m not mistaken there’s no way to currently do that via toolbar addon system?
I already use the Avionics Framework for airport scanning (thanks!), would be great to also leverage the FP functionality.
Update: I guess in a pinch I could create an EFB addon to the Toolbar addon by accessing the stored data and have shared state to pass things through, but ideally I’d prefer to KISS and work in the one app.
Most times I personally use it as a minimal window on the same screen
It can be popped out to a second screen of course as well, and maximised, but I don’t mind it on one , or in VR.
You can also temporarily resize it to any dimension needed:
1 Like
Sounds cool! You probably want to check out the FlightPlanRouteManager Class: FlightPlanRouteManager | MSFS Avionics Frameworks and Instruments. That is how the EFB and avionics exchange routes. It’s basically a wrapper that makes it easy to use the JS_LISTENER_PLANNEDROUTE. The source code is also available for reference msfs-avionics-mirror/src/sdk/flightplan/FlightPlanRouteManager.ts at main · microsoft/msfs-avionics-mirror · GitHub
1 Like
aok, I’ll take a look. Thanks.
Ref: JS_LISTENER_PLANNEDROUTE