kaos.robots.util.gps.convert
Class Converter

java.lang.Object
  extended by kaos.robots.util.gps.convert.Converter

public class Converter
extends java.lang.Object

Converter.java

Description:

Created on Sep 1, 2004


Field Summary
static int NORTHERN_HEMISPHERE
           
static int SOUTHERN_HEMISPHERE
           
 
Constructor Summary
Converter()
           
 
Method Summary
static int getZoneNumber(double Lat, double Long)
          Returns the zone number for a given longitude.
static int getZoneNumber(GPSPosition pos)
          Returns the zone number for a given GPSPosition parameter.
static double[] LLtoUTM(int ellipsoidRef, double Lat, double Long)
          Converts lat/long to UTM coordinates.
static GPSPosition UTMtoLL(int ellipsoidRef, double UTMNorthing, double UTMEasting, int ZoneNumber, int Hemisphere)
          Converts UTM coords to lat/long.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOUTHERN_HEMISPHERE

public static final int SOUTHERN_HEMISPHERE
See Also:
Constant Field Values

NORTHERN_HEMISPHERE

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

Converter

public Converter()
Method Detail

LLtoUTM

public static double[] LLtoUTM(int ellipsoidRef,
                               double Lat,
                               double Long)
Converts lat/long to UTM coordinates. East Longitudes are positive, West are negative. North latitudes are positive, South are negative. UTM is limited to 84N to 80S.

Parameters:
ellipsoidRef -
Lat - -- decimal degrees
Long - -- decimal degrees

UTMtoLL

public static GPSPosition UTMtoLL(int ellipsoidRef,
                                  double UTMNorthing,
                                  double UTMEasting,
                                  int ZoneNumber,
                                  int Hemisphere)
Converts UTM coords to lat/long. East Longitudes are positive, West longitudes are negative. North latitudes are positive, South latitudes are negative. Lat and Long are in decimal degrees.


getZoneNumber

public static int getZoneNumber(GPSPosition pos)
Returns the zone number for a given GPSPosition parameter.

Parameters:
pos -
Returns:
UTM zone number.

getZoneNumber

public static int getZoneNumber(double Lat,
                                double Long)
Returns the zone number for a given longitude.

Parameters:
Lat - -- decimal degrees
Long - -- decimal degrees.
Returns:
int of UTM zone number.