aboutsummaryrefslogtreecommitdiff
path: root/src/lib/external_lgpl
diff options
context:
space:
mode:
authorphilipoe <philipp.oettershagen@mavt.ethz.ch>2014-07-01 10:49:59 +0200
committerphilipoe <philipp.oettershagen@mavt.ethz.ch>2014-07-01 10:49:59 +0200
commit534c377ec6d09aff0feed9eb7e70c9188abcda8c (patch)
tree30775f615c1dbf3b62d0560b48cbc7a91b52b84b /src/lib/external_lgpl
parent48f4a1e5cd6ef653b466eb68c1073fb47cbefbd7 (diff)
downloadpx4-firmware-534c377ec6d09aff0feed9eb7e70c9188abcda8c.tar.gz
px4-firmware-534c377ec6d09aff0feed9eb7e70c9188abcda8c.tar.bz2
px4-firmware-534c377ec6d09aff0feed9eb7e70c9188abcda8c.zip
TECS: Small fix to throttle feed-forward
Diffstat (limited to 'src/lib/external_lgpl')
-rw-r--r--src/lib/external_lgpl/tecs/tecs.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/external_lgpl/tecs/tecs.cpp b/src/lib/external_lgpl/tecs/tecs.cpp
index 3730b1920..6386e37a0 100644
--- a/src/lib/external_lgpl/tecs/tecs.cpp
+++ b/src/lib/external_lgpl/tecs/tecs.cpp
@@ -310,7 +310,7 @@ void TECS::_update_throttle(float throttle_cruise, const math::Matrix<3,3> &rotM
STEdot_dem = STEdot_dem + _rollComp * (1.0f / constrain(cosPhi , 0.1f, 1.0f) - 1.0f);
if (STEdot_dem >= 0) {
- ff_throttle = nomThr + STEdot_dem / _STEdot_max * (1.0f - nomThr);
+ ff_throttle = nomThr + STEdot_dem / _STEdot_max * (_THRmaxf - nomThr);
} else {
ff_throttle = nomThr - STEdot_dem / _STEdot_min * nomThr;