|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuavsim.datatypes.A_LatitudeLongitude<_TYPE_>
_TYPE_ - - the measurement type: latitude or longitudepublic abstract class A_LatitudeLongitude<_TYPE_ extends A_LatitudeLongitude<?>>
Defines the shared aspects of a latitude and longitude in terms of Universal Transverse Mercator (UTM) coordinates. Only northern and western hemispheres are currently supported.
| Nested Class Summary | |
|---|---|
static class |
A_LatitudeLongitude.E_Format
The enumeration defines the format of the encoding. |
| Field Summary | |
|---|---|
protected int |
_degrees
the degrees |
protected int |
_minutes
the minutes |
protected double |
_seconds
the seconds |
private static java.text.DecimalFormat |
FORMAT
the format for pretty-printing values |
static int |
MINUTES_PER_DEGREE
the number of minutes of distance in a degree |
static int |
SECONDS_PER_MINUTE
the number of seconds in a minute of distance |
| Constructor Summary | |
|---|---|
A_LatitudeLongitude(double encoding)
Creates an abstract object for latitude or longitude from the decimal encoding format. |
|
A_LatitudeLongitude(double encoding,
A_LatitudeLongitude.E_Format format)
Creates an abstract object for latitude or longitude. |
|
A_LatitudeLongitude(int degrees,
int minutes,
double seconds,
int degreesModulo)
Creates an object for abstract latitude or longitude. |
|
| Method Summary | |
|---|---|
int |
compareTo(_TYPE_ coordinate)
|
private double |
encodeAsDecimal(int degrees,
int minutes,
double seconds)
Encodes the coordinate in decimal format |
java.lang.String |
formatString(boolean isPadded,
char hemisphere)
Formats the coordinate appropriately. |
double |
getDecimalEncoding()
Gets the encoding. |
int |
getDegrees()
Gets the degrees. |
int |
getMinutes()
Gets the minutes. |
double |
getMinutesAndSeconds()
Gets the minutes and seconds with minutes as the whole-number part and seconds as the fractional-part as a percent of 60. |
double |
getSeconds()
Gets the seconds. |
int |
getSecondsInt()
Gets the seconds as an integer. |
double |
getSecondsTenth()
Gets the seconds rounded to a tenth. |
double |
getValue_()
Returns the numerical value of this unit. |
abstract _TYPE_ |
round(_TYPE_ image)
Rounds the coordinate to the nearest degree, minute, or second. |
protected double |
round2(_TYPE_ image)
Rounds the coordinate to the nearest degree, minute, or second. |
| 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 |
|---|
protected final int _degrees
protected final int _minutes
protected final double _seconds
private static final java.text.DecimalFormat FORMAT
public static final int MINUTES_PER_DEGREE
public static final int SECONDS_PER_MINUTE
| Constructor Detail |
|---|
public A_LatitudeLongitude(double encoding)
encoding - - the encoding
public A_LatitudeLongitude(double encoding,
A_LatitudeLongitude.E_Format format)
encoding - - the encodingformat - - the encoding format
public A_LatitudeLongitude(int degrees,
int minutes,
double seconds,
int degreesModulo)
degrees - - the degreesminutes - - the minutesseconds - - the secondsdegreesModulo - - the modulo for wrapping degrees (90 for latitude, 180 for longitude)| Method Detail |
|---|
public int compareTo(_TYPE_ coordinate)
compareTo in interface java.lang.Comparable<_TYPE_ extends A_LatitudeLongitude<?>>
private double encodeAsDecimal(int degrees,
int minutes,
double seconds)
degrees - - the degreesminutes - - the minutesseconds - - the seconds
public java.lang.String formatString(boolean isPadded,
char hemisphere)
isPadded - - whether to pad the formathemisphere - - the hemisphere, either N or W
public double getDecimalEncoding()
public int getDegrees()
public int getMinutes()
public double getMinutesAndSeconds()
public double getSeconds()
public int getSecondsInt()
public double getSecondsTenth()
public double getValue_()
getValue_ in interface I_Unitable<_TYPE_ extends A_LatitudeLongitude<?>>public abstract _TYPE_ round(_TYPE_ image)
image - - the image; the one and only one nonzero field specifies the field to round
protected double round2(_TYPE_ image)
image - - the image; the one and only one nonzero field specifies the field to round
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||