Main Content

Simulation 3D Aircraft

Implement aircraft in 3D environment

  • Library:
  • Aerospace Blockset / Animation / Simulation 3D

  • Simulation 3D Aircraft block icon

Description

The Simulation 3D Aircraft block implements an aircraft in a 3D visualization environment using translation and rotation to place the aircraft.

To use this block, ensure that the Simulation 3D Scene Configuration block is in your model. If you set the Sample time parameter of this block to -1, the block uses the sample time specified in the Simulation 3D Scene Configuration block.

The block input uses the aircraft north-east-down (NED) right-handed (RH) Cartesian coordinate system, with its origin fixed at the approximate aircraft center of gravity.

  • X-axis — Along aircraft longitudinal axis, points forward

  • Y-axis — Along aircraft lateral axis, points to the right

  • Z-axis — Points downward

For more information, see About Aerospace Coordinate Systems.

Tip

Verify that the Simulation 3D Aircraft block executes before the Simulation 3D Scene Configuration block. That way, Simulation 3D Aircraft prepares the signal data before the Unreal Engine® 3D visualization environment receives it. To check the block execution order, right-click the blocks and select Properties. On the General tab, confirm these Priority settings:

  • Simulation 3D Scene Configuration0

  • Simulation 3D Aircraft-1

For more information about execution order, see Control and Display Execution Order.

Ports

Input

expand all

Aircraft translation, specified as:

  • 11-by-3 — Aircraft Type is SkyHogg.

  • 12-by-3 array — Aircraft Type is Airliner.

The signal contains translation [X, Y, Z], in meters, with one row of the array for each part of the aircraft.

The translation applies to these parts of the Airliner type:

  • BODY

  • LEFT_ENGINE

  • RIGHT_ENGINE

  • RUDDER

  • ELEVATOR

  • LEFT_AILERON

  • RIGHT_AILERON

  • FLAPS

  • NOSE_WHEEL_STRUT

  • NOSE_WHEEL

  • LEFT_WHEEL

  • RIGHT_WHEEL

The translation applies to these parts of the SkyHogg type:

  • BODY

  • PROPELLER

  • RUDDER

  • ELEVATOR

  • LEFT_AILERON

  • RIGHT_AILERON

  • FLAPS

  • NOSE_WHEEL_STRUT

  • NOSE_WHEEL

  • LEFT_WHEEL

  • RIGHT_WHEEL

Aircraft rotation, specified as:

  • 11-by-3 — Aircraft Type is SkyHogg.

  • 12-by-3 array — Aircraft Type is Airliner.

The translation applies to these parts of the Airliner type:

  • BODY

  • LEFT_ENGINE

  • RIGHT_ENGINE

  • RUDDER

  • ELEVATOR

  • LEFT_AILERON

  • RIGHT_AILERON

  • FLAPS

  • NOSE_WHEEL_STRUT

  • NOSE_WHEEL

  • LEFT_WHEEL

  • RIGHT_WHEEL

The translation applies to these parts of the SkyHogg type:

  • BODY

  • PROPELLER

  • RUDDER

  • ELEVATOR

  • LEFT_AILERON

  • RIGHT_AILERON

  • FLAPS

  • NOSE_WHEEL_STRUT

  • NOSE_WHEEL

  • LEFT_WHEEL

  • RIGHT_WHEEL

The signal contains the rotation [roll, pitch, yaw], in radians, with one row of the array for each part of the aircraft.

Output

expand all

Aircraft altitude, returned as a 1-by-4 vector. The four altitudes are, in order:

  • aircraft_body

  • aircraft_front_tire

  • aircraft_left_tire

  • aircraft_right_tire

Dependencies

To enable this port, select the Enable altitude sensor check box.

Data Types: double

Aircraft weight on wheels logical switch, returned as true if either of the main gear tires (left or right) are on the ground. Otherwise, false is returned.

Dependencies

To enable this port, select the Enable altitude sensor check box.

Data Types: Boolean

Parameters

expand all

Parameters

Aircraft type, specified as SkyHogg or Airliner.

Programmatic Use

Block Parameter: Mesh
Type: character vector
Values: 'SkyHogg' | 'Airliner'
Default: 'SkyHogg'

Aircraft color, specified as Red, Green, Blue, Cyan, Red lines, or Cyan lines.

Programmatic Use

Block Parameter: AircraftColor
Type: character vector
Values: 'Red' | 'Green' | 'Blue' | 'Cyan' | 'Red lines' | 'Cyan lines'
Default: 'Red'

Aircraft name, specified as a character vector. By default, when you use the block in your model, the block sets the Name parameter to SimulinkVehicleX. The value of X depends on the number of Simulation 3D Aircraft blocks that you have in your model.

Programmatic Use

Block Parameter: ActorName
Type: character vector
Values: scalar
Default: 'SimulinkVehicle1'

Initial Values

Initial translation of aircraft, specified as a 11-by-3 or 12-by-3 array.

Programmatic Use

Block Parameter: Translation
Type: character vector
Values: 11-by-3 array | 12-by-3 array
Default: 'zeros( 11, 3 )'

Initial rotation of aircraft, specified as a 11-by-3 or 12-by-3 array.

Programmatic Use

Block Parameter: Rotation
Type: character vector
Values: 11-by-3 array | 12-by-3 array
Default: 'zeros( 11, 3 )'

Altitude Sensor

To enable the altitude sensor, select this check box. Otherwise, clear this check box.

Programmatic Use

Block Parameter: IsGHSensorEnabled
Type: character vector
Values: 'on' | 'off'
Default: 'on'

To enable visible sensor rays, select this check box. Otherwise, clear this check box.

Dependencies

To enable this parameter, select the Enable altitude sensor check box.

Programmatic Use

Block Parameter: AreGHRaysVisible
Type: character vector
Values: 'on' | 'off'
Default: 'off'

Length of rays, specified as a real scalar in meters. The length of the rays limits the altitude detection. For example, if the vertical distance to the ground beneath the aircraft origin is greater than the length of the rays plus the aircraft body Z offset, the altitude sensor returns -1 for the first value.

Dependencies

To enable this parameter, select the Enable altitude sensor check box.

Programmatic Use

Block Parameter: GHRayLength
Type: character vector
Values: real scalar
Default: '1524'

Aircraft body Z offset, specified as a real scalar in meters.

Dependencies

To enable this parameter, select the Enable altitude sensor check box.

Programmatic Use

Block Parameter: GHBodyOffset
Type: character vector
Values: real scalar
Default: '0.90'

Front gear tire radius, specified as a real scalar in meters. The front gear altitude ray originates at the front gear axle center plus the front gear tire radius Z offset.

Dependencies

To enable this parameter, select the Enable altitude sensor check box.

Programmatic Use

Block Parameter: GHFrontTireRadius
Type: character vector
Values: real scalar
Default: '0.21'

Left gear tire radius, specified as a real scalar in meters.

Dependencies

To enable this parameter, select the Enable altitude sensor check box.

Programmatic Use

Block Parameter: GHLeftTireRadius
Type: character vector
Values: real scalar
Default: '0.21'

Right gear tire radius, specified as a real scalar in meters.

Dependencies

To enable this parameter, select the Enable altitude sensor check box.

Programmatic Use

Block Parameter: GHRightTireRadius
Type: character vector
Values: real scalar
Default: '0.21'

Sample time, Ts. The graphics frame rate is the inverse of the sample time.

Programmatic Use

Block Parameter: SampleTime
Type: character vector
Values: real scalar
Default: '-1'
Introduced in R2021b