pub fn lean_weight(lean: &LeanNode, q: &[f64], mass: f64, g: f64) -> (f64, f64)Expand description
The weight’s geometric stiffness of the lean, and its rate per metre of the lever axis: the body’s weight m g at its
centre of mass rises by F^2 lean_rise as the spring’s force F = k u holds it out, V = m g F^2 r = 1/2 c u^2 with
c = 2 k^2 m g r (the body hangs like a pendulum, c > 0 where its centre of mass is below the carriage). The rate is
the central difference over 2e-6 m, as the crate has it. Both are 0 without gravity.