I'm still trying to wrap my head around wind data in WeeWX... Does that 
mean that in the Seasons skin, the weekwinddir, monthwindir, and 
yearwinddir plots are not a vector average? If yearwinddir plot was 
something like below, would it generate a vector average?
        [[[yearwinddir]]]
            yscale = 0.0, 360.0, 45.0
            line_type = None
            marker_type = box
            marker_size = 2
            #[[[[windDir]]]]
            [[[[wind]]]]
                aggregate_type = vecdir
When I changed the yearwinddir plot to the above, it ran and I got what 
looked like a different plot.
Thanks. rich

On Monday, 17 October 2022 at 09:05:37 UTC-4 [email protected] wrote:

> Calculating the vector averaged direction requires a vector, so the 
> observation type is 'wind', which is a vector, not 'windDir'. The 
> aggregation that returns direction from a vector is 'vecdir', so, you want:
>
> (start_ts, stop_ts, dirs) = weewx.xtypes.get_series('wind', x_domain, 
> db_lookup(data_binding=binding), 'vecdir', aggregate_interval)
>
> Unfortunately, 'wind' appears only in the daily summaries. This means 
> aggregate_interval must be multiples of one day. This restriction could be 
> relaxed should someone want to write the necessary xtypes extension. 
>
>
>
> On Sun, Oct 16, 2022 at 6:35 AM James Taylor <
> [email protected]> wrote:
>
>> Hello
>>
>> Following on from https://github.com/weewx/weewx/issues/798, I've been 
>> trying to replicate and understand weewx behaviour when it comes to using 
>> get_series and get_aggregate.
>>
>> 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
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/2ed7f92d-c030-45df-a241-2abde9c647een%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/2ed7f92d-c030-45df-a241-2abde9c647een%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/febe0e12-adee-4e34-b7d9-9f1791d80531n%40googlegroups.com.

Reply via email to