com.scottpreston.javarobot.chapter7
Class Localization

java.lang.Object
  extended by com.scottpreston.javarobot.chapter7.Navigation
      extended by com.scottpreston.javarobot.chapter7.Localization
Direct Known Subclasses:
ObstacleNavigation

public class Localization
extends Navigation


Field Summary
static int ROBOT_RADIUS
           
 
Fields inherited from class com.scottpreston.javarobot.chapter7.Navigation
DEFAULT_SPEED, RAW_FWD, RAW_LFT, RAW_REV, RAW_RGT, REL_EAST, REL_NORTH, REL_SOUTH, REL_WEST, surface, SURFACE_CARPET, SURFACE_CEMENT
 
Constructor Summary
Localization(JSerialPort serialPort)
           
 
Method Summary
static DistanceVector getDistanceVector(java.awt.Point a, java.awt.Point b)
           
 int[] getFourCoordinates()
           
 SonarServos getSonarServos()
           
 NavPoint getStart()
           
 NavPoint getStart2()
           
static void main(java.lang.String[] args)
           
 void move(java.awt.Point b)
           
 void move(java.awt.Point a, java.awt.Point b)
           
 
Methods inherited from class com.scottpreston.javarobot.chapter7.Navigation
changeHeading, getDrive, getNavStamp, getRealAngle, getSpeed, getSurfaceRate, move, move, move, moveRaw, setSpeed, stop
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROBOT_RADIUS

public static final int ROBOT_RADIUS
See Also:
Constant Field Values
Constructor Detail

Localization

public Localization(JSerialPort serialPort)
             throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getDistanceVector

public static DistanceVector getDistanceVector(java.awt.Point a,
                                               java.awt.Point b)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

getStart

public NavPoint getStart()
                  throws java.lang.Exception
Throws:
java.lang.Exception

getFourCoordinates

public int[] getFourCoordinates()
                         throws java.lang.Exception
Throws:
java.lang.Exception

getStart2

public NavPoint getStart2()
                   throws java.lang.Exception
Throws:
java.lang.Exception

move

public void move(java.awt.Point a,
                 java.awt.Point b)
          throws java.lang.Exception
Throws:
java.lang.Exception

move

public void move(java.awt.Point b)
          throws java.lang.Exception
Throws:
java.lang.Exception

getSonarServos

public SonarServos getSonarServos()

main

public static void main(java.lang.String[] args)