uk.me.jstott.jcoord
Class ECEFRef

java.lang.Object
  extended by uk.me.jstott.jcoord.CoordinateSystem
      extended by uk.me.jstott.jcoord.ECEFRef

public class ECEFRef
extends CoordinateSystem

This class is part of the Jcoord package. Visit the Jcoord website for more information.

ECEF (earth-centred, earth-fixed) Cartesian co-ordinates are used to define a point in three-dimensional space. ECEF co-ordinates are defined relative to an x-axis (the intersection of the equatorial plane and the plane defined by the prime meridian), a y-axis (at 90° to the x-axis and its intersection with the equator) and a z-axis (intersecting the North Pole). All the axes intersect at the point defined by the centre of mass of the Earth.

(c) 2006 Jonathan Stott

Created on 02-Apr-2006

Since:
1.1
Version:
1.1
Author:
Jonathan Stott

Constructor Summary
ECEFRef(double x, double y, double z)
          Create a new earth-centred, earth-fixed (ECEF) reference from the given parameters using the WGS84 reference ellipsoid.
ECEFRef(double x, double y, double z, Datum datum)
          Create a new earth-centred, earth-fixed (ECEF) reference from the given parameters and the given reference ellipsoid.
ECEFRef(LatLng ll)
          Create a new earth-centred, earth-fixed reference from the given latitude and longitude.
 
Method Summary
 double getX()
          Get the x co-ordinate.
 double getY()
          Get the y co-ordinate.
 double getZ()
          Get the z co-ordinate.
 void setX(double x)
          Set the x co-ordinate.
 void setY(double y)
          Set the y co-ordinate.
 void setZ(double z)
          Set the z co-ordinate.
 LatLng toLatLng()
          Convert this ECEFRef object to a LatLng object.
 java.lang.String toString()
          Get a String representation of this ECEF reference.
 
Methods inherited from class uk.me.jstott.jcoord.CoordinateSystem
getDatum, setDatum
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ECEFRef

public ECEFRef(double x,
               double y,
               double z)
Create a new earth-centred, earth-fixed (ECEF) reference from the given parameters using the WGS84 reference ellipsoid.

Parameters:
x - the x co-ordinate.
y - the y co-ordinate.
z - the z co-ordinate.

ECEFRef

public ECEFRef(double x,
               double y,
               double z,
               Datum datum)
Create a new earth-centred, earth-fixed (ECEF) reference from the given parameters and the given reference ellipsoid.

Parameters:
x - the x co-ordinate.
y - the y co-ordinate.
z - the z co-ordinate.
datum - the datum.
Since:
1.1

ECEFRef

public ECEFRef(LatLng ll)
Create a new earth-centred, earth-fixed reference from the given latitude and longitude.

Parameters:
ll - latitude and longitude.
Since:
1.1
Method Detail

toLatLng

public LatLng toLatLng()
Convert this ECEFRef object to a LatLng object.

Specified by:
toLatLng in class CoordinateSystem
Returns:
the equivalent latitude and longitude.
Since:
1.1

getX

public double getX()
Get the x co-ordinate.

Returns:
the x co-ordinate.
Since:
1.1

getY

public double getY()
Get the y co-ordinate.

Returns:
the y co-ordinate.
Since:
1.1

getZ

public double getZ()
Get the z co-ordinate.

Returns:
the z co-ordinate.
Since:
1.1

setX

public void setX(double x)
Set the x co-ordinate.

Parameters:
x - the new x co-ordinate.
Since:
1.1

setY

public void setY(double y)
Set the y co-ordinate.

Parameters:
y - the y co-ordinate.
Since:
1.1

setZ

public void setZ(double z)
Set the z co-ordinate.

Parameters:
z - the z co-ordinate.
Since:
1.1

toString

public java.lang.String toString()
Get a String representation of this ECEF reference.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of this ECEF reference.
Since:
1.1