# Interpolate and remove GPS coordinates

Hi all,

I want to interpolate between two GPS points and also remove the outliers.

I did a test on a ship and put two GPS receivers horizontally. Afterwards I plotted the coordinates in a graph in Excel. The GPS receivers receive data asynchronously. If the interpolation is done correctly, the heading could be figured out by using the other sets of data the GPS receivers provided.

How can I interpolate GPS data real time?

Blue is the GPS data from one receiver and orange is the GPS data from the second receiver.

Is this the same request as;

If a collection of posit data could be kept on the MCU using Regression will remove the outliers. Perhaps a Polynomial Regression would work a bit better, being better able to adjust to sudden and deep angular changes.

cubiwan Regression library, using 64bit regression

I used a ESP32 to store 96 hours worth of air pressure readings to predict the AIr Pressure trends for the next 5 days. Worked really well. I've since changed overt to using a RPi.

Not exactly. The main point is not the heading here. It's about the interpolation between a line of GPS coordinates.

And ...... for what purpose ?

To accurately measure the distance between the GPS receivers. As it is now, the program calculates the GPS receivers diagonally, which make the distance bigger than it actually is.

A tape measure would be useful to accurately measure the distance between two GPS receivers. Interpolation of GPS coordinates would not be useful.

But if you insist, GPS coordinates are just numbers. For linear interpolation see
https://en.wikipedia.org/wiki/Linear_interpolation

I want to plot the route of the ship as neatly as possible. The distance is already known, but the system prints out something else, thanks for the link!

Thank you for the feedback, however I have to make it real time. How does regression work?

Well you could look at the link the several good regression libraries I posted in post number 4 to see how it works. You can look up the Python library scikit-learn to learn about LR. Many pieces of documentation about the Python scikit-learn library go into depth on how regression works.

Thanks a lot!

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.