Board index FlightGear Support Compiling

Logging Flight to print Longitude,Latitude,Heading,Altitude

Building FlightGear from source, and in the need for help?

Logging Flight to print Longitude,Latitude,Heading,Altitude

Postby D-ABBA » Mon Dec 24, 2018 3:43 pm

Dear users.

Please show me the way to create a small Logger, to get an outputfile (Readable as windows textfile) of an FGFS flight. For Example DR400.
I wrote the .xml and use --config=Logging Properties for FlightPlan DR400.xml at settings from FGFS 2018.3.1.

Code: Select all
<?xml version="1.0"?>

<PropertyList>
 <logging>
  <log>
   <filename>DR400-Log-Flightplan.csv</filename>
   <enabled>true</enabled>
   <interval-ms>1000</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><ref></ref>
    <title>Heading</title>
    <property>/orientation/heading-deg</property>
   </entry>
  </log>
 </logging>
</PropertyList>


FGFS 2018.3.1 give me a message (at --console) this .xml file is not supported. Whats wrong ??? :(

Thanks for your support
D-ABBA
D-ABBA
 
Posts: 125
Joined: Fri Jun 11, 2010 7:22 pm
Location: W.-Germany Bad Nauheim near Frankfurt Main
Callsign: D-ABBA
Version: 2018.3.1
OS: Windows 10 64bit

Re: Logging Flight to print Longitude,Latitude,Heading,Altit

Postby wkitty42 » Mon Dec 24, 2018 7:46 pm

i think you have to put the full path in the filename... it has to be somewhere where FG can write to... i know that it can write to the Export directory in the same directory where the fgfs.log and navdata cache files are written... on winwhatever, that's in the FG directory inside %appdata%... on linux and i think on mac, it'll be ~/.fgfs/Export...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5777
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Logging Flight to print Longitude,Latitude,Heading,Altit

Postby D-ABBA » Tue Dec 25, 2018 9:48 am

Hi wkitty42,

Thank you for your support.

Report find :
C:\Users\UserName\AppData\Roaming\flightgear.org\fgs.log

general:5:C:\Jenkins\workspace\Windows-release\flightgear\src\Main\logger.cxx:69:The FGLogger logging system,
via the '/logging/log/filename' property,
was asked to write to 'C::/users/thomas polzer/AppData/Roaming/flightgear.org/Export/LogText.txt',
however this path is not authorized for writing anymore for security reasons. Please choose another location,
for instance in the $FG_HOME/Export folder (C:/Users/Thomas Polzer/AppData/Roaming/flightgear.org/Export).


So I did the following:

C:/Users/UserName/AppData/Roaming/flightgear.org/Export/fg_log.cvs

I have entered this line in the debug logging window -> then there is an EXCEL file in the named directory !!!!
It then creates a Windows Excel file. A very helpfully tool for creating a traffic path. For example, a path for an aircraft towing AI. At last
I renamed fg_log.cvs in DR400_log.cvs

Thank you for your support. :D
Merry Christmas and Happy New Year
D-ABBA
D-ABBA
 
Posts: 125
Joined: Fri Jun 11, 2010 7:22 pm
Location: W.-Germany Bad Nauheim near Frankfurt Main
Callsign: D-ABBA
Version: 2018.3.1
OS: Windows 10 64bit

Re: Logging Flight to print Longitude,Latitude,Heading,Altit

Postby wkitty42 » Tue Dec 25, 2018 6:59 pm

excellent! i think i ran into the same thing with the file name but it was so long ago and i don't have that code mod any more... i did it to the c172p when the team was looking for another stall warning... i was able to record the data and graph it in libre office... worked well once i adjusted the timing down to maybe once every second but i wasn't able to come up with something for the stall warning like i was wanting to...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5777
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Logging Flight to print Longitude,Latitude,Heading,Altit

Postby Ramanathan » Wed Jan 09, 2019 10:29 pm

I'm having some issue on obtaining the glideslope data for my flights.
I have the data logging setup and after each flight, I was able to collect data related to pitch, heading, etc. But my glideslope value is not logged.

I have pasted my code below. Please verify


-<PropertyList>

-<logging>


-<log>

<enabled>true</enabled>

<interval-ms>100</interval-ms>

<delimeter>,</delimeter>


-<entry>

<enabled>true</enabled>

<title>Aileron</title>

<property>/controls/flight/aileron</property>

</entry>


-<entry>

<enabled>true</enabled>

<title>Elevator</title>

<property>/controls/flight/elevator</property>

</entry>


-<entry>

<enabled>true</enabled>

<title>Rudder</title>

<property>/controls/flight/rudder</property>

</entry>


-<entry>

<enabled>true</enabled>

<title>flaps</title>

<property>/controls/flight/flaps</property>

</entry>


-<entry>

<enabled>true</enabled>

<title>Airspeed</title>

<property>/velocities/airspeed-kt</property>

</entry>


-<entry>

<enabled>true</enabled>

<title>Glideslope</title>

<property>/velocities/glideslope</property>

</entry>


-<entry>

<enabled>true</enabled>

<title>Altitude-agl-FT</title>

<property>/position/altitude-agl-ft</property>

</entry>


-<entry>

<enabled>true</enabled>

<title>Altitude-MSL-ft</title>

<property>/position/altitude-ft</property>

</entry>


-<entry>

<enabled>true</enabled>

<title>VSI</title>

<property>/instrumentation/vertical-speed-indicator/indicated-speed-fpm</property>

</entry>


-<entry>

<enabled>true</enabled>

<title>Lat-Deg</title>

<property>/position/latitude-deg</property>

</entry>


-<entry>

<enabled>true</enabled>

<title>Long-Deg</title>

<property>/position/longitude-deg</property>

</entry>


-<entry>

<enabled>true</enabled>

<title>AoA-degrees</title>

<property>/orientation/alpha-deg</property>

</entry>


-<entry>

<enabled>true</enabled>

<title>Heading-deg</title>

<property>/orientation/heading-deg</property>

</entry>


-<entry>

<enabled>true</enabled>

<title>path-deg</title>

<property>/orientation/path-deg</property>

</entry>


-<entry>

<enabled>true</enabled>

<title>Pitch-deg</title>

<property>/orientation/pitch-deg</property>

</entry>


-<entry>

<enabled>true</enabled>

<title>Track-deg</title>

<property>/orientation/track-deg</property>

</entry>


-<entry>

<enabled>true</enabled>

<title>GSNeedleDeflection</title>

<property>/instrumentation/nav/gs-needle-deflection-deg</property>

</entry>


-<entry>

<enabled>true</enabled>

<title>GSNeedleDeflectionNorm</title>

<property>/instrumentation/nav/gs-needle-deflection-norm</property>

</entry>


-<entry>

<enabled>true</enabled>

<title>LocNeedleDeflection</title>

<property>/instrumentation/nav/heading-needle-deflection</property>

</entry>


-<entry>

<enabled>true</enabled>

<title>LocNeedleDeflectionNorm</title>

<property>/instrumentation/nav/heading-needle-deflection-norm</property>

</entry>


-<entry>

<enabled>true</enabled>

<title>Crosstrack-error</title>

<property>/instrumentation/nav/crosstrack-error-m</property>

</entry>


-<entry>

<enabled>true</enabled>

<title>Crosstrack-error-deg</title>

<property>/instrumentation/nav/crosstrack-heading-error-deg</property>

</entry>

</log>

</logging>

</PropertyList>
Ramanathan
 
Posts: 8
Joined: Mon Jun 04, 2018 9:32 pm

Re: Logging Flight to print Longitude,Latitude,Heading,Altit

Postby Hooray » Wed Jan 09, 2019 11:06 pm

Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11377
Joined: Tue Mar 25, 2008 8:40 am

Re: Logging Flight to print Longitude,Latitude,Heading,Altit

Postby Ramanathan » Thu Jan 10, 2019 6:35 pm

Thanks. I also wanted to collect data pertaining to my touchdown points and how far it is from the centerline. Could you tell me which property within the tree logs those data
Ramanathan
 
Posts: 8
Joined: Mon Jun 04, 2018 9:32 pm

Re: Logging Flight to print Longitude,Latitude,Heading,Altit

Postby Hooray » Thu Jan 10, 2019 7:38 pm

that is going to be aircraft specific anyway, so you will have to compute it yourself (dimensions of the aircraft, gear attachment points)

Equally, the center line will probably need to be computed.

For starters, you could treat the gear configuration as a geo-referenced triangle and use groundspeed/course to compute the vector.

The corresponding helpers can be found in geo,nas - obviously, you could write a simple Nasal script to handle these computations, and also to provide the results via the property tree.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11377
Joined: Tue Mar 25, 2008 8:40 am


Return to Compiling

Who is online

Users browsing this forum: No registered users and 1 guest