Date: 07/10/2003 at 14:21:30 From: Peter Richard Subject: Spherical Trigonometry If we have three points on the earth measured in latitude/longitude, such as 'A'= 33S54;151E12 / 'B'= 37S49;144E58 / 'C'= 51N30;0W10 what is the formula to calculate a mean latitude/longitude for this group of 3? When I say 'mean latitude/longitude' I am referring to a 'midpoint in space' between the three. So perhaps if I used the term 'equidistant' rather than 'mean' it might make it clearer.
Date: 07/15/2003 at 14:47:57 From: Doctor Rick Subject: Re: Spherical Trigonometry Hi, Peter. I might approach this as follows: Convert the lat-long positions into x,y,z coordinates, find the mean position in 3-dimensional space, and project this point back onto the sphere, and convert back to latitude and longitude. (I am assuming - and hoping - that a spherical approximation to the earth's surface is sufficient.) This method will give the correct result in the "flat-earth approximation" in which the points are close enough together that the curvature of the earth can be ignored. It seems like a reasonable operational definition of an average position on the earth, but I'm being rather intuitive at this point. To convert each location to (x,y,z) coordinates, use the formulas x_n = cos(lat_n)*cos(lon_n) y_n = cos(lat_n)*sin(lon_n) z_n = sin(lat_n) where location n has latitude lat_n and longitude lon_n. I have set the radius of the earth equal to 1 since we aren't interested in actual distances; the radius would cancel out eventually anyway. Average the coordinates independently: x = (x_1 + x_2 + x_3)/3 y = (y_1 + y_2 + y_3)/3 z = (z_1 + z_2 + z_3)/3 Now convert to latitude and longitude using the inverse transformation r = sqrt(x^2 + y^2 + z^2) lat = arcsin(z/r) lon = arctan(y/x) I haven't tested this, so let me know if you have any trouble with it. If you're programming, you should use the atan2() function found in many programming languages, spreadsheets etc. Otherwise you'll have to do some extra stuff if x = 0 or if the longitude is more than 90 degrees from the Prime Meridian. The "mean" in any ordinary sense can be quite different from the point that is equidistant from three points. To demonstrate, draw a circle and pick three points on the circle, all on the right side. The point that is equidistant from the three points is the center of the circle. I doubt that this is what you mean by "mean"! (However, it could be what you want: If you expect a structure to be circular and you have found three points on the edge of the structure, you could use such a method to find the center of the structure.) - Doctor Rick, The Math Forum http://mathforum.org/dr.math/
Search the Dr. Math Library:
Ask Dr. MathTM
© 1994-2015 The Math Forum