Limited Z-compensation much stronger to prevent throttle jumps

This commit is contained in:
Lorenz Meier
2012-09-09 22:18:21 +02:00
parent 6caa3038ba
commit 80c6252c0a
@@ -252,15 +252,15 @@ void multirotor_control_attitude(const struct vehicle_attitude_setpoint_s *att_s
*/ */
float zcompensation = 1.0f; float zcompensation = 1.0f;
if (fabsf(att->roll) > 1.0f) { if (fabsf(att->roll) > 0.3f) {
zcompensation *= 1.85081571768f; zcompensation *= 1.04675160154f;
} else { } else {
zcompensation *= 1.0f / cosf(att->roll); zcompensation *= 1.0f / cosf(att->roll);
} }
if (fabsf(att->pitch) > 1.0f) { if (fabsf(att->pitch) > 0.3f) {
zcompensation *= 1.85081571768f; zcompensation *= 1.04675160154f;
} else { } else {
zcompensation *= 1.0f / cosf(att->pitch); zcompensation *= 1.0f / cosf(att->pitch);