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.
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:
Unreal Engine visualization
To position objects and query the Unreal Engine visualization environment, the UAV Toolbox uses a left-hand rule 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.
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.
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.
x-axis points through the nose of the craft.
y-axis points to the right of the
x-axis (facing in the pilot's direction of view), perpendicular to the
z-axis points down through the bottom of the craft, perpendicular to the
yplane and satisfying the RH rule.
Translational Degrees of Freedom
Translations are defined by moving along these axes by distances
z from the origin.
Rotational Degrees of Freedom
Rotations are defined by the Euler angles
R or Φ, Θ, Ψ. They are
Por Φ: Roll about the
Qor Θ: Pitch about the
Ror Ψ: Yaw about the
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 left-hand rule world coordinate system with axes that are fixed in the inertial reference frame.
Forward direction of the vehicle
Roll — Right-handed rotation about X-axis
Extends to the right of the vehicle, parallel to the ground plane
Pitch — Right-handed rotation about Y-axis
Yaw — Left-handed rotation about Z-axis