Real Time manual

From FlightGear wiki
Revision as of 00:19, 31 January 2020 by Jano (talk | contribs)
Jump to navigation Jump to search

Following the work in the Mp-patch, this page is intended to help setup fg to use the real time lag compensation.

mp session où le ch53e se ravitaille dérrière le 707-TT, qui a des tuyaux qui se déplacent au point de contact.
the ch53e, the tanker and the ufo taking the screen are all mp pilots.

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.


As a way to investigate network issues, there are now the lag, and pps (packet per second) values available for each mp pilots, and a dedicated page is included in pilot list, just click on the unit to get it.

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 synchronized to the internet time servers (probably european pilots, like me).

- 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).

the very obvious advantage is that if you're using ntp, nothing is needed to have a perfect sync, and the offset allow you to tune easily your clock. Note that this works well for Clocks having the same speed, we had a case with a pilot who was playing with the ntp settings a drifting lag over time, but this was the only case (Older FG version before the change in the mp clock behave like that too).