pub const MIN_VELOCITY_THRESHOLD: f64 = 1e-6;
Minimum threshold for velocity magnitude to avoid division by zero