Hi folks,
I have a bit of a problem with a pretty complicated mathematical
expression. Basically, I'm trying to determine the initial heading
between two points on the globe using latitude and longitude of the
two points. I already know the distance between the two ($miles).
Here's the expression:
$Hdg=2*M_PI-acos((sin($lat2)-sin($lat1)*cos($miles))/(sin($miles)*cos($lat1)));
When I echo $Hdg, I see:
-1.#IND
If the expression was working, I should see something like 134.9 for
the following latitude/longitude combinations:
$lat1 = 33.9780761
$lon1 = -83.9623772
$lat2 = 32.1950556
$lon2 = -81.8695556
$miles = 172.7381359
I can't find any references to what #IND means, so if anyone out there
has any ideas, I'd be grateful.
-JS
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/HKFolB/TM
--------------------------------------------------------------------~->
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/