[aprssig] Proximity detection

Scott Miller scott at opentrac.org
Wed Aug 22 12:16:33 EDT 2007


My original implementation on the Tracker2 used the haversine formula to 
get proper great circle distances, but it turned out to be too much 
code.  I switched to a formula like yours, but with a lookup table for 
the latitude correction.  Works well enough for what it needs.

Scott
N1VG

Wes Johnston, AI4PX wrote:
> Or you could use cosine corrected Pythagorean theorem....
>  
> dist=sqrt( (COS(average latitude) x [delta longitude] ^2 ) + [delta 
> latitude]^2). 
>  
> of course the answer you get is in degrees and you have to convert that 
> to miles or km.  1 degree = 60 miles, 1 degree = 111km
>  
> I've checked it with a spread sheet years ago, and it works to within .1 
> of a mile out to 100 miles at 33° latitude.  It does NOT work for great 
> circle distances... it will choke on antipodal points for example.  But 
> it's good for your general vicinity.
>  
> Wes
> 
>  
> On 8/22/07, *Andrew Rich* <vk4tec at people.net.au 
> <mailto:vk4tec at people.net.au>> wrote:
> 
>     Gudday
>      
>     If you get a micro, and you know from a GPS where you are, and then
>     you pick up another position, one would assume you can then apply a
>     basic "is there anyone in my box" calculation ?
>      
>     For example
>      
>     I am at
>      
>     2734.44 15206.20 and another object is at
>     2734.45 15206.20 - does not match - outside the box
>      
>     2734.44 15206.20 and another object is at
>     2734.44 15206.20 - match - inside the box
>      
>     I spose the size of the area depends on how many significant digits
>     of the position you use ?
>      
>     You could make it tighter by comparing more digits, and wider if you
>     compare less ?
>      
>     Comments ?
>      
>     ----------------------------------------------------------------------------
>     Andrew Rich VK4TEC
>     vk4tec at people.net.au <mailto:vk4tec at people.net.au>
>     http://www.tech-software.net <http://www.tech-software.net/>
>      
>      
>      
> 
>     _______________________________________________
>     aprssig mailing list
>     aprssig at lists.tapr.org <mailto:aprssig at lists.tapr.org>
>     https://lists.tapr.org/cgi-bin/mailman/listinfo/aprssig
> 
> 
> 
> 
> -- 
> In theory there is no difference between practice and theory.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> aprssig mailing list
> aprssig at lists.tapr.org
> https://lists.tapr.org/cgi-bin/mailman/listinfo/aprssig





More information about the aprssig mailing list