Smartcar Shield
|
#include <Odometer.hpp>
Public Member Functions | |
virtual | ~Odometer ()=default |
virtual long | getDistance ()=0 |
Returns the travelled distance in centimeters where sign can indicate direction if there is hardware support. More... | |
virtual float | getSpeed ()=0 |
Returns the current speed in meters/sec where sign can indicate direction if there is hardware support. More... | |
virtual bool | isAttached () const =0 |
Returns whether the sensor has been properly attached. More... | |
virtual bool | providesDirection () const =0 |
Return whether the sensor is capable of inferring the direction of movement. More... | |
An interface to programmatically represent all odometers
Definition at line 26 of file Odometer.hpp.
|
virtualdefault |
|
pure virtual |
Returns the travelled distance in centimeters where sign can indicate direction if there is hardware support.
Example:
Implemented in DirectionalOdometer, and DirectionlessOdometer.
|
pure virtual |
Returns the current speed in meters/sec where sign can indicate direction if there is hardware support.
Example:
Implemented in DirectionalOdometer, and DirectionlessOdometer.
|
pure virtual |
Returns whether the sensor has been properly attached.
Implemented in DirectionlessOdometer.
|
pure virtual |
Return whether the sensor is capable of inferring the direction of movement.
true
if the sensor supports direction readings otherwise false
Example:
Implemented in DirectionalOdometer, and DirectionlessOdometer.