• 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.

FS2004 Read loaded flight plan name

Messages
18
Country
unitedkingdom
I'm looking for a way to read the filename of the currently loaded flight plan within the sim. With FSX this is straightforward through simconnect, but any pointers as to how this may be approached in FS2004 would be appreciated.

Gerard
 
Messages
1,564
Country
thailand
I'm looking for a way to read the filename of the currently loaded flight plan within the sim. With FSX this is straightforward through simconnect, but any pointers as to how this may be approached in FS2004 would be appreciated.

Gerard

Gerard,

You're talking about the *.pln file name. As far as an XML approach, there is nothing that I know of for FS9. Probably you're aware that the gps module can give you FlightPlanTitle and FlightPlanDescription (bacically Departure airport Ident to Destination airport Ident) of the loaded plan which contains key elements of a MSFS generated flight plan file name, but not the exact name.

Good luck. Maybe someone has another idea.

Bob

Of course, there is the Windows file manager contained in Flight Planner but I don't think that's what you mean ...
 
Last edited:

ddawson

Resource contributor
Messages
862
Country
canada
I'm pretty sure that FSUIPC will do that for you in FS9.

Doug
 
Messages
18
Country
unitedkingdom
Tks for the responses,

Unfortunately FSUIPC doesn't have this information for FS9, I asked at Pete's forum earlier and he confirmed the flight plan filename is only available for FSX.

I guess I was hoping that it was available though XML, perhaps via the GPS info, but I didn't spot anything in the docs.

I'm writing a logger program which includes a means to plot the flight plan and subsequent flight track and wanted to avoid having to manually enter the filename and path. And yes, its the *.pln name I'm after. Easy using FSX, but not obvious on FS9.

Gerard
 
Messages
1,564
Country
thailand
I'm writing a logger program which includes a means to plot the flight plan and subsequent flight track and wanted to avoid having to manually enter the filename and path. And yes, its the *.pln name I'm after. Easy using FSX, but not obvious on FS9.

Sounds interesting. Are you reading from the .pln file or just associating the file name with the info you record with Logger?

Bob
 
Messages
18
Country
unitedkingdom
Hi Bob,

I get the flightplan name from FSX and then read the waypoints from it into my program. I then record the actual flight positions at intervals and at the end write both sets of data to a file in the IGC standard format. IGC is the Intenational Gliding Committe governing gliding and it maintains a real world standard for flight logging. I can then plot the planned and actual flight details on a map for analysis The nice point is that the IGC format is well supported by a range of flight analysis programs. Nothing very clever and only possible through the magic of FSUIPC.

Gerard
 
Messages
18
Country
unitedkingdom
Tks for the pointer, I'll have a look at the example xml. I did scan through the "FS9 GPS Complete Guidebook" but found it a bit intimidating for my skilll level (but a fantastic piece of work). Will brew a strong coffee and have another go!

Gerard
 
Messages
1,564
Country
thailand
Gerard,

I'll hammer out and post an example XML 'gauge' that will write flight plan waypoint lat/lons as well as aircraft flight path lat/lons, altitude, vsi and airspeed to a .txt (or .csv) file that can be read and displayed by subsequent applications. One interesting application is Google Earth as discussed in the Logger docs.

The XML script will be very similar to the FLIGHT DATA RECORDER.xml included in the Logger website XML Examples downloads except that I'll add code that writes the flight plan waypoint lat/lons to the file as well. The XML isn't really so complicated.

I use the Logger module to write flight sim data to file, so it must be downloaded and installed for the example gauge to work. There is a Logger module for FS9 as well as FSX, and the XML I provide will be in FS9 format.

Give me a day ... about to board a trans Pacific flight so no internet access for a while.

Yes, the gps module is intimidating at first ... over 300 variables. Many coffees.

Bob
 
Messages
18
Country
unitedkingdom
Tks Bob, That would be great and educational. No rush as I'm away for a few days myself.

Gerard
 
Messages
1,564
Country
thailand
Gerard,

Attached is a fully functional FS9 XML gauge that will write Flight Plan Waypoint Latitudes and Longitudes as well as flight progress information (Aircraft Latitude, Longitude, Altitude, VSI, Airspeed, Heading, Absolute Time) to an output file. It uses the LOGGER module for FS9. LOGGER can be freely downloaded from the Blackbox website indicated in a previous post in this thread.

The gauge is designed to be displayed in its own window. From my panel.cfg file:

[Window Titles]
Window28=FLIGHT DATA RECORDER

[Window28]
position=4
size_mm=150,75
visible=1
gauge00=FDR!FLIGHT DATA RECORDER, 0, 0, 150, 75

and the xml gauge, FLIGHT DATA RECORDER.xml, is located in folder FDR in the Panel folder of the aircraft.

Line 5 of the gauge xml file must be edited one time only to assign the desired file name path for the output file. In the example, it is C:\Users\Username\Desktop\Flight Data Recorder\

When the FS9 aircraft is loaded, the following appears in the center of the screen:

attachment.php


Clicking the gray button turns the flight data recorder On and the following occurs:

1. Button turns lime green color indicating that the recorder is On.
2. An output data file with the file name Ident1-Ident2_X.csv is automatically created. Ident1 is the departure airport ident in your loaded flight plan, Ident2 is the destination airport ident, and X is the number of waypoints in the flight plan. Note that the file can be .csv or .txt file format. Refer to LOGGER documentation.
3. The first line of the output file is the flight plan title.
4. The second line is the number of waypoints.
5. The lines following that are the Latitude, Longitude and Ident of the waypoints.
6. 9999 is added to signify end of the waypoints.
7. Subsequent lines of Latitude, Longitude, Altitude, VSI, Airspeed, Heading, and Absolute Time are written in flight data recorder mode as the aircraft flies. Records are written at regular time intervals by editing line 101 of the xml file. As shown, flight data are recorded every three seconds. Beware that a large file can be created very quickly if (L:RecorderSkipCycles, enum) is not set high enough. The number of flight records written to file is updated in the gauge readout as the flight progresses.
8. When the lime green button is clicked it turns gray signifying that the flight data recorder is turned Off. The last line written is the number of records of the flight data.
9. The output .csv file is then automatically closed and is available for analysis outside of Flight Simulator.

Of course, the window can be undocked by right clicking it and moved to a suitable position on the screen.

The following pic is an example of a .csv file opened in excel. The file name is KJFK-KDAL_13.csv

attachment.php


Hope this helps.

Bob
 

Attachments

  • LoggerOutput1.jpg
    LoggerOutput1.jpg
    186.3 KB · Views: 1,491
  • FDR1.jpg
    FDR1.jpg
    4.4 KB · Views: 1,359
  • FLIGHT DATA RECORDER.xml
    4.5 KB · Views: 449
Messages
1,564
Country
thailand
Hello Gerard,

Here is an update to the flight data recorder XML gauge. It adds the ability to change the recorder time increment via keyboard entry while the gauge is open rather than by editing the XML, and it adds a few more gps variables in the flight plan output such as leg distance and magnetic heading.

View attachment FLIGHT DATA RECORDER.xml

When the aircraft is loaded, the following appears (window has been undocked):

attachment.php


Default recorder increment is 3 seconds as shown in the white box. To change it, click the white box and a red border appears signifying that keyboard entry is enabled. Type in a new increment value and click the red box again to turn off keyboard entry. The data recorder is temporarily disabled while keyboard entry is enabled. As before, click the gray button to turn On the data recorder. Button turns lime green. Click again to turn Off the recorder and close the output .csv file.

attachment.php


Output now looks like:

attachment.php


Finally, the output data file name is now in the form of IFR/VFR Ident1 to Ident2_Number Waypoints. The file name for the output file above is IFR EGLL to LOWS_15.csv

Hope you will find that working with the gps module and LOGGER is not that difficult after all.

Bob

Note that this XML is valid in either FS9 or FSX, but one must use the FS9 LOGGER module in FS9, and the FSX LOGGER module in FSX.

View attachment FLIGHT DATA RECORDER.xml
 

Attachments

  • FDR2.jpg
    FDR2.jpg
    11 KB · Views: 1,374
  • FDR3.jpg
    FDR3.jpg
    11.5 KB · Views: 1,253
  • FDR OUTPUT2.jpg
    FDR OUTPUT2.jpg
    162.6 KB · Views: 1,401
Last edited:
Messages
1,564
Country
thailand
Gerard,

Since you will record flights, another thing that can be done if the flight is recorded using LOGGER is a playback in Google Earth as a Tour or Track. Not many people will be interested in this, but its just another cool thing possible with Flight Simulator.

After recording FS variables Longitude, Latitude, Altitude, True Heading, Pitch degrees, Bank degrees and Absolute time, a Google Earth .kml can be generated and then the Flight Simulator flight played back in Google Earth.

If you have Google Earth installed, then unzip and double click the attached .kml files and you can see what a playback looks like. Attached are examples of Flight Simulator (FS9 or FSX) Matterhorn, Grand Tetons, and aerobatics flights that were recorded using LOGGER. Cheap entertainment on a rainy day.

Bob

View attachment LOGGER Google Earth files.zip
 
Last edited:
Messages
129
Country
us-indiana
To borgfan. Please pardon me as I can see this is an old thread, not sure when these enter the archive mode. I was just looking out to get the flightplan info. and I was able to extract it using:

Code:
<Macro Name="c">C:fs9gps</Macro>
<Macro Name="g">C:fs9gps</Macro>

// this extracts from the *.pln's title row
<Element><Visible>(A:GPS IS ACTIVE FLIGHT PLAN, bool) </Visible>
    <Position X="581" Y="30"/>
      <FormattedText X="110" Y="29" Length="80" Font="arial" FontSize="14" Fix="Yes"
Color="#ff9900" Bright="Yes" Adjust="Left">
          <String>%((C:fs9gps:FlightPlanTitle))%!s!</String>
      </FormattedText>
</Element>

In my case, it displayed: KABQ to KDEN

Does anyone know how to get the pan rotate info? I can see how to set it: xxxx (>K:AXIS_PAN_TILT) but how can I find its value in an XML? Using FS9's default axis assignment, if I assign, say the slider to the spoiler axis, I can see its value using: (A:SPOILERS HANDLE Position, percent over 100). But when I assign the slider to PAN VIEW TILT AXIS, I don't know how to get its value... Thanks.
 
Top