GPS_nmeaLib

03 Jan 2012

There is a bug in the GPS_nmealib (http://mbed.org/users/todotani/programs/GPS_nmeaLib/5yo4h) in the module gmath.c, exactly in the nmea_distance_ellipsoid() function.

The bug is in the original library by Tim (http://nmea.sourceforge.net), it always returns a zero distance if the arrival point longitude is equal or smaller than the starting point one.

in the same repository there is a proposal for the solution, bug report ID: 2945855:

http://sourceforge.net/tracker/?func=detail&aid=2945855&group_id=192054&atid=939854

The original gmath.c has been modified from:

while ((delta_lambda > 1e-12) && (remaining_steps > 0))

to

while (( remaining_steps == 20 ) || ((fabs(delta_lambda) > 1e-12) && (remaining_steps > 0)))