You are here: Re: GeoClass Advice « All PHP « IT news, forums, messages
Re: GeoClass Advice

Posted by MS on 05/17/06 02:18

Thanks NC

Worked a treat.

--
----------------------------------------------------------------------------
http://www.myclubweb.co.uk - The Home of Club Websites
----------------------------------------------------------------------------


"NC" <nc@iname.com> wrote in message
news:1146756304.466009.320340@y43g2000cwc.googlegroups.com...
> MS wrote:
> >
> > I am looking for a geoclass, which initially will return a distance
> > between point A & B referenced by Lat & Lon
>
> You don't need a class for that. Here's the computation in its
> entirety:
>
> $distance = $r * acos(cos($lat1) * cos($lon1) * cos($lat2) * cos($lon2)
> +
> cos($lat1) * sin($lon1) * cos($lat2) * sin($lon2)
> +
> sin($lat1) * sin($lat2));
>
> where:
>
> $r -- radius of the Earth
> $lat1 -- latitude of point 1 in radians
> $lon1 -- longitude of point 1 in radians
> $lat2 -- latitude of point 2 in radians
> $lon2 -- longitude of point 2 in radians
>
> Cheers,
> NC
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация