Ardupilot config for any airframes

Yello people,

As I see, the current AP code development for Easy Star only.
Only 2 questions:
1. Which config parameters I need to change to use AP for another airframe?
2. How to calculate this parameters? (I think those parameters will depend per each airftame)

Thanx for any advises

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • as I see there are following airframe depence paremeters:

    Apconfig.h
    /***************************************/
    // AIRFRAME SETTINGS
    #define MIXING_MODE 0 //Servo mixing mode 0 = Normal, 1 = Elevons (or v tail)
    // NOTE - IF USING ELEVONS, 1-2 AND 1-3 SHOULD BE 1
    #define REVERSE_ROLL 1 // To reverse roll, PUT -1 to reverse it
    #define REVERSE_PITCH 1 // To reverse pitch, PUT -1 to reverse it
    #define REVERSE_RUDDER 1 // To reverse rudder for 4 channel control setups
    // JUST FOR ELEVONS:
    #define REVERSE_ELEVONS 1 // Use 1 for regular, -1 if you need to reverse roll direction
    #define REVERSE_CH1_ELEVON -1 // To reverse channel 1 elevon servo, PUT -1 to reverse it
    #define REVERSE_CH2_ELEVON 1 // To reverse channel 2 elevon servo, PUT -1 to reverse it
    // Airplane speed control
    #define AIRSPEED_CRUISE 25 // meters/s : Speed to try and maintain - You must set this value even without an airspeed sensor!
    #define AIRSPEED_RATIO 0.1254 // If your airspeed is under-reporting, increase this value to something like .2
    // NOTE - The range for throttle values is 0 to 125
    // NOTE - For proper tuning the THROTTLE_CRUISE value should be the correct value to produce AIRSPEED_CRUISE in straight and level flight with your airframe
    #define THROTTLE_MIN 0 // (0-100) raise it if your plane falls to quickly when decending.
    #define THROTTLE_CRUISE 45 // (0-100) Default throttle value - Used for central value.
    #define THROTTLE_MAX 75 // (0-100) example: 70 = 56% throttle (lower this if your plane is overpowered)
    // For use in Fly By Wire B mode in meters per second
    #define AIRSPEED_FBW_MIN 6 // meters/s : Minimum airspeed for Fly By Wire mode B, throttle stick at bottom
    #define AIRSPEED_FBW_MAX 30 // meters/s : Maximum airspeed for Fly By Wire mode B, throttle stick at top

    AP_PID_Settings.h
    #define XTRACK_GAIN 10 // Amount to compensate for crosstrack (degrees/100 per meter)
    #define XTRACK_ENTRY_ANGLE 3000 // Max angle used to correct for track following degrees*100
    //ATTITUDE: ROLL GAINS [Start with changes of no more than 25% at a time]
    // IMPORTANT!! Servo Gain values will be 100 times less than equivalent gains for ArduPilot 2.5
    #define SERVO_ROLL_P .004 // Primary value to tune - overall proportional term determines how much rudder/aileron you use to turn
    #define SERVO_ROLL_I .00 // roll PID integrator gain (value should generally be low)
    #define SERVO_ROLL_D .00 // roll PID derivative gain (for advanced users - should be zero for most airframes)
    #define SERVO_ROLL_INT_MAX 500 // Maximium integrator value in degrees * 100
    #define ROLL_SLEW_LIMIT 0 // Use to limit slew rate of roll servo. If zero then slew rate is not limited
    // Value is degree per second limit
    //ATTITUDE: PITCH GAINS [Start with changes of no more than 25% at a time]
    //IMPORTANT!! Servo Gain values will be 100 times less than equivalent gains for ArduPilot 2.5
    #define SERVO_PITCH_P .005 // Pitch Proportional gain
    #define SERVO_PITCH_I .0 // Pitch integrator gain (value should generally be low)
    #define SERVO_PITCH_D .0 // Pitch derivative gain (for advanced users - should be zero for most airframes)
    #define SERVO_PITCH_INT_MAX 500 // Maximum integrator value in degrees * 100
    #define PITCH_COMP .20 // Pitch compensation vs. Roll bank angle.
    // NOTE!! The implementation of pitch compensation has been changed.
    // The optimal value for your airframe will likely differ between 2.5 and 2.6
    //ATTITUDE: RUDDER GAINS
    // IMPORTANT!! Servo Gain values will be 100 times less than equivalent gains for ArduPilot 2.5
    #define SERVO_RUDDER_P .000 // Primary value to tune - overall proportional term determines how much rudder you use to coordinate turn
    #define SERVO_RUDDER_I .0 // roll PID integrator gain (value should generally be low)
    #define SERVO_RUDDER_D 0.0 // roll PID derivative gain (for advanced users - should be zero for most airframes)
    #define SERVO_RUDDER_INT_MAX 500 //Maximium integrator value in degrees * 100
    #define RUDDER_MIX 0.5
    //NAV: ROLL GAINS [Start with changes of no more than 25% at a time]
    #define NAV_ROLL_P .7 // Primary value to tune - overall proportional term determines how aggressively we bank to change heading
    #define NAV_ROLL_I .01 // roll PID integrator gain (value should generally be low)
    #define NAV_ROLL_D .02 // roll PID derivative gain (for advanced users - should be zero for most airframes)
    #define NAV_ROLL_INT_MAX 500 // Maximium integrator value in degrees * 100
    //NAV: PITCH GAINS [Start with changes of no more than 25% at a time]
    #define NAV_PITCH_ASP_P .65 // Overall proportional term determines how aggressively we change pitch to maintain airspeed
    #define NAV_PITCH_ASP_I .0 // PID integrator gain (value should generally be low)
    #define NAV_PITCH_ASP_D 0.0 // PID derivative gain (for advanced users - should be zero for most airframes)
    #define NAV_PITCH_ASP_INT_MAX 500 // Maximium integrator value in degrees * 100
    #define NAV_PITCH_ALT_P .65 // Overall proportional term determines how aggressively we change pitch to maintain airspeed
    #define NAV_PITCH_ALT_I .0 // PID integrator gain (value should generally be low)
    #define NAV_PITCH_ALT_D 0.0 // PID derivative gain (for advanced users - should be zero for most airframes)
    #define NAV_PITCH_ALT_INT_MAX 500 // Maximium integrator value in degrees * 100
    //ENERGY HEIGHT: THROTTLE OUTPUT GAINS [Start with changes of no more than 25% at a time]
    #define THROTTLE_TE_P .50 // Proportional
    #define THROTTLE_TE_I .0 // Integrator
    #define THROTTLE_TE_D .0 // Derivative
    #define THROTTLE_TE_INT_MAX 20 // (0-100) Integrator limit.
    #define THROTTLE_SLEW_LIMIT 0 // Use to limit slew rate of throttle output. If zero then slew rate is not limited
    // Value is throttle value (0-100) per second limit
    #define P_TO_T 2.5 // Pitch to Throttle feedforward gain (used when no airspeed sensor)
    //FLY BY WIRE AIRSPEED: THROTTLE OUTPUT GAINS
    #define THROTTLE_ALT_P .32 //Proportional
    #define THROTTLE_ALT_I .04 //Integrator
    #define THROTTLE_ALT_D 0.0 //Derivative
    #define THROTTLE_ALT_INT_MAX 20 // (0-100) Integrator limit.
    //NAVIGATION: PARAMETERS
    //Note: Some Gains are now variables
    #define HEAD_MAX 4500 // deg * 100 : The maximum commanded bank angle (left and right) degrees*100
    #define PITCH_MAX 1500 // deg * 100 : The maximum commanded pitch up angle degrees*100
    #define PITCH_MIN -2500 // deg * 100 : The maximum commanded pitch down angle degrees*100
    #define LOITER_RADIUS 40 // meters : radius in meters of a Loiter
    // Auto launch and land
    #define TAKE_OFF_ALT 75 // meters. Altitude below which take-off controls apply
    #define TAKE_OFF_PITCH 25 // degrees : Pitch value to hold during take-off
    #define LAND_PITCH 15 // degrees : Pitch value to hold during landing
    #define AIRSPEED_SLOW 5 // meters/s
    #define THROTTLE_SLOW 20 // 0-100 : This should be the throttle value that produces AIRSPEED_SLOW in straight and level flight

    #define SLOW_RADIUS 60 // meters : When this becomes the current waypoint we will decrease airspeed_cruise to AIRSPEED_SLOW. Replace 999 with the beginning of your landing pattern
    #define THROTTLE_CUT_RADIUS 40 // meters : When this becomes the current waypoint we will cut the throttle; set it so it is well beyond the touchdown zone so that it is not reached, else you will enter RTL mode or loop waypoints

    -----------------
    How to calculate a optimal parameters for new airframe (not Easy Star)?
This reply was deleted.

Activity