Robot's source code
Dependencies: mbed
Diff: Odometry/Odometry2.cpp
- Revision:
- 93:4d5664e9188a
- Parent:
- 85:8e95432d99d3
- Child:
- 100:a827a645d6c2
diff -r b403f2724252 -r 4d5664e9188a Odometry/Odometry2.cpp --- a/Odometry/Odometry2.cpp Wed Apr 29 16:13:53 2015 +0000 +++ b/Odometry/Odometry2.cpp Thu Apr 30 15:55:09 2015 +0000 @@ -64,7 +64,7 @@ m_vitLeft = m_distPerTick_left*delta_left/dt; m_vitRight = m_distPerTick_right*delta_right/dt; - float deltaS = (m_distPerTick_left*delta_left + m_distPerTick_right*delta_right) / 2.0; + float deltaS = (m_distPerTick_left*delta_left + m_distPerTick_right*delta_right) / 2.0f; float deltaTheta = (m_distPerTick_right*delta_right - m_distPerTick_left*delta_left) / m_v; float dx = deltaS*cos(theta); @@ -79,6 +79,3 @@ } - - - \ No newline at end of file