uavsim.datatypes
Class AttitudeYaw

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

public class AttitudeYaw
extends A_Attitude<AttitudeYaw>

Defines the yaw degree of freedom of an attitude on the interval [-180,+180] navigational degrees, with 0 being north (or straight forward in terms of heading relative to course).

Author:
Dan Tappan [18.06.11]

Field Summary
private static double DEFAULT_YAW
          the default yaw
static AttitudeYaw YAW_0
          predefined common yaws
static AttitudeYaw YAW_180
           
static AttitudeYaw YAW_M120
           
static AttitudeYaw YAW_M150
           
static AttitudeYaw YAW_M30
           
static AttitudeYaw YAW_M60
           
static AttitudeYaw YAW_M90
           
static AttitudeYaw YAW_P120
           
static AttitudeYaw YAW_P150
           
static AttitudeYaw YAW_P30
           
static AttitudeYaw YAW_P60
           
static AttitudeYaw YAW_P90
           
 
Fields inherited from class uavsim.datatypes.A_Attitude
_angleDegrees
 
Constructor Summary
AttitudeYaw()
          Creates a yaw object at 0 degrees.
AttitudeYaw(double angleDegrees)
          Creates a yaw object.
 
Method Summary
 AttitudeYaw add_(AttitudeYaw yaw)
          Adds another unit to this one.
 AngleNavigational convertToAngleNavigational()
          Converts this yaw to a navigational angle.
 boolean isPlusMinus90()
          Returns whether this yaw is on the interval [-90,+90].
 boolean isPlusMinusDelta(AttitudeYaw deltaAngle)
          Returns whether this yaw is on an interval plus or minus a delta value.
 AttitudeYaw negate()
          Generates the negated form of this yaw, meaning the its sign flips.
 AttitudeYaw reciprocate()
          Generates the 180-degree reciprocal of this yaw.
protected  void setAngle(double angleDegrees)
          Sets the roll angle.
 AttitudeYaw subtract_(AttitudeYaw yaw)
          Subtract another unit from this one.
 java.lang.String toString()
          
 
Methods inherited from class uavsim.datatypes.A_Attitude
compareTo, getAngleMathematical, getAngleNavigational, getAngleRadians, getValue_
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_YAW

private static final double DEFAULT_YAW
the default yaw

See Also:
Constant Field Values

YAW_0

public static final AttitudeYaw YAW_0
predefined common yaws


YAW_180

public static final AttitudeYaw YAW_180

YAW_M120

public static final AttitudeYaw YAW_M120

YAW_M150

public static final AttitudeYaw YAW_M150

YAW_M30

public static final AttitudeYaw YAW_M30

YAW_M60

public static final AttitudeYaw YAW_M60

YAW_M90

public static final AttitudeYaw YAW_M90

YAW_P120

public static final AttitudeYaw YAW_P120

YAW_P150

public static final AttitudeYaw YAW_P150

YAW_P30

public static final AttitudeYaw YAW_P30

YAW_P60

public static final AttitudeYaw YAW_P60

YAW_P90

public static final AttitudeYaw YAW_P90
Constructor Detail

AttitudeYaw

public AttitudeYaw()
Creates a yaw object at 0 degrees.


AttitudeYaw

public AttitudeYaw(double angleDegrees)
Creates a yaw object.

Parameters:
angleDegrees - - the yaw, as defined in the class description
Method Detail

add_

public AttitudeYaw add_(AttitudeYaw yaw)
Adds another unit to this one.

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

convertToAngleNavigational

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

Returns:
the angle

isPlusMinus90

public boolean isPlusMinus90()
Returns whether this yaw is on the interval [-90,+90].

Returns:
the state

isPlusMinusDelta

public boolean isPlusMinusDelta(AttitudeYaw deltaAngle)
Returns whether this yaw is on an interval plus or minus a delta value.

Parameters:
deltaAngle - - the delta angle, which must be positive
Returns:
the state

negate

public AttitudeYaw negate()
Generates the negated form of this yaw, meaning the its sign flips.

Returns:
the yaw

reciprocate

public AttitudeYaw reciprocate()
Generates the 180-degree reciprocal of this yaw.

Returns:
the yaw

setAngle

protected void setAngle(double angleDegrees)
Sets the roll angle.

Specified by:
setAngle in class A_Attitude<AttitudeYaw>
Parameters:
angleDegrees - - the angle, which is internally normalized as defined in the class description

subtract_

public AttitudeYaw subtract_(AttitudeYaw yaw)
Subtract another unit from this one.

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

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object