Class EulerConversions

java.lang.Object
edu.nps.moves.dis7.utilities.EulerConversions

public class EulerConversions extends Object
Class contains methods that convert to Tait_Bryan_angles (i.e., roll, pitch and yaw/heading) given the position (i.e., latitude, longitude) and the euler angles (i.e., psi, theta, and phi). Class also has methods for the corollary: converting to psi, theta, and phi given the lat/lon position and the entity's roll, pitch and yaw angles In this class roll, pitch and yaw are always expressed in degrees whereas psi, theta, and phi are always in radians. Note: latitude and longitude are also expressed in radians.
Author:
loyaj and bhughes
  • Constructor Summary

    Constructors
    Constructor
    Description
    default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    getOrientationFromEuler(double lat, double lon, double psi, double theta)
    Gets a degree heading for an entity based on euler angles.
    static double
    getPhiFromTaitBryanAngles(double lat, double lon, double yaw, double pitch, double roll)
    Gets the Euler Phi value (in radians) from position and Tait-Brayn yaw, pitch and roll angles
    static double
    getPitchFromEuler(double lat, double lon, double psi, double theta)
    Gets a degree pitch for an entity based on euler angles.
    static double
    getPsiFromTaitBryanAngles(double lat, double lon, double yaw, double pitch)
    Gets the Euler Psi value (in radians) from position and Tait-Brayn yaw and roll angles
    static double
    getRollFromEuler(double lat, double lon, double psi, double theta, double phi)
    Gets the degree roll for an entity based on euler angles.
    static double
    getThetaFromTaitBryanAngles(double lat, double lon, double yaw, double pitch)
    Gets the Euler Theta value (in radians) from position and Tait-Brayn yaw and roll angles

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EulerConversions

      public EulerConversions()
      default constructor
  • Method Details

    • getOrientationFromEuler

      public static double getOrientationFromEuler(double lat, double lon, double psi, double theta)
      Gets a degree heading for an entity based on euler angles. All angular values passed in must be in radians.
      Parameters:
      lat - Entity's latitude, IN RADIANS
      lon - Entity's longitude, IN RADIANS
      psi - Psi angle, IN RADIANS
      theta - Theta angle, IN RADIANS
      Returns:
      the heading, in degrees, with 0 being north, positive angles going clockwise, and negative angles going counterclockwise (i.e., 90 deg is east, -90 is west)
    • getPitchFromEuler

      public static double getPitchFromEuler(double lat, double lon, double psi, double theta)
      Gets a degree pitch for an entity based on euler angles. All angular values passed in must be in radians.
      Parameters:
      lat - Entity's latitude, IN RADIANS
      lon - Entity's longitude, IN RADIANS
      psi - Psi angle, IN RADIANS
      theta - Theta angle, IN RADIANS
      Returns:
      the pitch, in degrees, with 0 being level. A negative values is when the entity's nose is pointing downward, positive value is when the entity's nose is pointing upward.
    • getRollFromEuler

      public static double getRollFromEuler(double lat, double lon, double psi, double theta, double phi)
      Gets the degree roll for an entity based on euler angles. All angular values passed in must be in radians.
      Parameters:
      lat - Entity's latitude, IN RADIANS
      lon - Entity's longitude, IN RADIANS
      psi - Psi angle, IN RADIANS
      theta - Theta angle, IN RADIANS
      phi - Phi angle, IN RADIANS
      Returns:
      the roll, in degrees, with 0 being level flight, + roll is clockwise when looking out the front of the entity.
    • getThetaFromTaitBryanAngles

      public static double getThetaFromTaitBryanAngles(double lat, double lon, double yaw, double pitch)
      Gets the Euler Theta value (in radians) from position and Tait-Brayn yaw and roll angles
      Parameters:
      lat - Entity's latitude, IN RADIANS
      lon - Entity's longitude, IN RADIANS
      yaw - entity's yaw angle (also know as the entity's bearing or heading angle), in degrees
      pitch - entity's pitch angle, in degrees
      Returns:
      the Theta value in radians
    • getPsiFromTaitBryanAngles

      public static double getPsiFromTaitBryanAngles(double lat, double lon, double yaw, double pitch)
      Gets the Euler Psi value (in radians) from position and Tait-Brayn yaw and roll angles
      Parameters:
      lat - Entity's latitude, IN RADIANS
      lon - Entity's longitude, IN RADIANS
      yaw - ettity's yaw angle (also know as the entity's bearing or heading angle), in degrees
      pitch - entity's pitch angle, in degrees
      Returns:
      the Psi value in radians
    • getPhiFromTaitBryanAngles

      public static double getPhiFromTaitBryanAngles(double lat, double lon, double yaw, double pitch, double roll)
      Gets the Euler Phi value (in radians) from position and Tait-Brayn yaw, pitch and roll angles
      Parameters:
      lat - Entity's latitude, IN RADIANS
      lon - Entity's longitude, IN RADIANS
      yaw - yaw angle (also know as the entity's bearing or heading angle), in degrees
      pitch - entity's pitch angle, in degrees
      roll - entity's roll angle (0 is level flight, + roll is clockwise looking out the nose), in degrees
      Returns:
      the Phi value in radians