windRun unit label is in miles only

57 views
Skip to first unread message

Pat

unread,
Mar 12, 2019, 8:00:16 PM3/12/19
to weewx-development
In weewx 3.9.1 and when the windRun archive type is enabled, it's only outputting miles when using $year.windrun.max, even when the skin is in metric. 

Likewise, $unit.label.windRun is not returning anything in the skin. 

I haven't found a way to get the label to observe the Group labels. 

I'm still learning the generators, it's a slow process since it's in my spare hobby time. My question is, how can windRun observe the skin metric values?

Thomas Keffer

unread,
Mar 12, 2019, 8:33:26 PM3/12/19
to Pat, weewx-development
The type 'windrun' (note the lower-case 'r') is part of group_distance, which was inadvertently left out of the set of groups that get  switched when the user selects metric or US (it doesn't appear in any of the skins that are part of WeeWX).

It is easily added. Go into weewx.conf, section [StdReports] / [[Defaults]] / [[[Units]]] / [[[[Groups]]]] and add it. For example,

    [[Defaults]]
        
        [[[Units]]]
            
            # The following section sets what unit to use for each unit group.
            # NB: The unit is always in the singular. I.e., 'mile_per_hour',
            # NOT 'miles_per_hour'
            [[[[Groups]]]]
                
                group_altitude = meter    # Options are 'foot' or 'meter'
                group_degree_day = degree_C_day    # Options are 'degree_F_day' or 'degree_C_day'
                group_pressure = mbar    # Options are 'inHg', 'mmHg', 'mbar', or 'hPa'
                group_rain = mm    # Options are 'inch', 'cm', or 'mm'
                group_rainrate = mm_per_hour    # Options are 'inch_per_hour', 'cm_per_hour', or 'mm_per_hour'
                group_speed = meter_per_second    # Options are 'mile_per_hour', 'km_per_hour', 'knot', or 'meter_per_second'
                group_speed2 = meter_per_second2    # Options are 'mile_per_hour2', 'km_per_hour2', 'knot2', or 'meter_per_second2'
                group_temperature = degree_C    # Options are 'degree_F' or 'degree_C'
                group_distance = km_per_hour

I'll add it to the development branch.

-tk

Pat

unread,
Mar 12, 2019, 8:36:30 PM3/12/19
to weewx-development
I knew it was a lowercase R, not sure why I decided to camelCase it here. 

Thanks for the update and fix.

Side question that I may have missed in the threads. Should I remove the Unit Groups from skin.conf and have them rely on weewx.conf's only?

Pat

unread,
Mar 12, 2019, 8:44:03 PM3/12/19
to weewx-development
Also Tom, while testing, looks like the valid input for group_distance is either "mile" or "km" (no _per_hour).


On Tuesday, March 12, 2019 at 8:33:26 PM UTC-4, Tom Keffer wrote:

Thomas Keffer

unread,
Mar 12, 2019, 9:05:03 PM3/12/19
to Pat, weewx-development
You can. In fact, if you take a look at Seasons, that's basically what's been done. However, it will only work with V3.9, not older versions.

-tk

Thomas Keffer

unread,
Mar 12, 2019, 9:05:18 PM3/12/19
to Pat, weewx-development
Oops. That was a typo. I mean 'km'

Pat

unread,
Mar 12, 2019, 9:08:31 PM3/12/19
to weewx-development
Thanks for that. I'll probably leave it in skin.conf for now for fallback purposes. 
Reply all
Reply to author
Forward
0 new messages