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
parent 2b6fbe5c01
commit 50bd21d548
1 changed files with 1 additions and 1 deletions

View File

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