mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
navigator: use vehicle_status flag to decide if global position is valid
This commit is contained in:
parent
e9f45a82b8
commit
4e6a5ed1e8
@ -844,14 +844,9 @@ Navigator::task_main()
|
||||
/* Reset the _geofence_violation_warning_sent field */
|
||||
_geofence_violation_warning_sent = false;
|
||||
}
|
||||
|
||||
_global_pos_valid = true;
|
||||
|
||||
} else {
|
||||
/* assume that global position is valid if updated in last 20ms */
|
||||
_global_pos_valid = _global_pos.timestamp != 0 && hrt_abstime() < _global_pos.timestamp + 20000;
|
||||
}
|
||||
|
||||
_global_pos_valid = _vstatus.condition_global_position_valid;
|
||||
|
||||
/* publish position setpoint triplet if updated */
|
||||
if (_pos_sp_triplet_updated) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user