David's line following code from the LVBots competition, 2015.
Dependencies: GeneralDebouncer Pacer PololuEncoder mbed
Fork of DeadReckoning by
Revision 55:05c8f439497d, committed 2015-04-16
- Comitter:
- DavidEGrayson
- Date:
- Thu Apr 16 20:59:35 2015 +0000
- Parent:
- 54:1ca4e748e098
- Child:
- 56:55b1473f9e3b
- Commit message:
- This commit works!! I recorded its logs in reckon_course_12.ods
Changed in this revision
turn_sensor.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/turn_sensor.cpp Thu Apr 16 20:21:13 2015 +0000 +++ b/turn_sensor.cpp Thu Apr 16 20:59:35 2015 +0000 @@ -49,6 +49,12 @@ // // (0.07 dps/digit) * (1/1000000 s/us) * (2^29/45 unit/degree) // = 14680064/17578125 unit/(digit*us) + //const float factor = (float)14680064 / 17578125; + + // Fudge factor to account for the fact that the gyro might be mounted + // at a bad angle or it might be more or less sensitive than expected. + //const float fudge = 0.98809906722; + angleUnsigned += (int64_t)d * 14680064 / 17578125; } } \ No newline at end of file