uavsim.datatypes
Class AngleMathematical

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

public class AngleMathematical
extends A_Angle<AngleMathematical>

Defines the shared aspects of a mathematical angle in degrees, which has zero degrees at the right and moves counterclockwise.

Author:
Dan Tappan [23.06.11]

Field Summary
static AngleMathematical ANGLE_000
          common predefined angles in terms of degrees
static AngleMathematical ANGLE_045
           
static AngleMathematical ANGLE_090
           
static AngleMathematical ANGLE_135
           
static AngleMathematical ANGLE_180
           
static AngleMathematical ANGLE_225
           
static AngleMathematical ANGLE_270
           
static AngleMathematical ANGLE_315
           
static AngleMathematical ANGLE_360
           
static AngleMathematical[] ANGLES
          the cardinal angles
static AngleMathematical CLOCK_0130
          common predefined angles in terms of clock position
static AngleMathematical CLOCK_0300
           
static AngleMathematical CLOCK_0430
           
static AngleMathematical CLOCK_0600
           
static AngleMathematical CLOCK_0730
           
static AngleMathematical CLOCK_0900
           
static AngleMathematical CLOCK_1030
           
static AngleMathematical CLOCK_1200
           
private static double DEFAULT_ANGLE
          the default angle
 
Constructor Summary
AngleMathematical()
          Creates an angle object with a default angle of zero.
AngleMathematical(double angle)
          Creates an angle object.
 
Method Summary
 AngleMathematical add_(AngleMathematical angle)
          Adds another unit to this one.
 AngleNavigational convertToAngleNavigational()
          Converts this angle to a navigational angle.
 AttitudePitch convertToPitch()
          Converts this angle zzz +-90
 AngleMathematical interpolate(AngleMathematical angle, Scaler scaler)
          Interpolates between this angle and another.
 AngleMathematical interpolate(AngleMathematical angle, Scaler scaler, boolean isOverShortestPath)
          Interpolates between this angle and another.
 boolean isShortestPathClockwise(AngleMathematical angle)
          Determines whether the shortest direction between this angle and another is clockwise.
 AngleMathematical negate()
          Negates this angle (by taking its negative value) and normalizes it.
 AngleMathematical reciprocate()
          Reciprocates this angle (by adding 180) and normalizes it.
 AngleMathematical subtract_(AngleMathematical 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 AngleMathematical ANGLE_000
common predefined angles in terms of degrees


ANGLE_045

public static final AngleMathematical ANGLE_045

ANGLE_090

public static final AngleMathematical ANGLE_090

ANGLE_135

public static final AngleMathematical ANGLE_135

ANGLE_180

public static final AngleMathematical ANGLE_180

ANGLE_225

public static final AngleMathematical ANGLE_225

ANGLE_270

public static final AngleMathematical ANGLE_270

ANGLE_315

public static final AngleMathematical ANGLE_315

ANGLE_360

public static final AngleMathematical ANGLE_360

ANGLES

public static final AngleMathematical[] ANGLES
the cardinal angles


CLOCK_0130

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


CLOCK_0300

public static final AngleMathematical CLOCK_0300

CLOCK_0430

public static final AngleMathematical CLOCK_0430

CLOCK_0600

public static final AngleMathematical CLOCK_0600

CLOCK_0730

public static final AngleMathematical CLOCK_0730

CLOCK_0900

public static final AngleMathematical CLOCK_0900

CLOCK_1030

public static final AngleMathematical CLOCK_1030

CLOCK_1200

public static final AngleMathematical CLOCK_1200

DEFAULT_ANGLE

private static final double DEFAULT_ANGLE
the default angle

See Also:
Constant Field Values
Constructor Detail

AngleMathematical

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


AngleMathematical

public AngleMathematical(double angle)
Creates an angle object.

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

add_

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

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

convertToAngleNavigational

public AngleNavigational convertToAngleNavigational()
Converts this angle to a navigational angle.

Returns:
the new angle

convertToPitch

public AttitudePitch convertToPitch()
Converts this angle zzz +-90

Returns:
the pitch

interpolate

public AngleMathematical interpolate(AngleMathematical angle,
                                     Scaler scaler)
Interpolates between this angle and another. This always interpolates in a counterclockwise direction. // xxx

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

interpolate

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

Specified by:
interpolate in class A_Angle<AngleMathematical>
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(AngleMathematical angle)
Determines whether the shortest direction between this angle and another is clockwise.

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

negate

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

Returns:
the result

reciprocate

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

Returns:
the result

subtract_

public AngleMathematical subtract_(AngleMathematical 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