Skip to main content

friction

Function friction 

Source
pub fn friction(
    time: &[f64],
    angle: &[f64],
    speed: &[f64],
    torque: &[f64],
) -> Option<Friction>
Expand description

Inertia and friction from a trace’s speed and torque at one motor (angle for the presliding). Speed and torque are averaged over 5 ms on either side, the acceleration is the slope of the speed across that window. Rows slower than 1 % of the top speed are left out, and so are rows whose window has a reversal. None if the motor does not turn both ways (Coulomb friction and a constant torque cannot be told apart then) or the trace is too short.