uavsim.datatypes
Class A_Attitude<_TYPE_ extends A_Attitude<?>>

java.lang.Object
  extended by uavsim.datatypes.A_Attitude<_TYPE_>
Type Parameters:
_TYPE_ - - the attitude type: pitch, roll, or yaw
All Implemented Interfaces:
java.lang.Comparable<_TYPE_>, I_Unitable<_TYPE_>
Direct Known Subclasses:
AttitudePitch, AttitudeRoll, AttitudeYaw, Course

public abstract class A_Attitude<_TYPE_ extends A_Attitude<?>>
extends java.lang.Object
implements I_Unitable<_TYPE_>

Defines the shared aspects of a degree of attitude freedom.

Author:
Dan Tappan [18.06.11]

Field Summary
protected  double _angleDegrees
          the angle in degrees
 
Constructor Summary
A_Attitude()
           
 
Method Summary
 int compareTo(_TYPE_ attitude)
          
 AngleMathematical getAngleMathematical()
          Gets the angle in mathematical degrees.
 AngleNavigational getAngleNavigational()
          Gets the angle in navigational degrees.
 double getAngleRadians()
          Gets the roll angle in radians.
 double getValue_()
          Returns the numerical value of this unit.
protected abstract  void setAngle(double angleDegrees)
          Sets the roll angle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface uavsim.datatypes.I_Unitable
add_, subtract_
 

Field Detail

_angleDegrees

protected double _angleDegrees
the angle in degrees

Constructor Detail

A_Attitude

public A_Attitude()
Method Detail

compareTo

public int compareTo(_TYPE_ attitude)

Specified by:
compareTo in interface java.lang.Comparable<_TYPE_ extends A_Attitude<?>>

getAngleMathematical

public AngleMathematical getAngleMathematical()
Gets the angle in mathematical degrees.

Returns:
the angle

getAngleNavigational

public AngleNavigational getAngleNavigational()
Gets the angle in navigational degrees.

Returns:
the angle

getAngleRadians

public double getAngleRadians()
Gets the roll angle in radians.

Returns:
the angle

getValue_

public double getValue_()
Returns the numerical value of this unit. The angle is normalized as defined in the class description.

Specified by:
getValue_ in interface I_Unitable<_TYPE_ extends A_Attitude<?>>
Returns:
the value

setAngle

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

Parameters:
angleDegrees - - the angle, which is internally normalized as defined in the class description