lejos.robotics.proposal
Class DeadReckonerPoseProvider

java.lang.Object
  extended by lejos.robotics.proposal.DeadReckonerPoseProvider
All Implemented Interfaces:
PoseProvider, MoveListener

public class DeadReckonerPoseProvider
extends Object
implements MoveListener, PoseProvider

A PoseProvider that keeps track of coordinates using dead reckoning, by monitoring Pilot movements. Question: What about a robot that is helped along with a Compass? Should the compass go in a DeadReckoner constructor, or a Pilot constructor? The PoseProvider seems more logical but Lawrie wants it to only accept a Pilot. Provisional name: DeadReckonerPoseProvider Alternate names: DeadReckonerPoseProvider, DeadReckoner, OrienteeringPoseProvider, OdometryPoseProvider


Constructor Summary
DeadReckonerPoseProvider(MovementProvider mp)
          Internally, the constructor listens to movements from the Pilot.
 
Method Summary
 Pose getPose()
           
 void movementStarted(Movement event, MovementProvider mp)
          Called when a Movement Provider starts a move
 void movementStopped(Movement event, MovementProvider mp)
          Called by the movementr provider when a move stops
 void setPosition(Point p)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeadReckonerPoseProvider

public DeadReckonerPoseProvider(MovementProvider mp)
Internally, the constructor listens to movements from the Pilot. This allows it to keep track of all vector movements made.

Parameters:
mp - the movement provider
Method Detail

getPose

public Pose getPose()
Specified by:
getPose in interface PoseProvider

movementStarted

public void movementStarted(Movement event,
                            MovementProvider mp)
Description copied from interface: MoveListener
Called when a Movement Provider starts a move

Specified by:
movementStarted in interface MoveListener
Parameters:
event - the movement
mp - the movement provider

movementStopped

public void movementStopped(Movement event,
                            MovementProvider mp)
Description copied from interface: MoveListener
Called by the movementr provider when a move stops

Specified by:
movementStopped in interface MoveListener
Parameters:
event - the movement
mp - movement provider

setPosition

public void setPosition(Point p)