Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4627d5d commit 3329d69Copy full SHA for 3329d69
src/modules/mc_pos_control/mc_pos_control_main.cpp
@@ -683,11 +683,9 @@ MulticopterPositionControl::run()
683
constraints.speed_up = _takeoff_speed;
684
// altitude above reference takeoff
685
const float alt_above_tko = -(_states.position(2) - _takeoff_reference_z);
686
- // altitude threshold at which full control is enabled
687
- const float alt_threshold = 0.5f; //at 0.5m above grouund, control all setpoints
688
689
// disable position-xy / yaw control when close to ground
690
- if (alt_above_tko <= alt_threshold) {
+ if (alt_above_tko <= ALTITUDE_THRESHOLD) {
691
// don't control position in xy
692
setpoint.x = setpoint.y = NAN;
693
setpoint.vx = setpoint.vy = NAN;
0 commit comments