I have a set of ship trajectory points that were irregularly sampled and I would like to resample them to a fixed frequency (e.g. every minute).

Rather than just linearly interpolating between latitude and longitude, I would like to do this in a way that smooths according to course (COG) and speed (SOG).

Here is an example of the data:

Time              Lat    Lon    COG  SOG                                                         
2019-05-08 00:16  36.25  14.82  211  8.0
2019-05-08 00:28  36.23  14.80  221  7.7
2019-05-08 00:41  36.21  14.77  222  8.3

And here is a toy diagram explaining what I am trying to do. Instead of the first, I would like the second: enter image description here

Is there a simple way to achieve this using Python libraries? I am hoping there is a built-in method out there that can do this in a few lines :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.