I am searching for the best possible filter to filter out noise from the GPS (u-blox NEO-6).
I came across the unscented Kalman Filter but it is impossible to find someone to help me implement it to my project. Do you have any suggestions or libraries in mind for an alternative?
It is very important to distinguish measurement noise from measurement errors. With GPS, the errors are the more significant problem, as they tend to be systematic.
@srnet I want to install a GPS on a mooring buoy (at sea) and code a geofence alarm. I need a filter for the GPS that will give me the best possible accuracy
A standard GPS in a location where there is good view of the horizon, such as at sea, ought to provide circa 2-3M position accuracy, one might think that is enough for the application.
Whilst its often talked about that some form of filtering or averaging will improve GPS accuracy, I dont recall seeing much in the way of published code.
Which in itself you might think odd, GPSs have been around for some 40 years, so if you could improve position accuracy with a bit of software, you might expect the allogarithms and code to have been published many years ago also.
Were you able to find any resources which demonstrated significant improvements in GPS accuracy using numerical filters etc ?
I'm not in the position to evaluate if the results are significant or not since I'm not a pro. But what I found working best is the use of a Unscented Kalman Filter and the fuse of an IMU unit. But I dont know/need help to implement it. I also tried to post in the collabs section (https://forum.arduino.cc/t/i-will-pay-for-tutoring-on-unscented-kalman-filter/)...
There are fifty to sixty people that regularly answer questions in the English speaking sections of the forum. Your question has been up for long enough that if any of them had a ready answer for you, you would have heard about it by now.
@srnet's point is well taken too. Two to three meters is plenty, particularly in tidal waters where the buoy will likely move around significantly more than that anyway. So even if your filter could get you say one meter accuracy (which I doubt), it would be irrelevant compared to tide and wind effects.
It might be an entertainment to code this up, but I don't believe it would ever be effective.
To rain on your parade a little more, I suspect that if it were possible to use something as comparatively simple as a Kalman filter, some clever programmer at Garmin or B&G would already have tried it.
So either they got it working and that's one of the reasons we get such good accuracy these days or they tried and it didn't work.
The OP's two threads on this topic are a perfect example of the XY problem. OP assumed procedure Y solves problem X, and without clearly describing problem X, asks for help in implementing procedure Y.
However, procedure Y cannot possibly solve problem X.
The "best filter for GPS" is already built into consumer grade GPS units -- how could it be otherwise? To do better, you have to buy professional grade units using advanced hardware and software.
For this exact application, I use in the past spot trace GPS device. This work by sending an alarm plus the position when the position is 100m out of the initial roughly determined position.
My experience with spot is not good as a consumer but it 80% work. From time to time, my mooring suddenly travel to the nearest town! When the GPS precision strongly decrease (weather and waves).
What you need to keep in mind is the coordinates. You want to know if your system move but when it do move for real, what you really want is to know we're it is now to track it and bring it back home. The geofence then become less important than making sure you receive coordinates when needed. With cellular modem (often on those scientific buoys), you also have access to a GPS.