diff options
author | Julian Oes <julian@oes.ch> | 2013-12-27 00:04:32 +0100 |
---|---|---|
committer | Julian Oes <julian@oes.ch> | 2013-12-27 00:04:32 +0100 |
commit | 40f2d581bffacbf214edfcadac3a57756d605196 (patch) | |
tree | e63077b8eeb2ac98a3a28772ffa9dbeb63f6f865 /src/lib/external_lgpl | |
parent | 9d4ba6e4f64d631c67a419518a8398debade4641 (diff) | |
parent | d3a71d1e420c595a9a242d12264d553759dd9e2a (diff) | |
download | px4-firmware-40f2d581bffacbf214edfcadac3a57756d605196.tar.gz px4-firmware-40f2d581bffacbf214edfcadac3a57756d605196.tar.bz2 px4-firmware-40f2d581bffacbf214edfcadac3a57756d605196.zip |
Merge branch 'fw_autoland_att_tecs_navigator_termination_controlgroups' into bottle_drop_navigator
Conflicts:
src/drivers/px4fmu/fmu.cpp
src/modules/dataman/dataman.c
src/modules/dataman/dataman.h
src/modules/mavlink/orb_listener.c
src/modules/mavlink/waypoints.c
src/modules/navigator/navigator_main.cpp
src/modules/navigator/navigator_mission.cpp
src/modules/navigator/navigator_mission.h
src/modules/uORB/topics/mission.h
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; |