![](/media/cache/profiles/2012_sf_avc_095.jpg.50x50_q85.jpg)
Code for autonomous rover for Sparkfun AVC. DataBus won 3rd in 2012 and the same code was used on Troubled Child, a 1986 Jeep Grand Wagoneer to win 1st in 2014.
Dependencies: mbed Watchdog SDFileSystem DigoleSerialDisp
Config/Config.h
- Committer:
- shimniok
- Date:
- 2013-06-07
- Revision:
- 3:42f3821c4e54
- Parent:
- 1:cb84b477886c
- Child:
- 11:33757b21d0e4
File content as of revision 3:42f3821c4e54:
#ifndef __CONFIG_H #define __CONFIG_H #include "GeoPosition.h" #include "CartPosition.h" /** Text-based configuration; reads config file and stores in fields */ class Config { public: Config(); bool load(); bool loaded; // has the config been loaded yet? float interceptDist; // used for course correction steering calculation float waypointDist; // distance threshold to waypoint float brakeDist; // braking distance float declination; float compassGain; // probably don't need this anymore float yawGain; // probably don't need this anymore GeoPosition wpt[10]; // Waypoints, lat/lon coords CartPosition cwpt[10]; // Waypoints, cartesian coords unsigned int wptCount; // number of active waypoints int escMin; // minimum ESC value; brake int escZero; // zero throttle int escMax; // max throttle float topSpeed; // top speed to achieve on the straights float turnSpeed; // speed for turns float startSpeed; // speed for start float minRadius; // minimum turning radius (calculated) float speedKp; // Speed PID proportional gain float speedKi; // Speed PID integral gain float speedKd; // Speed PID derivative gain float steerZero; // zero steering aka center point float steerGain; // gain factor for steering algorithm float steerGainAngle; // angle below which steering gain takes effect float curbThreshold; // distance at which curb avoid takes place float curbGain; // gain of curb avoid steering // acceleration profile? // braking profile? float gyroBias; // this needs to be 3d // float gyroScale[3]; float magOffset[3]; float magScale[3]; // float accelOffset[3]; // float accelScale[3]; int gpsType; int gpsBaud; }; #endif