mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 14:03:34 +08:00
Add more GPS checks for LPE (#4750)
* Added more GPS checks for LPE. * Add logic to force GPS alt init.
This commit is contained in:
@@ -51,8 +51,15 @@ int BlockLocalPositionEstimator::gpsMeasure(Vector<double, n_y_gps> &y)
|
||||
// check for good gps signal
|
||||
uint8_t nSat = _sub_gps.get().satellites_used;
|
||||
float eph = _sub_gps.get().eph;
|
||||
float epv = _sub_gps.get().epv;
|
||||
uint8_t fix_type = _sub_gps.get().fix_type;
|
||||
|
||||
if (nSat < 6 || eph > _gps_eph_max.get()) {
|
||||
if (
|
||||
nSat < 6 ||
|
||||
eph > _gps_eph_max.get() ||
|
||||
epv > _gps_epv_max.get() ||
|
||||
fix_type < 3
|
||||
) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user