Dont use mag suffix for magnitude

This commit is contained in:
kamilritz
2019-08-20 14:31:37 +02:00
committed by Paul Riseborough
parent 05196db79e
commit ea352a6631
+3 -3
View File
@@ -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