Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#13 nmea_distance_ellipsoid

NMEA Library v0.4.x
open
nobody
None
5
2012-08-04
2012-08-04
Helios
No

nmea_distance_ellipsoid() gives an incorrect result for this input:
origin: lat=-34.626348°, lon=-58.385799°
destination: lat=35.659933°, lon=139.725321°
The function outputs 1642958.869 m, when the real distance is closer to 1.8e+7 m. The result is in error of over 1000%!
Note that I wrote the coordinates in degrees for convenience; I'm passing these same coordinates, but in radians, so it's not a problem with units.

Discussion