Browse Source

AP_InertialNav: Address peer review comments

The decision to set the origin to zero has been moved out of the AHRS library and into the inertial nav library as this is consumer specific.
master
Paul Riseborough 9 years ago committed by Andrew Tridgell
parent
commit
f63c32531c
  1. 5
      libraries/AP_InertialNav/AP_InertialNav_NavEKF.cpp

5
libraries/AP_InertialNav/AP_InertialNav_NavEKF.cpp

@ -54,7 +54,10 @@ nav_filter_status AP_InertialNav_NavEKF::get_filter_status() const @@ -54,7 +54,10 @@ nav_filter_status AP_InertialNav_NavEKF::get_filter_status() const
struct Location AP_InertialNav_NavEKF::get_origin() const
{
struct Location ret;
ret = _ahrs_ekf.get_origin();
if (!_ahrs_ekf.get_origin(ret)) {
// initialise location to all zeros if EKF1 origin not yet set
memset(&ret, 0, sizeof(ret));
}
return ret;
}

Loading…
Cancel
Save