2014 Eurobot fork
Dependencies: mbed-rtos mbed QEI
Diff: Processes/Kalman/Kalman.cpp
- Revision:
- 22:6e3218cf75f8
- Parent:
- 21:167dacfe0b14
- Child:
- 26:7cb3a21d9a2e
diff -r 167dacfe0b14 -r 6e3218cf75f8 Processes/Kalman/Kalman.cpp --- a/Processes/Kalman/Kalman.cpp Tue Apr 09 19:24:31 2013 +0000 +++ b/Processes/Kalman/Kalman.cpp Tue Apr 09 20:41:22 2013 +0000 @@ -28,7 +28,7 @@ Mutex statelock; float RawReadings[maxmeasure+1]; -float IRpahseOffset; +float IRphaseOffset; bool Kalman_inited = 0; @@ -89,10 +89,10 @@ fromb0offset += constrainAngle(IR_Offsets[i] - IR_Offsets[0]); } - IRpahseOffset = constrainAngle(IR_Offsets[0] + fromb0offset/3); + IRphaseOffset = constrainAngle(IR_Offsets[0] + fromb0offset/3); //debug - printf("Offsets IR: %0.4f\r\n",IRpahseOffset*180/PI); + printf("Offsets IR: %0.4f\r\n",IRphaseOffset*180/PI); statelock.lock(); X(0,0) = x_coor; @@ -224,7 +224,7 @@ } else { if (type >= IR0 && type <= IR2) - RawReadings[type] = value - IRpahseOffset; + RawReadings[type] = value - IRphaseOffset; else RawReadings[type] = value;