Lazarus
Programming => General => Topic started by: mika on January 27, 2021, 08:12:14 pm

Looking for package/unit written in pascal that work with GPS coordinates. I need function  distance and angle between two GPS coordinates.

GPS distance is implemented in unit mvEngine of the LazMapViewer package (install via OPM, or look directly at https://sourceforge.net/p/lazarusccr/svn/HEAD/tree/components/lazmapviewer/).
What is the "angle" between two GPS points?

What is the "angle" between two GPS points?
Azimuth (Degrees/Radians)

He means "are you talking about a course, a heading, a bearing, the great circle angle, the angle subtended from the POV of one (unspecified) satellite..."
MarkMLl

Of course. This is an intermediate result of the CalcGeoDistance function that I menationed, before the angle is multiplied by the earth radius.

This is an intermediate result of the CalcGeoDistance function that I menationed, before the angle is multiplied by the earth radius.
Sadly i could not extract "azimuth" from function CalcGeoDistance.
I found this and translated to pascal:
https://www.movabletype.co.uk/scripts/latlongvincenty.html
It would be nice if there would be fclgps or gps package in fpc.

Here i have written an example some time ago, see attachment.

Here i have written an example some time ago, see attachment.
Thank you. It's what I was looking for.