suspension, convert mm to mm/s

enduranceracing.dk
Posts: 14
Joined: Thu May 01, 2008 9:57 pm

suspension, convert mm to mm/s

Postby enduranceracing.dk » Sun Aug 16, 2009 7:41 pm

I want to calculate the damper speed from a suspension sensor, I made a script but the result is not what I expected. Does anybody know how to do this?

the script I made is:

Dim Last_time
Dim Last_output

Dim Last_mm
Dim Diff_time

function output()

Diff_time=VAR_0001-Last_time

if Diff_time =0 then
Diff_time=1
end if

Last_output=(Last_mm-VAR_0201)/Diff_time

Last_mm =VAR_0201
Last_time=VAR_0001

output=Last_output
end function

VAR_0201 is in mm.

Thanks

tristancliffe
Posts: 220
Joined: Thu Mar 15, 2007 3:41 pm
Location: Norwich, UK
Contact:

Postby tristancliffe » Sun Aug 16, 2009 10:03 pm

Can't you just differentiate the position channel, with respect to time?
Monoposto 2000 - Reynard 883 Toyota

enduranceracing.dk
Posts: 14
Joined: Thu May 01, 2008 9:57 pm

Postby enduranceracing.dk » Mon Aug 17, 2009 7:08 am

Yes, you're right. Didn't think about that one. Thanks.


Return to “General software support”

Who is online

Users browsing this forum: No registered users and 208 guests