Terrabots
/
Tracker2
Made distance public
Fork of Tracker by
Diff: Tracker.h
- Revision:
- 6:50f337affc44
- Parent:
- 5:757a984ac553
--- a/Tracker.h Tue Feb 14 21:04:20 2017 +0000 +++ b/Tracker.h Tue Feb 14 21:18:43 2017 +0000 @@ -61,27 +61,75 @@ */ void calcDisplacement(); private: + /** + * The QEI object created with the QEI library to interpret encoder + * measurements. + */ QEI *wheel; + /** + * The interrupt pin used for channel A. + */ PinName chA; + /** + * The interrupt pin used for channel B. + */ PinName chB; + /** + * The AnalogIn pin used for the potentiometer. + */ AnalogIn pot; + /** + * The number of pulses recorded by the encoder. + */ float pulseCount; + /** + * The type of encoding (X2 or X4) used for the encoder. + */ float encoding; + /** + * The circumference of the front dump truck wheel. + */ float circumference; + /** + * Equal to 1360. This constant is used to convert pulses counted to + * inches traveled. + */ float constant; - + /** + * The distance traveled by the dump truck. + */ float distance; - + /** + * The horizontal position of the dump truck. + */ float x; + /** + * The vertical position of the dump truck. + */ float y; - + /** + * The raw analog value of the potentiometer + */ float value; + /** + * The angle at which the dump truck is turning. + */ float turnAngle; + /** + * The angle at which the dump truck is driving straight forward. + */ float zeroAngle; - + /** + * The direction at which the dump truck is turning. + */ int dir; - + /** + * The distance from the front wheel to the turning axle. + */ float df; + /** + * The distance from the rear wheel to the turning axle. + */ float db; float W; float R;