RegisterSearchFAQMemberlistUsergroupsLog in
Reply to topic Page 1 of 1
wheelspeed defaulting to 8mph
Author Message
Reply with quote
Post wheelspeed defaulting to 8mph 
Not sure what I'm doing wrong, e46/mini code with an average on it, I get a lot of wheelspin and I lift the rear wheels when I autocross and they tend to stop in the air, so I'm averaging the front two tires for the log and harry's laptimer.

This is the wheelspeed code, I'm correcting for my smaller 15" track/autocross tires

function processWheel(id, data, offset)
--wheel speed is 13 bits long, little endian
--low byte high byte
--76543210 76543210
--11111111 11111XXX
local highByte = bit.band(data[offset + 2], 0x1F)
local lowByte = data[offset + 1]
local value = highByte * 256 + lowByte
value = value * 0.0625
--convert to MPH. comment to keep KPH
value = value * 0.621371
--15" wheel correction
value = value * .9468
setChannel(id, value)
end


this is the wheelspeed data that I'm using, it's defaulting to 8mph when I'm at a standstill and the car is shut off

setChannel(AvgWheelId, ((lfWheelId + rfWheelId) /2))

View user's profile Send private message
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum