Re: [weewx-user] Re: Current wind graphic?

2018-04-06 Thread RobbH
Thanks for the tips on color, Glenn. (Thanks also for providing a live 
example of how this looks.)

I hope someone can come up with a more attractive color combination that 
provides enough contrast between wind and gusts, without clashing. Colors 
are not my forte. Just ask my wife.

The other thing I'm less than happy with is the fatness of that gust 
pointer. It needs to be significantly larger than the wind pointer, so it's 
visible when they're pointing in the same direction. But it's really ugly.

At present, I'm trying this as a substitute for the gust pointer definition:



I think it's a slight improvement.


On Friday, April 6, 2018 at 4:42:40 AM UTC-4, Glenn McKechnie wrote:
>
> For any one else who wants to tweak the colours to match their weewx 
> skin.conf of choice.
> It's worth noting the hint that's in the [ImageGenerator] section of the 
> Standard skin.conf file
>   
>  # Colors can be specified any of three ways:
> #   1. Notation 0xBBGGRR;
> #   2. Notation #RRGGBB; or
> #   3. Using an English name, such as 'yellow', or 'blue'.
> # So, 0xff, #ff, or 'blue' would all specify a pure blue color.
>
> The existing skin colors are probably in the first format. 
> To use those values in the svg windrose they needs to be changed to the 
> 2nd format. 
>
> Note the BGR -- RGB reversal and you'll be less likely to be surprised by 
> the weird results ;-)
>
>
>
> Cheers
>  Glenn
>
> rorpi - read only raspberry pi & various weewx addons
> https://github.com/glennmckechnie
>
> On 6 April 2018 at 05:36, RobbH > wrote:
>
>> I finally came to the realization that everything I wanted to do could be 
>> done with the Cheetah engine, and even learned a tiny bit of Python in the 
>> process. The following code, added to index,html.tmpl (or some other 
>> template) generates a crude compass rose with up to two directional vanes, 
>> one (in red) for gust direction and one (in blue) for wind direction. The 
>> length of the vanes is proportional to the corresponding speed value, on a 
>> logarithmic scale.
>>
>> #import math
>>> xmlns="http://www.w3.org/2000/svg";>
>>
>> > stroke-dasharray="1,12.08" fill="transparent" />
>> > stroke-width="10" fill="transparent" />
>> > fill="transparent" />
>> > fill="transparent" />
>> > fill="gray">100
>> > fill="gray">10
>> > fill="gray">1
>>
>> 
>> 
>> > fill="gray">N
>> > fill="gray">S
>> > fill="gray">W
>> > fill="gray">E
>> 
>>
>> > fill="orangered">$current.windGust.formatted
>> > fill="dodgerblue">$current.windSpeed.formatted
>>#if $current.windGustDir.formatted != "   N/A" and 
>> float($current.windGust.formatted) > 0
>>#set $wg = 65 - 18 * (1 + 
>> math.log(float($current.windGust.formatted), 10))
>> > transform="rotate($current.windGustDir.formatted 90 85)" />
>>#end if
>> #if $current.windDir.formatted != "   N/A" and 
>> float($current.windSpeed.formatted) > 0
>>#set $ws = 65 - 18 * (1 + 
>> math.log(float($current.windSpeed.formatted), 10))
>> > transform="rotate($current.windDir.formatted 90 85)" />
>>#end if
>>
>>
>>
>> This is set up to work with speeds measured in miles per hour. Some 
>> modification would be needed to make it work with other units. I hope 
>> someone will find it useful. Improvements welcome.
>>
>>
>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: Current wind graphic?

2018-04-06 Thread Glenn McKechnie
For any one else who wants to tweak the colours to match their weewx
skin.conf of choice.
It's worth noting the hint that's in the [ImageGenerator] section of the
Standard skin.conf file

 # Colors can be specified any of three ways:
#   1. Notation 0xBBGGRR;
#   2. Notation #RRGGBB; or
#   3. Using an English name, such as 'yellow', or 'blue'.
# So, 0xff, #ff, or 'blue' would all specify a pure blue color.

The existing skin colors are probably in the first format.
To use those values in the svg windrose they needs to be changed to the 2nd
format.

Note the BGR -- RGB reversal and you'll be less likely to be surprised by
the weird results ;-)



Cheers
 Glenn

rorpi - read only raspberry pi & various weewx addons
https://github.com/glennmckechnie

On 6 April 2018 at 05:36, RobbH  wrote:

> I finally came to the realization that everything I wanted to do could be
> done with the Cheetah engine, and even learned a tiny bit of Python in the
> process. The following code, added to index,html.tmpl (or some other
> template) generates a crude compass rose with up to two directional vanes,
> one (in red) for gust direction and one (in blue) for wind direction. The
> length of the vanes is proportional to the corresponding speed value, on a
> logarithmic scale.
>
> #import math
> xmlns="http://www.w3.org/2000/svg";>
>
>  stroke-dasharray="1,12.08" fill="transparent" />
>  stroke-width="10" fill="transparent" />
>  fill="transparent" />
>  fill="transparent" />
>  fill="gray">100
>  fill="gray">10
>  fill="gray">1
>
> 
> 
>  fill="gray">N
>  fill="gray">S
>  fill="gray">W
>  fill="gray">E
> 
>
>  fill="orangered">$current.windGust.formatted
>  fill="dodgerblue">$current.windSpeed.formatted
>#if $current.windGustDir.formatted != "   N/A" and
> float($current.windGust.formatted) > 0
>#set $wg = 65 - 18 * (1 + math.log(float($current.windGust.formatted),
> 10))
>  transform="rotate($current.windGustDir.formatted 90 85)" />
>#end if
> #if $current.windDir.formatted != "   N/A" and
> float($current.windSpeed.formatted) > 0
>#set $ws = 65 - 18 * (1 + math.log(float($current.windSpeed.formatted),
> 10))
>  transform="rotate($current.windDir.formatted 90 85)" />
>#end if
>
>
>
> This is set up to work with speeds measured in miles per hour. Some
> modification would be needed to make it work with other units. I hope
> someone will find it useful. Improvements welcome.
>
>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: Current wind graphic?

2018-04-05 Thread RobbH
Thanks, Tom! You made my day.

About other measurement units, the log scale in the graphic works with 
values from 1 to 100, and possibly a bit beyond. I think that might work 
reasonably well for knots and km per hour, but probably not for meters per 
second.


On Thursday, April 5, 2018 at 7:25:13 PM UTC-4, Tom Keffer wrote:
>
> Very clever!
>
> -tk
>
> On Thu, Apr 5, 2018 at 12:36 PM, RobbH > 
> wrote:
>
>> I finally came to the realization that everything I wanted to do could be 
>> done with the Cheetah engine, and even learned a tiny bit of Python in the 
>> process. The following code, added to index,html.tmpl (or some other 
>> template) generates a crude compass rose with up to two directional vanes, 
>> one (in red) for gust direction and one (in blue) for wind direction. The 
>> length of the vanes is proportional to the corresponding speed value, on a 
>> logarithmic scale.
>>
>> #import math
>>> xmlns="http://www.w3.org/2000/svg";>
>>
>> > stroke-dasharray="1,12.08" fill="transparent" />
>> > stroke-width="10" fill="transparent" />
>> > fill="transparent" />
>> > fill="transparent" />
>> > fill="gray">100
>> > fill="gray">10
>> > fill="gray">1
>>
>> 
>> 
>> > fill="gray">N
>> > fill="gray">S
>> > fill="gray">W
>> > fill="gray">E
>> 
>>
>> > fill="orangered">$current.windGust.formatted
>> > fill="dodgerblue">$current.windSpeed.formatted
>>#if $current.windGustDir.formatted != "   N/A" and 
>> float($current.windGust.formatted) > 0
>>#set $wg = 65 - 18 * (1 + 
>> math.log(float($current.windGust.formatted), 10))
>> > transform="rotate($current.windGustDir.formatted 90 85)" />
>>#end if
>> #if $current.windDir.formatted != "   N/A" and 
>> float($current.windSpeed.formatted) > 0
>>#set $ws = 65 - 18 * (1 + 
>> math.log(float($current.windSpeed.formatted), 10))
>> > transform="rotate($current.windDir.formatted 90 85)" />
>>#end if
>>
>>
>>
>> This is set up to work with speeds measured in miles per hour. Some 
>> modification would be needed to make it work with other units. I hope 
>> someone will find it useful. Improvements welcome.
>>
>>
>> On Monday, April 2, 2018 at 8:21:51 PM UTC-4, RobbH wrote:
>>>
>>> Very nice! That's not exactly what I'm attempting right now, but I'll 
>>> keep in mind for the future.
>>>
>>> I hope you'll add it to the weewx wiki, so it'll be easy to find in the 
>>> future.
>>>
>>> I didn't find the realtime gauge data extension in the wiki, either, but 
>>> found it here:
>>>
>>> https://github.com/gjr80/weewx-realtime_gauge-data
>>>
>>>
>>>
>>> On Sunday, April 1, 2018 at 10:32:53 PM UTC-4, Alec Bennett wrote:

 > On the other hand, it may be possible to do all I need with 
 javascript, and I'll probably try that first.

 If you want to use javascript, you might be interested in this project 
 of mine:

 github.com/wrybread/Weather-Underground-Style-Real-Time-Gauge

 Personally I think javascript is a good method for current wind 
 conditions, since it makes it easy to update a graphic continually. This 
 live demo should update every 2 seconds or so (every time the wind 
 indicator turns green is an update):

 sinkingsensation.com/wu_gauge/

 I should really update that though, since it's very small on my screen. 
 A CSS issue. Or here (css optimized for mobile):

 sinkingsensation.com/wind

 Note that this requires enabling the RTC ("real time gauge") extension 
 in weewx. And fyi the effect is achieved by rotating the circle to the 
 current wind direction. 











  

> A crude version, without making the wind directional pointer 
> proportional to wind speed, can be done with svg graphics and no outside 
> help. I've posted that to the old thread that I linked in the first post.
>
>
> On Friday, March 30, 2018 at 8:27:41 PM UTC-4, RobbH wrote:
>>
>> Maybe, at long last, I'm going to have to buckle down and learn 
>> enough of Python to do this!
>>
>>
>> On Friday, March 30, 2018 at 6:51:49 PM UTC-4, vince wrote:
>>>
>>> On Friday, March 30, 2018 at 1:54:30 PM UTC-7, RobbH wrote:

 Still pursuing this, and I have learned how to generate the sort of 
 image I want, but not within Weewx. Is it possible call an external 
 program 
 (shell script) during each report cycle?


>>> It is possible to do darn near anything if you write an extension to 
>>> do so.assuming the account weewx runs as has privileges to do so.
>>>  
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "weewx-user" group.
>> To unsubscribe from t

Re: [weewx-user] Re: Current wind graphic?

2018-04-05 Thread Thomas Keffer
Very clever!

-tk

On Thu, Apr 5, 2018 at 12:36 PM, RobbH  wrote:

> I finally came to the realization that everything I wanted to do could be
> done with the Cheetah engine, and even learned a tiny bit of Python in the
> process. The following code, added to index,html.tmpl (or some other
> template) generates a crude compass rose with up to two directional vanes,
> one (in red) for gust direction and one (in blue) for wind direction. The
> length of the vanes is proportional to the corresponding speed value, on a
> logarithmic scale.
>
> #import math
> xmlns="http://www.w3.org/2000/svg";>
>
>  stroke-dasharray="1,12.08" fill="transparent" />
>  stroke-width="10" fill="transparent" />
>  fill="transparent" />
>  fill="transparent" />
>  fill="gray">100
>  fill="gray">10
>  fill="gray">1
>
> 
> 
>  fill="gray">N
>  fill="gray">S
>  fill="gray">W
>  fill="gray">E
> 
>
>  fill="orangered">$current.windGust.formatted
>  fill="dodgerblue">$current.windSpeed.formatted
>#if $current.windGustDir.formatted != "   N/A" and
> float($current.windGust.formatted) > 0
>#set $wg = 65 - 18 * (1 + math.log(float($current.windGust.formatted),
> 10))
>  transform="rotate($current.windGustDir.formatted 90 85)" />
>#end if
> #if $current.windDir.formatted != "   N/A" and
> float($current.windSpeed.formatted) > 0
>#set $ws = 65 - 18 * (1 + math.log(float($current.windSpeed.formatted),
> 10))
>  transform="rotate($current.windDir.formatted 90 85)" />
>#end if
>
>
>
> This is set up to work with speeds measured in miles per hour. Some
> modification would be needed to make it work with other units. I hope
> someone will find it useful. Improvements welcome.
>
>
> On Monday, April 2, 2018 at 8:21:51 PM UTC-4, RobbH wrote:
>>
>> Very nice! That's not exactly what I'm attempting right now, but I'll
>> keep in mind for the future.
>>
>> I hope you'll add it to the weewx wiki, so it'll be easy to find in the
>> future.
>>
>> I didn't find the realtime gauge data extension in the wiki, either, but
>> found it here:
>>
>> https://github.com/gjr80/weewx-realtime_gauge-data
>>
>>
>>
>> On Sunday, April 1, 2018 at 10:32:53 PM UTC-4, Alec Bennett wrote:
>>>
>>> > On the other hand, it may be possible to do all I need with
>>> javascript, and I'll probably try that first.
>>>
>>> If you want to use javascript, you might be interested in this project
>>> of mine:
>>>
>>> github.com/wrybread/Weather-Underground-Style-Real-Time-Gauge
>>>
>>> Personally I think javascript is a good method for current wind
>>> conditions, since it makes it easy to update a graphic continually. This
>>> live demo should update every 2 seconds or so (every time the wind
>>> indicator turns green is an update):
>>>
>>> sinkingsensation.com/wu_gauge/
>>>
>>> I should really update that though, since it's very small on my screen.
>>> A CSS issue. Or here (css optimized for mobile):
>>>
>>> sinkingsensation.com/wind
>>>
>>> Note that this requires enabling the RTC ("real time gauge") extension
>>> in weewx. And fyi the effect is achieved by rotating the circle to the
>>> current wind direction.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
 A crude version, without making the wind directional pointer
 proportional to wind speed, can be done with svg graphics and no outside
 help. I've posted that to the old thread that I linked in the first post.


 On Friday, March 30, 2018 at 8:27:41 PM UTC-4, RobbH wrote:
>
> Maybe, at long last, I'm going to have to buckle down and learn enough
> of Python to do this!
>
>
> On Friday, March 30, 2018 at 6:51:49 PM UTC-4, vince wrote:
>>
>> On Friday, March 30, 2018 at 1:54:30 PM UTC-7, RobbH wrote:
>>>
>>> Still pursuing this, and I have learned how to generate the sort of
>>> image I want, but not within Weewx. Is it possible call an external 
>>> program
>>> (shell script) during each report cycle?
>>>
>>>
>> It is possible to do darn near anything if you write an extension to
>> do so.assuming the account weewx runs as has privileges to do so.
>>
>>
> --
> 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 weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: Current wind graphic?

2018-04-05 Thread RobbH
For future reference, if the graphic linked in the previous post is no 
longer available, just save the svg code (everything but the '#import math' 
line) to a file, rose.svg. Open it in a text editor, then replace the two 
lines of text declaration and the two "if" blocks, all following the final 
comment, with this code:

  10
  5
  
  




On Thursday, April 5, 2018 at 5:25:01 PM UTC-4, RobbH wrote:
>
> It's available (temporarily) here:
>
> http://rh3.operamail.com/windrose_testing.svg
>
> On Thursday, April 5, 2018 at 3:45:58 PM UTC-4, Alec Bennett wrote:
>>
>> Possible to see the generated output of that somewhere?
>>
>> On Thu, Apr 5, 2018 at 12:36 PM, RobbH  wrote:
>>
>>> I finally came to the realization that everything I wanted to do could 
>>> be done with the Cheetah engine, and even learned a tiny bit of Python in 
>>> the process. The following code, added to index,html.tmpl (or some other 
>>> template) generates a crude compass rose with up to two directional vanes, 
>>> one (in red) for gust direction and one (in blue) for wind direction. The 
>>> length of the vanes is proportional to the corresponding speed value, on a 
>>> logarithmic scale.
>>>
>>> #import math
>>>>> xmlns="http://www.w3.org/2000/svg";>
>>>
>>> >> stroke-dasharray="1,12.08" fill="transparent" />
>>> >> stroke-width="10" fill="transparent" />
>>> >> fill="transparent" />
>>> >> fill="transparent" />
>>> >> fill="gray">100
>>> >> fill="gray">10
>>> >> fill="gray">1
>>>
>>> 
>>> 
>>> >> fill="gray">N
>>> >> fill="gray">S
>>> >> fill="gray">W
>>> >> fill="gray">E
>>> 
>>>
>>> >> fill="orangered">$current.windGust.formatted
>>> >> fill="dodgerblue">$current.windSpeed.formatted
>>>#if $current.windGustDir.formatted != "   N/A" and 
>>> float($current.windGust.formatted) > 0
>>>#set $wg = 65 - 18 * (1 + 
>>> math.log(float($current.windGust.formatted), 10))
>>> >> transform="rotate($current.windGustDir.formatted 90 85)" />
>>>#end if
>>> #if $current.windDir.formatted != "   N/A" and 
>>> float($current.windSpeed.formatted) > 0
>>>#set $ws = 65 - 18 * (1 + 
>>> math.log(float($current.windSpeed.formatted), 10))
>>> >> transform="rotate($current.windDir.formatted 90 85)" />
>>>#end if
>>>
>>>
>>>
>>> This is set up to work with speeds measured in miles per hour. Some 
>>> modification would be needed to make it work with other units. I hope 
>>> someone will find it useful. Improvements welcome.
>>>
>>>
>>> On Monday, April 2, 2018 at 8:21:51 PM UTC-4, RobbH wrote:

 Very nice! That's not exactly what I'm attempting right now, but I'll 
 keep in mind for the future.

 I hope you'll add it to the weewx wiki, so it'll be easy to find in the 
 future.

 I didn't find the realtime gauge data extension in the wiki, either, 
 but found it here:

 https://github.com/gjr80/weewx-realtime_gauge-data



 On Sunday, April 1, 2018 at 10:32:53 PM UTC-4, Alec Bennett wrote:
>
> > On the other hand, it may be possible to do all I need with 
> javascript, and I'll probably try that first.
>
> If you want to use javascript, you might be interested in this project 
> of mine:
>
> github.com/wrybread/Weather-Underground-Style-Real-Time-Gauge
>
> Personally I think javascript is a good method for current wind 
> conditions, since it makes it easy to update a graphic continually. This 
> live demo should update every 2 seconds or so (every time the wind 
> indicator turns green is an update):
>
> sinkingsensation.com/wu_gauge/
>
> I should really update that though, since it's very small on my 
> screen. A CSS issue. Or here (css optimized for mobile):
>
> sinkingsensation.com/wind
>
> Note that this requires enabling the RTC ("real time gauge") extension 
> in weewx. And fyi the effect is achieved by rotating the circle to the 
> current wind direction. 
>
>
>
>
>
>
>
>
>
>
>
>  
>
>> A crude version, without making the wind directional pointer 
>> proportional to wind speed, can be done with svg graphics and no outside 
>> help. I've posted that to the old thread that I linked in the first post.
>>
>>
>> On Friday, March 30, 2018 at 8:27:41 PM UTC-4, RobbH wrote:
>>>
>>> Maybe, at long last, I'm going to have to buckle down and learn 
>>> enough of Python to do this!
>>>
>>>
>>> On Friday, March 30, 2018 at 6:51:49 PM UTC-4, vince wrote:

 On Friday, March 30, 2018 at 1:54:30 PM UTC-7, RobbH wrote:
>
> Still pursuing this, and I have learned how to generate the sort 
> of image I want, but not within Weewx. Is it possible call 

Re: [weewx-user] Re: Current wind graphic?

2018-04-05 Thread Glenn McKechnie
Interesting, Nice and simple too.

Just dropped the code into the main index template here and it works well.

I'm using Metric and kph ( km/h ) here and I don't see anything
unusual in its scaling.


http://203.213.243.61/weewx/

In fact, it's probably a keeper. Just need to find a more suitable
spot to place it.



Cheers
 Glenn

rorpi - read only raspberry pi & various weewx addons
https://github.com/glennmckechnie


On 6 April 2018 at 07:25, RobbH  wrote:
> It's available (temporarily) here:
>
> http://rh3.operamail.com/windrose_testing.svg
>
> On Thursday, April 5, 2018 at 3:45:58 PM UTC-4, Alec Bennett wrote:
>>
>> Possible to see the generated output of that somewhere?
>>
>> On Thu, Apr 5, 2018 at 12:36 PM, RobbH  wrote:
>>>
>>> I finally came to the realization that everything I wanted to do could be
>>> done with the Cheetah engine, and even learned a tiny bit of Python in the
>>> process. The following code, added to index,html.tmpl (or some other
>>> template) generates a crude compass rose with up to two directional vanes,
>>> one (in red) for gust direction and one (in blue) for wind direction. The
>>> length of the vanes is proportional to the corresponding speed value, on a
>>> logarithmic scale.
>>>
>>> #import math
>>>>> xmlns="http://www.w3.org/2000/svg";>
>>>
>>> >> stroke-dasharray="1,12.08" fill="transparent" />
>>> >> stroke-width="10" fill="transparent" />
>>> >> fill="transparent" />
>>> >> fill="transparent" />
>>> >> fill="gray">100
>>> >> fill="gray">10
>>> >> fill="gray">1
>>>
>>> 
>>> 
>>> >> fill="gray">N
>>> >> fill="gray">S
>>> >> fill="gray">W
>>> >> fill="gray">E
>>> 
>>>
>>> >> fill="orangered">$current.windGust.formatted
>>> >> fill="dodgerblue">$current.windSpeed.formatted
>>>#if $current.windGustDir.formatted != "   N/A" and
>>> float($current.windGust.formatted) > 0
>>>#set $wg = 65 - 18 * (1 +
>>> math.log(float($current.windGust.formatted), 10))
>>> >> transform="rotate($current.windGustDir.formatted 90 85)" />
>>>#end if
>>> #if $current.windDir.formatted != "   N/A" and
>>> float($current.windSpeed.formatted) > 0
>>>#set $ws = 65 - 18 * (1 +
>>> math.log(float($current.windSpeed.formatted), 10))
>>> >> transform="rotate($current.windDir.formatted 90 85)" />
>>>#end if
>>>
>>>
>>>
>>> This is set up to work with speeds measured in miles per hour. Some
>>> modification would be needed to make it work with other units. I hope
>>> someone will find it useful. Improvements welcome.
>>>
>>>
>>> On Monday, April 2, 2018 at 8:21:51 PM UTC-4, RobbH wrote:

 Very nice! That's not exactly what I'm attempting right now, but I'll
 keep in mind for the future.

 I hope you'll add it to the weewx wiki, so it'll be easy to find in the
 future.

 I didn't find the realtime gauge data extension in the wiki, either, but
 found it here:

 https://github.com/gjr80/weewx-realtime_gauge-data



 On Sunday, April 1, 2018 at 10:32:53 PM UTC-4, Alec Bennett wrote:
>
> > On the other hand, it may be possible to do all I need with
> > javascript, and I'll probably try that first.
>
> If you want to use javascript, you might be interested in this project
> of mine:
>
> github.com/wrybread/Weather-Underground-Style-Real-Time-Gauge
>
> Personally I think javascript is a good method for current wind
> conditions, since it makes it easy to update a graphic continually. This
> live demo should update every 2 seconds or so (every time the wind 
> indicator
> turns green is an update):
>
> sinkingsensation.com/wu_gauge/
>
> I should really update that though, since it's very small on my screen.
> A CSS issue. Or here (css optimized for mobile):
>
> sinkingsensation.com/wind
>
> Note that this requires enabling the RTC ("real time gauge") extension
> in weewx. And fyi the effect is achieved by rotating the circle to the
> current wind direction.
>
>
>
>
>
>
>
>
>
>
>
>
>>
>> A crude version, without making the wind directional pointer
>> proportional to wind speed, can be done with svg graphics and no outside
>> help. I've posted that to the old thread that I linked in the first post.
>>
>>
>> On Friday, March 30, 2018 at 8:27:41 PM UTC-4, RobbH wrote:
>>>
>>> Maybe, at long last, I'm going to have to buckle down and learn
>>> enough of Python to do this!
>>>
>>>
>>> On Friday, March 30, 2018 at 6:51:49 PM UTC-4, vince wrote:

 On Friday, March 30, 2018 at 1:54:30 PM UTC-7, RobbH wrote:
>
> Still pursuing this, and I have learned how to generate the sort of
> image I want, but n

Re: [weewx-user] Re: Current wind graphic?

2018-04-05 Thread RobbH
It's available (temporarily) here:

http://rh3.operamail.com/windrose_testing.svg

On Thursday, April 5, 2018 at 3:45:58 PM UTC-4, Alec Bennett wrote:
>
> Possible to see the generated output of that somewhere?
>
> On Thu, Apr 5, 2018 at 12:36 PM, RobbH > 
> wrote:
>
>> I finally came to the realization that everything I wanted to do could be 
>> done with the Cheetah engine, and even learned a tiny bit of Python in the 
>> process. The following code, added to index,html.tmpl (or some other 
>> template) generates a crude compass rose with up to two directional vanes, 
>> one (in red) for gust direction and one (in blue) for wind direction. The 
>> length of the vanes is proportional to the corresponding speed value, on a 
>> logarithmic scale.
>>
>> #import math
>>> xmlns="http://www.w3.org/2000/svg";>
>>
>> > stroke-dasharray="1,12.08" fill="transparent" />
>> > stroke-width="10" fill="transparent" />
>> > fill="transparent" />
>> > fill="transparent" />
>> > fill="gray">100
>> > fill="gray">10
>> > fill="gray">1
>>
>> 
>> 
>> > fill="gray">N
>> > fill="gray">S
>> > fill="gray">W
>> > fill="gray">E
>> 
>>
>> > fill="orangered">$current.windGust.formatted
>> > fill="dodgerblue">$current.windSpeed.formatted
>>#if $current.windGustDir.formatted != "   N/A" and 
>> float($current.windGust.formatted) > 0
>>#set $wg = 65 - 18 * (1 + 
>> math.log(float($current.windGust.formatted), 10))
>> > transform="rotate($current.windGustDir.formatted 90 85)" />
>>#end if
>> #if $current.windDir.formatted != "   N/A" and 
>> float($current.windSpeed.formatted) > 0
>>#set $ws = 65 - 18 * (1 + 
>> math.log(float($current.windSpeed.formatted), 10))
>> > transform="rotate($current.windDir.formatted 90 85)" />
>>#end if
>>
>>
>>
>> This is set up to work with speeds measured in miles per hour. Some 
>> modification would be needed to make it work with other units. I hope 
>> someone will find it useful. Improvements welcome.
>>
>>
>> On Monday, April 2, 2018 at 8:21:51 PM UTC-4, RobbH wrote:
>>>
>>> Very nice! That's not exactly what I'm attempting right now, but I'll 
>>> keep in mind for the future.
>>>
>>> I hope you'll add it to the weewx wiki, so it'll be easy to find in the 
>>> future.
>>>
>>> I didn't find the realtime gauge data extension in the wiki, either, but 
>>> found it here:
>>>
>>> https://github.com/gjr80/weewx-realtime_gauge-data
>>>
>>>
>>>
>>> On Sunday, April 1, 2018 at 10:32:53 PM UTC-4, Alec Bennett wrote:

 > On the other hand, it may be possible to do all I need with 
 javascript, and I'll probably try that first.

 If you want to use javascript, you might be interested in this project 
 of mine:

 github.com/wrybread/Weather-Underground-Style-Real-Time-Gauge

 Personally I think javascript is a good method for current wind 
 conditions, since it makes it easy to update a graphic continually. This 
 live demo should update every 2 seconds or so (every time the wind 
 indicator turns green is an update):

 sinkingsensation.com/wu_gauge/

 I should really update that though, since it's very small on my screen. 
 A CSS issue. Or here (css optimized for mobile):

 sinkingsensation.com/wind

 Note that this requires enabling the RTC ("real time gauge") extension 
 in weewx. And fyi the effect is achieved by rotating the circle to the 
 current wind direction. 











  

> A crude version, without making the wind directional pointer 
> proportional to wind speed, can be done with svg graphics and no outside 
> help. I've posted that to the old thread that I linked in the first post.
>
>
> On Friday, March 30, 2018 at 8:27:41 PM UTC-4, RobbH wrote:
>>
>> Maybe, at long last, I'm going to have to buckle down and learn 
>> enough of Python to do this!
>>
>>
>> On Friday, March 30, 2018 at 6:51:49 PM UTC-4, vince wrote:
>>>
>>> On Friday, March 30, 2018 at 1:54:30 PM UTC-7, RobbH wrote:

 Still pursuing this, and I have learned how to generate the sort of 
 image I want, but not within Weewx. Is it possible call an external 
 program 
 (shell script) during each report cycle?


>>> It is possible to do darn near anything if you write an extension to 
>>> do so.assuming the account weewx runs as has privileges to do so.
>>>  
>>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "weewx-user" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/weewx-user/FAaVIAv-Hfs/unsubscribe.
>> To unsubscribe from this group and all

Re: [weewx-user] Re: Current wind graphic?

2018-04-05 Thread Alec Bennett
Possible to see the generated output of that somewhere?

On Thu, Apr 5, 2018 at 12:36 PM, RobbH  wrote:

> I finally came to the realization that everything I wanted to do could be
> done with the Cheetah engine, and even learned a tiny bit of Python in the
> process. The following code, added to index,html.tmpl (or some other
> template) generates a crude compass rose with up to two directional vanes,
> one (in red) for gust direction and one (in blue) for wind direction. The
> length of the vanes is proportional to the corresponding speed value, on a
> logarithmic scale.
>
> #import math
> xmlns="http://www.w3.org/2000/svg";>
>
>  stroke-dasharray="1,12.08" fill="transparent" />
>  stroke-width="10" fill="transparent" />
>  fill="transparent" />
>  fill="transparent" />
>  fill="gray">100
>  fill="gray">10
>  fill="gray">1
>
> 
> 
>  fill="gray">N
>  fill="gray">S
>  fill="gray">W
>  fill="gray">E
> 
>
>  fill="orangered">$current.windGust.formatted
>  fill="dodgerblue">$current.windSpeed.formatted
>#if $current.windGustDir.formatted != "   N/A" and
> float($current.windGust.formatted) > 0
>#set $wg = 65 - 18 * (1 + math.log(float($current.windGust.formatted),
> 10))
>  transform="rotate($current.windGustDir.formatted 90 85)" />
>#end if
> #if $current.windDir.formatted != "   N/A" and
> float($current.windSpeed.formatted) > 0
>#set $ws = 65 - 18 * (1 + math.log(float($current.windSpeed.formatted),
> 10))
>  transform="rotate($current.windDir.formatted 90 85)" />
>#end if
>
>
>
> This is set up to work with speeds measured in miles per hour. Some
> modification would be needed to make it work with other units. I hope
> someone will find it useful. Improvements welcome.
>
>
> On Monday, April 2, 2018 at 8:21:51 PM UTC-4, RobbH wrote:
>>
>> Very nice! That's not exactly what I'm attempting right now, but I'll
>> keep in mind for the future.
>>
>> I hope you'll add it to the weewx wiki, so it'll be easy to find in the
>> future.
>>
>> I didn't find the realtime gauge data extension in the wiki, either, but
>> found it here:
>>
>> https://github.com/gjr80/weewx-realtime_gauge-data
>>
>>
>>
>> On Sunday, April 1, 2018 at 10:32:53 PM UTC-4, Alec Bennett wrote:
>>>
>>> > On the other hand, it may be possible to do all I need with
>>> javascript, and I'll probably try that first.
>>>
>>> If you want to use javascript, you might be interested in this project
>>> of mine:
>>>
>>> github.com/wrybread/Weather-Underground-Style-Real-Time-Gauge
>>>
>>> Personally I think javascript is a good method for current wind
>>> conditions, since it makes it easy to update a graphic continually. This
>>> live demo should update every 2 seconds or so (every time the wind
>>> indicator turns green is an update):
>>>
>>> sinkingsensation.com/wu_gauge/
>>>
>>> I should really update that though, since it's very small on my screen.
>>> A CSS issue. Or here (css optimized for mobile):
>>>
>>> sinkingsensation.com/wind
>>>
>>> Note that this requires enabling the RTC ("real time gauge") extension
>>> in weewx. And fyi the effect is achieved by rotating the circle to the
>>> current wind direction.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
 A crude version, without making the wind directional pointer
 proportional to wind speed, can be done with svg graphics and no outside
 help. I've posted that to the old thread that I linked in the first post.


 On Friday, March 30, 2018 at 8:27:41 PM UTC-4, RobbH wrote:
>
> Maybe, at long last, I'm going to have to buckle down and learn enough
> of Python to do this!
>
>
> On Friday, March 30, 2018 at 6:51:49 PM UTC-4, vince wrote:
>>
>> On Friday, March 30, 2018 at 1:54:30 PM UTC-7, RobbH wrote:
>>>
>>> Still pursuing this, and I have learned how to generate the sort of
>>> image I want, but not within Weewx. Is it possible call an external 
>>> program
>>> (shell script) during each report cycle?
>>>
>>>
>> It is possible to do darn near anything if you write an extension to
>> do so.assuming the account weewx runs as has privileges to do so.
>>
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/weewx-user/FAaVIAv-Hfs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 weewx-user+unsubscr...@goog

[weewx-user] Re: Current wind graphic?

2018-04-05 Thread RobbH
I finally came to the realization that everything I wanted to do could be 
done with the Cheetah engine, and even learned a tiny bit of Python in the 
process. The following code, added to index,html.tmpl (or some other 
template) generates a crude compass rose with up to two directional vanes, 
one (in red) for gust direction and one (in blue) for wind direction. The 
length of the vanes is proportional to the corresponding speed value, on a 
logarithmic scale.

#import math
   http://www.w3.org/2000/svg";>
   




100
10
1
   


N
S
W
E

   
$current.windGust.formatted
$current.windSpeed.formatted
   #if $current.windGustDir.formatted != "   N/A" and 
float($current.windGust.formatted) > 0
   #set $wg = 65 - 18 * (1 + 
math.log(float($current.windGust.formatted), 10))

   #end if
#if $current.windDir.formatted != "   N/A" and 
float($current.windSpeed.formatted) > 0
   #set $ws = 65 - 18 * (1 + 
math.log(float($current.windSpeed.formatted), 10))

   #end if
   


This is set up to work with speeds measured in miles per hour. Some 
modification would be needed to make it work with other units. I hope 
someone will find it useful. Improvements welcome.


On Monday, April 2, 2018 at 8:21:51 PM UTC-4, RobbH wrote:
>
> Very nice! That's not exactly what I'm attempting right now, but I'll keep 
> in mind for the future.
>
> I hope you'll add it to the weewx wiki, so it'll be easy to find in the 
> future.
>
> I didn't find the realtime gauge data extension in the wiki, either, but 
> found it here:
>
> https://github.com/gjr80/weewx-realtime_gauge-data
>
>
>
> On Sunday, April 1, 2018 at 10:32:53 PM UTC-4, Alec Bennett wrote:
>>
>> > On the other hand, it may be possible to do all I need with javascript, 
>> and I'll probably try that first.
>>
>> If you want to use javascript, you might be interested in this project of 
>> mine:
>>
>> github.com/wrybread/Weather-Underground-Style-Real-Time-Gauge
>>
>> Personally I think javascript is a good method for current wind 
>> conditions, since it makes it easy to update a graphic continually. This 
>> live demo should update every 2 seconds or so (every time the wind 
>> indicator turns green is an update):
>>
>> sinkingsensation.com/wu_gauge/
>>
>> I should really update that though, since it's very small on my screen. A 
>> CSS issue. Or here (css optimized for mobile):
>>
>> sinkingsensation.com/wind
>>
>> Note that this requires enabling the RTC ("real time gauge") extension in 
>> weewx. And fyi the effect is achieved by rotating the circle to the current 
>> wind direction. 
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>  
>>
>>> A crude version, without making the wind directional pointer 
>>> proportional to wind speed, can be done with svg graphics and no outside 
>>> help. I've posted that to the old thread that I linked in the first post.
>>>
>>>
>>> On Friday, March 30, 2018 at 8:27:41 PM UTC-4, RobbH wrote:

 Maybe, at long last, I'm going to have to buckle down and learn enough 
 of Python to do this!


 On Friday, March 30, 2018 at 6:51:49 PM UTC-4, vince wrote:
>
> On Friday, March 30, 2018 at 1:54:30 PM UTC-7, RobbH wrote:
>>
>> Still pursuing this, and I have learned how to generate the sort of 
>> image I want, but not within Weewx. Is it possible call an external 
>> program 
>> (shell script) during each report cycle?
>>
>>
> It is possible to do darn near anything if you write an extension to 
> do so.assuming the account weewx runs as has privileges to do so.
>  
>


-- 
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 weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Current wind graphic?

2018-04-02 Thread RobbH
Very nice! That's not exactly what I'm attempting right now, but I'll keep 
in mind for the future.

I hope you'll add it to the weewx wiki, so it'll be easy to find in the 
future.

I didn't find the realtime gauge data extension in the wiki, either, but 
found it here:

https://github.com/gjr80/weewx-realtime_gauge-data



On Sunday, April 1, 2018 at 10:32:53 PM UTC-4, Alec Bennett wrote:
>
> > On the other hand, it may be possible to do all I need with javascript, 
> and I'll probably try that first.
>
> If you want to use javascript, you might be interested in this project of 
> mine:
>
> github.com/wrybread/Weather-Underground-Style-Real-Time-Gauge
>
> Personally I think javascript is a good method for current wind 
> conditions, since it makes it easy to update a graphic continually. This 
> live demo should update every 2 seconds or so (every time the wind 
> indicator turns green is an update):
>
> sinkingsensation.com/wu_gauge/
>
> I should really update that though, since it's very small on my screen. A 
> CSS issue. Or here (css optimized for mobile):
>
> sinkingsensation.com/wind
>
> Note that this requires enabling the RTC ("real time gauge") extension in 
> weewx. And fyi the effect is achieved by rotating the circle to the current 
> wind direction. 
>
>
>
>
>
>
>
>
>
>
>
>  
>
>> A crude version, without making the wind directional pointer proportional 
>> to wind speed, can be done with svg graphics and no outside help. I've 
>> posted that to the old thread that I linked in the first post.
>>
>>
>> On Friday, March 30, 2018 at 8:27:41 PM UTC-4, RobbH wrote:
>>>
>>> Maybe, at long last, I'm going to have to buckle down and learn enough 
>>> of Python to do this!
>>>
>>>
>>> On Friday, March 30, 2018 at 6:51:49 PM UTC-4, vince wrote:

 On Friday, March 30, 2018 at 1:54:30 PM UTC-7, RobbH wrote:
>
> Still pursuing this, and I have learned how to generate the sort of 
> image I want, but not within Weewx. Is it possible call an external 
> program 
> (shell script) during each report cycle?
>
>
 It is possible to do darn near anything if you write an extension to do 
 so.assuming the account weewx runs as has privileges to do so.
  

>>>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Current wind graphic?

2018-04-01 Thread Alec Bennett
> On the other hand, it may be possible to do all I need with javascript, 
and I'll probably try that first.

If you want to use javascript, you might be interested in this project of 
mine:

github.com/wrybread/Weather-Underground-Style-Real-Time-Gauge

Personally I think javascript is a good method for current wind conditions, 
since it makes it easy to update a graphic continually. This live demo 
should update every 2 seconds or so (every time the wind indicator turns 
green is an update):

sinkingsensation.com/wu_gauge/

I should really update that though, since it's very small on my screen. A 
CSS issue. Or here (css optimized for mobile):

sinkingsensation.com/wind

Note that this requires enabling the RTC ("real time gauge") extension in 
weewx. And fyi the effect is achieved by rotating the circle to the current 
wind direction. 











 

> A crude version, without making the wind directional pointer proportional 
> to wind speed, can be done with svg graphics and no outside help. I've 
> posted that to the old thread that I linked in the first post.
>
>
> On Friday, March 30, 2018 at 8:27:41 PM UTC-4, RobbH wrote:
>>
>> Maybe, at long last, I'm going to have to buckle down and learn enough of 
>> Python to do this!
>>
>>
>> On Friday, March 30, 2018 at 6:51:49 PM UTC-4, vince wrote:
>>>
>>> On Friday, March 30, 2018 at 1:54:30 PM UTC-7, RobbH wrote:

 Still pursuing this, and I have learned how to generate the sort of 
 image I want, but not within Weewx. Is it possible call an external 
 program 
 (shell script) during each report cycle?


>>> It is possible to do darn near anything if you write an extension to do 
>>> so.assuming the account weewx runs as has privileges to do so.
>>>  
>>>
>>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Current wind graphic?

2018-03-31 Thread RobbH
On the other hand, it may be possible to do all I need with javascript, and 
I'll probably try that first.

A crude version, without making the wind directional pointer proportional 
to wind speed, can be done with svg graphics and no outside help. I've 
posted that to the old thread that I linked in the first post.


On Friday, March 30, 2018 at 8:27:41 PM UTC-4, RobbH wrote:
>
> Maybe, at long last, I'm going to have to buckle down and learn enough of 
> Python to do this!
>
>
> On Friday, March 30, 2018 at 6:51:49 PM UTC-4, vince wrote:
>>
>> On Friday, March 30, 2018 at 1:54:30 PM UTC-7, RobbH wrote:
>>>
>>> Still pursuing this, and I have learned how to generate the sort of 
>>> image I want, but not within Weewx. Is it possible call an external program 
>>> (shell script) during each report cycle?
>>>
>>>
>> It is possible to do darn near anything if you write an extension to do 
>> so.assuming the account weewx runs as has privileges to do so.
>>  
>>
>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Current wind graphic?

2018-03-30 Thread RobbH
Maybe, at long last, I'm going to have to buckle down and learn enough of 
Python to do this!


On Friday, March 30, 2018 at 6:51:49 PM UTC-4, vince wrote:
>
> On Friday, March 30, 2018 at 1:54:30 PM UTC-7, RobbH wrote:
>>
>> Still pursuing this, and I have learned how to generate the sort of image 
>> I want, but not within Weewx. Is it possible call an external program 
>> (shell script) during each report cycle?
>>
>>
> It is possible to do darn near anything if you write an extension to do 
> so.assuming the account weewx runs as has privileges to do so.
>  
>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Current wind graphic?

2018-03-30 Thread vince
On Friday, March 30, 2018 at 1:54:30 PM UTC-7, RobbH wrote:
>
> Still pursuing this, and I have learned how to generate the sort of image 
> I want, but not within Weewx. Is it possible call an external program 
> (shell script) during each report cycle?
>
>
It is possible to do darn near anything if you write an extension to do 
so.assuming the account weewx runs as has privileges to do so.
 

-- 
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 weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Current wind graphic?

2018-03-30 Thread RobbH
Still pursuing this, and I have learned how to generate the sort of image I 
want, but not within Weewx. Is it possible call an external program (shell 
script) during each report cycle?


On Friday, March 23, 2018 at 2:44:49 PM UTC-4, RobbH wrote:
>
> Is it possible, using the standard image generator, to create an image of 
> the maximum and average wind vector, only for the most recent archive 
> period?
>
> I assume not, as the docs are very clear that there is no current.windvec 
> tag. Still, I have some hope that Those Who Know A Lot More Than I Do might 
> have an alternate way of achieving the results.
>
> What I'm looking for is a graphic display of current wind, as discussed in 
> this very old thread: 
> https://groups.google.com/d/topic/weewx-user/vwX11T8pBlM/discussion . Tom 
> provided a good way to display current wind direction on a compass rose, 
> but I thought a vector display would be cooler.
>
>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.