diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2012-09-09 22:18:21 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2012-09-09 22:18:21 +0200 |
commit | 80c6252c0a2ea87acf94a375a5209fa3ee3a5fed (patch) | |
tree | ad862fdfb193822057bc1dc6649824ea909fd780 /apps/multirotor_att_control/multirotor_attitude_control.c | |
parent | 6caa3038bac3039dff1d486f14f5032524f5b0e0 (diff) | |
download | px4-firmware-80c6252c0a2ea87acf94a375a5209fa3ee3a5fed.tar.gz px4-firmware-80c6252c0a2ea87acf94a375a5209fa3ee3a5fed.tar.bz2 px4-firmware-80c6252c0a2ea87acf94a375a5209fa3ee3a5fed.zip |
Limited Z-compensation much stronger to prevent throttle jumps
Diffstat (limited to 'apps/multirotor_att_control/multirotor_attitude_control.c')
-rw-r--r-- | apps/multirotor_att_control/multirotor_attitude_control.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/multirotor_att_control/multirotor_attitude_control.c b/apps/multirotor_att_control/multirotor_attitude_control.c index 38fe13bfe..db2d28601 100644 --- a/apps/multirotor_att_control/multirotor_attitude_control.c +++ b/apps/multirotor_att_control/multirotor_attitude_control.c @@ -252,15 +252,15 @@ void multirotor_control_attitude(const struct vehicle_attitude_setpoint_s *att_s */ float zcompensation = 1.0f; - if (fabsf(att->roll) > 1.0f) { - zcompensation *= 1.85081571768f; + if (fabsf(att->roll) > 0.3f) { + zcompensation *= 1.04675160154f; } else { zcompensation *= 1.0f / cosf(att->roll); } - if (fabsf(att->pitch) > 1.0f) { - zcompensation *= 1.85081571768f; + if (fabsf(att->pitch) > 0.3f) { + zcompensation *= 1.04675160154f; } else { zcompensation *= 1.0f / cosf(att->pitch); |