jasi.sim.geo.spherical
Class Coordinate

java.lang.Object
  extended by jasi.sim.geo.GeoObject
      extended by jasi.sim.geo.spherical.Coordinate
All Implemented Interfaces:
SimValue, Geometric, java.io.Serializable

public final class Coordinate
extends GeoObject

Immutable class to represent space values.

See Also:
Serialized Form

Field Summary
static Space CIRCLE
          The sphere's circumference.
static Coordinate ORIGIN
          The reference point of origin.
static Space RADIUS
          The sphere's radius.
 
Fields inherited from interface jasi.sim.geo.Geometric
BEGIN, END, MIDLE
 
Constructor Summary
Coordinate(Coordinate c)
          Constructor of a spherical coordinate.
Coordinate(Latitude lattitude, Longitude longitude)
          Constructor of a spherical coordinate on the surface.
Coordinate(Latitude lattitude, Longitude longitude, Space heights)
          Constructor of a spherical coordinate.
Coordinate(SpaceVec r)
          Constructor of a spherical coordinate.
Coordinate(java.lang.String s)
          Constructor of a spherical coordinate.
 
Method Summary
 double angleFrom(Coordinate c)
          Get the direction angle to that coordinate from this coordinate.
 double angleTo(Coordinate c)
          Get the direction angle at this coordinate to that coordinate.
 Arc arc(Coordinate c)
          Get the arc length from this coordinate to that coordinate.
 Coordinate direction(double angle, double length)
          Calculate new coordinate moving a path from this to that coordinate.
 Space distance(Coordinate c)
          Get the distance from this coordinate to that coordinate.
 boolean equals(java.lang.Object o)
          Indicates whether some other object is "equal to" this one.
 Space getHeight()
          Get height of this coordinate.
 Latitude getLattitude()
          Get the latitude of this coordinate.
 Longitude getLongitude()
          Get the longitude of this coordinate.
 int hashCode()
          Returns a hash code value for the object.
 java.lang.String toString()
          Returns a string representation of this object.
 SpaceVec transform()
          Returns the space vector of this coordinate.
 
Methods inherited from class jasi.sim.geo.GeoObject
getContent
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

RADIUS

public static final Space RADIUS
The sphere's radius.


CIRCLE

public static final Space CIRCLE
The sphere's circumference.


ORIGIN

public static final Coordinate ORIGIN
The reference point of origin.

Constructor Detail

Coordinate

public Coordinate(Latitude lattitude,
                  Longitude longitude,
                  Space heights)
Constructor of a spherical coordinate.

Parameters:
lattitude - The latitude part.
longitude - The longitude part.
heights - The heights part.

Coordinate

public Coordinate(Latitude lattitude,
                  Longitude longitude)
Constructor of a spherical coordinate on the surface.

Parameters:
lattitude - The latitude part.
longitude - The longitude part.

Coordinate

public Coordinate(Coordinate c)
Constructor of a spherical coordinate.

Parameters:
c - A coordinate.

Coordinate

public Coordinate(SpaceVec r)
Constructor of a spherical coordinate.

Parameters:
r - The space vector.

Coordinate

public Coordinate(java.lang.String s)
Constructor of a spherical coordinate.

Parameters:
s - The string representation of a space value.
Method Detail

getLattitude

public Latitude getLattitude()
Get the latitude of this coordinate.

Returns:
The latitude.

getLongitude

public Longitude getLongitude()
Get the longitude of this coordinate.

Returns:
The longitude

getHeight

public Space getHeight()
Get height of this coordinate.

Returns:
The height.

transform

public SpaceVec transform()
Returns the space vector of this coordinate.

Returns:
The space vector.

distance

public Space distance(Coordinate c)
Get the distance from this coordinate to that coordinate.

Parameters:
c - That coordinate.
Returns:
The distance.

arc

public Arc arc(Coordinate c)
Get the arc length from this coordinate to that coordinate.

Parameters:
c - That coordinate.
Returns:
The arc length.

angleTo

public double angleTo(Coordinate c)
Get the direction angle at this coordinate to that coordinate.

Parameters:
c - That coordinate
Returns:
The direction angle at this coordinate.

angleFrom

public double angleFrom(Coordinate c)
Get the direction angle to that coordinate from this coordinate.

Parameters:
c - That coordinate
Returns:
The direction angle to that coordinate.

direction

public Coordinate direction(double angle,
                            double length)
Calculate new coordinate moving a path from this to that coordinate.

Parameters:
angle - The course angle at this coordinate.
length - The path length.
Returns:
The new coordinate.

toString

public java.lang.String toString()
Returns a string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
The string.

hashCode

public int hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hash tables.

Overrides:
hashCode in class java.lang.Object
Returns:
A hash code value for this object.

equals

public boolean equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class java.lang.Object
Parameters:
o - That object which is compared with this object.
Returns:
True, if this object is the same as that object.