Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed Watchdog SDFileSystem DigoleSerialDisp
Config/Config.h@0:a6a169de725f, 2013-05-27 (annotated)
- Committer:
- shimniok
- Date:
- Mon May 27 13:26:03 2013 +0000
- Revision:
- 0:a6a169de725f
- Child:
- 1:cb84b477886c
Working version with priorities set and update time display
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| shimniok | 0:a6a169de725f | 1 | #ifndef __CONFIG_H |
| shimniok | 0:a6a169de725f | 2 | #define __CONFIG_H |
| shimniok | 0:a6a169de725f | 3 | |
| shimniok | 0:a6a169de725f | 4 | #include "GeoPosition.h" |
| shimniok | 0:a6a169de725f | 5 | #include "CartPosition.h" |
| shimniok | 0:a6a169de725f | 6 | |
| shimniok | 0:a6a169de725f | 7 | /** Text-based configuration; reads config file and stores in fields |
| shimniok | 0:a6a169de725f | 8 | */ |
| shimniok | 0:a6a169de725f | 9 | class Config { |
| shimniok | 0:a6a169de725f | 10 | public: |
| shimniok | 0:a6a169de725f | 11 | Config(); |
| shimniok | 0:a6a169de725f | 12 | |
| shimniok | 0:a6a169de725f | 13 | bool load(); |
| shimniok | 0:a6a169de725f | 14 | |
| shimniok | 0:a6a169de725f | 15 | float interceptDist; // used for course correction steering calculation |
| shimniok | 0:a6a169de725f | 16 | float waypointDist; // distance threshold to waypoint |
| shimniok | 0:a6a169de725f | 17 | float brakeDist; // braking distance |
| shimniok | 0:a6a169de725f | 18 | float declination; |
| shimniok | 0:a6a169de725f | 19 | float compassGain; // probably don't need this anymore |
| shimniok | 0:a6a169de725f | 20 | float yawGain; // probably don't need this anymore |
| shimniok | 0:a6a169de725f | 21 | GeoPosition wpt[10]; // Waypoints, lat/lon coords |
| shimniok | 0:a6a169de725f | 22 | CartPosition cwpt[10]; // Waypoints, cartesian coords |
| shimniok | 0:a6a169de725f | 23 | unsigned int wptCount; // number of active waypoints |
| shimniok | 0:a6a169de725f | 24 | int escMin; // minimum ESC value; brake |
| shimniok | 0:a6a169de725f | 25 | int escZero; // zero throttle |
| shimniok | 0:a6a169de725f | 26 | int escMax; // max throttle |
| shimniok | 0:a6a169de725f | 27 | float topSpeed; // top speed to achieve on the straights |
| shimniok | 0:a6a169de725f | 28 | float turnSpeed; // speed for turns |
| shimniok | 0:a6a169de725f | 29 | float startSpeed; // speed for start |
| shimniok | 0:a6a169de725f | 30 | float minRadius; // minimum turning radius (calculated) |
| shimniok | 0:a6a169de725f | 31 | float speedKp; // Speed PID proportional gain |
| shimniok | 0:a6a169de725f | 32 | float speedKi; // Speed PID integral gain |
| shimniok | 0:a6a169de725f | 33 | float speedKd; // Speed PID derivative gain |
| shimniok | 0:a6a169de725f | 34 | float steerZero; // zero steering aka center point |
| shimniok | 0:a6a169de725f | 35 | float steerGain; // gain factor for steering algorithm |
| shimniok | 0:a6a169de725f | 36 | float steerGainAngle; // angle below which steering gain takes effect |
| shimniok | 0:a6a169de725f | 37 | float cteKi; // cross track error integral gain |
| shimniok | 0:a6a169de725f | 38 | bool usePP; // use pure pursuit algorithm? |
| shimniok | 0:a6a169de725f | 39 | float curbThreshold; // distance at which curb avoid takes place |
| shimniok | 0:a6a169de725f | 40 | float curbGain; // gain of curb avoid steering |
| shimniok | 0:a6a169de725f | 41 | // acceleration profile? |
| shimniok | 0:a6a169de725f | 42 | // braking profile? |
| shimniok | 0:a6a169de725f | 43 | float gyroBias; // this needs to be 3d |
| shimniok | 0:a6a169de725f | 44 | // float gyroScale[3]; |
| shimniok | 0:a6a169de725f | 45 | float magOffset[3]; |
| shimniok | 0:a6a169de725f | 46 | float magScale[3]; |
| shimniok | 0:a6a169de725f | 47 | // float accelOffset[3]; |
| shimniok | 0:a6a169de725f | 48 | // float accelScale[3]; |
| shimniok | 0:a6a169de725f | 49 | int gpsType; |
| shimniok | 0:a6a169de725f | 50 | int gpsBaud; |
| shimniok | 0:a6a169de725f | 51 | |
| shimniok | 0:a6a169de725f | 52 | }; |
| shimniok | 0:a6a169de725f | 53 | |
| shimniok | 0:a6a169de725f | 54 | #endif |