MulticopterLandDetector: use quick access for xy angular velocity components

This commit is contained in:
Matthias Grob
2022-11-01 18:35:54 +01:00
committed by Silvan Fuhrer
parent d9764f2ef4
commit 509c37c373
@@ -272,9 +272,7 @@ bool MulticopterLandDetector::_get_maybe_landed_state()
max_rotation_threshold *= 2.5f;
}
matrix::Vector2f angular_velocity{_angular_velocity(0), _angular_velocity(1)};
if (angular_velocity.norm() > max_rotation_threshold) {
if (_angular_velocity.xy().norm() > max_rotation_threshold) {
_rotational_movement = true;
return false;