mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 07:23:34 +08:00
EKF: Don't start using GPS for height until all validity checks have passed
Consolidate intermittent data checks, improve variable and clarify usage.
This commit is contained in:
committed by
Paul Riseborough
parent
cef2ba5ab9
commit
7612fa40ed
+2
-2
@@ -59,8 +59,8 @@
|
||||
bool Ekf::collect_gps(const gps_message &gps)
|
||||
{
|
||||
// Run GPS checks always
|
||||
bool gps_checks_pass = gps_is_good(gps);
|
||||
if (!_NED_origin_initialised && gps_checks_pass) {
|
||||
_gps_checks_passed = gps_is_good(gps);
|
||||
if (!_NED_origin_initialised && _gps_checks_passed) {
|
||||
// If we have good GPS data set the origin's WGS-84 position to the last gps fix
|
||||
double lat = gps.lat / 1.0e7;
|
||||
double lon = gps.lon / 1.0e7;
|
||||
|
||||
Reference in New Issue
Block a user