Calculating Inverse Corner Radius
Posted: Fri May 15, 2015 6:46 pm
Hi, I've been trying to calculate the Inverse Corner Radius but I'm really not getting any results I expect:
What I get is either almost entirely all zero's or no readings. Any thoughts?[/code]
Code: Select all
setTickRate(20)
icrId = addChannel("ICR",10,2)
function onTick()
# Convert the GPS Speed to meters per second
mps = ((getGpsSpeed()*0.44704))
# Prevent a divide by zero
if mps >=0.05 then
icr = (getImu(1)*9.806)/(mps*mps)
else
icr=0.0
end
setChannel(icrId,icr)
if getGpio(0) == 1 then
startLogging()
else
stopLogging()
end
end
What I get is either almost entirely all zero's or no readings. Any thoughts?[/code]