mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-14 07:03:34 +08:00
MulticopterLandDetector: use quick access for xy angular velocity components
This commit is contained in:
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user