Nonlinear conversion between the Beaufort wind force scale and meters per second.
Implements the ICU algorithm using interpolated midpoints between the WMO-defined speed thresholds for each Beaufort number.
Registered as a :special custom unit so that the generic
conversion pipeline dispatches through forward/1 and inverse/1
rather than using factor-based arithmetic.
Summary
Functions
Converts a Beaufort scale value to meters per second.
Converts meters per second to a Beaufort scale value.
Functions
Converts a Beaufort scale value to meters per second.
Values are clamped to the range [0, 17]. Fractional Beaufort numbers are interpolated between adjacent midpoints.
Examples
iex> Localize.Unit.Conversion.Beaufort.forward(0)
0.15
iex> Localize.Unit.Conversion.Beaufort.forward(5)
9.4
Converts meters per second to a Beaufort scale value.
Finds the Beaufort band whose midpoint range contains the given
speed and interpolates within it. Negative speeds return 0.0.
Examples
iex> Localize.Unit.Conversion.Beaufort.inverse(9.4)
5.0
iex> Localize.Unit.Conversion.Beaufort.inverse(-3)
0.0