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:
parent
58d57994f4
commit
f63c32531c
@ -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…
Reference in New Issue
Block a user