1
votes

Is there any repository of math functions focused on the GPS coordinates system? (latitude, longitude)

I am looking for:

  • Distance between two points
  • Distance from point to line
  • Obtain mirror point D: Given a line from A to B and the point C, obtain the point D, which has the distance to the line as C. (on the same plane):

mirror point

I will implement it in php, although that it's not relevant.

2

2 Answers

1
votes

These are basically normal functions...

Have a look at http://www.movable-type.co.uk/scripts/latlong.html .

This site was a big help for me understanding the mathematic background of the calculations.

1
votes

I've found that PROJ to be brilliant for this kind of work. It also allows you to convert between ellipsoid approximations (such as WGS84 commonly used by GPS) and a plethora of map projections. There's a simple C library for use in a program of your own.

It's under a very liberal license.