koala
Class KoalaLocation

java.lang.Object
  extended by koala.KoalaLocation
All Implemented Interfaces:
java.io.Serializable

public class KoalaLocation
extends java.lang.Object
implements java.io.Serializable

Represents a 2 dimensional real-world location. The imageX, Y fields denote the co-ordinates in the image, if this location was calculated using a camera.

See Also:
Serialized Form

Field Summary
 int heading
           
 int imageX
           
 int imageY
           
static int UNKNOWN_HEADING
           
 int x
           
 int y
           
 
Constructor Summary
KoalaLocation()
           
KoalaLocation(int x, int y)
           
KoalaLocation(int x, int y, int heading)
           
 
Method Summary
 int getRotationTo(KoalaLocation target)
          Compute the (minimum) angle by which the robot needs to turn to face the target location.
 KoalaVector getVectorTo(KoalaLocation target)
          Computes the vector drawn from this location to the target.
 int reliability()
          Describes the reliability of the location reading (when derived from a camera).
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN_HEADING

public static final int UNKNOWN_HEADING
See Also:
Constant Field Values

imageX

public int imageX

imageY

public int imageY

x

public int x

y

public int y

heading

public int heading
Constructor Detail

KoalaLocation

public KoalaLocation()

KoalaLocation

public KoalaLocation(int x,
                     int y)

KoalaLocation

public KoalaLocation(int x,
                     int y,
                     int heading)
Method Detail

reliability

public int reliability()
Describes the reliability of the location reading (when derived from a camera). Higher values are more reliable.


getVectorTo

public KoalaVector getVectorTo(KoalaLocation target)
Computes the vector drawn from this location to the target.


getRotationTo

public int getRotationTo(KoalaLocation target)
Compute the (minimum) angle by which the robot needs to turn to face the target location.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object