mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-08 22:10:35 +08:00
replace camel case by snake case.
Co-Authored-By: EliaTarasov <elias.tarasov@gmail.com>
This commit is contained in:
committed by
Roman Bapst
parent
84d9820baa
commit
aa36fa2dfd
@@ -179,8 +179,8 @@ bool MulticopterLandDetector::_get_ground_contact_state()
|
||||
}
|
||||
|
||||
// Check if we are moving horizontally.
|
||||
_horizontalMovement = sqrtf(_vehicleLocalPosition.vx * _vehicleLocalPosition.vx
|
||||
+ _vehicleLocalPosition.vy * _vehicleLocalPosition.vy) > _params.maxVelocity;
|
||||
_horizontal_movement = sqrtf(_vehicleLocalPosition.vx * _vehicleLocalPosition.vx
|
||||
+ _vehicleLocalPosition.vy * _vehicleLocalPosition.vy) > _params.maxVelocity;
|
||||
|
||||
// if we have a valid velocity setpoint and the vehicle is demanded to go down but no vertical movement present,
|
||||
// we then can assume that the vehicle hit ground
|
||||
@@ -189,7 +189,7 @@ bool MulticopterLandDetector::_get_ground_contact_state()
|
||||
bool hit_ground = _in_descend && !verticalMovement;
|
||||
|
||||
// TODO: we need an accelerometer based check for vertical movement for flying without GPS
|
||||
if ((_has_low_thrust() || hit_ground) && (!_horizontalMovement || !_has_position_lock())
|
||||
if ((_has_low_thrust() || hit_ground) && (!_horizontal_movement || !_has_position_lock())
|
||||
&& (!verticalMovement || !_has_altitude_lock())) {
|
||||
return true;
|
||||
}
|
||||
@@ -336,7 +336,7 @@ bool MulticopterLandDetector::_has_minimal_thrust()
|
||||
|
||||
bool MulticopterLandDetector::_get_ground_effect_state()
|
||||
{
|
||||
if (_in_descend && !_horizontalMovement) {
|
||||
if (_in_descend && !_horizontal_movement) {
|
||||
return true;
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user