Main Content

Coordinate Systems for Unreal Engine Simulation in UAV Toolbox

UAV Toolbox enables you to simulate your driving algorithms in a virtual environment that uses the Unreal Engine® from Epic Games®. In general, the coordinate systems used in this environment follow the conventions described in Coordinate Systems for Modeling (Aerospace Toolbox). However, when simulating in this environment, it is important to be aware of the specific differences and implementation details of the coordinate systems.

UAV Toolbox uses these coordinate systems to calculate the vehicle dynamics and position objects in the Unreal Engine visualization environment.

Environment

Description

Coordinate Systems

UAV vehicle dynamics in Simulink®

The right-hand rule establishes the X-Y-Z sequence and rotation of the coordinate axes used to calculate the vehicle dynamics. The UAV Toolbox interface to the Unreal Engine simulation environment uses the right-handed (RH) Cartesian coordinate systems:

  • Earth-fixed (inertial)

  • Vehicle

Earth-Fixed (Inertial) Coordinate System

Body (Non-Inertial) Coordinate System

Unreal Engine visualization

To position objects and query the Unreal Engine visualization environment, the UAV Toolbox uses a world coordinate system.

Unreal Engine World Coordinate System

Earth-Fixed (Inertial) Coordinate System

The earth-fixed coordinate system (XE, YE, ZE) axes are fixed in an inertial reference frame. The inertial reference frame has zero linear and angular acceleration and zero angular velocity. In Newtonian physics, the earth is an inertial reference.

AxisDescription
XE

The XE axis is in the forward direction of the vehicle.

The XE and YE axes are parallel to the ground plane. The ground plane is a horizontal plane normal to the gravitational vector.

YE
ZE

In the Z-up orientation, the positive ZE axis points upward.

In the Z-down orientation, the positive ZE axis points downward.

Body (Non-Inertial) Coordinate System

Modeling aircraft and spacecraft are simplest if you use a coordinate system fixed in the body itself. In the case of aircraft, the forward direction is modified by the presence of wind, and the craft's motion through the air is not the same as its motion relative to the ground. The non-inertial body coordinate system is fixed in both origin and orientation to the moving craft. The craft is assumed to be rigid. The orientation of the body coordinate axes is fixed in the shape of body.

  • The x-axis points through the nose of the craft.

  • The y-axis points to the right of the x-axis (facing in the pilot's direction of view), perpendicular to the x-axis.

  • The z-axis points down through the bottom of the craft, perpendicular to the x-y plane and satisfying the RH rule.

Translational Degrees of Freedom

Translations are defined by moving along these axes by distances x, y, and z from the origin.

Rotational Degrees of Freedom

Rotations are defined by the Euler angles P, Q, R or Φ, Θ, Ψ. They are

  • P or Φ: Roll about the x-axis

  • Q or Θ: Pitch about the y-axis

  • R or Ψ: Yaw about the z-axis

Unless otherwise specified, by default the software uses ZYX rotation order for Euler angles.

Unreal Engine World Coordinate System

The Unreal Engine environment uses a world coordinate system with axes that are fixed in the inertial reference frame.

AxisDescription
X

Forward direction of the vehicle

Roll — Right-handed rotation about X-axis

Y

Extends to the right of the vehicle, parallel to the ground plane

Pitch — Right-handed rotation about Y-axis

Z

Extends upwards

Yaw — Left-handed rotation about Z-axis

See Also

|

Related Topics