Posted by Graham Dyer on December 3, 2009 at 4:01am
My own design plane with ArduPilot 2.1 (no z-sensor, no shield) has a problem with it's aileron control reversed. Now let me explain: the ailerons work correctly with AP switched off i.e. normal flight (lets call this A), they also work correctly during navigation to the waypoints i.e. under the control of the AP (and this B).However, when in navigation mode and using the Tx's stick to override the controls then the movement is reversed (C), i.e. if I push the stick right, the left aileron lifts...(btw the elevator, which is not set in the code to be reversed works fine all the time!)AFAIK there are 2 bits of code that affect this:1) #if REVERSE_ROLL ==1pulse_servo_1(90+roll);#elsepulse_servo_1(90-roll);#endif#if REVERSE_PITCH == 1pulse_servo_2(90+pitch);#elsepulse_servo_2(90-pitch); //invert sign if you want to reverse the servo...#endifor 2)#define REVERSE_ROLL 1 //To reverse servo roll#define REVERSE_PITCH 0 //To reverse servo pitchRoll had to be reversed because of the way my servos are set up, if I reverse the roll in 1) or 2) above then A and B are reversed but C is correct, however of course, I can't fly like this.Any ideas?
You need to be a member of diydrones to add comments!
Is your UAV a V-tail or Delta ??? I would like to set up a Stryker V3 but, no time yet
This mode is called Fly_By_Wire mode (stabilization with manual override). So change item #2-5 to 1 or -1 to reverse rudder/ailerons for this mode only
//2-5
#define REV_FLY_BY_WIRE_CH1 -1 //-1 will invert it // change to 1 or -1 to reverse rudder/ailerons
//2-6
#define REV_FLY_BY_WIRE_CH2 -1 //-1 will invert it // change to 1 or -1 to reverse elevator
Replies
Perhaps someone can show me where in the code of v2.1 is the amount and direction of the fly-by-wire determined?
This mode is called Fly_By_Wire mode (stabilization with manual override). So change item #2-5 to 1 or -1 to reverse rudder/ailerons for this mode only
//2-5
#define REV_FLY_BY_WIRE_CH1 -1 //-1 will invert it // change to 1 or -1 to reverse rudder/ailerons
//2-6
#define REV_FLY_BY_WIRE_CH2 -1 //-1 will invert it // change to 1 or -1 to reverse elevator
Hope this helps