Package com.luciad.ais.geodesy
Class TLcdForwardAzimuthUtil
java.lang.Object
com.luciad.ais.geodesy.TLcdForwardAzimuthUtil
Class containing utility methods for handling forward azimuths.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
forwardAzimuth2ArcAngle
(double aForwardAzimuth) Convert a forward azimuth (0 is North, clockwise) to an angle value that can be used for anILcdArc
(0 is East, counter-clockwise).static double
forwardAzimuthDelta2ArcDelta
(double aAzimuth1, double aAzimuth2) Convert the difference between two forward azimuths (0 is north, clockwise) to an arc size that can be used for painting (0 is east, counter-clockwise).static double
forwardAzimuthDelta2ArcDelta
(double aAzimuth1, double aAzimuth2, boolean aClockwise) Convert the difference between to forward azimuths (0 is north, clockwise) to an arc size that can be used for painting (0 is east, counter-clockwise).static double
getForwardAzimuthDelta
(double aAzimuth1, double aAzimuth2) Returns the difference (in degrees) between two forward azimuths.static boolean
isForwardAzimuthClockwise
(double aFa1, double aFa2) Return true if a turn from forward azimuth 1 to 2 goes in clockwise direction.static double
normalizeForwardAzimuth
(double aForwardAzimuth) Normalize a given forward azimuth: the result is always in the interval [0;360[.
-
Constructor Details
-
TLcdForwardAzimuthUtil
public TLcdForwardAzimuthUtil()
-
-
Method Details
-
isForwardAzimuthClockwise
public static boolean isForwardAzimuthClockwise(double aFa1, double aFa2) Return true if a turn from forward azimuth 1 to 2 goes in clockwise direction.- Parameters:
aFa1
- Forward azimuth 1 (degrees).aFa2
- Forward azimuth 2 (degrees).- Returns:
- true if a turn from forward azimuth 1 to 2 goes in clockwise direction.
-
forwardAzimuthDelta2ArcDelta
public static double forwardAzimuthDelta2ArcDelta(double aAzimuth1, double aAzimuth2) Convert the difference between two forward azimuths (0 is north, clockwise) to an arc size that can be used for painting (0 is east, counter-clockwise). The result is in the interval ]-180;180] degrees.- Parameters:
aAzimuth1
- First forward azimuth (degrees).aAzimuth2
- Second forward azimuth (degrees).- Returns:
- Difference between the two azimuths, normalized to the interval ]-180;180] degrees.
-
forwardAzimuthDelta2ArcDelta
public static double forwardAzimuthDelta2ArcDelta(double aAzimuth1, double aAzimuth2, boolean aClockwise) Convert the difference between to forward azimuths (0 is north, clockwise) to an arc size that can be used for painting (0 is east, counter-clockwise). The result is an arc that goes from the first azimuth to the second in the given direction: clockwise ifaClockwise == true
, counter-clockwise otherwise.- Parameters:
aAzimuth1
- First forward azimuth (degrees).aAzimuth2
- Second forward azimuth (degrees).aClockwise
- True to return an arc in clockwise direction.- Returns:
- Angle difference between the two given azimuths, taking into account the given direction (clockwise/counter-clockwise).
-
normalizeForwardAzimuth
public static double normalizeForwardAzimuth(double aForwardAzimuth) Normalize a given forward azimuth: the result is always in the interval [0;360[.- Parameters:
aForwardAzimuth
- Azimuth to normalize (degrees).- Returns:
- An angle in the range [0;360[.
-
forwardAzimuth2ArcAngle
public static double forwardAzimuth2ArcAngle(double aForwardAzimuth) Convert a forward azimuth (0 is North, clockwise) to an angle value that can be used for anILcdArc
(0 is East, counter-clockwise).- Parameters:
aForwardAzimuth
- Given forward azimuth (degrees).- Returns:
- Angle value that can be used for an
ILcdArc
.
-
getForwardAzimuthDelta
public static double getForwardAzimuthDelta(double aAzimuth1, double aAzimuth2) Returns the difference (in degrees) between two forward azimuths. The return value is unsigned!
-