mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-29 19:57:12 +08:00
mc_pos_control: fix acc Z sign
This commit is contained in:
committed by
Matthias Grob
parent
24ffed827f
commit
da4d0e650a
@@ -481,7 +481,7 @@ MulticopterPositionControl::set_vehicle_states(const float &vel_sp_z)
|
|||||||
_states.velocity(2) = _local_pos.z_deriv * weighting + _local_pos.vz * (1.0f - weighting);
|
_states.velocity(2) = _local_pos.z_deriv * weighting + _local_pos.vz * (1.0f - weighting);
|
||||||
}
|
}
|
||||||
|
|
||||||
_states.acceleration(2) = _vel_z_deriv.update(-_states.velocity(2));
|
_states.acceleration(2) = _vel_z_deriv.update(_states.velocity(2));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
_states.velocity(2) = _states.acceleration(2) = NAN;
|
_states.velocity(2) = _states.acceleration(2) = NAN;
|
||||||
|
|||||||
Reference in New Issue
Block a user