Main Content

Aero.Aircraft.ControlState Class

Namespace: Aero

Define control states of fixed-wing state

Since R2021a

Description

An object of the Aero.Aircraft.ControlState class defines and manages the control states of fixed-wing states.

Note

This class supports fixed-wing objects. Do not directly use this class. To set up the command state vectors on a fixed-wing object, see the setupControlStates method.

Class Attributes

Sealed
true

For information on class attributes, see Class Attributes.

Properties

expand all

Current control state value, specified as a scalar numeric.

Attributes:

GetAccess
public
SetAccess
public

Data Types: double

Maximum value of control surface, specified as a scalar numeric.

Attributes:

GetAccess
public
SetAccess
public

Data Types: double

Minimum value of control surface, specified as a scalar numeric.

Attributes:

GetAccess
public
SetAccess
public

Data Types: double

Control states upon which the control state depends, specified as a two-element vector.

For asymmetrical control surfaces, the two asymmetrical control states are settable, but the resulting effective control state is not.

Attributes:

GetAccess
public
SetAccess
public

Data Types: char | string

Current control state value, specified as 'on' or 'off'. Specify 'on' to make the control state settable. Otherwise, set to 'off'.

Tip

For asymmetrical control surfaces, the two asymmetrical control states are settable, but the resulting effective control state is not.

Attributes:

GetAccess
public
SetAccess
public

Data Types: double

Aero.Aircraft.Properties object, specified as a scalar.

Attributes:

GetAccess
public
SetAccess
public

Examples

collapse all

Create and set up dynamic behavior and the current state for the fixed-wing object aircraft.

Create a fixed-wing object.

aircraft = Aero.FixedWing()
aircraft = 

  FixedWing with properties:

        ReferenceArea: 0
        ReferenceSpan: 0
      ReferenceLength: 0
         Coefficients: [1×1 Aero.FixedWing.Coefficient]
     DegreesOfFreedom: "6DOF"
             Surfaces: [1×0 Aero.FixedWing.Surface]
              Thrusts: [1×0 Aero.FixedWing.Thrust]
          AspectRatio: NaN
           UnitSystem: "Metric"
          AngleSystem: "Radians"
    TemperatureSystem: "Kelvin"
           Properties: [1×1 Aero.Aircraft.Properties]

To define the aircraft dynamic behavior, set a coefficient for it.

aircraft = setCoefficient(aircraft, "CD", "Zero", 0.27)
aircraft = 

  FixedWing with properties:

        ReferenceArea: 0
        ReferenceSpan: 0
      ReferenceLength: 0
         Coefficients: [1×1 Aero.FixedWing.Coefficient]
     DegreesOfFreedom: "6DOF"
             Surfaces: [1×0 Aero.FixedWing.Surface]
              Thrusts: [1×0 Aero.FixedWing.Thrust]
          AspectRatio: NaN
           UnitSystem: "Metric"
          AngleSystem: "Radians"
    TemperatureSystem: "Kelvin"
           Properties: [1×1 Aero.Aircraft.Properties]

Define the aircraft's current state.

state = Aero.FixedWing.State("Mass", 500)
state = 

  State with properties:

                   Alpha: 0
                    Beta: 0
                AlphaDot: 0
                 BetaDot: 0
                    Mass: 500
                 Inertia: [3×3 table]
         CenterOfGravity: [0 0 0]
        CenterOfPressure: [0 0 0]
             AltitudeMSL: 0
            GroundHeight: 0
                      XN: 0
                      XE: 0
                      XD: 0
                       U: 50
                       V: 0
                       W: 0
                     Phi: 0
                   Theta: 0
                     Psi: 0
                       P: 0
                       Q: 0
                       R: 0
                  Weight: 4905
             AltitudeAGL: 0
                Airspeed: 50
             GroundSpeed: 50
              MachNumber: 0.1469
            BodyVelocity: [50 0 0]
          GroundVelocity: [50 0 0]
                      Ur: 50
                      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: 1.5312e+03
             Environment: [1×1 Aero.Aircraft.Environment]
              UnitSystem: "Metric"
             AngleSystem: "Radians"
       TemperatureSystem: "Kelvin"
           ControlStates: [1×0 Aero.Aircraft.ControlState]
        OutOfRangeAction: "Limit"
        DiagnosticAction: "Warning"
              Properties: [1×1 Aero.Aircraft.Properties]

Calculate the forces and moments on the aircraft.

[F, M] = forcesAndMoments(aircraft, state)
F =

           0
           0
        4905


M =

     0
     0
     0

Limitations

You cannot subclass Aero.Aircraft.ControlState.

Version History

Introduced in R2021a