AISdb includes a function called aisdb.gis.delta_meters that calculates the Haversine distance in meters between consecutive positions within a vessel track. This function is essential for analyzing vessel movement patterns and ensuring accurate distance calculations on the Earth's curved surface. It is also integrated into the denoising encoder, which compares distances against a threshold to aid in the data-cleaning process.
Here is an example of calculating the Haversine distance between each pair of consecutive points on a track: