Pong

## May 26th 2015, Application Of Least Squares To GPS

To smooth a GPS track with the described weighted least square approach, we would like to substitute the last point $p_n$ with a better estimate of the trajectory.

We assume that while the GPS receiver moves a short distance, it maintains constant acceleration. This holds for the last couple of track recordings, so we keep track of the last $n$ recordings with $n$ in the range from 10–20.

Then the weights $w_i$ of the points $p_i$ with accuracy $a_i$ and velocity $v_i$ are given by

$w_i = \frac{ 1 }{ {a_i}^2 } \left( \frac{ i }{ n } \right)^\frac{ v_i }{ v_{ref} }$

Recorded track points with a lower precision, that is a higher accuracy radius, receive a lower weight. In the literature it is advised to make the weights proportional to the inverse of the squared standard deviation.

The exponential term of the weights controls the aggressiveness of the smoothing. If the velocity $v_i$ is low compared to a reference velocity $v_{ref}$ then the smoothing is more aggressive to smooth out the jitter. For higher velocities, the jitter is less visible, so we can tune down the aggressiveness by using a higher exponent. A higher exponent leads to lower weights for past time points, so the least squares fit will consider less points in the past.

Now we can perform a weighted least squares fit of a parametric curve $\vec{c}(t)$ to the points $p_i$ at time $t_i$ with the above weights $w_i$.

Finally, the smoothed position of the latest recorded GPS point $p_n$ is $\vec{c}(t_n)$.