# Fine Tuning By now you should have set up a rudimentary flight model that defines the geometry, the aerodynamics, the engines, the fuel system, and the electrics for the aircraft. At this point you can test the aircraft and it should fly and behave fairly similarly to the "real" aircraft, however there will almost certainly be differences and issues. So, this means you need to do some "fine tuning" of the flight model which is what we'll discuss on this page. **IMPORTANT**: Even after performing this fine tuning, your aircraft will not be completely correct in its behavior and handling. There are a **vast** number of components available and each aircraft will require a unique combination of parameters and values to fly correctly. This is something that is impossible for us to cover in a tutorial and as such the idea is that at the end of this section you have a more-or-less working aircraft that you can then refine using: - the various debug windows - the documentation for each parameter - the information gained form the {{< glossterm >}}poh{{< /glossterm >}} and other sources - your own intuition for how it "feels" when flying     ### Define Moments Of Inertia You should have already set up the everything that influences the weight of the aircraft and the distribution of that weight over its volume, so now it is time to set the empty aircraft {{< glossterm >}}moi{{< /glossterm >}}s. These are edited in the [`[WEIGHT_AND_BALANCE]`](../../../content-configuration/cfg-files/flight_model.cfg/#weightandbalance) section of the `flight_model.cfg` file: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Define_Flight_Model/tuning/tuning_1_moi.png" alt="The Different MOI Parameters In The Flight Model Tab" >}} - **Empty Weight Pitch MOI** ([`empty_weight_pitch_MOI`](../../../content-configuration/cfg-files/flight_model.cfg/#empty_weight_pitch_MOI)): The pitch {{< glossterm >}}moi{{< /glossterm >}}, in {{< glossterm >}}slug_sqft{{< /glossterm >}}, when the aircraft is empty.   - **Empty Weight Roll MOI** ([`empty_weight_roll_MOI`](../../../content-configuration/cfg-files/flight_model.cfg/#empty_weight_roll_MOI)): The roll {{< glossterm >}}moi{{< /glossterm >}}, in {{< glossterm >}}slug_sqft{{< /glossterm >}}, when the aircraft is empty.   - **Empty Weight Yaw MOI** ([`empty_weight_yaw_MOI`](../../../content-configuration/cfg-files/flight_model.cfg/#empty_weight_yaw_MOI)): The yaw {{< glossterm >}}moi{{< /glossterm >}}, in {{< glossterm >}}slug_sqft{{< /glossterm >}}, when the aircraft is empty.   - **Empty Weight Coupled MOI** ([`empty_weight_coupled_MOI`](../../../content-configuration/cfg-files/flight_model.cfg/#empty_weight_coupled_MOI)): The empty transverse {{< glossterm >}}moi{{< /glossterm >}}, in {{< glossterm >}}slug_sqft{{< /glossterm >}}, when the aircraft is empty.   If you have the data available for these setting then you should always use it, but if not, then you can use the **Debug** menu in the SimObject Editor and select the [Weight](../../../devmode/editors/simobject-editor/debug_info/simobject-debug-menu/#weight) debug window. Here you can find the estimated typical empty MOI values: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Define_Flight_Model/tuning/tuning_2_estimated_moi.png" alt="The Estimated Typical MOIs In The Weight Debug Window" >}} These {{< glossterm >}}moi{{< /glossterm >}}s are calculated based on the dimensions and geometric shape of the aircraft, and you can use these values to fill in the parameters in the SimObject Editor, then tweak them as required.     ### Advanced Wing Effects The following explains the specific sections that should be modified at this point to perfect the flight model for the aircraft with relation to the aircraft geometry.   #### Wing Camber The wing [`wing_camber`](../../../content-configuration/cfg-files/flight_model.cfg/#wing_camber) parameter tells the simulation how the airflow will affect the lift forces as it moves over the wing: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Define_Flight_Model/tuning/tuning_3_camber.png" alt="The Wing Camber Parameter In The Geometry Section" >}}   When the airflow is moving over the wing, it is bent, and the air particles are first accelerating upwards a little and then they accelerate downwards a lot. The resulting reaction is what creates lift on the wing: when the air particles accelerate downwards, the wing accelerates upwards which corresponds to the lift force. This uneven acceleration of air particles, up first and then down, creates a moment on the surface, and the larger the difference, the more the wing will want to pitch down. This effect is fully automatic but the wing camber parameter allows you to define how much of the effect you want to get by altering the convexity of the wing itself. Basically, the more the wing is cambered, the larger the difference between the up and then down acceleration of the air, and the larger the pitch moment.   The following illustration helps show how this affects the actual simulated wing geometry: ![Illustration Of How Camber Is Calculated In The Simulation](images/7_Samples_Tutorials/Tutorials/Define_Flight_Model/tuning/tuning_20_camber.png)As you can see, the simulation does not model a fully curved wing surface, but instead creates an upper "front" surface and an upper "back" surface, as well as the corresponding lower surfaces. The camber is the difference in angle between those surfaces, and the mean camber line is calculated along the geometric center of the wing at half-wing thickness. Note that the current flight model does not permit setting the camber for the top and bottom surfaces independently, and the bottom camber will be derived in symmetry with the top surface camber. Also note that the value cannot be 0 and inputting a value of 0 will force the flight model to a default value of 1.   #### Wing Incidence Most aircraft have some wing incidence to produce some quantity of lift when the aircraft pitch/{{< glossterm >}}aoa{{< /glossterm >}} is zero, which set using the [`wing_incidence`](../../../content-configuration/cfg-files/flight_model.cfg/#wing_incidence) parameter: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Define_Flight_Model/tuning/tuning_6_incidence.png" alt="The Wing Incidence Parameter In The Geometry Section" >}}   Within the simulation, all aircraft are normalized through a virtual wind tunnel, which means that the overall lift and drag curves will correspond to the data defined for the base aerodynamic parameters, ie: incidence is the average chord incidence, and normalisation will change the incidence to get the target lift polar. The best result is always when normalisation makes zero changes, which will happen when the defined geometry of the plane matches the defined performance. The further apart the geometry and the expected performance are, the more the normalisation will change the incidence.   Note that setting the correct wing incidence will affect each simulated wing surface and will have an effect on the exact level of lift and drag, depending on the pitch of the aircraft. Just like the definition of wing twist, it will slightly change the shape of the lift and drag curves, without changing the lift and drag values at maximum and zero {{< glossterm >}}aoa{{< /glossterm >}}.   #### Wing Twist The [`wing_twist`](../../../content-configuration/cfg-files/flight_model.cfg/#wing_twist) parameter affects the incidence angle of the surfaces: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Define_Flight_Model/tuning/tuning_5_twist.png" alt="The Wing Twist Parameter In The Geometry Section" >}}   On most aircraft, the incidence at the exterior edge of the wing is lower than the incidence close to the fuselage. Now, because wings stall at a given angle of attack, this twist allows the stall to occur in the *middle* of the wing first and then to propagate towards the end of the wing. While this happens, and because the end is not stalled yet, the ailerons will remain effective allowing roll control over the aircraft. This effect is an important component of whether the aircraft will enter a spin when it stalls.   Twist is computed from wing root to wing tip around the average chord incidence, as shown below: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Define_Flight_Model/tuning/tuning_22_twist.png" alt="Illustration Of Wing Twist Relative To The Angle Of Incidence" >}}   Note too that the wing twist value may result in the wing producing negative lift at the outside and positive lift close to the fuselage when flying at high speeds. {{< image-center src="images/7_Samples_Tutorials/Tutorials/Define_Flight_Model/tuning/tuning_21_twistdebug.png" alt="The Debug Overlay Showing Effects Of Wing Twist At High Speed" >}}   #### Adverse Yaw Adverse yaw is the natural and undesirable tendency for an aircraft to yaw in the opposite direction of a roll. ![Illustration Of The Effect Of Adverse Yaw When Turning](images/7_Samples_Tutorials/Tutorials/Define_Flight_Model/tuning/tuning_26_adverseyaw.png)It is caused by the difference in lift and drag of each wing, and to modify this and create a more realistic simulation you can edit the [`aileron_up_drag_coef`](../../../content-configuration/cfg-files/flight_model.cfg/#aileron_up_drag_coef) , and [`aileron_down_drag_coef`](../../../content-configuration/cfg-files/flight_model.cfg/#aileron_up_drag_coef) values in the **Aerodynamics** section of the Flight Model tab: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Define_Flight_Model/tuning/tuning_14_yaw.png" alt="The Aileron Drag Parameters In The Aerodynamics Section" >}} To increase the adverse yaw effect, increase the drag of the *down* aileron and decrease it for the *up* aileron.     ### Lift Coefficients And Fuselage CX At this point you will also want to go ahead and set the [`elevator_lift_coef`](../../../content-configuration/cfg-files/flight_model.cfg/#elevator_lift_coef) and [`rudder_lift_coefficient`](../../../content-configuration/cfg-files/flight_model.cfg/#elevator_lift_coef) in the **Aerodynamics** section of the **Flight Model** tab: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Define_Flight_Model/tuning/tuning_7_coefficients.png" alt="The Rudder And Elevator Parameters In The Geometry Section" >}}   These parameters are set based on the aspect ratio curve, eg: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Define_Flight_Model/tuning/tuning_8_aspect.png" alt="Aspect Ratio Curves For Rudder/Aileron Efficiency" >}} - Elevator aspect ratio is usually between 3 and 5, so a good starting value for the elevator coefficient would be between 3.3 and 4.25. - Rudder aspect ratio is usually between 1 and 2, so a good starting value for the rudder coefficient would be between 1.5 and 3. Here you should also take a moment to set the [`fuselage_lateral_cx`](../../../content-configuration/cfg-files/flight_model.cfg/#fuselage_lateral_cx) value: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Define_Flight_Model/tuning/tuning_9_fuselage.png" alt="The Fuselage Lateral CX Parameter In The Geometry Section" >}}   Fuselage CX has a default value of 4.0 and should ideally fall between the range of 0.2 and 0.8. This value helps give more YAW stability (ie: how easily the aircraft will return to center).   Finally, you should set the following effectiveness scalars in the **Flight Tuning** section:   - [`elevator_effectiveness`](../../../content-configuration/cfg-files/flight_model.cfg/#elevator_effectiveness) - [`aileron_effectiveness`](../../../content-configuration/cfg-files/flight_model.cfg/#aileron_effectiveness) - [`rudder_effectiveness`](../../../content-configuration/cfg-files/flight_model.cfg/#rudder_effectiveness)   These are used to scale the different coefficients and can be tweaked later, but to start with we recommend setting them to 1.     ### Elasticity Settings You will want to go ahead and setup the following tables in the **Geometry** section of the Flight Model tab: - [`elevator_elasticity_table`](../../../content-configuration/cfg-files/flight_model.cfg/#elevator_elasticity_table)) - [`aileron_elasticity_table`](../../../content-configuration/cfg-files/flight_model.cfg/#elevator_elasticity_table)) - [`rudder_elasticity_table`](../../../content-configuration/cfg-files/flight_model.cfg/#elevator_elasticity_table)) - [`elevator_trim_elasticity_table`](../../../content-configuration/cfg-files/flight_model.cfg/#elevator_elasticity_table)) These tables can be used to scale up or down the different control surface deflection angles depending on the current dynamic pressure: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Define_Flight_Model/tuning/tuning_10_elasticity.png" alt="The Different Elasticity Tables In The SimObject Editor" >}} Within the simulation, dynamic pressure (expressed in {{< glossterm >}}psf{{< /glossterm >}}) is airspeed dependent, so these tables allows you to reduce deflection based on the correlation between the given dynamic pressure and a yoke correction factor. You should open the [Speed](../../../devmode/editors/simobject-editor/debug_info/simobject-debug-menu/#speed) debug window, as there you can see the current dynamic pressure: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Define_Flight_Model/tuning/tuning_11_pressure.png" alt="The Dynamic Pressure Readings In The Speed Debug Window" >}} The general process for setting these values is as follows: - Set the elevator/aileron/rudder size and max angle to get the desired stall - Set the elasticity to 1 at stall speed. - Set the elasticity to get the maximum {{< glossterm >}}g{{< /glossterm >}}'s at max speed. - Set the elasticity to get the maximum {{< glossterm >}}g{{< /glossterm >}}'s at maneuver speed.     ### Trim You need to adjust the default trim for the aircraft by setting the [`htail_incidence`](../../../content-configuration/cfg-files/flight_model.cfg/#htail_incidence) value: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Define_Flight_Model/tuning/tuning_12_htail.png" alt="The Htail Incidence Parameter In The SimObject Editor" >}} For this, you should be flying the aircraft at cruise speed, and then set the horizontal tail incidence until the aircraft is naturally trimmed for cruise speed at trim 0.   Once you have edited this you need to edit the [`elevator_trim_neutral`](../../../content-configuration/cfg-files/flight_model.cfg/#elevator_trim_neutral) value: {{< image-center src="images/7_Samples_Tutorials/Tutorials/Define_Flight_Model/tuning/tuning_13_trim.png" alt="The Elevator Trim Neutral Parameter In The SimObject Editor" >}} This value is used to set set the default take off trim (as well as the green band on the external HUD trim indicator). When setting this value, the aircraft should *not* be able to take off by itself at, or before, rotation speed - 30% above published rotation speed would be a good starting point.