Board index FlightGear Support Interfacing

Fastest rate at which we can log data from flight gear

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

Fastest rate at which we can log data from flight gear

Postby Shah » Tue Jun 18, 2019 5:16 am

HI,
I've been trying to log flight data using config file and generic protocol but apparently the fastest we can log data is every 16 ms i.e. 62 Hz.
I've been wondering as to why this bottle-neck and is there a way we can get higher rate ?
Thanks in advance.
Shah
 
Posts: 2
Joined: Fri Jun 14, 2019 1:58 pm

Re: Fastest rate at which we can log data from flight gear

Postby AndersG » Tue Jun 18, 2019 7:41 am

Since writing to the log occurs in the mostly single threaded main loop it will be constrained by your frame rate or, perhaps, by the 120 Hz (virtual) JSBSim FDM rate if it is a FDM controlled property and you use a JSBSim aircraft.
Callsign: SE-AG
Aircraft (uhm...): Submarine Scout, Zeppelin NT, ZF Navy free balloon, Nordstern, Hindenburg, Short Empire flying-boat, ZNP-K, North Sea class, MTB T21 class, U.S.S. Monitor, MFI-9B, Type UB I submarine, Gokstad ship, Renault FT.
AndersG
 
Posts: 2444
Joined: Wed Nov 29, 2006 9:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Re: Fastest rate at which we can log data from flight gear

Postby Shah » Thu Jun 27, 2019 4:29 am

So is there a way we can increase this rate by any chance?
Shah
 
Posts: 2
Joined: Fri Jun 14, 2019 1:58 pm

Re: Fastest rate at which we can log data from flight gear

Postby Thorsten » Thu Jun 27, 2019 7:09 am

You can conceptually log things at a faster rate than they're computed, but it's generally pointless because they change only at the rate they're computed, so you're not getting any new information out and you can easily insert any number of points into your log file by interpolating afer the fact.

JSBSim has an option to increase the computation rate (take a look into the manual, I forgot the syntax) so whatever is directly written by JSBSim is theoretically available at higher rate, whatever FG computes is only available at framerate, so to get a higher rate you need to minimize graphics and see how much computation speed goes up - though weird things are known to happen to Nasal-controlled systems beyond 60 fps...
Thorsten
 
Posts: 11086
Joined: Mon Nov 02, 2009 8:33 am

Re: Fastest rate at which we can log data from flight gear

Postby AndersG » Thu Jun 27, 2019 8:06 am

You could also, I suppose, decrease the virtual time rate compared to real time to get a more fine grained log using /sim/max-simtime-per-frame set to something low (1/60 second?). Then the in-sim time goes slower than real time as far as your box cannot meet the max-simtime-per-frame goal. There may well be (I don't know) various problems to take care of in whatever subsystems you use, though.

On my own box I have max-simtime-per-frame set to 0.1 seconds and for some aircraft the JSBSim rate set to 960 Hz to support interaction with JSBSim simulated water.
Callsign: SE-AG
Aircraft (uhm...): Submarine Scout, Zeppelin NT, ZF Navy free balloon, Nordstern, Hindenburg, Short Empire flying-boat, ZNP-K, North Sea class, MTB T21 class, U.S.S. Monitor, MFI-9B, Type UB I submarine, Gokstad ship, Renault FT.
AndersG
 
Posts: 2444
Joined: Wed Nov 29, 2006 9:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux


Return to Interfacing

Who is online

Users browsing this forum: No registered users and 1 guest