On Fri, Nov 11, 2005 at 21:26:47 +0000,
Tom <[EMAIL PROTECTED]> wrote:
>
> --Calculate distance
> select acos
> (
> sin($1*pi()/180)*sin($3*pi()/180)
> +
> cos($1*pi()/180)*cos($3*pi()/180)
> *cos(($2-$4)*pi()/180)
> )*60*1.1515*180/pi();
In addition to the other comments, you don't want to calculate distance this
way. It isn't very accurate when $2 and $4 are nearly equal which is the
normal case.
Do a search for haversine.
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly