forked from Archive/PX4-Autopilot
position_estimator_inav: requre EPH < 5m to set GPS reference
This commit is contained in:
parent
00a2a0370e
commit
bf9282c988
|
@ -429,7 +429,7 @@ int position_estimator_inav_thread_main(int argc, char *argv[])
|
||||||
if (fds[6].revents & POLLIN) {
|
if (fds[6].revents & POLLIN) {
|
||||||
orb_copy(ORB_ID(vehicle_gps_position), vehicle_gps_position_sub, &gps);
|
orb_copy(ORB_ID(vehicle_gps_position), vehicle_gps_position_sub, &gps);
|
||||||
|
|
||||||
if (gps.fix_type >= 3 && t < gps.timestamp_position + gps_timeout) {
|
if (gps.fix_type >= 3 && t < gps.timestamp_position + gps_timeout && gps.eph_m < 5.0f) {
|
||||||
/* initialize reference position if needed */
|
/* initialize reference position if needed */
|
||||||
if (!ref_xy_inited) {
|
if (!ref_xy_inited) {
|
||||||
if (ref_xy_init_start == 0) {
|
if (ref_xy_init_start == 0) {
|
||||||
|
|
Loading…
Reference in New Issue