Class Angle3D

  • All Implemented Interfaces:
    Serializable

    public class Angle3D
    extends Object
    implements Serializable
    3D-rotation, RPY coded (longitudinal roll around the x-axis, lateral pitch around the y-axis and vertical yaw around the z-axis), also called Tait–Bryan angles or Cardan angles. Angles are relative, and can relate to e.g. the inertial frame of a GTU.

    Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
    BSD-style license. See OpenTrafficSim License.

    $LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Dec 10, 2015
    Author:
    Alexander Verbraeck, Peter Knoppers
    See Also:
    Serialized Form
    • Constructor Detail

      • Angle3D

        public Angle3D​(AngleVector rotation)
                throws ValueRuntimeException
        Construct a new Angle3D.
        Parameters:
        rotation - AngleVector; the angles of the rotation in 3D (RPY coded)
        Throws:
        ValueRuntimeException - in case the vector does not have exactly three elements
      • Angle3D

        public Angle3D​(Angle roll,
                       Angle pitch,
                       Angle yaw)
                throws ValueRuntimeException
        Construct a new Angle3D.
        Parameters:
        roll - Angle; (phi) the rotation around the x-axis
        pitch - Angle; (theta) the rotation around the y-axis
        yaw - Angle; (psi) the rotation around the z-axis
        Throws:
        ValueRuntimeException - in case the units are incorrect
      • Angle3D

        public Angle3D​(double roll,
                       double pitch,
                       double yaw,
                       AngleUnit unit)
                throws ValueRuntimeException
        Construct a new Angle3D.
        Parameters:
        roll - double; (phi) the rotation around the x-axis
        pitch - double; (theta) the rotation around the y-axis
        yaw - double; (psi) the rotation around the z-axis
        unit - AngleUnit; the unit of the RPY parameters
        Throws:
        ValueRuntimeException - in case the units are incorrect
    • Method Detail

      • getRoll

        public final Angle getRoll()
        Retrieve the roll (rotation around the x-axis).
        Returns:
        Angle; the roll
      • getPitch

        public final Angle getPitch()
        Retrieve the pitch (rotation around the y-axis).
        Returns:
        Angle; the pitch
      • getYaw

        public final Angle getYaw()
        Retrieve the yaw (rotation around the z-axis).
        Returns:
        Angle; the yaw