![]() |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]()
Has anyone got a formula that:
given a lat/long starting point plus a distance and bearing will output the new lat/long position? I found this but it doesnt seem to work right double curLat=40.12345; double curLong=-122.12345; double bearing=90; // east double dist=1609.344; // 1 mile in meters d_lat = asin(sin(curLat)* cos(dist)+ cos(curLat)* sin(dist)*cos(bearing)); d_lon = atan2(sin(bearing)*sin(dist)*cos(curLat), cos(dist)-sin(altitude)*sin(curLat)); d_long = fmod( curLong - d_lon + pi, 2*pi )- pi; printf("new coordinates: %lg x %lg\n", d_lat, d_long); my results look like this: new coordinates: -0.384715 x -6.1364 Thanks Eric |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Looking for software compute lat and long of features on solar system bodies | canopus56 | Amateur Astronomy | 2 | August 20th 06 06:04 PM |
How to compute a Hubble distance? | Steve Willner | Research | 0 | April 1st 06 09:54 AM |
High Schoolers Have Long-Distance Chat With Station Crew | Jacques van Oene | Space Station | 0 | November 15th 05 11:45 PM |
High Schoolers Have Long-Distance Chat With Station Crew | Jacques van Oene | News | 0 | November 15th 05 11:44 PM |
School Makes a Super-Long Distance Call | Jacques van Oene | Space Station | 1 | January 4th 05 05:55 PM |