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.
This commit is contained in:
Paul Riseborough 2015-10-15 16:10:44 +11:00 committed by Andrew Tridgell
parent 58d57994f4
commit f63c32531c

View File

@ -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;
}