Waiting for the filter to be initialized to set global origin

This commit is contained in:
Loic Dubois
2021-02-11 18:05:21 +01:00
committed by Daniel Agar
parent 602e65146c
commit ffab483504
+1 -1
View File
@@ -61,7 +61,7 @@ bool Ekf::collect_gps(const gps_message &gps)
// Run GPS checks always // Run GPS checks always
_gps_checks_passed = gps_is_good(gps); _gps_checks_passed = gps_is_good(gps);
if (!_NED_origin_initialised && _gps_checks_passed) { if (_filter_initialised && !_NED_origin_initialised && _gps_checks_passed) {
// If we have good GPS data set the origin's WGS-84 position to the last gps fix // If we have good GPS data set the origin's WGS-84 position to the last gps fix
const double lat = gps.lat * 1.0e-7; const double lat = gps.lat * 1.0e-7;
const double lon = gps.lon * 1.0e-7; const double lon = gps.lon * 1.0e-7;