mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-06 04:30:35 +08:00
EKF: don't accept GPS data without a 3D lock
This commit is contained in:
committed by
Lorenz Meier
parent
588b27bde7
commit
9bb54ccc08
@@ -178,7 +178,7 @@ void EstimatorInterface::setGpsData(uint64_t time_usec, struct gps_message *gps)
|
||||
|
||||
// limit data rate to prevent data being lost
|
||||
bool need_gps = (_params.fusion_mode & MASK_USE_GPS) || (_params.vdist_sensor_type == VDIST_SENSOR_GPS);
|
||||
if (((time_usec - _time_last_gps) > _min_obs_interval_us) && need_gps) {
|
||||
if (((time_usec - _time_last_gps) > _min_obs_interval_us) && need_gps && gps->fix_type > 2) {
|
||||
gpsSample gps_sample_new = {};
|
||||
gps_sample_new.time_us = gps->time_usec - _params.gps_delay_ms * 1000;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user