mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-04 19:18:54 +08:00
EKF: scale GPS vertical accuracy check when using optical flow
This commit is contained in:
committed by
Lorenz Meier
parent
fc9f532c34
commit
7f36add241
+4
-5
@@ -118,19 +118,18 @@ bool Ekf::gps_is_good(struct gps_message *gps)
|
|||||||
// Check the geometric dilution of precision
|
// Check the geometric dilution of precision
|
||||||
_gps_check_fail_status.flags.gdop = (gps->gdop > _params.req_gdop);
|
_gps_check_fail_status.flags.gdop = (gps->gdop > _params.req_gdop);
|
||||||
|
|
||||||
// Check the reported horizontal position accuracy
|
// Check the reported horizontal and vertical position accuracy
|
||||||
if (_control_status.flags.opt_flow) {
|
if (_control_status.flags.opt_flow) {
|
||||||
// optical flow is used when low and slow and often in a confined environment
|
// optical flow is used when low and slow and often in a confined environment
|
||||||
// so tighten required GPS accuracy that affects position hold
|
// so tighten required GPS accuracy that affects position and altitude hold
|
||||||
// This also applies some hysteresis to the logic used to activate optical flow
|
// This also applies some hysteresis to the logic used to activate optical flow
|
||||||
_gps_check_fail_status.flags.hacc = (gps->eph > 0.7f * _params.req_hacc);
|
_gps_check_fail_status.flags.hacc = (gps->eph > 0.7f * _params.req_hacc);
|
||||||
|
_gps_check_fail_status.flags.vacc = (gps->epv > 0.7f * _params.req_vacc);
|
||||||
} else {
|
} else {
|
||||||
_gps_check_fail_status.flags.hacc = (gps->eph > _params.req_hacc);
|
_gps_check_fail_status.flags.hacc = (gps->eph > _params.req_hacc);
|
||||||
|
_gps_check_fail_status.flags.vacc = (gps->epv > _params.req_vacc);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check the reported vertical position accuracy
|
|
||||||
_gps_check_fail_status.flags.vacc = (gps->epv > _params.req_vacc);
|
|
||||||
|
|
||||||
// Check the reported speed accuracy
|
// Check the reported speed accuracy
|
||||||
if (_control_status.flags.opt_flow) {
|
if (_control_status.flags.opt_flow) {
|
||||||
// Optical flow is used when low and slow and often in a confined environment
|
// Optical flow is used when low and slow and often in a confined environment
|
||||||
|
|||||||
Reference in New Issue
Block a user