Real Time manual: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
This page is intended to help setup fg to use the real time lag compensation;  
This page is intended to help setup fg to use the real time lag compensation, WIP;  


== how it works ==
== how it works ==

Revision as of 23:00, 26 January 2020

This page is intended to help setup fg to use the real time lag compensation, WIP;

how it works

préviously, we tried to guess manually a lag value, and use that lag correction to display the planes in the futur.

Now, we will trust the pc clocks, and use the same time to display all the mp plane, if the times they show are close enough.

The advantage is that the pilots don't need to do anything in most the case.

there are now the lag value, and pps (packet per second) available for each mp pilots, and a dedicaced page is included in pilot list.

step by step

(will probably change :) ): first, set the master switch and apply to close mp to on, in the lag correction menu


Next is to open pilot list, and display the "lag" page (by clicking on the unit (IM => lag => SI)

- lag-pps is the number of packets received per second. if all pilots are sending at 10 (work quite well for the public mpservers) they should have 10 or quite close for this value, something equal or inferior to 1 pps show usually a different mpserver used, wich don't properly relai the traffic, letting only the "lazy relai" at 1 pps working. Change the mpserver you're on to have a solid 10, if that still don't works, there are sometimes pilots with bad internet connexion dropping too much FG traffic.

- lag-ms This is the time in ms between our FG clock, and the time present in the packet received from the mp pilots, negative is mp pilots are late. This is basically the travel time from the mp pilot's pc to our FG, a bit pessimistic because of delay waiting to be processed at the next iteration. From recent mp session, i get in the -50 ~ -70ms range for mp pilots lag, who have a clock synchronised to the internet time servers.

- If the values are nearly the same from each side, our clocks are in synchro, and all is left is to fly. Different fps lead to a bit better or worst lag display so 10 or so ms difference is not a big deal. - For high lag values, it can be a very bad internet pipe (eg australia <=> europe) specially if both side see something in the same range (and with the same "-" sign :) ) Or it can be simply a clock not synchronised over internet. You can add an offset to the mp clock, (the clock offset in the lag menu) beware this value is in seconds, and the lag in ms ! If a player using ntp have 15260 lag in pilot list, using 15.320 in the offset should give -60ms lag and if the value is in the same range on his side, you should be good.

The other solution is to use ntp, wich should do the job permanently, install ntp on linux, similar on mac ?? and there's a ntp program from Meinberg for windows users (need confirmation)

result and limitations

If i find a good cameraman, will do a better one than this hastily made (and speeded x1.5) video of a mp session, where the tanker move the drogue to the plane's refuel point: mp planes refueling

the flight is now very smooth, for the speed and altitudes used by the planes.

I tried it with the ufo at high speed and altitude, and that's not good enough, so this not to be used for a space rendez-vous :( the tip in this case is for the chasing space vehicule to tune the offset to avoid prediction, eg have a iss lag in the 150ms range (positive value).