Browse Source

Merge branch 'master' of github.com:philipoe/Firmware into throttle_tuning

sbg
Lorenz Meier 11 years ago
parent
commit
1300c9a975
  1. 2
      src/lib/external_lgpl/tecs/tecs.cpp
  2. 5
      src/lib/external_lgpl/tecs/tecs.h

2
src/lib/external_lgpl/tecs/tecs.cpp

@ -298,7 +298,7 @@ void TECS::_update_throttle(float throttle_cruise, const math::Matrix<3,3> &rotM @@ -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;

5
src/lib/external_lgpl/tecs/tecs.h

@ -123,6 +123,10 @@ public: @@ -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: @@ -204,6 +208,7 @@ private:
float _minSinkRate;
float _maxSinkRate;
float _timeConst;
float _timeConstThrot;
float _ptchDamp;
float _thrDamp;
float _integGain;

Loading…
Cancel
Save