Clean up GPS code and add some flags per #1740

This commit is contained in:
Thomas Göttgens
2022-10-03 20:30:11 +02:00
parent 482c0766af
commit cf124d97b8
3 changed files with 29 additions and 23 deletions

View File

@@ -223,13 +223,10 @@ bool NMEAGPS::lookForLocation()
}
}
/*
// REDUNDANT?
// expect gps pos lat=37.520825, lon=-122.309162, alt=158
DEBUG_MSG("new NMEA GPS pos lat=%f, lon=%f, alt=%d, dop=%g, heading=%f\n",
latitude * 1e-7, longitude * 1e-7, altitude, dop * 1e-2,
heading * 1e-5);
*/
if (reader.speed.isUpdated() && reader.speed.isValid()) {
p.ground_speed = reader.speed.kmph() * 1e3; // Scale the speed (in km/h * 10^-2) to match the expected m/s * 10^-5
}
return true;
}