Well, I whipped out this BASICally script that maybe does the inertia part, albeit with an extremely naïve notion about how physics works:
WHEN start()
pos = in1
velocity = 0
' Maximum acceleration per sample.
' Should be computed from something more
' intuitive.
max_accel = 0.001
' Maximum amount of ground pos can cover
' in a sample.
max_vel = 0.07
' A friction coefficient to prevent
' infinite wobble around IN1?
friction = 0.00009
END WHEN
ALSO
diff = in1 - pos
IF velocity > 0 THEN
velocity = max(velocity - friction, 0)
ELSE
velocity = min(velocity + friction, 0)
END IF
if diff > 0 THEN
velocity = velocity + min(max_accel, diff)
ELSE
velocity = velocity + max(-1 * max_accel, diff)
END IF
IF velocity > 0 THEN
velocity = min(velocity, max_vel)
ELSE
velocity = max(velocity, -1 * max_vel)
END IF
pos = pos + velocity
out1 = pos
END ALSO
Those variables max_accel, max_vel, and friction values are worth playing with.
Just throwing out some half-baked implementation for you.
