Main Content

setupControlStates

Class: Aero.FixedWing.State
Namespace: Aero

Set up control states for Aero.FixedWing.State object

Since R2021a

Syntax

state = setupControlStates(aircraft, state)

Description

state = setupControlStates(aircraft, state) sets up initial control states for the Aero.FixedWing object.

Input Arguments

expand all

Aero.FixedWing object, specified as a scalar.

Data Types: double

Aero.FixedWing.State object, specified as a scalar.

Output Arguments

expand all

Modified Aero.FixedWing.State object, returned as a scalar.

Data Types: double

Examples

expand all

Initialize the control and command states on a cruise state.

[C182, CruiseState] = astC182();
CruiseState = setupControlStates(CruiseState,C182)
CruiseState = 

  State with properties:

                   Alpha: 0
                    Beta: 0
                AlphaDot: 0
                 BetaDot: 0
                    Mass: 82.2981
                 Inertia: [3×3 table]
         CenterOfGravity: [1.2936 0 0]
        CenterOfPressure: [1.2250 0 0]
             AltitudeMSL: 5000
            GroundHeight: 0
                      XN: 0
                      XE: 0
                      XD: -5000
                       U: 220.1000
                       V: 0
                       W: 0
                     Phi: 0
                   Theta: 0
                     Psi: 0
                       P: 0
                       Q: 0
                       R: 0
                  Weight: 2.6500e+03
             AltitudeAGL: 5000
                Airspeed: 220.1000
             GroundSpeed: 220.1000
              MachNumber: 0.2006
            BodyVelocity: [220.1000 0 0]
          GroundVelocity: [220.1000 0 0]
                      Ur: 220.1000
                      Vr: 0
                      Wr: 0
         FlightPathAngle: 0
             CourseAngle: 0
    InertialToBodyMatrix: [3×3 double]
    BodyToInertialMatrix: [3×3 double]
        BodyToWindMatrix: [3×3 double]
        WindToBodyMatrix: [3×3 double]
         DynamicPressure: 49.6149
             Environment: [1×1 Aero.Aircraft.Environment]
              UnitSystem: "English (ft/s)"
             AngleSystem: "Radians"
       TemperatureSystem: "Fahrenheit"
           ControlStates: [1×4 Aero.Aircraft.ControlState]
        OutOfRangeAction: "Limit"
        DiagnosticAction: "Warning"
              Properties: [1×1 Aero.Aircraft.Properties]

Version History

Introduced in R2021a