How to combine a virtual gps in Node-RED with a real one

Interesting, our approach is more technical. After cleaning up the NMEA data we first use non-positional data to filter out outliers, this works well under bridges for instance. Then we keep track of speed and use motor power to filter out impossible speed jumps based on maximum acceleration / deceleration foremost. Skipped datapoints are replaced by estimations/extrapolations to keep up with the roughly 1Hz update interval. This then gets fed through a rather fast weighted averaging filter of 5 datapoints with relative weights, currently: 1, 0.25, 0.0625, 0.015625 , 0.00391 (if I recall correctly). Finally only speed get then up sampled to 5Hz with linear interpolation to smooth out the boat page dial movements.

Compared to the raw datastream the results are impressive, without the delay issues of our previous approach with Karman filters. Responsiveness is great, very little delay. Stability is great as well, no noticeable ‘jitter’ and accuracy is good enough, only under bridges the speed may notably deviate from expected. The cherry on top is the up sampling of the speed data for the boat page display.