pub fn boundary_layer_speed_ratio(
height_rel_launch_m: f64,
model: WindShearModel,
) -> f64Expand description
Boundary-layer wind-speed multiplier for a projectile flying height_rel_launch_m above the
muzzle (McCoy Y / height relative to the line of departure).
The user-supplied wind is treated as the operative surface/flight wind: the multiplier is floored at 1.0 so the wind is never reduced below the input value, and only increases (logarithmically, or by the 1/7 power law) for trajectories that climb well above the standard 10 m meteorological reference height. This matches the uniform-wind convention used by standard ballistic solvers for flat fire, while still adding genuine shear for high-angle / ELR shots.
Height above ground is approximated as the bullet’s height gained plus an assumed muzzle height. Shooter altitude above sea level is deliberately excluded: boundary-layer shear is relative to the local ground, and air-density effects of altitude are modelled separately.
This replaces the previous behaviour where the height-relative-to-line-of-sight (~0 for flat fire) was treated as a true above-ground altitude and clamped to zero below the roughness length, which zeroed the crosswind for almost the whole flight (~5x too little drift).