Martin Spott writes: > > Lawrence Manning <[EMAIL PROTECTED]> wrote: > > > Have no idea at all where those aircraft come from! But I believe I can > > answer the last point. The jumping around is because of the way the > > multiplayer feature works; it simply transmits coordinates at regular > > intervals So the other guys position updates N times a second (I've tried > > 10 over a VPN to my mates LAN). Thus the other plane appears to jump > > rapidly from point to point in the sky. Of course, it would be cool if it > > transmitted velocities as well, thus the other machine could "guess" at > > where it is going between updates. > > You're describing how the IEEE1278 (DIS) protocol works :-)
If you have a time series of positions, you have a time series of velocities ie the velocity is just the first difference ( Pi - P(i-1)) / dT; And acceleration is just the 2nd differeance so all you need is to keep track of the difference vectors for the Positions dX, dY, dZ and the Rotations HPR, and the Positional, and Rotational accelerations < probably easiest to keep these in Vector form but in essence > dX = (ThisX-LastX)/dT # Velocity in X ddX = dX - last_dX # Acceleration in X etc... http://www.shodor.org/cserd/Resources/Algorithms/NumericalDifferentiation/index.php Even better is to feed the positions into a Kalman Filter http://seneca.me.umn.edu/pipermail/flightgear-devel/2003-June/018511.html Keep in mind that these techniques work best with 'continious' functions but this should still give *much* better AI for the *vast* majority of the time as 'normal' Flight is reasonably 'smooth' Cheers Norman _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel