forked from Archive/PX4-Autopilot
Merge pull request #145 from CarlOlsson/small_fix
Deleted second update of transformation matrix
This commit is contained in:
commit
c8c2d6d963
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue