AP_InertialNav: make use of ahrs library's get_accel_ef method to save some cpu cycles

This commit is contained in:
rmackay9 2012-12-12 16:27:27 +09:00 committed by Andrew Tridgell
parent 1c08f176ea
commit e9fa5dec0f

View File

@ -65,7 +65,7 @@ void AP_InertialNav::update(float dt)
// convert accelerometer readings to earth frame
Matrix3f dcm = _ahrs->get_dcm_matrix();
accel_ef = dcm * _ins->get_accel();
accel_ef = _ahrs->get_accel_ef();
// remove influence of gravity
accel_ef.z += AP_INTERTIALNAV_GRAVITY;