mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 19:13:33 +08:00
TECS: Added separate gain / time constant for the throttle loop to allow independent tuning
This commit is contained in:
@@ -298,7 +298,7 @@ void TECS::_update_throttle(float throttle_cruise, const math::Matrix<3,3> &rotM
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Calculate gain scaler from specific energy error to throttle
|
// 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
|
// Calculate feed-forward throttle
|
||||||
float ff_throttle = 0;
|
float ff_throttle = 0;
|
||||||
|
|||||||
@@ -123,6 +123,10 @@ public:
|
|||||||
_timeConst = time_const;
|
_timeConst = time_const;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void set_time_const_throt(float time_const_throt) {
|
||||||
|
_timeConstThrot = time_const_throt;
|
||||||
|
}
|
||||||
|
|
||||||
void set_min_sink_rate(float rate) {
|
void set_min_sink_rate(float rate) {
|
||||||
_minSinkRate = rate;
|
_minSinkRate = rate;
|
||||||
}
|
}
|
||||||
@@ -204,6 +208,7 @@ private:
|
|||||||
float _minSinkRate;
|
float _minSinkRate;
|
||||||
float _maxSinkRate;
|
float _maxSinkRate;
|
||||||
float _timeConst;
|
float _timeConst;
|
||||||
|
float _timeConstThrot;
|
||||||
float _ptchDamp;
|
float _ptchDamp;
|
||||||
float _thrDamp;
|
float _thrDamp;
|
||||||
float _integGain;
|
float _integGain;
|
||||||
|
|||||||
Reference in New Issue
Block a user