Station upload API v2 - wind direction
-
The new API only accepts wind direction values in the range 0-359.
Cumulus MX defaults to the common convention of using 0-360 for direction, where zero is used for no direction when the wind speed is zero. But 0 or 360 is commonly used for north.
This worked fine with the v1 API, but users are now getting uploads rejected when they report the direction as 360.
-
@mcrossley
Generally, in meteorological codes (SYNOP, METAR ...)
0 stands for calm
360 for wind from north. -
@mcrossley It is possible to normalize a wind direction from the 0–360 range to the 0–359 standard using the modulo operator. When calculating the remainder of the division by 360, the value 360 automatically becomes 0, closing the compass cycle. For example: 180 % 360 = 180 and 360 % 360 = 0.
-
@ulerio I know I can fix it at my end, but really, I think Windy should accept 0-360 which is the normal range in meteorology.
-
@mcrossley Thank you for the feedback. It is now possible to send 360 for wind direction.
-
@marekd Thank you.