linux-hams.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Distance measuring
@ 2004-01-06  1:52 Phil
  2004-01-07  0:40 ` Jeroen Vreeken
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Phil @ 2004-01-06  1:52 UTC (permalink / raw)
  To: linux-hams

Hello Everyone,

I'm looking for a Linux application, or maybe the code that does the 
calculation, that will measure the distance between two points given the 
latitude and longitude. I've seen applications that measure the distance 
between grid squares but that's not what I need.

Can anyone help?

-- 
Regards,
Phil.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Distance measuring
  2004-01-06  1:52 Distance measuring Phil
@ 2004-01-07  0:40 ` Jeroen Vreeken
  2004-01-07  1:03 ` Dennis Boone
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Jeroen Vreeken @ 2004-01-07  0:40 UTC (permalink / raw)
  To: Phil; +Cc: linux-hams

On 2004.01.06 02:52:01 +0100 Phil wrote:
> Hello Everyone,
> 
> I'm looking for a Linux application, or maybe the code that does the 
> calculation, that will measure the distance between two points given the 
> latitude and longitude. I've seen applications that measure the distance 
> between grid squares but that's not what I need.
> 
> Can anyone help?
> 
> -- 
> Regards,
> Phil.
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-hams" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

Substract the two latitudes and the two longitudes and use pythagoras for
calculating the difference in degrees (hypot() in libm)
Then you have the distance in degrees...
If you use relativly localized positions you can asume the latitude and
longitude to form a perfect square grid and simply multiply with a constant
to get other measures of distance.
If you want it done proberly you have to use the right geode and assorted
stuff.
Most aprs programs like xastir will also do distance calculation, maybe you
can look at their code for some more scientific way :)

Jeroen


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Distance measuring
  2004-01-06  1:52 Distance measuring Phil
  2004-01-07  0:40 ` Jeroen Vreeken
@ 2004-01-07  1:03 ` Dennis Boone
  2004-01-07  1:59 ` Nate Bargmann
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Dennis Boone @ 2004-01-07  1:03 UTC (permalink / raw)
  To: linux-hams

 > I'm looking for a Linux application, or maybe the code that does the
 > calculation, that will measure the distance between two points given
 > the latitude and longitude. I've seen applications that measure the
 > distance between grid squares but that's not what I need.

Look at the proj.4 package.  The geod and/or invgeod commands can do
these calculations.

http://remotesensing.org/proj/

Dennis Boone
KB8ZQZ

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Distance measuring
  2004-01-06  1:52 Distance measuring Phil
  2004-01-07  0:40 ` Jeroen Vreeken
  2004-01-07  1:03 ` Dennis Boone
@ 2004-01-07  1:59 ` Nate Bargmann
  2004-01-07  7:36 ` Milan Kalina
  2004-01-07  9:14 ` Joop Stakenborg
  4 siblings, 0 replies; 6+ messages in thread
From: Nate Bargmann @ 2004-01-07  1:59 UTC (permalink / raw)
  To: linux-hams

* Phil <phil@spiderweb.com.au> [2004 Jan 06 18:19 -0600]:
> Hello Everyone,
> 
> I'm looking for a Linux application, or maybe the code that does the 
> calculation, that will measure the distance between two points given the 
> latitude and longitude. I've seen applications that measure the distance 
> between grid squares but that's not what I need.
> 
> Can anyone help?

Hi Phil.

You might also want to check out Hamlib at http://sf.net/projects/hamlib

Last summer a substantial amoutn of re-work went to locator.c in the src
directory which implements just the functions you're looking for.
Hamlib is written in C and it's a reasonably simple matter to install
the library and use those functions in your program.  I won't guarantee
the code to return extremely accurate results, but they seem reasonable.

Right now the only way to get the latest changes is through CVS although
a stable release is expected in the next few weeks.

HTH,

73, de Nate >>

-- 
 Wireless | Amateur Radio Station N0NB          |  Successfully Microsoft
 Internet | n0nb@networksplus.net               | free since January 1998.
 Location | Bremen, Kansas USA EM19ov           |  "Debian, the choice of
  Amateur radio exams; ham radio; Linux info @  |     a GNU generation!"
             http://www.qsl.net/n0nb/           |   http://www.debian.org

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Distance measuring
  2004-01-06  1:52 Distance measuring Phil
                   ` (2 preceding siblings ...)
  2004-01-07  1:59 ` Nate Bargmann
@ 2004-01-07  7:36 ` Milan Kalina
  2004-01-07  9:14 ` Joop Stakenborg
  4 siblings, 0 replies; 6+ messages in thread
From: Milan Kalina @ 2004-01-07  7:36 UTC (permalink / raw)
  To: linux-hams

Hi Phil,

if Perl would come into account, look at www.cpan.org and look at 
Math::Trig module, both distance and heading functions are in.

73,
Milan OK1XH

Phil wrote:

>Hello Everyone,
>
>I'm looking for a Linux application, or maybe the code that does the 
>calculation, that will measure the distance between two points given the 
>latitude and longitude. I've seen applications that measure the distance 
>between grid squares but that's not what I need.
>
>Can anyone help?
>
>  
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Distance measuring
  2004-01-06  1:52 Distance measuring Phil
                   ` (3 preceding siblings ...)
  2004-01-07  7:36 ` Milan Kalina
@ 2004-01-07  9:14 ` Joop Stakenborg
  4 siblings, 0 replies; 6+ messages in thread
From: Joop Stakenborg @ 2004-01-07  9:14 UTC (permalink / raw)
  To: Phil; +Cc: linux-hams

Phil wrote:
> Hello Everyone,
> 
> I'm looking for a Linux application, or maybe the code that does the 
> calculation, that will measure the distance between two points given the 
> latitude and longitude. I've seen applications that measure the distance 
> between grid squares but that's not what I need.
> 
> Can anyone help?
> 

ftp://ftp.ucsd.edu/hamradio/packet/misc/gc107.tar.gz

Regards,
Joop

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-01-07  9:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-06  1:52 Distance measuring Phil
2004-01-07  0:40 ` Jeroen Vreeken
2004-01-07  1:03 ` Dennis Boone
2004-01-07  1:59 ` Nate Bargmann
2004-01-07  7:36 ` Milan Kalina
2004-01-07  9:14 ` Joop Stakenborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).