uavsim.datatypes
Class AngleNavigational

java.lang.Object
  extended by uavsim.datatypes.A_Angle<AngleNavigational>
      extended by uavsim.datatypes.AngleNavigational
All Implemented Interfaces:
java.lang.Comparable<AngleNavigational>, I_Unitable<AngleNavigational>

public class AngleNavigational
extends A_Angle<AngleNavigational>

Defines the shared aspects of a navigational angle, which has zero degrees (north) at the top and moves clockwise. This also functions as azimuth.

Author:
Dan Tappan [23.06.11]

Field Summary
static AngleNavigational ANGLE_000
          common predefined angles in terms of degrees
static AngleNavigational ANGLE_045
           
static AngleNavigational ANGLE_090
           
static AngleNavigational ANGLE_135
           
static AngleNavigational ANGLE_180
           
static AngleNavigational ANGLE_225
           
static AngleNavigational ANGLE_270
           
static AngleNavigational ANGLE_315
           
static AngleNavigational ANGLE_360
           
static AngleNavigational[] ANGLES
          the cardinal angles
static AngleNavigational CLOCK_0130
          common predefined angles in terms of clock position
static AngleNavigational CLOCK_0300
           
static AngleNavigational CLOCK_0430
           
static AngleNavigational CLOCK_0600
           
static AngleNavigational CLOCK_0730
           
static AngleNavigational CLOCK_0900
           
static AngleNavigational CLOCK_1030
           
static AngleNavigational CLOCK_1200
           
private static double DEFAULT_ANGLE
          the default angle
 
Constructor Summary
AngleNavigational()
          Creates an angle object with a default angle of zero.
AngleNavigational(double angleDegrees)
          Creates an angle object.
 
Method Summary
 AngleNavigational add_(AngleNavigational angle)
          Adds another unit to this one.
 AngleMathematical convertToAngleMathematical()
          Converts this angle to a mathematical angle.
 AttitudeYaw convertToYaw()
          Converts this angle zzz +-180
 AngleNavigational interpolate(AngleNavigational angle, Scaler scaler)
          Interpolates between this angle and another.
 AngleNavigational interpolate(AngleNavigational angle, Scaler scaler, boolean isOverShortestPath)
          Interpolates between this angle and another.
 boolean isShortestPathClockwise(AngleNavigational angle)
          Determines whether the shortest direction between this angle and another is clockwise.
 AngleNavigational negate()
          Negates this angle (by taking its negative value) and normalizes it.
 AngleNavigational reciprocate()
          Reciprocates this angle (by adding 180) and normalizes it.
 AngleNavigational subtract_(AngleNavigational angle)
          Subtract another unit from this one.
 java.lang.String toString()
          
 
Methods inherited from class uavsim.datatypes.A_Angle
compareTo, formatString, getValue_, getValueAffineRadians, getValueFormatted, getValueInt, getValueRadians, normalizeAngle, offset, scale, scale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ANGLE_000

public static final AngleNavigational ANGLE_000
common predefined angles in terms of degrees


ANGLE_045

public static final AngleNavigational ANGLE_045

ANGLE_090

public static final AngleNavigational ANGLE_090

ANGLE_135

public static final AngleNavigational ANGLE_135

ANGLE_180

public static final AngleNavigational ANGLE_180

ANGLE_225

public static final AngleNavigational ANGLE_225

ANGLE_270

public static final AngleNavigational ANGLE_270

ANGLE_315

public static final AngleNavigational ANGLE_315

ANGLE_360

public static final AngleNavigational ANGLE_360

ANGLES

public static final AngleNavigational[] ANGLES
the cardinal angles


CLOCK_0130

public static final AngleNavigational CLOCK_0130
common predefined angles in terms of clock position


CLOCK_0300

public static final AngleNavigational CLOCK_0300

CLOCK_0430

public static final AngleNavigational CLOCK_0430

CLOCK_0600

public static final AngleNavigational CLOCK_0600

CLOCK_0730

public static final AngleNavigational CLOCK_0730

CLOCK_0900

public static final AngleNavigational CLOCK_0900

CLOCK_1030

public static final AngleNavigational CLOCK_1030

CLOCK_1200

public static final AngleNavigational CLOCK_1200

DEFAULT_ANGLE

private static final double DEFAULT_ANGLE
the default angle

See Also:
Constant Field Values
Constructor Detail

AngleNavigational

public AngleNavigational()
Creates an angle object with a default angle of zero.


AngleNavigational

public AngleNavigational(double angleDegrees)
Creates an angle object.

Parameters:
angleDegrees - - the angle in navigational degrees. Use 359.99 for fill-circle rings xxx
Method Detail

add_

public AngleNavigational add_(AngleNavigational angle)
Adds another unit to this one.

Parameters:
angle - - the unit
Returns:
the result as a new unit

convertToAngleMathematical

public AngleMathematical convertToAngleMathematical()
Converts this angle to a mathematical angle.

Returns:
the new angle

convertToYaw

public AttitudeYaw convertToYaw()
Converts this angle zzz +-180

Returns:
the yaw

interpolate

public AngleNavigational interpolate(AngleNavigational angle,
                                     Scaler scaler)
Interpolates between this angle and another. This always interpolates in a clockwise direction.

Specified by:
interpolate in class A_Angle<AngleNavigational>
Parameters:
angle - - the ending angle
scaler - - the scaler for the interpolated point
Returns:
the angle

interpolate

public AngleNavigational interpolate(AngleNavigational angle,
                                     Scaler scaler,
                                     boolean isOverShortestPath)
Interpolates between this angle and another.

Specified by:
interpolate in class A_Angle<AngleNavigational>
Parameters:
angle - - the ending angle
scaler - - the scaler for the interpolated point
isOverShortestPath - - whether to interpolate over the shortest or longest arc length in the appropriate direction
Returns:
the angle

isShortestPathClockwise

public boolean isShortestPathClockwise(AngleNavigational angle)
Determines whether the shortest direction between this angle and another is clockwise.

Specified by:
isShortestPathClockwise in class A_Angle<AngleNavigational>
Parameters:
angle - - the other angle
Returns:
the state

negate

public AngleNavigational negate()
Negates this angle (by taking its negative value) and normalizes it.

Returns:
the result

reciprocate

public AngleNavigational reciprocate()
Reciprocates this angle (by adding 180) and normalizes it.

Returns:
the result

subtract_

public AngleNavigational subtract_(AngleNavigational angle)
Subtract another unit from this one.

Parameters:
angle - - the unit
Returns:
the result as a new unit

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object