Wind speed from Rest API?

Hey there :wave:

Can anyone explain how to the wind average is calculated for the rest API?

I accessed my station via the API at: https://swd.weatherflow.com/swd/rest/observations/station/25764?api_key=20c70eae-e62f-4d3b-b3a4-8586e90f3ac8

the values I get for wind speeds are:
“units_wind”: “kph”,
“wind_avg”,
“wind_direction”,
“wind_gust”,
“wind_lull”,
“wind_chill”,
“wind_avg”: 2.3,
“wind_direction”: 120,
“wind_gust”: 3.1,
“wind_lull”: 1.1,
“wind_chill”: 27.1,

At the same time, I get very different values from the app/webinterface at: Tempest

The average has never matched between the two so I’m wondering what I’m missing to understand this.

Than you!

Yes. It is the average of the wind speeds during the last 60 seconds. There is a specific formula for the calculation of speed and direction.

1 Like

Thanks for the answer, Gary.

Would it be correct in thinking that this is also the average over 1 minute too? Shouldn’t these numbers be the same between the app and api?

They will be depending on when the call is made. The applications Apple, Android and website get the data via a websocket. The REST API gets the data from the same database as the websocket.

2 Likes

The average hasn’t gone below 5 km/h all day today and yet it’s still always in the low 2 km/h range. I still don’t understand what I’m missing. It seems off to me but I’m sure it’s my misunderstanding.

I’ve been comparing the two for most of the day.

I think it is the units that is confusing you. Despite the units_wind field reading kph, wind speeds in the API are reported in meters per second. The units_wind field refers to what units you use in the app. You will need to convert the value in the API to kph to match what you see in the app

1 Like

That is exactly what has thrown me off! Thank you, Peter!

1 Like