Board index FlightGear Support Interfacing

Flight Management System and extracting its data  Topic is solved

Connecting two computers, using generic protocol, connecting with Matlab?

Flight Management System and extracting its data

Postby muraliever4u » Mon Sep 28, 2015 1:19 pm

Hello FG team,

I'm pretty new to FlightGear and have installed FlightGear in my desktop last week. For my educational purpose i'm trying to come up with an an android application that would interact with a flightgear running in server side. The communication between android app and the server would be through HTTP. In server side i would like to log the flightgear data into a csv file which can be read by the server side scripts and can be sent to the android application.

so here are my questions,
1) I read about Logging_properties in FG and i would like to use it to log data like altitude, speed, lat/long, flap/slat positions, landing gear positions etc. Am i heading in right direction?
2) Is flightgear having any inbuilt flight management system which can give me takeoff speeds, landing speeds and other FMS page data? I would like to log some of the FMS data like the above said speeds and leg information too in the csv. How could i do it?

Thanks in advance.
muraliever4u
 
Posts: 3
Joined: Mon Sep 28, 2015 12:30 pm

Re: Flight Management System and extracting its data  

Postby clrCoda » Tue Sep 29, 2015 9:30 pm

Hi, Muraliever4u,

I don't log all of the things you have mentioned, but I log some things every flight and I believe this and a look thru the property browser will give you most everything you need to construct your own log.

Here's the first 10 minutes of my most recent log. The xml that creates this log destroys the old log and creates a new one every simulator run.

Code: Select all
Time,Longitude,Latitude,Altitude,Heading,IAS,Fuel
60.0583,-112.0138196,33.43337612,1117.446022,0.60029366,0,23104.96157
120.067,-112.0138196,33.43337612,1117.446028,0.6002948539,0,23104.96157
180.033,-112.0138196,33.43337612,1117.446028,0.6002949035,0,23104.96157
240.075,-112.0138196,33.43337612,1117.446028,0.6002949035,0,23104.96157
300.033,-112.0138196,33.43337612,1117.446028,0.6002949034,0,23104.96157
360.058,-112.0138196,33.43337612,1117.446028,0.6002949034,0,23104.96157
420.025,-112.0138196,33.43337612,1117.446028,0.6002949035,0,23104.96157
480.517,-112.0138196,33.43337612,1117.446193,0.6003427559,0,16885.57154
540.033,-112.0138196,33.43337612,1117.444384,0.600348812,0,16839.87399


Here's the xml that creates that log.

Code: Select all
<?xml version="1.0"?>
<!--
Save this as log-restart.xml in your flightgear folder.
This will create and recreate log-restart.csv every sim start.
You can read log-restart.csv in a text application.
You have to point the simulator to this log-restart.xml to create
log-restart.csv. ( C comma, S sperated, V values)
 
At the top of log-restart.csv you can see what is in the file and in
what order, but it's TIME, LON, LAT, ALT, HEAD, SPEED, and FUEL
 
To get the sim to read this file before the QT5 launcher you have to tell FGrun where it is.
You could go to the run pane and click on ADVANCED and GENERAL
and near the bottom of the pane there is a "CONFIG" box, and next
to the text entery there is a box with 3 dots (...) on it and you
can use that to select log-restart.xml. log-retstart.csv will be
in the same folder as where you put log-restart.xml so you should
find it in your flightgear folder.

 In the Qt5 launcher add the switch to the Additional Options text box in the Settings window.
--config=path/to/file/file.xml
here's
log-restart.xml
-->
 
<PropertyList>
 <logging>
  <log>
   <enabled>true</enabled>
   <filename>C:\Users\joe\Documents\FlightGear\log-restart.csv</filename>
   <interval-ms>60000</interval-ms>
   <delimiter>,</delimiter>
   <entry>
    <enabled>true</enabled>
    <title>Longitude</title>
    <property>/position/longitude-deg</property>
   </entry>
   <entry>
    <enabled>true</enabled>
    <title>Latitude</title>
    <property>/position/latitude-deg</property>
   </entry>
   <entry>
    <enabled>true</enabled>
    <title>Altitude</title>
    <property>/position/altitude-ft</property>
   </entry>
   <entry>
    <enabled>true</enabled>
    <title>Heading</title>
    <property>/orientation/heading-deg</property>
   </entry>
   <entry>
    <enabled>true</enabled>
    <title>IAS</title>
    <property>/velocities/airspeed-kt</property>
   </entry>
   <entry>
    <enabled>true</enabled>
    <title>Fuel</title>
    <property>/consumables/fuel/total-fuel-lbs</property>
   </entry>
  </log>
 </logging>
</PropertyList>


You can read data/Docs/README.logging to decode the above, and you can use the simulators property browser, or the PHI interface property browser, in both cases with the simulator running to collect the names/labels of the properties you wish to track.

Changing the interval, obviously, changes the granularity. The rest should be pretty self explanatory.
Hope this is at least interesting if not helpful,
Ray :)
Ray St. Marie
clrCoda
 
Posts: 1225
Joined: Wed Apr 07, 2010 12:04 pm

Re: Flight Management System and extracting its data

Postby muraliever4u » Tue Oct 06, 2015 5:34 pm

Hi clrCoda,

Thanks for taking time in educating me, i'm able to log the values now
muraliever4u
 
Posts: 3
Joined: Mon Sep 28, 2015 12:30 pm

Re: Flight Management System and extracting its data

Postby AeroFlyWing » Wed Oct 14, 2015 6:10 am

I'm new here.Thanks a lot for help me so much!
AeroFlyWing
 
Posts: 11
Joined: Tue Oct 13, 2015 3:28 pm
Callsign: Tan651
Version: 3.4.0
OS: Windows


Return to Interfacing

Who is online

Users browsing this forum: No registered users and 2 guests