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
-by-N
matrix of
Aero.FixedWing.State
.
Aero.FixedWing.State(
or
M
,N
,P
,...)Aero.FixedWing.State([
creates an
M
N
P
...])M
-by-N
-by-P
-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
Number of fixed-wing objects, specified as a scalar.
Number of fixed-wing objects, specified as a scalar.
Number of fixed-wing objects, specified as a scalar.
Size of fixed-wing object, specified as a scalar.
Properties
Public Properties
Unit system, specified as a scalar string or character vector.
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: string
| char
Angle system, specified as 'Radians'
or
'Degrees'
.
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: string
| char
Temperature system, specified as 'Kelvin'
,
'Celsius'
, 'Rankine'
, or
'Fahrenheit'
.
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: string
| char
Fixed-wing 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
Inertial matrix of aircraft, specified as a 3-by-3 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
Location of center of gravity on the fixed-wing aircraft in the body frame, specified as a three-element vector in these units:
Unit | Unit System |
---|---|
Meters (m) |
|
Feet (ft) |
|
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: string
| char
Location of center of pressure on the fixed-wing aircraft in the body frame, specified as a three-element vector, in these units:
Unit | Unit System |
---|---|
Meters (m) |
|
Feet (ft) |
|
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: string
| char
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
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
North position of fixed-wing 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
East position of fixed-wing 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
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
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
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
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
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
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
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
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
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
Angle of attack rate on fixed-wing 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
Angle of sideslip rate on the fixed-wing 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
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
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
Fixed-wing aircraft weight, specified as a scalar numeric, in these units:
Unit | Unit System |
---|---|
newtons (N) |
|
pound-force (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
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
Down position of fixed-wing 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
Current airspeed of fixed-wing 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
Current ground speed of fixed-wing aircraft, specified as a three-element 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
Mach number of fixed-wing 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
Body velocity of fixed-wing aircraft, specified as a three-element 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
Ground velocity of the fixed-wing aircraft, specified as a three-element vector, defined with the equation
GroundVelocity
= [U
,
V
, W
].
Attributes:
GetAccess | Restricts access |
SetAccess | protected |
Data Types: double
X component of body velocity, specified as scalar numeric.
Ur
depends on
BodyVelocity
.
Attributes:
GetAccess | Restricts access |
SetAccess | protected |
Data Types: double
Y component of body velocity, specified as scalar numeric.
Ur
depends on
BodyVelocity
.
Attributes:
GetAccess | Restricts access |
SetAccess | protected |
Data Types: double
Z component of body velocity, specified as scalar numeric.
Ur
depends on
BodyVelocity
.
Attributes:
GetAccess | Restricts access |
SetAccess | protected |
Data Types: double
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
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
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
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
Inertial to body axes transformation matrix, specified as a 3-by-3 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
Body axes to stability axes transformation matrix, specified as a 3-by-3 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
Body to wind axes transformation matrix, specified as a 3-by-3 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
Wind to body axes transformation matrix, specified as a 3-by-3 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
Body axes to stability axes transformation matrix, specified as a 3-by-3 matrix.
For a definition of BodyToStabilityMatrix
, see Algorithms.
Attributes:
GetAccess | Restricts access |
SetAccess | protected |
Data Types: string
| char
Stability axes to body matrix axes transformation matrix, specified as a 3-by-3
matrix. For a definition of StabilityToBodyMatrix
, see Algorithms.
Attributes:
GetAccess | Restricts access |
SetAccess | protected |
Data Types: string
| char
Dynamic pressure at current state, specified as a scalar numeric in these units:
Unit | Unit System |
---|---|
Pascals (Pa) |
|
pounds per foot squared (lbf/ft2) |
|
This property is defined with the equation
DynamicPressure
= 0.5 *
Environment.Density
*
Airspeed
2.
Attributes:
GetAccess | Restricts access |
SetAccess | protected |
Data Types: double
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 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 Properties: [1×1 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: [1×1 Aero.FixedWing.Coefficient] DegreesOfFreedom: "6DOF" Surfaces: [1×0 Aero.FixedWing.Surface] Thrusts: [1×0 Aero.FixedWing.Thrust] AspectRatio: NaN Properties: [1×1 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: [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] BodyToStabilityMatrix: [3×3 double] StabilityToBodyMatrix: [3×3 double] DynamicPressure: 1.5312e+03 Environment: [1×1 Aero.Aircraft.Environment] ControlStates: [1×0 Aero.Aircraft.ControlState] OutOfRangeAction: "Limit" DiagnosticAction: "Warning" Properties: [1×1 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
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.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- 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)