Hi Roby,
Thanks for the question.
Regarding the present version of compensation for GPS latency I offer the following brief explanation:
The primary information used for instantaneous speed, position and attitude estimation are computations based gyro and accelerometer signals. In a secondary computation, GPS information is merged with those sources to prevent accumulation of error due to time integration of small biases. Without compensation for GPS latency, there would be biases in the final estimates of velocity and position. Because the accelerometers and gyros provide the main source of information, the demands on the GPS latency compensation are not too great.
The team tried to determine the dynamics of the GPS latency for the various models of GPS that were employed by our users. Along the way, we discovered sources of latency in the MatrixPilot code, and eliminated them. We also discovered that the major contribution to latency in several of the models, especially the EM406 and EM506, was a simple communications delay of one set of samples.
So, what is needed is an algorithm that compensates for a pure one sample latency. In general, that is not possible to do with sampled data for the general case. However, all we really need to do is to compensate for bias during either straight line flight or during a turn. In that case you can do a geometrical analysis in what I liked to call "polygonal analysis" to determine the corrections based on changes the angles and positions. I no longer have the sketches, but you can work it out from geometry. The result is a two step process.
The first step is the computation of certain differences:
Then, based on the geometry of the polygons formed by samples of the GPS data, adjustments are made to the raw data.
Best regards,
Bill