Recent

Author Topic: working with GPS coordinates  (Read 1478 times)

mika

  • Full Member
  • ***
  • Posts: 102
working with GPS coordinates
« 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.

wp

  • Hero Member
  • *****
  • Posts: 11831
Re: working with GPS coordinates
« Reply #1 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?

mika

  • Full Member
  • ***
  • Posts: 102
Re: working with GPS coordinates
« Reply #2 on: January 27, 2021, 10:45:27 pm »
What is the "angle" between two GPS points?
Azimuth (Degrees/Radians)
« Last Edit: January 27, 2021, 10:56:02 pm by mika »

MarkMLl

  • Hero Member
  • *****
  • Posts: 6647
Re: working with GPS coordinates
« Reply #3 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
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

wp

  • Hero Member
  • *****
  • Posts: 11831
Re: working with GPS coordinates
« Reply #4 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.

mika

  • Full Member
  • ***
  • Posts: 102
Re: working with GPS coordinates
« Reply #5 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.

sstvmaster

  • Sr. Member
  • ****
  • Posts: 299
Re: working with GPS coordinates
« Reply #6 on: January 28, 2021, 11:50:55 am »
Here i have written an example some time ago, see attachment.
greetings Maik

Windows 10,
- Lazarus 2.2.6 (stable) + fpc 3.2.2 (stable)
- Lazarus 2.2.7 (fixes) + fpc 3.3.1 (main/trunk)

mika

  • Full Member
  • ***
  • Posts: 102
Re: working with GPS coordinates
« Reply #7 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