|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuavsim.datatypes.A_Angle<_ANGLETYPE_>
_ANGLETYPE_ - - the type of angle: currently mathematical or navigationalpublic abstract class A_Angle<_ANGLETYPE_ extends A_Angle<?>>
Defines the shared aspects of an angle.
| Field Summary | |
|---|---|
private double |
_angleDegrees
the angle in degrees; it should always be normalized |
private static java.text.DecimalFormat |
ANGLE_FORMATTER
the format for three-digit angles |
| Constructor Summary | |
|---|---|
A_Angle(double angle)
Creates an abstract angle object. |
|
| Method Summary | |
|---|---|
int |
compareTo(_ANGLETYPE_ angle)
|
java.lang.String |
formatString()
Formats the angle string as [zzz???]. |
double |
getValue_()
Returns the numerical value of this unit. |
double |
getValueAffineRadians()
Gets the affine radians value of the angle, defined as -radians(degrees - 90). |
java.lang.String |
getValueFormatted()
Formats the angle as three digits. |
int |
getValueInt()
Rounds the angle to the nearest integer. |
double |
getValueRadians()
Gets the angle in radians. |
abstract _ANGLETYPE_ |
interpolate(_ANGLETYPE_ angle,
Scaler scaler)
Interpolates between this angle and another. |
abstract _ANGLETYPE_ |
interpolate(_ANGLETYPE_ angle,
Scaler scaler,
boolean isOverShortestPath)
Interpolates between this angle and another. |
abstract boolean |
isShortestPathClockwise(_ANGLETYPE_ angle)
Determines whether the shortest direction between this angle and another is clockwise. |
static double |
normalizeAngle(double angleDegrees)
Normalizes an angle to the interval [0,360). |
protected double |
offset(double angle)
Offsets this angle by another (by addition). |
protected double |
scale(double fraction)
Scales this angle by a percent of a circle. |
protected double |
scale(Scaler scaler)
Scales this angle by a percent of a circle. |
private void |
setAngle(double angleDegrees)
Sets the 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 |
|---|
private double _angleDegrees
private static final java.text.DecimalFormat ANGLE_FORMATTER
| Constructor Detail |
|---|
public A_Angle(double angle)
angle - - the angle in degrees| Method Detail |
|---|
public int compareTo(_ANGLETYPE_ angle)
compareTo in interface java.lang.Comparable<_ANGLETYPE_ extends A_Angle<?>>public java.lang.String formatString()
public double getValue_()
getValue_ in interface I_Unitable<_ANGLETYPE_ extends A_Angle<?>>public double getValueAffineRadians()
public java.lang.String getValueFormatted()
public int getValueInt()
public double getValueRadians()
public abstract _ANGLETYPE_ interpolate(_ANGLETYPE_ angle,
Scaler scaler)
angle - - the ending anglescaler - - the scaler for the interpolated point
public abstract _ANGLETYPE_ interpolate(_ANGLETYPE_ angle,
Scaler scaler,
boolean isOverShortestPath)
angle - - the ending anglescaler - - the scaler for the interpolated pointisOverShortestPath - - whether to interpolate over the shortest or longest arc length in the appropriate direction
public abstract boolean isShortestPathClockwise(_ANGLETYPE_ angle)
angle - - the other angle
public static double normalizeAngle(double angleDegrees)
angleDegrees - - the angle in degrees
protected double offset(double angle)
angle - - the offset angle
protected double scale(double fraction)
fraction - - the percent on the interval [0,1]
protected double scale(Scaler scaler)
scaler - - the scaler
private void setAngle(double angleDegrees)
angleDegrees - - the angle in degrees
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||