Main Content

Simulation 3D Spacecraft

Implement spacecraft in 3D environment

Since R2024a

  • Simulation 3D Spacecraft block icon

Libraries:
Aerospace Blockset / Animation / Simulation 3D

Description

Note

Simulating models with the Simulation 3D Spacecraft block requires Simulink® 3D Animation™. If you had an Aerospace Blockset™ license prior to R2024a, you might be eligible to continue using Simulation 3D Spacecraft to simulate models in the 3D environment. For more information, see Opt-In Offer for Aerospace Blockset Unreal Engine Visualization Users.

The Simulation 3D Spacecraft block implements spacecraft in a 3D visualization environment using translation and rotation to place the spacecraft.

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

The block input uses the spacecraft north-east-down (NED) right-handed (RH) Cartesian coordinate system.

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

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

  • Z-axis — Points downward

For more information, see About Aerospace Coordinate Systems.

Tip

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

  • Simulation 3D Scene Configuration0

  • Simulation 3D Spacecraft-1

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

Skeletons, Bones, and Meshes

Unreal Engine uses a skeleton, bones, and a mesh to define a 3D model. A skeleton is comprised of a set of bones. A mesh is the outer covering of the skeleton. Spacecraft parts are sections of the mesh, such as antenna or thrusters, that are linked to the bones. For more information, see https://docs.unrealengine.com/4.27/AnimatingObjects/SkeletalMeshAnimation/Skeleton/.

For more information on how the Simulation 3D Space block translation input arrays connect to spacecraft types, see Algorithms.

Ports

Input

expand all

Spacecraft translation, specified as:

  • 10-by-3 array — Spacecraft Type is CubeSat.

  • 20-by-3 array — Spacecraft Type is SmallSat.

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

The translation applies to these bones of the CubeSat type.

BoneIndex

BODY

1

ANTENNA1

2

ANTENNA2

3

ANTENNA3

4

SENSOR

5

SOLAR_ARRAY1

6

SOLAR_ARRAY1_1

7

SOLAR_ARRAY2

8

SOLAR_ARRAY2_2

9

THRUSTER

10

The translation applies to these bones of the SmallSat type.

BoneIndex

BODY

1

ANTENNA1

2

ANTENNA2

3

ANTENNA3

4

ANTENNA4

5

SENSOR1

6

SENSOR2

7

SENSOR3

8

SENSOR4

9

SOLAR_ARRAY1

10

SOLAR_ARRAY1_1

11

SOLAR_ARRAY1_1_1

12

SOLAR_ARRAY1_1_1_1

13

SOLAR_ARRAY1_1_1_1_1

14

SOLAR_ARRAY2

15

SOLAR_ARRAY2_2

16

SOLAR_ARRAY2_2_2

17

SOLAR_ARRAY2_2_2_2

18

SOLAR_ARRAY2_2_2_2_2

19

THRUSTER

20

Data Types: single | double

Spacecraft rotation, specified as:

  • 10-by-3 array — Spacecraft Type is CubeSat.

  • 20-by-3 array — Spacecraft Type is SmallSat.

The rotation applies to the same bones as listed for the Translation port.

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

Data Types: single | double

Parameters

expand all

To edit block parameters interactively, use the Property Inspector. From the Simulink Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.

Spacecraft type, specified as CubeSat or SmallSat.

Dependencies

To set this parameter, set the Initial translation and Initial rotation parameters to the matching array size. Failure to appropriately set these array sizes causes an error.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: Mesh
Values: CubeSat (default) | SmallSat

Example: CubeSat

Path to CubeSat mesh, specified as a character vector.

Dependencies

To enable this parameter, set Type to CubeSat.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: MeshPath
Values: /MathWorksAerospaceContent/Vehicles/Spacecraft/CubeSat/Mesh/SK_CubeSat.SK_CubeSat | character vector

Example: /MathWorksAerospaceContent/Vehicles/Spacecraft/CubeSat/Mesh/SK_CubeSat.SK_CubeSat

Path to SmallSat mesh, specified as a character vector.

Dependencies

To enable this parameter, set Type to SmallSat.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: MeshPathSmall
Values: /MathWorksAerospaceContent/Vehicles/Spacecraft/SmallSat/Mesh/SK_SmallSat.SK_SmallSat | character vector

Example: /MathWorksAerospaceContent/Vehicles/Spacecraft/SmallSat/Mesh/SK_SmallSat.SK_SmallSat

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

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: ActorName
Values: SimulinkVehicle1 (default) | character vector

Example: SimulinkVehicle1

Initial translation of spacecraft, specified as a 10-by-3 array.

Dependencies

This parameter must match the spacecraft type you set in Type. Failure to appropriately set these array sizes causes an error.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: Translation
Values: zeros(10,3) (default) | 10-by-3 array

Example: zeros(10,3)

Data Types: single | double

Initial rotation of spacecraft, specified as a 10-by-3 array.

Dependencies

This parameter must match the spacecraft type you set in Type. Failure to appropriately set these array sizes causes an error.

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: Rotation
Values: zeros(10,3) (default) | 10-by-3 array

Example: zeros(10,3)

Data Types: single | double

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

Programmatic Use

To set the block parameter value programmatically, use the set_param function.

To get the block parameter value programmatically, use the get_param function.

Parameter: SampleTime
Values: '-1' (default) | real scalar

Example: '-1'

Algorithms

expand all

Version History

Introduced in R2024a