On Wed, May 25, 2011 at 9:47 AM, Carlo Stonebanks <stonec.register@xxxxxxxxxxxx> wrote:
I need to calculate the long/lat values between a line demarcated by two long/lat points.
The points will be very close, but there is the 180 degree problem to consider, so a simple average won’t work.
Does anyone know of a function or have a formula that will work using geo long/lat values? I don’t see anything obvious in the earthdistance module.
The simplest way to deal with "the 180 degree problem" is to remember that you can add 360 degrees to a long and get a value that should continue to work. So, assuming "West" is negative, -175 (175 degrees West) is the same as -175+360 = 185 (185 degrees East). Then you don't have to worry about wraparound. If the result is > 180, subtract 360.
--
Rick Genter
rick.genter@xxxxxxxxx