Merge branch 'beta'

This commit is contained in:
Lorenz Meier
2015-08-23 14:06:37 +02:00
6 changed files with 17 additions and 14 deletions
+6 -3
View File
@@ -62,6 +62,10 @@ void TECS::update_state(float baro_altitude, float airspeed, const math::Matrix<
_integ3_state = baro_altitude;
_integ2_state = 0.0f;
_integ1_state = 0.0f;
// Reset the filter state as we just switched from non-altitude control
// to altitude control mode
_states_initalized = false;
}
_update_50hz_last_usec = now;
@@ -616,9 +620,8 @@ void TECS::update_pitch_throttle(const math::Matrix<3,3> &rotMat, float pitch, f
_tecs_state.energy_error_integ = _integ6_state;
_tecs_state.energy_distribution_error_integ = _integ7_state;
_tecs_state.throttle_sp = _throttle_dem;
_tecs_state.pitch_sp = _pitch_dem;
_tecs_state.throttle_integ = _integ6_state;
_tecs_state.pitch_integ = _integ7_state;
_update_pitch_throttle_last_usec = now;
+2 -2
View File
@@ -155,8 +155,8 @@ public:
float total_energy_rate_error;
float energy_distribution_error;
float energy_distribution_rate_error;
float throttle_sp;
float pitch_sp;
float throttle_integ;
float pitch_integ;
enum ECL_TECS_MODE mode;
};