Lazarus

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

Title: working with GPS coordinates
Post 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.
Title: Re: working with GPS coordinates
Post by: wp on January 27, 2021, 09:59:08 pm
GPS distance is implemented in unit mvEngine of the LazMapViewer package (install via OPM, or look directly at https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/lazmapviewer/).

What is the "angle" between two GPS points?
Title: Re: working with GPS coordinates
Post by: mika on January 27, 2021, 10:45:27 pm
What is the "angle" between two GPS points?
Azimuth (Degrees/Radians)
Title: Re: working with GPS coordinates
Post by: MarkMLl on January 27, 2021, 10:56:55 pm
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
Title: Re: working with GPS coordinates
Post by: wp on January 27, 2021, 11:27:27 pm
Of course. This is an intermediate result of the CalcGeoDistance function that I menationed, before the angle is multiplied by the earth radius.
Title: Re: working with GPS coordinates
Post by: mika on January 28, 2021, 11:02:09 am
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.movable-type.co.uk/scripts/latlong-vincenty.html
It would be nice if there would be fcl-gps or gps package in fpc.
Title: Re: working with GPS coordinates
Post by: sstvmaster on January 28, 2021, 11:50:55 am
Here i have written an example some time ago, see attachment.
Title: Re: working with GPS coordinates
Post by: mika on January 28, 2021, 02:15:35 pm
Here i have written an example some time ago, see attachment.
Thank you. It's what I was looking for.
TinyPortal © 2005-2018