Models
AeroState
AeroState(alpha, beta, alpha_dot, tas, eas, cas, ias, qinf, mach)
Aerodynamic state struct storing relevant aerodynamic data.
Constructors
Different constructors are provided:
AeroState(alpha, beta, alpha_dot, tas, eas, cas, ias, qinf, mach)
AeroState(state::State, env::Environment)
AeroState(tas::Number, alpha::Number, beta::Number, height::Number)
State
Position
Position(llh, xzy_earth, xyz_ecef)
Position information: - llh (latitude, longitude, height) [rad, rad, m] - Earth (x, y, z) [m] - ECEF (x, y, z) [m]
Constructors
PositionLLH(lat, lon, h, xe=0., ye=0., ze=0.)
PositionECEF(x, y, z, xe=0., ye=0., ze=0.)
PositionEarth(x, y, z, lat=0., lon=0., h=0.)
Attitude
Attitude objects that contains Euler angles and quaternions.
Constructors
Attitude(psi, theta, phi)
Attitude(q0, q1, q2, q3)
Environment
AtmosphereISA(temperature, pressure, density, sound_velocity)
International Standard Atmosphere 1976.
See also
atmosphere_isa(height)
References
- [1] U.S. Standard Atmosphere, 1976, U.S. Government Printing Office, Washington, D.C., 1976
From: https://en.wikipedia.org/wiki/U.S.StandardAtmosphere
Layer | h (m) | p (Pa) | T (K) | $α$ (K/m) |
---|---|---|---|---|
0 | 0 | 101325 | 288.15 | -0.0065 |
1 | 11000 | 22632.1 | 216.65 | 0 |
2 | 20000 | 5474.89 | 216.65 | 0.001 |
3 | 32000 | 868.019 | 228.65 | 0.0028 |
4 | 47000 | 110.906 | 270.65 | 0 |
5 | 51000 | 66.9389 | 270.65 | -0.0028 |
6 | 71000 | 3.95642 | 214.65 | -0.002 |
ConstantWind(direction, intensity, vertical)
Constant wind structure:
- direction: wind blowing from that direction [rad]
- intensity: wind speed [m/s]
- vertical: vertical wind speed [m/s] positive blowing upwards.
Constructors
ConstantWind(): No wind.
EarthConstantGravity(value, body_vector)
Earth Constant gravity model with value 9.80665 m/s² and oriented towards local horizon Z axis.
Constructors
EarthConstantGravity(value, body_vector)
EarthConstantGravity()
Environment(atmos::Atmosphere, wind::Wind, grav::Gravity)
Environment information composed of atmosphere, wind and gravity.
Constructors
DefatultEnvironment(): ISA atomosphere, Constant zero wind, and Constant gravity.
get_wind_NED(wind::Wind)
Express wind in local horizon axis [N, E, D].
Atmosphere
Atmospheric information at a given altitude.
Wind
Wind information at a given placement.
get_wind_body(wind::Wind, state::State)
Express wind body axis [N, E, D] given the Attitude
stored in State
.
Aircraft
PointForcesMoments
PointForcesMoments
Forces and moments applied on a point. This objects can be added, translated or rotated to be expressed in other coordinate system.
Constructor
PointForcesMoments(point::Array{Number, 1}, forces::Array{Number, 1},
moments::Array{Number, 1})
Base.:*
— Method.Multiply the forces and moments by a number.
Base.:+
— Method.Add two PointForcesMoments objects. The result will be expressed in the first point.
Base.:+
— Method.+(pfm1::PointForcesMoments, pfm2::PointForcesMoments, point::Array{T, 1})
where T<:Number
Add two PointForcesMoments objects expressing the result in point P.
Base.:-
— Method.Substract two PointForcesMoments objects. The result will be expressed in the first point.
Base.:-
— Method.-(pfm1::PointForcesMoments, pfm2::PointForcesMoments, point::Array{T, 1})
where T<:Number
Substract two PointForcesMoments objects expressing the result in point P.
Base.isapprox
— Method.Check if two PointForcesMoments are equivalent when expressed at the same point.
FlightMechanics.Simulator.Models.rotate
— Method.rotate(pfm::PointForcesMoments, psi, theta, phi)
Express the forces and moments in other coordinate system using the Euler angles that orientate the original pfm with respect to the second.
translate_forces_moments(pfm::PointForcesMoments, point::Array{T, 1}) where T<:Number
Calculate equivalent PointForcesMoments
in point Q given the forces and moments at point P. Forces are preserved and moments are calculated taking into account the arm between the two points.
$M_{Q} = M_{P} + r imes F$
Propulsion
Aerodynamics
Aerodynamics
Aerodynamic forces and moments information
FCS
RigidSolid & PointMass
RigidSolid(mass::Number, cg::Array{T, 1}, inertia::Array{T, 2})
Rigid solid represented by its mass center of gravity position reference system and inertia tensor.
Base.:+
— Method.+(comp1::RigidSolid, comp2::RigidSolid)
Compound two RigidSolid
objects. Masses are added, a new cg is calculated and the inertia tensors are added after being expressed with respect to the new center of gravity using Steiner's theorem.
PointMass(mass::Number, position::Array{T, 1})
Point mass represented by its mass and position. It is represented by a RigidSolid
with null inertia tensor.
get_inertia(rs::RigidSolid, point::Array{T, 1}) where T<:Number
Calculate inertia tensor of a RigidSolid
object in a point P using Steiner's theorem.