diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-08-01 12:02:14 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-08-01 12:02:14 +0200 |
commit | 1300c9a975193ea9217600f25cc14e04d9f7706b (patch) | |
tree | 79c6feb96b4240c992906f1afd62ad874ce92d94 /src/lib | |
parent | 2d4dd0d5c03a7ef3d696f40b6a6988e08e991034 (diff) | |
parent | fc2e0fad4731ef543be4c3da73de6b670d40d804 (diff) | |
download | px4-firmware-1300c9a975193ea9217600f25cc14e04d9f7706b.tar.gz px4-firmware-1300c9a975193ea9217600f25cc14e04d9f7706b.tar.bz2 px4-firmware-1300c9a975193ea9217600f25cc14e04d9f7706b.zip |
Merge branch 'master' of github.com:philipoe/Firmware into throttle_tuning
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/external_lgpl/tecs/tecs.cpp | 2 | ||||
-rw-r--r-- | src/lib/external_lgpl/tecs/tecs.h | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/external_lgpl/tecs/tecs.cpp b/src/lib/external_lgpl/tecs/tecs.cpp index 6386e37a0..16c7e5ffa 100644 --- a/src/lib/external_lgpl/tecs/tecs.cpp +++ b/src/lib/external_lgpl/tecs/tecs.cpp @@ -298,7 +298,7 @@ void TECS::_update_throttle(float throttle_cruise, const math::Matrix<3,3> &rotM } else { // Calculate gain scaler from specific energy error to throttle - float K_STE2Thr = 1 / (_timeConst * (_STEdot_max - _STEdot_min)); + float K_STE2Thr = 1 / (_timeConstThrot * (_STEdot_max - _STEdot_min)); // Calculate feed-forward throttle float ff_throttle = 0; diff --git a/src/lib/external_lgpl/tecs/tecs.h b/src/lib/external_lgpl/tecs/tecs.h index 5cafb1c79..10c9e9344 100644 --- a/src/lib/external_lgpl/tecs/tecs.h +++ b/src/lib/external_lgpl/tecs/tecs.h @@ -123,6 +123,10 @@ public: _timeConst = time_const; } + void set_time_const_throt(float time_const_throt) { + _timeConstThrot = time_const_throt; + } + void set_min_sink_rate(float rate) { _minSinkRate = rate; } @@ -204,6 +208,7 @@ private: float _minSinkRate; float _maxSinkRate; float _timeConst; + float _timeConstThrot; float _ptchDamp; float _thrDamp; float _integGain; |