Main Content

Aero.FixedWing.Coefficient Class

Namespace: Aero

Create Aero.FixedWing aircraft coefficient set

Since R2021a

Description

Aero.FixedWing.Coefficient creates an Aero.FixedWing coefficient set that describes the behavior and body of an aircraft.

Class Attributes

Sealed
true

For information on class attributes, see Class Attributes.

Creation

Description

fixedWingCoefficient = Aero.FixedWing.Coefficient creates a single Aero.FixedWing.Coefficient object with default property values.

fixedWingCoefficient = Aero.FixedWing.Coefficient(N) creates an N-by-N matrix of Aero.FixedWing.Coefficient objects with default property values.

fixedWingCoefficient = Aero.FixedWing.Coefficient(M,N,P,...) or Aero.FixedWing.Coefficient([M N P ...]) creates an M-by-N-by-P-by-... array of Aero.FixedWing.Coefficient objects with default property values.

fixedWingCoefficient = Aero.FixedWing.Coefficient(size(A)) creates an Aero.FixedWing.Coefficient object that is the same size as A and all Aero.FixedWing.Coefficient objects.

fixedWingCoefficient = Aero.FixedWing.Coefficient(__,property,propertyValue) creates an array of Aero.FixedWing.Coefficient objects with property, propertyValue pairs applied to each of the Aero.FixedWing.Coefficient array objects. For a list of properties, see Properties.

Input Arguments

expand all

Number of fixed-wing coefficient objects, specified as a scalar.

Number of fixed-wing coefficient objects, specified as a scalar.

Number of fixed-wing coefficient objects, specified as a scalar.

Size of fixed-wing coefficient object, specified as a scalar.

Properties

expand all

Public Properties

Coefficient values, specified in a 6-by-N table. Each row in the table must be a member of and in the same order as the StateOutput property.

Setting the Table property also sets the contents of the Values property and StateVariables to the Table property variables. To have a Simulink.LookupTable object and a constant value in the same column, use the setCoefficient or set the desired content of the Values property. Setting the Table property does not set the ReferenceFrame.

Note

Tables must have a single data type per column. If there are both constant values and Simulink.LookupTable objects in a given column, the Table property automatically converts the constants to Simulink.LookupTable objects.

Attributes:

GetAccess
public
SetAccess
public

Data Types: double

Coefficient values, specified as a 6-by-N cell array. Each entry in the cell array must be a single coefficient value corresponding to the StateOutput (row) and StateVariable (column) properties. Each coefficient value must be a scalar numeric value, Aero.Aircraft.CompositeCoefficient, or a Simulink.LookupTable object. If a value is a Simulink.LookupTable object, the FieldName of each breakpoint must be a valid property of the Aero.FixedWing.State object.

Unlike the Table property, Values do need to be a single data type per column.

Attributes:

GetAccess
public
SetAccess
public

Data Types: double

State variable names, specified as a 1-by-N vector of strings. Each entry in this property corresponds to a column in the Values property. Each entry in StateVariables must be a valid property in the Aero.FixedWing.State object. Adding a state variable adds a column of zeros to the end of the Values cell array.

Attributes:

GetAccess
public
SetAccess
public

Data Types: char | string

Reference frame for coefficients, specified as Wind, Body, or Stability with these outputs:

Reference FrameCoefficient Output

Wind

Forces:

  • drag (CD)

  • Y (CY)

  • lift (CL)

Moments:

  • L (Cl)

  • M (Cm)

  • N (Cn)

Body

Forces:

  • X (CX)

  • Y (CY)

  • Z (CZ)

Moments:

  • L (Cl)

  • M (Cm)

  • N (Cn)

Stability

Forces:

  • drag (CD)

  • Y (CY)

  • lift (Cn)

Moments:

  • L (Cl)

  • M (Cm)

  • N (Cn)

Example of Wind table:

CoefficientState

CD

state

CY

state

CL

state

Cl

state

Cm

state

Cn

state

Example of Body table:

CoefficientState

CX

state

CY

state

CZ

state

Cl

state

Cm

state

Cn

state

Example of Stability table:

CoefficientState

CD

state

CY

state

CL

state

Cl

state

Cm

state

Cn

state

Attributes:

GetAccess
public
SetAccess
public

Data Types: char | string

Option to multiply coefficients by state variables when calculating forces and moments. To multiply coefficients by state variables, set this property to 'on'. Otherwise, set this property to 'off'.

Attributes:

GetAccess
public
SetAccess
public

Data Types: char | string

Option to specify that nondimensional coefficients. To specify nondimensional coefficients, set this property to 'on'. Otherwise, set this property to 'off'.

Attributes:

GetAccess
public
SetAccess
public

Data Types: char | string

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

Attributes:

GetAccess
public
SetAccess
public

Protected Properties

Current state output, returned as one of these 6-by-1 vectors:

WindBodyStability

CD

CX

CD

CY

CY

CY

CL

CZ

CL

Cl

Cl

Cl

Cm

Cm

Cm

Cn

Cn

Cn

This property depends on ReferenceFrame.

Attributes:

GetAccess
Restricts access
SetAccess
protected

Data Types: char | string

Methods

expand all

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: [1x1 Aero.FixedWing.Coefficient]
     DegreesOfFreedom: "6DOF"
             Surfaces: [1x0 Aero.FixedWing.Surface]
              Thrusts: [1x0 Aero.FixedWing.Thrust]
          AspectRatio: NaN
           Properties: [1x1 Aero.Aircraft.Properties]
           UnitSystem: "Metric"
    TemperatureSystem: "Kelvin"
          AngleSystem: "Radians"

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: [1x1 Aero.FixedWing.Coefficient]
     DegreesOfFreedom: "6DOF"
             Surfaces: [1x0 Aero.FixedWing.Surface]
              Thrusts: [1x0 Aero.FixedWing.Thrust]
          AspectRatio: NaN
           Properties: [1x1 Aero.Aircraft.Properties]
           UnitSystem: "Metric"
    TemperatureSystem: "Kelvin"
          AngleSystem: "Radians"

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: [3x3 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: [3x3 double]
     BodyToInertialMatrix: [3x3 double]
         BodyToWindMatrix: [3x3 double]
         WindToBodyMatrix: [3x3 double]
    BodyToStabilityMatrix: [3x3 double]
    StabilityToBodyMatrix: [3x3 double]
          DynamicPressure: 1.5312e+03
              Environment: [1x1 Aero.Aircraft.Environment]
            ControlStates: [1x0 Aero.Aircraft.ControlState]
         OutOfRangeAction: "Limit"
         DiagnosticAction: "Warning"
               Properties: [1x1 Aero.Aircraft.Properties]
               UnitSystem: "Metric"
        TemperatureSystem: "Kelvin"
              AngleSystem: "Radians"

Calculate the forces and moments on the aircraft.

[F, M] = forcesAndMoments(aircraft, state)
F = 3×1

           0
           0
        4905

M = 3×1

     0
     0
     0

Limitations

  • This class requires a Simulink® license if the coefficient table contains Simulink.LookupTable objects.

  • You cannot subclass Aero.FixedWing.Coefficient.

Version History

Introduced in R2021a