Contenido principal

setBodyVelocity

Class: Aero.FixedWing.State
Namespace: Aero

Calculate state from U, V, and W values

Since R2026a

Description

state = setBodyVelocity(state,U,V,W) calculates the airspeed, alpha, and beta values from U, V, and W values for the Aero.FixedWing.State object specified by state.

Input Arguments

expand all

Aero.FixedWing.State object for which to calculate airspeed, alpha, and beta values.

Forward component of ground velocity along the aircraft body x-axis, specified as a scalar numeric in these units.

UnitUnit System

Meters per second (m/s)

'Metric'

Feet per second (ft/s)

'English (kts)'

Knots (kts)

'English (ft/s)'

Data Types: double

Side component of ground velocity along the aircraft body y-axis, specified as a scalar numeric in these units.

UnitUnit System

Meters per second (m/s)

'Metric'

Feet per second (ft/s)

'English (kts)'

Knots (kts)

'English (ft/s)'

Data Types: double

Downward component of ground velocity along the aircraft body z-axis, specified as a scalar numeric in these units.

UnitUnit System

Meters per second (m/s)

'Metric'

Feet per second (ft/s)

'English (kts)'

Knots (kts)

'English (ft/s)'

Data Types: double

Output Arguments

expand all

Modified Aero.FixedWing.State object, returned as a scalar.

Data Types: double

Examples

expand all

Calculate the airspeed, alpha, and beta values from U, V, and W values for state.

Create a fixed-wing state object, state.

state = Aero.FixedWing.State();

Set the body-fixed velocities U, V, and W using the setBodyVelocity method. setBodyVelocity converts the values to their Airspeed, Alpha, and Beta counterparts and sets state with these values.

state = setBodyVelocity(state, 50, 0, 0.2)
state = 
  State with properties:

                     Mass: 0
                  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.2000
                 Airspeed: 50.0004
                      Phi: 0
                    Theta: 0
                      Psi: 0
                        P: 0
                        Q: 0
                        R: 0
                    Alpha: 0.0040
                     Beta: 0
                 AlphaDot: 0
                  BetaDot: 0
                   Weight: 0
              AltitudeAGL: 0
              GroundSpeed: 50.0004
               MachNumber: 0.1469
             BodyVelocity: [50 0 0.2000]
           GroundVelocity: [50 0 0.2000]
                       Ug: 50
                       Vg: 0
                       Wg: 0.2000
          FlightPathAngle: 0.0040
              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.5313e+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"

Algorithms

The Aero.FixedWing.State.setBodyVelocity method uses these equations to calculate airspeed, alpha, and beta values from U, V, and W values.

airspeed = sqrt(U^2 + V^2 + W^2)
alpha = atan2(W,U)
beta = asin(V/airspeed)

Version History

Introduced in R2026a