Skip to content

Commit

Permalink
Dont use mag suffix for magnitude
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilritz authored and priseborough committed Aug 28, 2019
1 parent 05196db commit ea352a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions EKF/ekf_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1606,10 +1606,10 @@ void Ekf::calcExtVisRotMat()

// apply an input limiter to protect from spikes
Vector3f _input_delta_vec = rot_vec - _ev_rot_vec_filt;
float input_delta_mag = _input_delta_vec.norm();
float input_delta_len = _input_delta_vec.norm();

if (input_delta_mag > 0.1f) {
rot_vec = _ev_rot_vec_filt + _input_delta_vec * (0.1f / input_delta_mag);
if (input_delta_len > 0.1f) {
rot_vec = _ev_rot_vec_filt + _input_delta_vec * (0.1f / input_delta_len);
}

// Apply a first order IIR low pass filter
Expand Down

0 comments on commit ea352a6

Please sign in to comment.