gov.nasa.worldwind.geom.coords
Class UPSCoordConverter
java.lang.Object
gov.nasa.worldwind.geom.coords.UPSCoordConverter
public class UPSCoordConverter - extends Object
Ported to Java from the NGA GeoTrans ups.c and ups.h code - Feb 12, 2007 4:52:59 PM
|
Method Summary |
long |
convertGeodeticToUPS(double latitude,
double longitude)
The function convertGeodeticToUPS converts geodetic (latitude and longitude) coordinates to UPS (hemisphere,
easting, and northing) coordinates, according to the current ellipsoid parameters. |
long |
convertUPSToGeodetic(char Hemisphere,
double Easting,
double Northing)
The function Convert_UPS_To_Geodetic converts UPS (hemisphere, easting,
and northing) coordinates to geodetic (latitude and longitude) coordinates
according to the current ellipsoid parameters. |
double |
getEasting()
|
char |
getHemisphere()
|
double |
getLatitude()
|
double |
getLongitude()
|
double |
getNorthing()
|
long |
setUPSParameters(double a,
double f)
The function SetUPSParameters receives the ellipsoid parameters and sets the corresponding state variables. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UPS_EASTING_ERROR
public static final int UPS_EASTING_ERROR
- See Also:
- Constant Field Values
UPS_HEMISPHERE_ERROR
public static final int UPS_HEMISPHERE_ERROR
- See Also:
- Constant Field Values
UPS_NO_ERROR
public static final int UPS_NO_ERROR
- See Also:
- Constant Field Values
UPS_NORTHING_ERROR
public static final int UPS_NORTHING_ERROR
- See Also:
- Constant Field Values
convertGeodeticToUPS
public long convertGeodeticToUPS(double latitude,
double longitude)
- The function convertGeodeticToUPS converts geodetic (latitude and longitude) coordinates to UPS (hemisphere,
easting, and northing) coordinates, according to the current ellipsoid parameters. If any errors occur, the error
code(s) are returned by the function, otherwide UPS_NO_ERROR is returned.
- Parameters:
latitude - Latitude in radianslongitude - Longitude in radians
- Returns:
- error code
convertUPSToGeodetic
public long convertUPSToGeodetic(char Hemisphere,
double Easting,
double Northing)
- The function Convert_UPS_To_Geodetic converts UPS (hemisphere, easting,
and northing) coordinates to geodetic (latitude and longitude) coordinates
according to the current ellipsoid parameters. If any errors occur, the
error code(s) are returned by the function, otherwise UPS_NO_ERROR is
returned.
- Parameters:
Hemisphere - Hemisphere either 'N' or 'S'Easting - Easting/X in metersNorthing - Northing/Y in meters
- Returns:
- error code
getEasting
public double getEasting()
- Returns:
- Easting/X in meters
getHemisphere
public char getHemisphere()
- Returns:
- Hemisphere 'N' or 'S'
getLatitude
public double getLatitude()
- Returns:
- Latitude in radians.
getLongitude
public double getLongitude()
- Returns:
- Longitude in radians.
getNorthing
public double getNorthing()
- Returns:
- Northing/Y in meters
setUPSParameters
public long setUPSParameters(double a,
double f)
- The function SetUPSParameters receives the ellipsoid parameters and sets the corresponding state variables. If
any errors occur, the error code(s) are returned by the function, otherwise UPS_NO_ERROR is returned.
- Parameters:
a - Semi-major axis of ellipsoid in metersf - Flattening of ellipsoid
- Returns:
- error code
|
|