diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2013-12-23 13:19:07 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2013-12-23 13:19:07 +0100 |
commit | fcdb77d8ef8e0278eb9f8fc1cdf7c39d000c66c2 (patch) | |
tree | bb478dc5ae4383c5335c448d021e844046cfda10 /src/lib/external_lgpl | |
parent | 24e2676131ac688eaedcbc9f65a06446d066820d (diff) | |
parent | afbf4223398407a5734aa0741ef24b5fab5b6dca (diff) | |
download | px4-firmware-fcdb77d8ef8e0278eb9f8fc1cdf7c39d000c66c2.tar.gz px4-firmware-fcdb77d8ef8e0278eb9f8fc1cdf7c39d000c66c2.tar.bz2 px4-firmware-fcdb77d8ef8e0278eb9f8fc1cdf7c39d000c66c2.zip |
Merge branch '559_tecs_climbout' into fw_autoland_att_tecs_navigator_termination_controlgroups
Diffstat (limited to 'src/lib/external_lgpl')
-rw-r--r-- | src/lib/external_lgpl/tecs/tecs.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/external_lgpl/tecs/tecs.cpp b/src/lib/external_lgpl/tecs/tecs.cpp index d089be080..5a56dce65 100644 --- a/src/lib/external_lgpl/tecs/tecs.cpp +++ b/src/lib/external_lgpl/tecs/tecs.cpp @@ -433,10 +433,18 @@ void TECS::_update_pitch(void) // Apply max and min values for integrator state that will allow for no more than // 5deg of saturation. This allows for some pitch variation due to gusts before the // integrator is clipped. Otherwise the effectiveness of the integrator will be reduced in turbulence + // During climbout/takeoff, bias the demanded pitch angle so that zero speed error produces a pitch angle + // demand equal to the minimum value (which is )set by the mission plan during this mode). Otherwise the + // integrator has to catch up before the nose can be raised to reduce speed during climbout. float gainInv = (_integ5_state * _timeConst * CONSTANTS_ONE_G); float temp = SEB_error + SEBdot_error * _ptchDamp + SEBdot_dem * _timeConst; + if (_climbOutDem) + { + temp += _PITCHminf * gainInv; + } _integ7_state = constrain(_integ7_state, (gainInv * (_PITCHminf - 0.0783f)) - temp, (gainInv * (_PITCHmaxf + 0.0783f)) - temp); + // Calculate pitch demand from specific energy balance signals _pitch_dem_unc = (temp + _integ7_state) / gainInv; |