driver.ted.utilities
Class T_Site

java.lang.Object
  extended by driver.ted.utilities.T_Site

public class T_Site
extends java.lang.Object

Title: T_Site
Description: This class maintains its coordinates in ECEF XYZ and spherical geodetic (lat, lon, height). Whenever a coordinate is set or changed, a conversion is made so that the coordinates in both frames are always up to date.
Copyright: (c) 2002 - 2006
Change History:

Version:
1.1
Author:
Ted Driver

Constructor Summary
T_Site()
          Default Constructor, initializes X, Y, Z and latitude, longitude and height to 0.0.
T_Site(double initialX, double initialY, double initialZ)
          Constructor sets X, Y and Z.
 
Method Summary
 double getHeight()
          Returns the current geodetic height value.
 double getLatitude()
          Returns the current geodetic latitude value.
 double getLongitude()
          Returns the current geodetic longitude value.
 double getX()
          Returns the current Earth-Centered-Earth-Fixed (ECEF) X coordinate.
 double getY()
          Returns the current Earth-Centered-Earth-Fixed (ECEF) Y coordinate.
 double getZ()
          Returns the current Earth-Centered-Earth-Fixed (ECEF) Z coordinate.
static void main(java.lang.String[] args)
          Executable program to test the T_Site functionality.
 void setHeight(double newHeight)
          Sets the geodetic height value.
 void setLatitude(double newLatitude)
          Sets the geodetic latitude value.
 void setLatLonHeight(double newLatitude, double newLongitude, double newHeight)
          Sets the geodetic latitude, longitude and height values.
 void setLongitude(double newLongitude)
          Sets the geodetic longitude value.
 void setX(double newX)
          Sets the ECEF X coordinate.
 void setXYZ(double newX, double newY, double newZ)
          Sets the ECEF X, Y and Z coordinates.
 void setY(double newY)
          Sets the ECEF Y coordinate.
 void setZ(double newZ)
          Sets the ECEF Z coordinate.
 java.lang.String toString()
          Returns a listing of the sites coordinates in ECEF and Geocentric formats.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

T_Site

public T_Site()
Default Constructor, initializes X, Y, Z and latitude, longitude and height to 0.0.


T_Site

public T_Site(double initialX,
              double initialY,
              double initialZ)
Constructor sets X, Y and Z. Then calculates the geodetic latitude, longitude and height based on these values.

Parameters:
initialX - The initial X value
initialY - The initial Y value
initialZ - The initial Z value
Method Detail

getLongitude

public double getLongitude()
Returns the current geodetic longitude value. The value returned will be in the range (0,2*PI].

Returns:
A double representing the geodetic longitude in radians between 0 and 2*PI.

getLatitude

public double getLatitude()
Returns the current geodetic latitude value. The value returned will be in the range (-PI/2, PI/2).

Returns:
A double representing the geodetic latitude in radians between ,-PI/2 and PI/2.

getHeight

public double getHeight()
Returns the current geodetic height value. The value returned is the height in meters above mean sea level.

Returns:
A double representing the geodetic height in meters above mean sea level.

getX

public double getX()
Returns the current Earth-Centered-Earth-Fixed (ECEF) X coordinate. The value returned is the X coordinate in meters as measured from the center of the Earh.

Returns:
A double representing the ECEF X coordinate in meters.

getY

public double getY()
Returns the current Earth-Centered-Earth-Fixed (ECEF) Y coordinate. The value returned is the Y coordinate in meters as measured from the center of the Earh.

Returns:
A double representing the ECEF Y coordinate in meters.

getZ

public double getZ()
Returns the current Earth-Centered-Earth-Fixed (ECEF) Z coordinate. The value returned is the Z coordinate in meters as measured from the center of the Earh.

Returns:
A double representing the ECEF Z coordinate in meters.

setLongitude

public void setLongitude(double newLongitude)
Sets the geodetic longitude value.

Parameters:
newLongitude - The new longitude value. The longitude value must be in radians.

setLatitude

public void setLatitude(double newLatitude)
Sets the geodetic latitude value.

Parameters:
newLatitude - The new latitude value. The latitude value must be in radians.

setHeight

public void setHeight(double newHeight)
Sets the geodetic height value.

Parameters:
newHeight - The new height value. The height value must be in meters and must be larger than -T_Utilities.EarthEquatorialRadius. If the height is less than this value it will be set to -T_Utilities.EarthEquatorialRadius.

setX

public void setX(double newX)
Sets the ECEF X coordinate.

Parameters:
newX - The new X coordinate value. The X value must be in meters.

setY

public void setY(double newY)
Sets the ECEF Y coordinate.

Parameters:
newY - The new Y coordinate value. The Y value must be in meters.

setZ

public void setZ(double newZ)
Sets the ECEF Z coordinate.

Parameters:
newZ - The new Z coordinate value. The Z value must be in meters.

setLatLonHeight

public void setLatLonHeight(double newLatitude,
                            double newLongitude,
                            double newHeight)
Sets the geodetic latitude, longitude and height values.

Parameters:
newLatitude - The new latitude value. The latitude value must be in radians.
newLongitude - The new longitude value. The longitude value must be in radians.
newHeight - The new height value. The height value must be in meters and must be larger than -T_Utilities.EarthEquatorialRadius. If the height is less than this value it will be set to -T_Utilities.EarthEquatorialRadius.

setXYZ

public void setXYZ(double newX,
                   double newY,
                   double newZ)
Sets the ECEF X, Y and Z coordinates.

Parameters:
newX - The new X coordinate value. The X value must be in meters and may not be negative. If X is negative, it will be set to zero (0).
newY - The new Y coordinate value. The Y value must be in meters and may not be negative. If Y is negative, it will be set to zero (0).
newZ - The new Z coordinate value. The Z value must be in meters and may not be negative. If Z is negative, it will be set to zero (0).

toString

public java.lang.String toString()
Returns a listing of the sites coordinates in ECEF and Geocentric formats.

Overrides:
toString in class java.lang.Object
Returns:
String representation of sites coordinates

main

public static void main(java.lang.String[] args)
Executable program to test the T_Site functionality.

Parameters:
args - Argument string. Not needed for this function