mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
Waiting for the filter to be initialized to set global origin
This commit is contained in:
parent
602e65146c
commit
ffab483504
@ -61,7 +61,7 @@ bool Ekf::collect_gps(const gps_message &gps)
|
||||
// Run GPS checks always
|
||||
_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
|
||||
const double lat = gps.lat * 1.0e-7;
|
||||
const double lon = gps.lon * 1.0e-7;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user