Skip to main content

peak_bound_m

Function peak_bound_m 

Source
pub fn peak_bound_m(half: usize, interval: f64) -> f64
Expand description

How far below its true peak the running median of half samples either side can read a trace sampled every interval s and bent by gravity alone near its peak, m: g ((⌈half/2⌉ + ½) Δt)² / 2. At the highest sample, half + 1 of the window’s samples lie within ⌈half/2⌉ places of it, so the median is no lower than they are, and the true peak lies within half a sample of the highest sample. At 20 Hz, 0.077 m.