- May as well be Greek to me... -Digger Odell Mike Griffin <griff@xxxxxxxxxxxx> wrote: - I am writing a new program that does some calculations for waypoints, etc.. I have found the following information to be consistent with my calculations. Since the earth is not quite a sphere, there are small errors in using spherical geometry; the earth is actually roughly ellipsoidal (or more precisely, oblate spheroidal) with a radius varying between about 6,378km (equatorial) and 6,357km (polar). This means that errors from assuming spherical geometry might be up to about 0.5%, worst case, depending on latitude and direction of travel. An accuracy of better than 5m in 1km is good enough for me, but if you want greater accuracy, you could refine the result by using the local radius of curvature, as explained in the US Census Bureau GIS FAQ. You would need to use a mean latitude l = (lat1+lat2)/2, and take a = equatorial radius 6378, b = polar radius 6357, and e (eccentricity) = â??(1-b²/a²), then local radius of curvature travelling N/S is R' = a.(1 - e²) / (1 - e².sin²l)3/2, and travelling perpendicular to that is R'' = a / â??(1 - e².sin²l); you could then take a weighted average of the two local radii of curvature depending on direction of travel. Errors would then be negligible over small distances, and my back-of-envelope calculations suggest errors below 0.02% at distances of 1,000km, less then 0.1% traversing continents. Thanks to Jason Eisner at Johns Hopkins University for helping with this. There are techniques for calculating distances over ellipsoidal surfaces, but the maths is certainly a bit trickier. Me, Iâ??ll stick with a mean radius and errors up to 0.5%! By using the above rules in calculating, I would presume that this will find a fairly accurate location of the unknown coordinates and will properly calculate distance. However, I would still like to include bearing as well and have thought this statement to be true based upon the research from this website, http://www.moveable-type.co.uk/ Formula: atan2( -sin(long1-long2).cos(lat2), cos(lat1).sin(lat2) - sin(lat1).cos(lat2).cos(long1-long2)) He goes on to state that the actual bearing would change over time because this assumes in the calculation that straight lines are used and does not take into consideration the curvature of the earth. My question would be this.. Based upon calculting bearing and the distance calculation using the standard equatorial and polar radius, is it possible to then formulate the following? Formula: Take a mean lattitude above and then calculate atan2( -sin(long1-long2).cos(lat2), as you move both N/S and E/W???? I am really bad at math and I know this is the key to the universe. Thanks for any help! Mike **************************************** Our WebPage! Http://WWW.GeoStL.com Mail List Info. //www.freelists.org/cgi-bin/list?list_id=geocaching Mail List FAQ's: //www.freelists.org/help/questions.html **************************************** To unsubscribe from this list: send an email to geocaching-request@xxxxxxxxxxxxx with 'unsubscribe' in the Subject field -Edwin --------------------------------- Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! **************************************** Our WebPage! Http://WWW.GeoStL.com Mail List Info. //www.freelists.org/cgi-bin/list?list_id=geocaching Mail List FAQ's: //www.freelists.org/help/questions.html **************************************** To unsubscribe from this list: send an email to geocaching-request@xxxxxxxxxxxxx with 'unsubscribe' in the Subject field