1. You can do something like this in the templates (NOT TESTED): #if $current.windDir.raw >= 22.5 and $current.windDir.raw <= 67.5 #set label = "Bura" #elif $current.windDir.raw > 67.5 and $current.windDir.raw <= 112.5 #set label = "Levanat" #elif $current.windDir.raw > 112.5 and $current.windDir.raw <= 175.5 #set label = "Jugo" ... #else #set label = "something" #end if <p>The wind direction is $label</p>
Note the use of the .raw suffix. This is necessary to get a numeric value (otherwise, you get an instance of the ValueHelper class, which cannot do arithmetic). Also, the labels, Bura, etc., must be in quotes. 2. Not sure I understand what you're asking. Are you referring to the y-axis in plots? -tk On Mon, Sep 23, 2019 at 5:10 AM Pila <[email protected]> wrote: > I would like to use and display our local wind names. I understand this > may be impossible, but it is not my fault WeeWX impresses me so much that I > expect it to do anything I wish :) Not my fault! > > We have 8 distinct winds governing not only weather but also the mood of > most people. Just ask the police during Jugo :) Unless I am sailing and > watching the compass or the map, I really do not use degrees. Plus, not the > same watching the map or a graph. We normally use local wind names. Only if > unsure, we may use Cardinal directions for wind. But degrees - never. We do > it this way for thousands of years :) We comment winds many times each day. > > So, when the wind is NNE-NE-ENE - I would like to label it Bura. For > ENE-E-ESE wind I would like to label it Levanat. For ESE-SE-SSE I would > like to see Jugo and so on. If I could somehow define wind lables with > custom resolution, it would be perfect. This wish applies to both graphs > and the main page. > > 1. At main SmartPhone page, now I get (currently) Wind: 5 km/h E (98). I > guess it shold be possible to put somewhere something like: > > if $current.windDir >= 22.5 and $current.windDir <= 67.5 then label is > Bura > else if $current.windDir > 67.5 and $current.windDir <= 112.5 then label > is Levanat > else if $current.windDir > 112.5 and $current.windDir <= 157.5 then label > is Jugo > .... > > > And based on that, print cardinal leter and the wind name on the main > page. If this is possible, I would appreciate a hint and a little help. > > 2. In addition to dispalying 8 or 16 cardinal points of the compass as > Letters in the Wind graphs, I would also like to add above labels over the > graphs indicating Wind names. Bura would go over NE - 45 deg, Levanat over > E -90 deg, and Jugo over SE - 135 deg and so on. > > I do not care if it is complicated. > > -- > 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/91695557-c6d8-45d8-b2ec-4f4fbc7b140f%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/91695557-c6d8-45d8-b2ec-4f4fbc7b140f%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/CAPq0zED%2BQEoHFe-e8QXA%2B-pzEiLKeVdci7G2kg9Xmq-2Mmq1%2BQ%40mail.gmail.com.
