Skip to main content

simulated_wind

Function simulated_wind 

Source
pub fn simulated_wind(now: Duration) -> SimulatedWind
Expand description

A plausible wind for a simulated run, for features built on wind data (laylines, a wind readout) to have something to display before a real wind source exists.

A plain function of now rather than a Simulator method, since wind needs no accumulated state, only elapsed time. Direction and speed oscillate slowly rather than staying fixed, so a change a caller makes – to a beat-angle setting, say – remains distinguishable from the simulated wind’s own variation.

now is elapsed time since the run started, deterministic like every other simulated value, so a recorded session replays identically.