deleted second update of transformation matrix

This commit is contained in:
CarlOlsson 2016-05-22 16:03:30 +02:00
parent 4c5252269c
commit eb70aca2e8
1 changed files with 3 additions and 4 deletions

View File

@ -570,8 +570,10 @@ void Ekf::predictState()
// save the previous value of velocity so we can use trapzoidal integration
Vector3f vel_last = _state.vel;
// update the rotation matrix and calculate the increment in velocity using the current orientation
// update transformation matrix from body to world frame
_R_to_earth = quat_to_invrotmat(_state.quat_nominal);
// calculate the increment in velocity using the current orientation
_state.vel += _R_to_earth * corrected_delta_vel;
// compensate for acceleration due to gravity
@ -580,9 +582,6 @@ void Ekf::predictState()
// predict position states via trapezoidal integration of velocity
_state.pos += (vel_last + _state.vel) * _imu_sample_delayed.delta_vel_dt * 0.5f;
// update transformation matrix from body to world frame
_R_to_earth = quat_to_invrotmat(_state.quat_nominal);
constrainStates();
// calculate an average filter update time