NWH Aerodynamics
Search Results for

    Show / Hide Table of Contents

    Class ControlSurface

    Base class for aircraft control surfaces that modify airfoil aerodynamic properties through deflection. Handles rotation animation, input processing, and integration with the airfoil system.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    AircraftMonoBehaviour
    ControlSurface
    AileratorControlSurface
    AileronControlSurface
    ElevatorControlSurface
    FlapControlSurface
    RudderControlSurface
    Inherited Members
    AircraftMonoBehaviour._aircraftController
    AircraftMonoBehaviour._inputManager
    Namespace: NWH.Aerodynamics.AircraftController.ControlSurfaces
    Assembly: NWH.Aerodynamics.dll
    Syntax
    [RequireComponent(typeof(Airfoil))]
    public class ControlSurface : AircraftMonoBehaviour
    Remarks

    Control surfaces work by changing the effective camber and angle of attack of the attached airfoil, generating additional lift and drag forces. The deflection angle directly affects the airfoil's coefficient of lift curve, with positive deflections typically increasing lift generation.

    The system supports two rotation methods: LocalAxis (around airfoil X-axis) for simple hinge-like movement, and LeadingEdge rotation around the airfoil's front edge for more realistic control surface mechanics. Surface effectiveness scales with airspeed and decreases at high angles due to flow separation.

    Control authority is highest at moderate airspeeds and angles of attack. At very low speeds, control surfaces become ineffective, while at high speeds, excessive deflection can cause flow separation and loss of effectiveness. Typical control surface deflections range from 15-30°.

    Fields

    | Edit this page View Source

    angle

    Current deflection angle from neutral position in degrees. Positive values typically generate upward forces, negative values downward forces.

    Declaration
    [Tooltip("Current ControlSurface angle from the resting position in [deg].")]
    public float angle
    Field Value
    Type Description
    float
    Remarks

    The deflection angle directly affects the airfoil's effective camber and angle of attack. Most control surfaces operate effectively within ±25° deflection range.

    | Edit this page View Source

    angleSmoothing

    Control surface actuation smoothing factor (0-1 range). Higher values provide smoother movement but slower response to input changes.

    Declaration
    [Range(0, 1)]
    [Tooltip("    Smoothing intensity of the control surface angle. Higher value will result in slower\r\n    but smoother ControlSurface actuation.")]
    public float angleSmoothing
    Field Value
    Type Description
    float
    Remarks

    Simulates hydraulic or servo actuation lag. Values around 0.1-0.3 provide realistic control surface movement. Set to 0 for instant response, 1 for maximum smoothing.

    | Edit this page View Source

    maxAngle

    Maximum deflection angle in degrees (positive direction). Limits control authority to prevent stall or structural damage.

    Declaration
    [Range(0, 60)]
    [Tooltip("Maximum (absolute) rotation angle of the control surface. Should be a positive number.")]
    public float maxAngle
    Field Value
    Type Description
    float
    Remarks

    Typical values: Ailerons 15-25°, Elevators 20-30°, Rudders 25-35°, Flaps 40-60°. Excessive deflection angles can cause flow separation and loss of effectiveness.

    | Edit this page View Source

    minAngle

    Maximum deflection angle in degrees (negative direction). Should be positive value representing the negative limit magnitude.

    Declaration
    [Range(0, 60)]
    [Tooltip("Minimum (absolute) rotation angle of the control surface. Should be a positive number.")]
    public float minAngle
    Field Value
    Type Description
    float
    Remarks

    Often symmetric with maxAngle for primary controls (ailerons, elevators). May differ for asymmetric surfaces like flaps or trim tabs.

    | Edit this page View Source

    reverseRotation

    If true rotation angle will be reversed.

    Declaration
    [Tooltip("If true rotation angle will be reversed.")]
    public bool reverseRotation
    Field Value
    Type Description
    bool
    | Edit this page View Source

    rotationType

    Control surface transform rotation type. LocalAxis - rotates the surface around the Airfoil transform's X-axis. LeadingEdge -rotates the surface around the A-B edge of the Airfoil.

    Declaration
    [Tooltip("    Control surface transform rotation type.\r\n    LocalAxis - rotates the surface around the Airfoil transform's X-axis.\r\n    LeadingEdge -rotates the surface around the A-B edge of the Airfoil.")]
    public ControlSurface.RotationType rotationType
    Field Value
    Type Description
    ControlSurface.RotationType
    | Edit this page View Source

    side

    Side of the aircraft the ControlSurface is on.

    Declaration
    [Tooltip("Side of the aircraft the ControlSurface is on.")]
    public ControlSurface.Side side
    Field Value
    Type Description
    ControlSurface.Side
    | Edit this page View Source

    targetAirfoil

    Airfoil this ControlSurface is connected to.

    Declaration
    [Tooltip("Airfoil this ControlSurface is connected to.")]
    public Airfoil targetAirfoil
    Field Value
    Type Description
    Airfoil
    | Edit this page View Source

    trimSpeed

    Trim speed coefficient of ControlSurface.

    Declaration
    [Tooltip("Trim speed coefficient of ControlSurface.")]
    public float trimSpeed
    Field Value
    Type Description
    float

    Methods

    | Edit this page View Source

    ApplyAngle(float, float)

    Declaration
    protected void ApplyAngle(float targetAngle, float trimInput = 0)
    Parameters
    Type Name Description
    float targetAngle
    float trimInput
    | Edit this page View Source

    Awake()

    Declaration
    public override void Awake()
    Overrides
    AircraftMonoBehaviour.Awake()
    | Edit this page View Source

    FixedUpdate()

    Declaration
    public virtual void FixedUpdate()
    | Edit this page View Source

    Reset()

    Declaration
    public virtual void Reset()
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics