error (tipo) in GPS software ?

jack0

New member
Hello

I think I 've found a mistake in the gps.cpp software v1.04A. See below, I commented the original line where the longitude is equalled to lat(itude). Shouldn't it be lon(gitude) there as I replace in the following one?

Greets


void GPS::f_get_position(float *latitude, float *longitude, unsigned long *fix_age) {
long lat, lon;
get_position(&lat, &lon, fix_age);
*latitude = lat == GPS_INVALID_ANGLE ? GPS_INVALID_F_ANGLE : (lat / 100000.0);
// *longitude = lat == GPS_INVALID_ANGLE ? GPS_INVALID_F_ANGLE : (lon / 100000.0);
*longitude = lon == GPS_INVALID_ANGLE ? GPS_INVALID_F_ANGLE : (lon / 100000.0); // correction JR
}
 
Oben