org.jscience.devices.gps
Class Position

java.lang.Object
  extended by org.jscience.devices.gps.Position
All Implemented Interfaces:
IPosition

public class Position
extends java.lang.Object
implements IPosition

This is a class meant for containing positions.


Constructor Summary
Position()
          Makes a new position.
Position(double la, double lo)
          Initializes the Position with la as the latitude and lo as the longitude.
Position(IPosition pos)
          Initializes the position object from an IPosition reference.
Position(PositionRadians la, PositionRadians lo)
          Creates a new Position object.
 
Method Summary
 PositionRadians getLatitude()
          Returns the latitude of this position.
 PositionRadians getLongitude()
          Returns the longitude of this position.
 void setLatitude(PositionRadians l)
          Sets the latitude of this position.
 void setLongitude(PositionRadians l)
          Sets the longitude of this position.
 java.lang.String toString()
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Position

public Position()
Makes a new position. Initializes the latitude and the longitude to 0.


Position

public Position(double la,
                double lo)
Initializes the Position with la as the latitude and lo as the longitude.

Parameters:
la - DOCUMENT ME!
lo - DOCUMENT ME!

Position

public Position(PositionRadians la,
                PositionRadians lo)
Creates a new Position object.

Parameters:
la - DOCUMENT ME!
lo - DOCUMENT ME!

Position

public Position(IPosition pos)
Initializes the position object from an IPosition reference.

Parameters:
pos - DOCUMENT ME!
Method Detail

setLatitude

public void setLatitude(PositionRadians l)
Sets the latitude of this position.

Parameters:
l - DOCUMENT ME!

setLongitude

public void setLongitude(PositionRadians l)
Sets the longitude of this position.

Parameters:
l - DOCUMENT ME!

getLatitude

public PositionRadians getLatitude()
Returns the latitude of this position.

Specified by:
getLatitude in interface IPosition
Returns:
DOCUMENT ME!

getLongitude

public PositionRadians getLongitude()
Returns the longitude of this position.

Specified by:
getLongitude in interface IPosition
Returns:
DOCUMENT ME!

toString

public java.lang.String toString()
DOCUMENT ME!

Overrides:
toString in class java.lang.Object
Returns:
DOCUMENT ME!