Class EulerConversions
java.lang.Object
edu.nps.moves.dis7.utilities.EulerConversions
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 anglesstatic 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 anglesstatic 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
-
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 RADIANSlon
- Entity's longitude, IN RADIANSpsi
- Psi angle, IN RADIANStheta
- 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 RADIANSlon
- Entity's longitude, IN RADIANSpsi
- Psi angle, IN RADIANStheta
- 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 RADIANSlon
- Entity's longitude, IN RADIANSpsi
- Psi angle, IN RADIANStheta
- Theta angle, IN RADIANSphi
- 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 RADIANSlon
- Entity's longitude, IN RADIANSyaw
- entity's yaw angle (also know as the entity's bearing or heading angle), in degreespitch
- 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 RADIANSlon
- Entity's longitude, IN RADIANSyaw
- ettity's yaw angle (also know as the entity's bearing or heading angle), in degreespitch
- 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 RADIANSlon
- Entity's longitude, IN RADIANSyaw
- yaw angle (also know as the entity's bearing or heading angle), in degreespitch
- entity's pitch angle, in degreesroll
- entity's roll angle (0 is level flight, + roll is clockwise looking out the nose), in degrees- Returns:
- the Phi value in radians
-