Sometimes it helps to read the given sources

Is there somebody out there who understands this or can translate it to a none coding guy?

for( long i = 0; i < 4; ++i ) // Check all wheels for lock up

{

const TelemWheel &wheel = info.mWheel;

if(3.0*abs(wheel.mRotation)/metersPerSec<=.5) // if wheel is rotating slower than 50% vehicle spd { // speed@hub = dist/time = dist/angle * angle/time = 1.9m/2*pi * .mRotation = 3 * .mRotation

++sumLocked; // count how many wheels are locked

}

} // End rotation check

if (info.mUnfilteredBrake >= 0.1 && metersPerSec >= 1.0) // Are we moving AND braking?

{

if(sumLocked >= 1) // If we are moving AND braking AND have lockup in at least n wheels then...

{ SetDigital(6); // Send digital feedback (turn on digital output 6 - vibration)

SetAnalog(2,0); } // Send analog feeback (set analog channel 2 to zero - LED brightness)

else SetAnalog(2, min(abs((long) info.mWheel[3].mRotation*1.5),255)); // otherwise analog 2 represents brake disc rotation speed as the brightness of an LED on the board

}

else // If not braking OR moving

{

ClearDigital(6); // If we aren't braking OR we aren't moving then there should be no FFB

SetAnalog(2,0);

}

[i]

speed@hub = dist/time = dist/angle * angle/time = 1.9m/2*pi * .mRotation = 3 * .mRotation--> ok, the speed@hub is in [m/s]

--> this is the same like: dist/angle * angle/time

= (1,9m/2)*pi * .mRotation = 2,985 * .mRotation (I first read--> 1,9m/(2*pi) BUT this would be 6 ^^)

--->3 * .mRotation

Question:

Should 1,9m be the tire circumference? And if so - why should it be the same for all cars? A 225/45R17 tire has 192cm f.e.

?

Why can't it just be "if the car is moving BUT the speed@hub=0 --> vibrate the pedal" (wheels are locked)

Sorry be I don't get Richards code at the moment... Mat can you explain it further?