jme3tools.navigation
Class Coordinate

java.lang.Object
  extended by jme3tools.navigation.Coordinate

public class Coordinate
extends java.lang.Object

Coordinate class. Used to store a coordinate in [DD]D MM.M format.

Since:
1.0

Field Summary
static int DEGPRECISION
           
static int E
           
static int LAT
           
static int LNG
           
static int MINPRECISION
           
static int N
           
static int S
           
static int W
           
 
Constructor Summary
Coordinate(double decCoordinate, int coOrdinate)
          Constructor
Coordinate(int deg, float minsDecMins, int coOrdinate, int quad)
          Constructor
Coordinate(java.lang.String coOrdinate)
          This constructor takes a coordinate in the ALRS formats i.e 38∞31.64'N for lat, and 28∞19.12'W for long Note: ALRS positions are occasionally written with the decimal minutes apostrophe in the 'wrong' place and with an non CP1252 compliant decimal character.
 
Method Summary
 double decVal()
          Returns the coordinate's decimal value
 java.lang.String toStringDec()
          Prints out a coordinate as a string
 java.lang.String toStringDegMin()
          Prints out a coordinate as a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MINPRECISION

public static final int MINPRECISION
See Also:
Constant Field Values

DEGPRECISION

public static final int DEGPRECISION
See Also:
Constant Field Values

LAT

public static final int LAT
See Also:
Constant Field Values

LNG

public static final int LNG
See Also:
Constant Field Values

E

public static final int E
See Also:
Constant Field Values

S

public static final int S
See Also:
Constant Field Values

W

public static final int W
See Also:
Constant Field Values

N

public static final int N
See Also:
Constant Field Values
Constructor Detail

Coordinate

public Coordinate(int deg,
                  float minsDecMins,
                  int coOrdinate,
                  int quad)
           throws InvalidPositionException
Constructor

Parameters:
deg -
minsDecMins -
coOrdinate -
quad -
Throws:
InvalidPositionException
Since:
1.0

Coordinate

public Coordinate(double decCoordinate,
                  int coOrdinate)
           throws InvalidPositionException
Constructor

Parameters:
decCoordinate -
coOrdinate -
Throws:
InvalidPositionException
Since:
1.0

Coordinate

public Coordinate(java.lang.String coOrdinate)
           throws InvalidPositionException
This constructor takes a coordinate in the ALRS formats i.e 38∞31.64'N for lat, and 28∞19.12'W for long Note: ALRS positions are occasionally written with the decimal minutes apostrophe in the 'wrong' place and with an non CP1252 compliant decimal character. This issue has to be corrected in the source database

Parameters:
coOrdinate -
Throws:
InvalidPositionException
Since:
1.0
Method Detail

toStringDegMin

public java.lang.String toStringDegMin()
Prints out a coordinate as a string

Returns:
the coordinate in decimal format
Since:
1.0

toStringDec

public java.lang.String toStringDec()
Prints out a coordinate as a string

Returns:
the coordinate in decimal format
Since:
1.0

decVal

public double decVal()
Returns the coordinate's decimal value

Returns:
float the decimal value of the coordinate
Since:
1.0