Hi everyone,
I have had my octorotor flying using the 2.7 version of the code and everything is going well.
I would now like to change the reference frame of the vehicle so that it is valid on a global frame. This means that regardless of the vehicle attitude from where I am standing, if I want it to fly to my left I use the control stick to point to the left and it goes that way even if it means that the vehicle is pitching instead of rolling.
I have gone through the code as well as I can and found a line that says motor_to_channel_map. (this is in line 189 of AP_MotorsMatrix.cpp) and then line 39 of AP_Motors.cpp states:
// initialise motor map
if( APM_version == AP_MOTORS_APM1 ) {
set_motor_to_channel_map(APM1_MOTOR_TO_CHANNEL_MAP);
} else {
set_motor_to_channel_map(APM2_MOTOR_TO_CHANNEL_MAP);
}
Can anyone please help me to find where this mapping is taking place?
This will be the basis for applying some university research into control allocation so that I can perform motor failure flight testing.
Thanks for any help.
Aryeh
Replies
It's a simple vector rotation. It's far more upstream than what your talking about.