Board index FlightGear Support

Problems with Logging Flight Data

All general support: help on flying, installation, hardware, getting online etc. There are lots of users and developers to help you out.
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- what graphics card do you have?
- does the problem occur with any aircraft, at any airport?
- where did you download your aircraft/scenery from?
- is there any output printed to the console (black window)?
- copy&paste your commandline (tick the "Show commandline box on the last page of FGRun or the "Others" section on the Mac launcher).

If you experience FlightGear crashes, please report a bug using the issue tracker (can be also used for feature requests).
To run FlightGear on old computers with bad OpenGL support, please take a look at this wiki article.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

Problems with Logging Flight Data

Postby arizzuti » Mon Mar 04, 2019 11:38 pm

I'm new to FlightGear, so I hope y'all will bear with me.

Using:
- Linux/Ubuntu
- FG 2018.3.1
- Nvidia GeForce GTX 1070 (with 3 displays)

I'm having trouble getting FlightGear to output flight data files using the logging functions. I've tried using built-in logging (Debug->Logging->Enable Logging) as well as creating my own .xml file and --config=<file.xml> (if requested, I'll post a copy of my .xml file), but the program refuses to work with either method. When I use the built-in function, the program freezes and I have to force-close it. When I use my .xml file, the program crashes during simulation loading. In either case, I'm not able to perform any flight, so no data file is produced. I believe FGTape is working ok, because that creates a file, but I didn't bother to open it to see if the flight actually recorded correctly; I need a .csv file to manipulate with MATLAB, so I'm not really interested in the FGTape files.

Initially I thought there could be an issue with the permissions on the destination folder, so I gave full access to all users, but still nothing. The program also does not write a file to the default EXPORT folder.

Any suggestions?
arizzuti
 
Posts: 6
Joined: Mon Mar 04, 2019 9:16 pm

Re: Problems with Logging Flight Data

Postby Necolatis » Mon Mar 04, 2019 11:46 pm

try post your xml
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1941
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Problems with Logging Flight Data

Postby arizzuti » Tue Mar 05, 2019 2:33 pm

I'd like to use the longer code (posted below) to record many properties, but to test the logging function, I'm using this shortened code:
Code: Select all
<PropertyList>
  <logging>
    <log>
      <path>/home/aircraft/rizzutia</path>
      <filename>flight-data-log.csv</filename>
      <enabled>true</enabled>
      <interval-ms>10</interval-ms>
      <delimiter>,</delimiter>
      <entry>
        <enabled>true</enabled><ref></ref>
        <title>Elev_Def</title>
        <property>/controls/elevator</property>
      </entry>
    </log>
  </logging>
</PropertyList>


Again, the program freezes when I use the built-in logging function, selecting one or many of the preselected options, so I don't think it's a problem specific to my code (though I'm sure my code could be improved).

Longer code:
Code: Select all
<PropertyList>
  <logging>
    <log>
      <path>/home/aircraft/rizzutia</path>
      <filename>flight-data-log.csv</filename>
      <enabled>true</enabled>
      <interval-ms>10</interval-ms>
      <delimiter>,</delimiter>
      <entry>
        <enabled>true</enabled><ref></ref>
        <title>Elev_Def</title>
        <property>/controls/elevator</property>
      </entry>
      <entry>
        <enabled>true</enabled><ref></ref>
        <title>Ail_Def</title>
        <property>/controls/aileron</property>
      </entry>
      <entry>
        <enabled>true</enabled><ref></ref>
        <title>Rud_Def</title>
        <property>/controls/rudder</property>
      </entry>
      <entry>
        <enabled>true</enabled><ref></ref>
        <title>Altitude_ft</title>
        <property>/position/altitude-agl-ft (22.46983965)
      </entry>
      <entry>
        <enabled>true</enabled><ref></ref>
        <title>Airspeed_kts</title>
        <property>/velocities/airspeed-kt
      </entry>
      <entry>
        <enabled>true</enabled><ref></ref>
        <title>U_fps</title>
        <property>/velocities/uBody-fps
      </entry>
      <entry>
        <enabled>true</enabled><ref></ref>
        <title>V_fps</title>
        <property>/velocities/vBody-fps
      </entry>
      <entry>
        <enabled>true</enabled><ref></ref>
        <title>W_fps</title>
        <property>/velocities/wBody-fps
      </entry>
      <entry>
        <enabled>true</enabled><ref></ref>
        <title>Vert_Speed_fps</title>
        <property>/velocities/vertical-speed-fps
      </entry>
      <entry>
        <enabled>true</enabled><ref></ref>
        <title>Phi_deg</title>
        <property>/orientation/roll-deg
      </entry>
      <entry>
        <enabled>true</enabled><ref></ref>
        <title>Theta_deg</title>
        <property>/orientation/pitch-deg
      </entry>
      <entry>
        <enabled>true</enabled><ref></ref>
        <title>Hdg_deg</title>
        <property>/orientation/heading-deg
      </entry>
      <entry>
        <enabled>true</enabled><ref></ref>
        <title>P_dps</title>
        <property>/orientation/roll-rate-degps
      </entry>
      <entry>
        <enabled>true</enabled><ref></ref>
        <title>Q_dps</title>
        <property>/orientation/pitch-rate-degps
      </entry>
      <entry>
        <enabled>true</enabled><ref></ref>
        <title>R_dps</title>
        <property>/orientation/yaw-rate-degps
      </entry>
      <entry>
        <enabled>true</enabled><ref></ref>
        <title>Alpha_deg</title>
        <property>/orientation/alpha-deg
      </entry>
      <entry>
        <enabled>true</enabled><ref></ref>
        <title>Beta_deg</title>
        <property>/orientation/side-slip-deg
      </entry>
    </log>
  </logging>
</PropertyList>
arizzuti
 
Posts: 6
Joined: Mon Mar 04, 2019 9:16 pm

Re: Problems with Logging Flight Data

Postby Necolatis » Tue Mar 05, 2019 4:43 pm

Okay, 2 things:

You should not specify <path> at all, not even sure that does anything.
So try put full filename in <filename>.

Secondly, your path is read-only. Very few paths is allowed to write to, so use the export folder. Its not about your filesystem permissions, it about FG internal permission system.
Otherwise you have to tell FG that its allowed to write to that folder.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1941
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Problems with Logging Flight Data

Postby arizzuti » Tue Mar 05, 2019 5:56 pm

Again, it's not just with my .xml file. The program won't write any data to a file using it's own logging function. My understanding is that it should log the data to the default EXPORT folder within the FlightGear directories, thus no changes in permissions required. But it won't do that; it simply freezes the program and I have to force-close it. Once I get any logging working, I'll customize the file and save location as indicated above. But I need to get it recording data first, and not freezing/crashing.
arizzuti
 
Posts: 6
Joined: Mon Mar 04, 2019 9:16 pm

Re: Problems with Logging Flight Data

Postby Necolatis » Tue Mar 05, 2019 9:30 pm

Well as I said, your use of <path> is wrong, and your <filename> is incomplete (needs full absolute path).

And your understanding is wrong, it needs the absolute path, it does not write to anywhere default as I got it.

I was logging as late as 2 days ago, I know how to get it to work, so please try my suggestions.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1941
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Problems with Logging Flight Data

Postby arizzuti » Wed Mar 06, 2019 1:05 am

Your suggestions don't seem to understand my main problem. Forget about my .xml code; that's not the biggest concern (fyi, same problem with and without a path specified both by itself and in the filename). The main issue is that logging in general does not seem to work, as evidenced by the fact that the program entirely freezes using the built-in logging function, without using any additional .xml code or modifications. I.e., when using the Debug->Logging function (with everything as predefined from a clean install), the program freezes and won't unfreeze without force-closing it.
arizzuti
 
Posts: 6
Joined: Mon Mar 04, 2019 9:16 pm

Re: Problems with Logging Flight Data

Postby Necolatis » Wed Mar 06, 2019 2:29 am

ok, the debug->logging function also dont work if you use a path that does not explicit mention the export folder. Its the same underlying system.
On windows a non export folder makes the program crash for me, just tried it, on Ubuntu it might freeze, dont know.

Did you check that all your properties you try to log exist? 3 of what you have in your xml does not exist per default (but might exist in your aircraft, dont know):

/controls/elevator
/controls/aileron
/controls/rudder

Also, very important if you use that dialog, its often not enough just to enter the info into the fields, you have to click 'enter' key while the red cursor is in the field to be sure it registers it.

Image
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1941
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Problems with Logging Flight Data

Postby arizzuti » Wed Mar 06, 2019 6:45 pm

That did not solve the problem either. But instead of freezing with this method, now the program crashes when I click the 'OK' button. Tried removing and reinstalling FlightGear, and it still crashes.
arizzuti
 
Posts: 6
Joined: Mon Mar 04, 2019 9:16 pm

Re: Problems with Logging Flight Data

Postby arizzuti » Wed Mar 06, 2019 7:52 pm

I finally got a data file, but not using any of the logging functions. To get my data, I added an output section (see below) to the aircraft .xml file. Even though it seems I can finally get the data I need, I'd still like to know why the program crashes when I try to use logging.

Code: Select all
    <output name="/home/aircraft/Desktop/rizzutia/172P_data.csv" type="CSV" rate="100">
      <rates> ON </rates>
      <velocities> ON </velocities>
      <forces> ON </forces>
      <moments> ON </moments>
      <position> ON </position>
      <fcs> ON </fcs>
      <propulsion> ON </propulsion>
      <aerosurfaces> ON </aerosurfaces>
      <ground_reactions> OFF </ground_reactions>
    </output>
arizzuti
 
Posts: 6
Joined: Mon Mar 04, 2019 9:16 pm

Re: Problems with Logging Flight Data

Postby Necolatis » Wed Mar 06, 2019 8:02 pm

Ah, yes JSB aircraft has that option. :)

Note that when you add properties to OUTPUT without a leading '/' it means it logs properties from inside /fdm/jsbsim/
I think you can make it log normal properties by leading them with a '/'.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1941
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10


Return to Support

Who is online

Users browsing this forum: No registered users and 7 guests