• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

types of waypoints

Messages
3
Hello,

Is there a programming interface to access to the
types of waypoints of a loaded flightplan? (FS9/FSX)
(during run-time of FS)
Or I have to dissassamble the concerning bgl-file
via bgl-analyzer?

I would also detect data like traffic-positions/numbers
and cloud-positions for programming a radar-instrument.

What is the way?

Thank you
 

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
34,855
Country
unitedkingdom
OK this is probably my lack of understanding. Are you asking how to access the waypoints in a flight plan from outside FS? or are you asking how to find the waypoints in a bgl file? or both.

As far as I know the flightplan for FS is a text file (if I recall correctly) so should be easy to decode. For waypoints inside a bgl you would need to use a decompiler like NewBglAnalyze for FS9 or BglAnalyzeX for FSX.
 
Messages
3
Thank you. Do you know the name/path of textfile of flightplan?

Do anybody know somethink about interfaces for air-traffic
data (call sign/position) and clouds-locating data? I gas that this data are random generated and only accessably during run-time?
 

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
34,855
Country
unitedkingdom
Waypoints can be all over the place :) They certainly exist in the AP files which contain airport data. They also appear in AT files which contain waypoint and boundary data.
 
Messages
156
Country
france
For FSX (not FS9), flightplans are saved as XML files (with a .PLN file extension). These XML files contain the type of each waypoint;
Code:
<ATCWaypoint id="JOXUS">
    <ATCWaypointType>Intersection</ATCWaypointType>
    <WorldPosition> ... </WordPosition>
    ....
And so on with VORs, NDB, user-defined waypoints etc.

I don't know if there is a canonical way to guess the current flight plan file. Maybe a simulation variable. What you could do is read the the current flight .FLT file, which is located in Application Data/Microsoft/FSX
Be aware that the name of this file is localised. In the French Deluxe edition it is "Vol précédent.FLT" :eek:
This file contains a section [GPS_Engine] with a Filename= entry giving the path of the current .PLN file.
 
Messages
64
Country
germany
You can subscribe to SimConnect events "FlightPlanActivated" and "FlightPlanDeactived". The first one gives you also the filename of the flightplan file. You can also read out the various gps variables via SimConnect. It goes so far that you can even set messages into the gps message window from what i read.

From what i can tell now (since i wanted to know that for my addon) there is no way to determine whether the player is actually flying IFR rules. You don't get FlightPlanDeactivated events until a new flightplan or a new flight is loaded. Actually when the player reaches the destination, cancels the flightplan or gets kicked from ATC should IMO produce a FlightPlanDeactivated event too. Also FlightPlanActivated should only get sent when the player asks ATC for initial clearance, not when the plan is loaded.
 
Messages
156
Country
france
You can also read out the various gps variables via SimConnect. It goes so far that you can even set messages into the gps message window from what i read.

Most GPS variables are only accessible through the panel system, and thus only from inside FS modules. The subset of GPS variables readable from simconnect does not seem to include the name of the flightplan or message functions (or maybe the Simulation Variables document is incomplete, which is not impossible ;) )

A practical way to share all variables with remote simconnect clients is to make a bridge module that retrieve gps variables with execute_calculator_code (or better, using GetPropertyValue() from the GPS IGaugeCCallback) and exposes them through simconnect client data areas.
 
Top