jwo.landserf.process.gps
Class AngleRadians

java.lang.Object
  extended by jwo.landserf.process.gps.AngleRadians

public class AngleRadians
extends Object

Used to represent an angular coordinate in radians, usually for global longitude, latitude position.

Version:
2.3, 24th June, 2004.
Author:
Jo Wood, based on the design by Henrik Sorensen (haas@itu.dk).

Constructor Summary
AngleRadians(double angle)
          Initialises object with a given angle in degrees.
 
Method Summary
 boolean equals(AngleRadians otherAngle)
          Tests if the two angles are identical.
 double getAngle()
          Reports his angle in radians.
 int getDegrees()
          Reports the whole degrees part of this angle.
 double getMinutes()
          Reports the minutes part of this angle.
 boolean greaterThan(AngleRadians otherAngle)
          Tests if this angle is greater than the given angle.
 boolean lessThan(AngleRadians otherAngle)
          Tests if this angle is less than the given angle.
 String toString()
          Reports the value of this angle in degrees and minutes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AngleRadians

public AngleRadians(double angle)
Initialises object with a given angle in degrees. Note that this is an immutable class so cannot change its angular value.

Parameters:
angle - Angle in degrees.
Method Detail

getAngle

public double getAngle()
Reports his angle in radians.

Returns:
Angle (not rounded or truncated).

getDegrees

public int getDegrees()
Reports the whole degrees part of this angle.

Returns:
The whole number of degrees in this angle (truncated not rounded).

getMinutes

public double getMinutes()
Reports the minutes part of this angle. Can include decimal minutes.

Returns:
The minutes component of this angle.

toString

public String toString()
Reports the value of this angle in degrees and minutes.

Overrides:
toString in class Object
Returns:
A textual representation of this angle. Useful for reporting angle to user.

equals

public boolean equals(AngleRadians otherAngle)
Tests if the two angles are identical.

Parameters:
otherAngle - Other angle to compare with this one.
Returns:
True if this angle is equal to the given one.

greaterThan

public boolean greaterThan(AngleRadians otherAngle)
Tests if this angle is greater than the given angle.

Parameters:
otherAngle - Other angle to compare with this one.
Returns:
True if this angle is greater than the given one.

lessThan

public boolean lessThan(AngleRadians otherAngle)
Tests if this angle is less than the given angle.

Parameters:
otherAngle - Other angle to compare with this one.
Returns:
True if this angle is less than the given one.


Copyright Jo Wood, 1996-2009, last modified, 17th April, 2009