Aero.FixedWing.State Class
Namespace: Aero
Description
Use the Aero.FixedWing.State
class to define the condition of an
Aero.FixedWing
aircraft at a time instant. The
Aero.FixedWing.State
object contains the information about the current state
of an aircraft at a single instance in time. A subclass can inherit the
Aero.FixedWing.State
.
Creation
Description
Aero.FixedWing.State
creates a single
Aero.FixedWing.State
object with default property values..
Aero.FixedWing.State(
creates an
N
)N
byN
matrix of
Aero.FixedWing.State
.
Aero.FixedWing.State(
or
M
,N
,P
,...)Aero.FixedWing.State([
creates an
M
N
P
...])M
byN
byP
by...
array of Aero.FixedWing.State
.
Aero.FixedWing.State(size(
creates an
A
))Aero.FixedWing.State
object that is the same size as
A
and all Aero.FixedWing.State
objects.
Aero.FixedWing.State(__,property,propertyValue)
creates an array of
Aero.FixedWing.State
objects with property
,
propertyValue
pairs applied to each of the
Aero.FixedWing
array objects. For a list of properties, see Properties.
Input Arguments
N
— Number of fixedwing objects
scalar
Number of fixedwing objects, specified as a scalar.
M
— Number of fixedwing objects
scalar
Number of fixedwing objects, specified as a scalar.
P
— Number of fixedwing objects
scalar
Number of fixedwing objects, specified as a scalar.
A
— Size of fixedwing object
scalar
Size of fixedwing object, specified as a scalar.
Properties
Public Properties
UnitSystem
— Unit system
'Metric'
(default)  'English (kts)'
 'English (ft/s)'
 scalar string  character vector
Unit system, specified as a scalar string or character vector.
Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
AngleSystem
— Angle system
'Radians'
(default)  'Degrees'
Angle system, specified as 'Radians'
or
'Degrees'
.
Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
TemperatureSystem
— Temperature system
'Kelvin'
(default)  'Celsius'
 'Rankine'
 'Fahrenheit'
Temperature system, specified as 'Kelvin'
,
'Celsius'
, 'Rankine'
, or
'Fahrenheit'
.
Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
Mass
— Fixedwing aircraft mass
0
(default)  scalar numeric
Fixedwing aircraft mass, specified as a scalar numeric, in the units:
Unit  Unit System 

newtons (N) 

slugs (slug) 

Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
Inertia
— Inertial matrix of aircraft
3by3
table of numeric values (default)  scalar numeric
Inertial matrix of aircraft, specified as a 3by3 table of numeric values specifying the body in this matrix form:
X  Y  Z  

X  Ixx  Ixy  Ixz 
Y  Iyx  Iyy  Iyz 
Z  Izx  Izy  Izz 
The matrix has these units:
Unit  Unit System 

kilogram meters squared (kg m^2) 

slug feet squared (slug ft^2) 

Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
CenterOfGravity
— Location of center of gravity
[0, 0, 0] (default)  threeelement vector
Location of center of gravity on the fixedwing aircraft in the body frame, specified as a threeelement vector in these units:
Unit  Unit System 

Meters (m) 

Feet (ft) 

Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
CenterOfPressure
— Location of center of pressure
[0, 0, 0] (default)  threeelement vector
Location of center of pressure on the fixedwing aircraft in the body frame, specified as a threeelement vector, in these units:
Unit  Unit System 

Meters (m) 

Feet (ft) 

Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
AltitudeMSL
— Altitude above sea level
0 (default)  scalar numeric
Altitude above sea level, specified as a scalar numeric, in these units:
Unit  Unit System 

Meters (m) 

Feet (ft) 

Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
GroundHeight
— Ground height above sea level
0 (default)  scalar numeric
Ground height above sea level, specified as a scalar numeric in these units:
Unit  Unit System 

Meters (m) 

Feet (ft) 

Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
XN
— North position of fixedwing aircraft
0 (default)  scalar numeric
North position of fixedwing aircraft, specified as a scalar numeric in these units:
Unit  Unit System 

Meters (m) 

Feet (ft) 

Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
XE
— East position of fixedwing aircraft
0 (default)  scalar numeric
East position of fixedwing aircraft, specified as a scalar numeric in these units:
Unit  Unit System 

Meters (m) 

Feet (ft) 

Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
U
— Forward component of ground velocity
50 (default)  scalar numeric
Forward component of ground velocity, specified as a scalar numeric in these units:
Unit  Unit System 

Meters per second (m/s) 

Feet per second (ft/s) 

Knots (kts) 

Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
V
— Side component of ground velocity
0 (default)  scalar numeric
Side component of ground velocity, specified as a scalar numeric in these units:
Unit  Unit System 

Meters per second (m/s) 

Feet per second (ft/s) 

Knots (kts) 

Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
W
— Downward component of ground velocity
0 (default)  scalar numeric
Downward component of ground velocity, specified as a scalar numeric in these units:
Unit  Unit System 

Meters per second (m/s) 

Feet per second (ft/s) 

Knots (kts) 

Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
Phi
— Euler roll angle
0 (default)  scalar numeric
Euler roll angle, specified as a scalar numeric in units of radians or degrees
depending on the AngleSystem
property.
Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
Theta
— Euler pitch angle
0 (default)  scalar numeric
Euler pitch angle, specified as a scalar numeric in units of radians or degrees
depending on the AngleSystem
property.
Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
Psi
— Euler yaw angle
0 (default)  scalar numeric
Euler yaw angle, specified as a scalar numeric in units of radians or degrees
depending on the AngleSystem
property.
Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
P
— Body roll rate
0 (default)  scalar numeric
Body roll rate, specified as a scalar numeric in units of radians per second or
degrees per second depending on the AngleSystem
property.
Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
Q
— Body pitch rate
0 (default)  scalar numeric
Body pitch rate, specified as a scalar numeric in units of radians per second or
degrees per second depending on the AngleSystem
property.
Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
R
— Body yaw rate
0 (default)  scalar numeric
Body yaw rate, specified as a scalar numeric in units of radians per second or
degrees per second depending on the AngleSystem
property.
Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
AlphaDot
— Angle of attack rate on fixedwing aircraft
0 (default)  scalar numeric
Angle of attack rate on fixedwing aircraft, specified as a scalar numeric in
units of radians per second or degrees per second depending on the
AngleSystem
property.
Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
BetaDot
— Angle of sideslip rate on fixedwing aircraft
0 (default)  scalar numeric
Angle of sideslip rate on the fixedwing aircraft, specified as a scalar numeric
in units of radians per second or degrees per second depending on the
AngleSystem
property.
Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
ControlStates
— Current control state values
vector
Current control state values, specified as a vector.
To set up control states, use
setupControlStates
.To set the control state positions, use
setState
.To get the control state positions, use
getState
.
You cannot set effective control variables created with asymmetric control surfaces.
Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
Environment
— Definition of current environment
scalar
Definition of current environment, contained in an
Aero.Aircraft.Environment
object, specified as a scalar.
Attributes:
GetAccess  public 
SetAccess  public 
Data Types: string
 char
Protected Properties
Weight
— Fixedwing aircraft weight
scalar numeric
Fixedwing aircraft weight, specified as a scalar numeric, in these units:
Unit  Unit System 

newtons (N) 

poundforce (lbf) 

Weight
depends on the values of the Mass
and
Gravity
properties of the
Aero.Aircraft.Environment
object, with the equation
Weight
= Mass
*
Environment
.Gravity
.
Attributes:
GetAccess  Restricts access 
SetAccess  protected 
Data Types: double
AltitudeAGL
— Altitude above ground level
scalar numeric
Altitude above ground level, specified as a scalar numeric value in these units:
Unit  Unit System 

meters (m) 

feet (ft) 

AltitudeAGL
depends on the values of the
AltitudeMSL
and GroundHeight
public
properties, with the equation:
AltitudeAGL
= AltitudeMSL

GroundHeight
.
Attributes:
GetAccess  Restricts access 
SetAccess  protected 
Data Types: double
XD
— Down position of fixedwing aircraft
0 (default)  scalar numeric
Down position of fixedwing aircraft, specified as a scalar numeric in these units:
Unit  Unit System 

Meters (m) 

Feet (ft) 

XD
depends on the value of the AltitudeMSL
public property, with the equation
XD
= 1
*
AltitudeMSL
.
Attributes:
GetAccess  Restricts access 
SetAccess  protected 
Data Types: double
Airspeed
— Current airspeed of fixedwing aircraft
0 (default)  scalar numeric
Current airspeed of fixedwing aircraft, specified as a scalar numeric in these units:
Unit  Unit System 

Meters/sec (m/s) 

Feet/sec (ft/s) 

knots (kts) 

Airspeed
depends on the values of the Ur
,
Vr
, and Wr
public properties, with the
equation
Airspeed
=
sqrt(Ur
^{2} +
Vr
^{2}+Wr
^{2}).
Attributes:
GetAccess  Restricts access 
SetAccess  protected 
Data Types: double
GroundSpeed
— Current ground speed of fixedwing aircraft
threeelement vector
Current ground speed of fixedwing aircraft, specified as a threeelement vector in these units:
Unit  Unit System 

Meters/sec (m/s) 

Feet/sec (ft/s) 

knots (kts) 

Groundspeed
depends on the values of the U
,
V
, and R
public properties, with the
equation
Groundspeed
=
[U
, V
,
W
].
Attributes:
GetAccess  Restricts access 
SetAccess  protected 
Data Types: double
MachNumber
— Mach number
numeric scalar
Mach number of fixedwing aircraft, specified as a numeric scalar.
MachNumber
depends on the values of the
AirSpeed
and SpeedOfSound
public properties,
with the equation
MachNumber
=
AirSpeed
/Environment.SpeedOfSound
.
Attributes:
GetAccess  Restricts access 
SetAccess  protected 
Data Types: double
BodyVelocity
— Body velocity of fixedwing aircraft
threeelement vector
Body velocity of fixedwing aircraft, specified as a threeelement vector.
BodyVelocity
depends on the values of the
GroundSpeed
, Phi
, Theta
,
and Psi
public properties, with the equation
BodyVelocity
=
GroundVelocity

InertialToBodyMatrix
*
Environment
.WindVelocity
.
Attributes:
GetAccess  Restricts access 
SetAccess  protected 
Data Types: double
GroundVelocity
— Ground velocity of fixedwing aircraft
threeelement vector
Ground velocity of the fixedwing aircraft, specified as a threeelement vector, defined with the equation
GroundVelocity
= [U
,
V
, W
].
Attributes:
GetAccess  Restricts access 
SetAccess  protected 
Data Types: double
Ur
— X component of body velocity
scalar numeric
X component of body velocity, specified as scalar numeric.
Ur
depends on
BodyVelocity
.
Attributes:
GetAccess  Restricts access 
SetAccess  protected 
Data Types: double
Vr
— Y component of body velocity
scalar numeric
Y component of body velocity, specified as scalar numeric.
Ur
depends on
BodyVelocity
.
Attributes:
GetAccess  Restricts access 
SetAccess  protected 
Data Types: double
Wr
— Z component of body velocity
scalar numeric
Z component of body velocity, specified as scalar numeric.
Ur
depends on
BodyVelocity
.
Attributes:
GetAccess  Restricts access 
SetAccess  protected 
Data Types: double
FlightPathAngle
— Flight path angle
scalar numeric
Flight path angle, specified as a scalar numeric in units of radians or degrees
depending on the AngleSystem
property.
FlightPathAngle
is defined with the equation:
FlightPathAngle
=
atan2
(W
,U
).
.
Attributes:
GetAccess  Restricts access 
SetAccess  protected 
Data Types: double
CourseAngle
— Course angle
scalar numeric
Course angle, specified as a scalar numeric in units of radians or degrees
depending on the AngleSystem
property.
CourseAngle
depends on V
and
U
with the equation
CourseAngle
=
atan2
(V
,U
).
Attributes:
GetAccess  Restricts access 
SetAccess  protected 
Data Types: double
Alpha
— Angle of attack
scalar numeric
Angle of attack, specified as a scalar numeric in units of radians or degrees
depending on the AngleSystem
property. Alpha
depends on Wr
and Ur
with the
equation:
Alpha
=
atan2
(Wr
,Ur
).
Attributes:
GetAccess  Restricts access 
SetAccess  protected 
Data Types: double
Beta
— Angle of side slip
scalar numeric
Angle of side slip, specified as a scalar numeric in units of radians or degrees
depends on the AngleSystem
property. Beta
depends on Vr
and Airspeed
with the
equation:
Beta
=
asin
(Vr
/Airspeed
).
Attributes:
GetAccess  Restricts access 
SetAccess  protected 
Data Types: double
InertialToBodyMatrix
— Inertial to body axes transformation matrix
3by3 matrix
Inertial to body axes transformation matrix, specified as a 3by3 matrix to
convert stability axes to body axes. This property depends on the
Phi
, Theta
, and Psi
properties.
Attributes:
GetAccess  Restricts access 
SetAccess  protected 
Data Types: double
BodyToInertialMatrix
— Body axes to stability axes transformation matrix
3by3 matrix
Body axes to stability axes transformation matrix, specified as a 3by3 matrix to
convert stability axes to body axes. This property depends on the
Phi
, Theta
, and Psi
properties.
Attributes:
GetAccess  Restricts access 
SetAccess  protected 
Data Types: double
BodyToWindMatrix
— Body to wind axes transformation matrix
3by3 matrix
Body to wind axes transformation matrix, specified as a 3by3 matrix to convert
body axes to wind axes. This property depends on the Alpha
and
Beta
properties.
Attributes:
GetAccess  Restricts access 
SetAccess  protected 
Data Types: double
WindToBodyMatrix
— Wind to body axes transformation matrix
3by3 matrix
Wind to body axes transformation matrix, specified as a 3by3 matrix to convert
wind axes to the body axes. This property depends on the Alpha
and
Beta
properties.
Attributes:
GetAccess  Restricts access 
SetAccess  protected 
Data Types: double
BodyToStabilityMatrix
— Body axes to stability axes transformation matrix
3by3 matrix
Body axes to stability axes transformation matrix, specified as a 3by3 matrix.
For a definition of BodyToStabilityMatrix
, see Algorithms.
Attributes:
GetAccess  Restricts access 
SetAccess  protected 
Data Types: string
 char
StabilityToBodyMatrix
— Stability axes to body matrix axes transformation matrix
3by3 matrix
Stability axes to body matrix axes transformation matrix, specified as a 3by3
matrix. For a definition of StabilityToBodyMatrix
, see Algorithms.
Attributes:
GetAccess  Restricts access 
SetAccess  protected 
Data Types: string
 char
DynamicPressure
— Dynamic pressure at current state
scalar numeric
Dynamic pressure at current state, specified as a scalar numeric in these units:
Unit  Unit System 

Pascals (Pa) 

pounds per foot squared (lbf/ft^{2}) 

This property is defined with the equation
DynamicPressure
= 0.5 *
Environment.Density
*
Airspeed
^{2}.
Attributes:
GetAccess  Restricts access 
SetAccess  protected 
Data Types: double
Methods
Public Methods
getState  Get state value 
setState  Set state value to Aero.FixedWing.State object 
setupControlStates  Set up control states for Aero.FixedWing.State
object 
Examples
Create and Use FixedWing Object
Create and set up dynamic behavior and the current state for the fixedwing object aircraft.
Create a fixedwing 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
Algorithms
The BodyToStabilityMatrix
transformation is defined by this matrix:
BodyToStabilityMatrix = [cos(Alpha), 0, sin(Alpha)] [ 0, 1, 0 ] [sin(Alpha), 0, cos(Alpha)]
The StabilityToBodyMatrix
transformation is the transpose of
BodyToStabilityMatrix
transformation:
StabilityToBodyMatrix = BodyToStabilityMatrix'
Version History
Introduced in R2021a
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
 América Latina (Español)
 Canada (English)
 United States (English)
Europe
 Belgium (English)
 Denmark (English)
 Deutschland (Deutsch)
 España (Español)
 Finland (English)
 France (Français)
 Ireland (English)
 Italia (Italiano)
 Luxembourg (English)
 Netherlands (English)
 Norway (English)
 Österreich (Deutsch)
 Portugal (English)
 Sweden (English)
 Switzerland
 United Kingdom (English)