Board index FlightGear Support Interfacing

Output update rate with UDP

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

Output update rate with UDP

Postby JFM » Fri Mar 25, 2016 7:59 pm

Hello,

I have set up the output of some properties with an UDP socket. The problem is that the update rate is far from the one I have programmed, say 10 Hz, and closer to the (low) frame rate that my PC is able to achieve (4-5). Is the output rate limited by the frame rate, or may be the problem is something different?

Regards,


JFM
JFM
 
Posts: 7
Joined: Fri Mar 25, 2016 1:41 pm

Re: Output update rate with UDP

Postby AndersG » Fri Mar 25, 2016 8:18 pm

It is limited by the frame rate.
If real time progress is not required you can set --prop:double:/sim/max-simtime-per-frame=0.1 to make sure each frame never exceeds 0.1 seconds of simulated time.
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: 2527
Joined: Wed Nov 29, 2006 10:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Re: Output update rate with UDP

Postby Hooray » Sat Mar 26, 2016 5:20 pm

For some background info, refer to: http://wiki.flightgear.org/FlightGear_I ... orkarounds
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Output update rate with UDP

Postby JFM » Sun Mar 27, 2016 5:04 pm

>It is limited by the frame rate.
>If real time progress is not required you can set --prop:double:/sim/max-simtime-per-frame=0.1 to make sure each frame never exceeds 0.1 seconds of simulated time.

In that case the controller should run at the same rate (non-real time). This is another possibility. However, I have found that I was not using the Nvidia card in my laptop. When I managed to enable it for FG it could reach at least 20 FPS or more, so now there is not much of a problem to control at 10 Hz, in fact I did. I managed to stabilize the Cessna and follow a heading with a relatively simple controller. May be for faster planes or more aggressive maneuvers I would need a higher rate, but not for this. It would be nice to be able to get data at model update rate instead of frame rate, anyway.

By the way, enabling the Nvidia card is tricky in my laptop; I finally had to right-click on the executable and select it every time. I tried to use the Nvidia control panel without success...

Thanks,

JFM
JFM
 
Posts: 7
Joined: Fri Mar 25, 2016 1:41 pm

Re: Output update rate with UDP

Postby Hooray » Sun Mar 27, 2016 7:47 pm

it's probably optimus related, right ?
See the help/about dialog.
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU


Return to Interfacing

Who is online

Users browsing this forum: No registered users and 2 guests