Hello
So if you are trying to aggregate winddir for graphing purposes, you want to get a wind vector which I understand
Here is my example where my data is being archived every 300 seconds
(time_start_vt, time_stop_vt, obs_vt) = weewx.xtypes.get_series(
obs_lookup,
x_domain,
db_lookup(data_binding=binding),
aggregate_type,
aggregate_interval)
obs_lookup is windDir
Start time is 1665440100 and end time is 1665442800
x_domain entries are 1665440100 and 1665442800
aggregate_type is avg
aggregate_interval is 300
([355.0, 355.0, 355.0, 355.480837630687, 0.0, 0.0, 0.0, 0.0, 4.249651034454402], 'degree_compass', 'group_direction')
aggregate_interval is 900
([355.0, 118.49361254356234, 1.416550344818134], 'degree_compass', 'group_direction')
I can see for the second group it is returning an average rather than a vector value of around 358.5, but trying to understand how we should be coding it.
If I can change to aggregate of vecdir or vecavg I get a UnknownType error
Any help will be appreciated here.
James