Code for autonomous ground vehicle, Data Bus, 3rd place winner in 2012 Sparkfun AVC.

Dependencies:   Watchdog mbed Schedule SimpleFilter LSM303DLM PinDetect DebounceIn Servo

Committer:
shimniok
Date:
Wed Jun 20 14:57:48 2012 +0000
Revision:
0:826c6171fc1b
Updated documentation

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shimniok 0:826c6171fc1b 1 #ifndef __CONFIG_H
shimniok 0:826c6171fc1b 2 #define __CONFIG_H
shimniok 0:826c6171fc1b 3
shimniok 0:826c6171fc1b 4 #include "GeoPosition.h"
shimniok 0:826c6171fc1b 5 #include "CartPosition.h"
shimniok 0:826c6171fc1b 6
shimniok 0:826c6171fc1b 7 /** Text-based configuration; reads config file and stores in fields
shimniok 0:826c6171fc1b 8 */
shimniok 0:826c6171fc1b 9 class Config {
shimniok 0:826c6171fc1b 10 public:
shimniok 0:826c6171fc1b 11 Config();
shimniok 0:826c6171fc1b 12
shimniok 0:826c6171fc1b 13 bool load();
shimniok 0:826c6171fc1b 14
shimniok 0:826c6171fc1b 15 float interceptDist; // used for course correction steering calculation
shimniok 0:826c6171fc1b 16 float waypointDist; // distance threshold to waypoint
shimniok 0:826c6171fc1b 17 float brakeDist; // braking distance
shimniok 0:826c6171fc1b 18 float declination;
shimniok 0:826c6171fc1b 19 float compassGain; // probably don't need this anymore
shimniok 0:826c6171fc1b 20 float yawGain; // probably don't need this anymore
shimniok 0:826c6171fc1b 21 GeoPosition wpt[10]; // Waypoints, lat/lon coords
shimniok 0:826c6171fc1b 22 CartPosition cwpt[10]; // Waypoints, cartesian coords
shimniok 0:826c6171fc1b 23 unsigned int wptCount; // number of active waypoints
shimniok 0:826c6171fc1b 24 int escMin; // minimum ESC value; brake
shimniok 0:826c6171fc1b 25 int escZero; // zero throttle
shimniok 0:826c6171fc1b 26 int escMax; // max throttle
shimniok 0:826c6171fc1b 27 float topSpeed; // top speed to achieve on the straights
shimniok 0:826c6171fc1b 28 float turnSpeed; // speed for turns
shimniok 0:826c6171fc1b 29 float startSpeed; // speed for start
shimniok 0:826c6171fc1b 30 float minRadius; // minimum turning radius (calculated)
shimniok 0:826c6171fc1b 31 float speedKp; // Speed PID proportional gain
shimniok 0:826c6171fc1b 32 float speedKi; // Speed PID integral gain
shimniok 0:826c6171fc1b 33 float speedKd; // Speed PID derivative gain
shimniok 0:826c6171fc1b 34 float steerZero; // zero steering aka center point
shimniok 0:826c6171fc1b 35 float steerGain; // gain factor for steering algorithm
shimniok 0:826c6171fc1b 36 float steerGainAngle; // angle below which steering gain takes effect
shimniok 0:826c6171fc1b 37 float cteKi; // cross track error integral gain
shimniok 0:826c6171fc1b 38 bool usePP; // use pure pursuit algorithm?
shimniok 0:826c6171fc1b 39 float curbThreshold; // distance at which curb avoid takes place
shimniok 0:826c6171fc1b 40 float curbGain; // gain of curb avoid steering
shimniok 0:826c6171fc1b 41 // acceleration profile?
shimniok 0:826c6171fc1b 42 // braking profile?
shimniok 0:826c6171fc1b 43 float gyroBias; // this needs to be 3d
shimniok 0:826c6171fc1b 44 // float gyroScale[3];
shimniok 0:826c6171fc1b 45 float magOffset[3];
shimniok 0:826c6171fc1b 46 float magScale[3];
shimniok 0:826c6171fc1b 47 // float accelOffset[3];
shimniok 0:826c6171fc1b 48 // float accelScale[3];
shimniok 0:826c6171fc1b 49 int gpsType;
shimniok 0:826c6171fc1b 50 int gpsBaud;
shimniok 0:826c6171fc1b 51
shimniok 0:826c6171fc1b 52 };
shimniok 0:826c6171fc1b 53
shimniok 0:826c6171fc1b 54 #endif