Skip to content

Rework wind direction handling

Volker Krause requested to merge work/vkrause/wind-direction-rework into master

This follows the common convention of specifying the wind direction as the direction the wind is coming from, rather than the direction it's blowing to. If there is a usecase for the other one too, we probably should rather name the methods windDirection[From|To]X() instead.

This now stores the direction in degree internally, and offers the cardinal direction only as a derived value, so we don't lose any precision should applications need that. This also fixes computing cardinal directions from degrees, which makes the wind direction value actually work.

This removes the string-based cardinal direction method, as that is unused now and isn't really usable for applications due to lack of translations. Should that be needed later it's easy to readd.

This change should be safe as KWeather isn't actually using any of this.

Merge request reports