Hello everyone! We are doing the control of a tailsitter nowadays. There are some problems in the code. Hope anyone can give me some advice.
1. The following code does the back transition of the vehicle.
_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);
I am puzzling whether _pitch_transition_start ~= -pi/2 ? so the _v_att_sp->pitch_body changes from 0 to pi/2 ? But why the _v_att_sp->pitch_body is constrained in -2.0~0.05 ? I donnot know whether _v_att_sp->pitch_body is described in fixed-wing body frame or mc body frame?
2. The problem about _actuators _out _0 and _actuators _out _1.
The code annotation says that _actuators _out _0 is actuator controls going to the mc mixer. Does it means this?
Motor mixer
Channel 1 connects to the right (starboard) motor.
Channel 2 connects to the left (port) motor.
R: 2- 10000 10000 10000 0
And _actuators _out _1 is actuator controls going to the fw mixer (used for elevons). Does it means this?
Elevons mixer
Channel 5 connects to the right (starboard) elevon.
Channel 6 connects to the left (port) elevon.
M: 2
O: 7500 7500 0 -10000 10000
S: 1 0 10000 10000 0 -10000 10000
S: 1 1 10000 10000 0 -10000 10000
M: 2
O: 7500 7500 0 -10000 10000
S: 1 0 10000 10000 0 -10000 10000
S: 1 1 -10000 -10000 0 -10000 10000
Thank you. Have a nice weekend!