GPS Distance Calculation Help

Hello , I intend to make a pair of (arduino nano + uBlox Gps + nrf24L01 ) The first system will be stationary , while the second will be moving around ie on a drone transmitting coordinates to the station.

I would like to know a way to calculate the distance between to points, comparing the two different coordinates.

Thank you !

I would like to know a way to calculate the distance between to points, comparing the two different coordinates.

Which library are you using to get the GPS data? TinyGPS contains a method to calculate the distance between two points.

Usually I do not use any libraries on gps, just parse the serial data from Gps, however since you mentioned it I just checked tinygps library and found two functions distance_to and distance_between

Will check later for functionality, Thank you !

If you would like to do it by old fashioned way, here is some math for help…

TommiP

Difference between two coordinate points, metric.PNG

My interest is trying to find the bearing from one latitude and longitude from another. The using the posted formula and though it worked for the values provided, it failed when I used: 17.064202,61.794895 ;16.45, 62.09 or any such low latitudes.

http://www.movable-type.co.uk/scripts/latlong.html