astyle src/modules/vtol_att_control

This commit is contained in:
Daniel Agar
2017-01-29 01:18:32 +01:00
committed by Lorenz Meier
parent 380819dfc5
commit a0271fe020
2 changed files with 15 additions and 15 deletions
+3 -3
View File
@@ -246,14 +246,14 @@ void Tailsitter::update_transition_state()
/** create time dependant pitch angle set point + 0.2 rad overlap over the switch value*/
_v_att_sp->pitch_body = _pitch_transition_start - (fabsf(PITCH_TRANSITION_FRONT_P1 - _pitch_transition_start) *
(float)hrt_elapsed_time(&_vtol_schedule.transition_start) / (_params_tailsitter.front_trans_dur * 1000000.0f));
_v_att_sp->pitch_body = math::constrain(_v_att_sp->pitch_body , PITCH_TRANSITION_FRONT_P1 - 0.2f ,
_v_att_sp->pitch_body = math::constrain(_v_att_sp->pitch_body, PITCH_TRANSITION_FRONT_P1 - 0.2f,
_pitch_transition_start);
/** create time dependant throttle signal higher than in MC and growing untill P2 switch speed reached */
if (_airspeed->indicated_airspeed_m_s <= _params_tailsitter.airspeed_trans) {
_thrust_transition = _thrust_transition_start + (fabsf(THROTTLE_TRANSITION_MAX * _thrust_transition_start) *
(float)hrt_elapsed_time(&_vtol_schedule.transition_start) / (_params_tailsitter.front_trans_dur * 1000000.0f));
_thrust_transition = math::constrain(_thrust_transition , _thrust_transition_start ,
_thrust_transition = math::constrain(_thrust_transition, _thrust_transition_start,
(1.0f + THROTTLE_TRANSITION_MAX) * _thrust_transition_start);
_v_att_sp->thrust = _thrust_transition;
}
@@ -316,7 +316,7 @@ void Tailsitter::update_transition_state()
/** create time dependant pitch angle set point stating at -pi/2 + 0.2 rad overlap over the switch value*/
_v_att_sp->pitch_body = M_PI_2_F + _pitch_transition_start + fabsf(PITCH_TRANSITION_BACK + 1.57f) *
(float)hrt_elapsed_time(&_vtol_schedule.transition_start) / (_params_tailsitter.back_trans_dur * 1000000.0f);
_v_att_sp->pitch_body = math::constrain(_v_att_sp->pitch_body , -2.0f , PITCH_TRANSITION_BACK + 0.2f);
_v_att_sp->pitch_body = math::constrain(_v_att_sp->pitch_body, -2.0f, PITCH_TRANSITION_BACK + 0.2f);
// throttle value is decreesed
_v_att_sp->thrust = _thrust_transition_start * 0.9f;