Thanks for this. After modifying it for current I having it working on my
site. I found that your code was missing an '$' for day.windSpeed.
-> On Tue, 22 Aug 2017 13:14:19 -0700 (PDT) WindnFog took time to scribe <-
>If you want to avoid Java, I cobbled together some code based on gjr80's
>template and added it to /etc/weewx/skins/Standard/index.html.tmpl as
>follows:
>
>## Calculate today's highest Beaufort based on wind speed in knots
>
> #if $varExists('day.windSpeed') and $day.windSpeed.max.raw is not
>None
> #if $unit.unit_type.windSpeed == 'mile_per_hour'
> #set $kts = $day.windSpeed.max.raw * 0.8689762
> #elif $unit.unit_type.windSpeed == 'km_per_hour'
> #set $kts = $day.windSpeed.max.raw * 0.539956
> #elif $unit.unit_type.windSpeed == 'meter_per_second'
> #set $kts = $day.windSpeed.max.raw * 1.943844
> #elif $unit.unit_type.windSpeed == 'knot'
> #set $kts = $day.windSpeed.max.raw
> #else
> #set $kts = 0
> #end if
> #if $kts < 1
> #set $beaufort = 0
> #set $word_beaufort = 'Calm'
> #elif $kts < 4
> #set $beaufort = 1
> #set $word_beaufort = 'Light air'
> #elif $kts < 7
> #set $beaufort = 2
> #set $word_beaufort = 'Light breeze'
> #elif $kts < 11
> #set $beaufort = 3
> #set $word_beaufort = 'Gentle breeze'
> #elif $kts < 17
> #set $beaufort = 4
> #set $word_beaufort = 'Moderate breeze'
> #elif $kts < 22
> #set $beaufort = 5
> #set $word_beaufort = 'Fresh breeze'
> #elif $kts < 28
> #set $beaufort = 6
> #set $word_beaufort = 'Strong breeze'
> #elif $kts < 34
> #set $beaufort = 7
> #set $word_beaufort = 'High wind'
> #elif $kts < 41
> #set $beaufort = 8
> #set $word_beaufort = 'Gale'
> #elif $kts < 48
> #set $beaufort = 9
> #set $word_beaufort = 'Strong gale'
> #elif $kts < 56
> #set $beaufort = 10
> #set $word_beaufort = 'Storm'
> #elif $kts < 64
> #set $beaufort = 11
> #set $word_beaufort = 'Violent storm'
> #else
> #set $beaufort = 12
> #set $word_beaufort = 'Hurricane'
> #end if
> #else
> #set $beaufort = 'N/A'
> #end if
>
> Put the above somewhere near the top, and then modify the Since Midnight
>table by adding a couple of lines in the High Wind row:
>
> <td class="stats_label">
> High Wind<br/>
> High Beaufort Scale
> </td>
> <td class="stats_data">
> $day.wind.max from $day.wind.gustdir at $day.wind.maxtime
><br/>
> $beaufort or $word_beaufort at $day.wind.maxtime
> </td>
>
>- Paul VE1DX
>
>https://www.ve1dx.net/
>
.-.-.-.-.-.-.
David Taylor, Puniho
'the place to be; beneath the Mountain, beside the Sea'
http://www.pwx.kiwi
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
whose computer uses linux/open source software, featuring
Mageia release 5 (Official) for x86_64, kernel 4.4.82-desktop-1.mga5
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
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].
For more options, visit https://groups.google.com/d/optout.