01.09.2020, 16:32
Hello
I keep polishing my script for Openweather, now with the direction of the wind.
If I have a value from 0 to 360 degrees of the wind direction, but I want to transform it into a character string according to its denomination of the winds in the Mediterranean:
• North or Terral wind (N): from 337.5 ° to 22.5 °
• Northeast wind (NE): 22.5 ° to 67.6 °
• East or Levante wind (E): from 67.5 ° to 112.5 °
• Southeast wind (SE): from 112.5 ° to 157.5 °
• South wind (S): from 157.5 ° to 202.5 °
• Southwest wind (SW): 202.5 ° to 247.5 °
• West or west wind (W): from 247.5 ° to 292.5 °
• Northwest wind (NW): 292.5 ° to 337.5 °
With the icons I have no problem adding new icons with the addresses and ranges, as if it were a dimmer or a blind.
I know that if I make icons instead of arrows with the text I could do it, but it doesn't seem like a very elegant solution.
And using a custom gauge like the compass rose?
Any suggestions on how to do it?
a greeting
I keep polishing my script for Openweather, now with the direction of the wind.
If I have a value from 0 to 360 degrees of the wind direction, but I want to transform it into a character string according to its denomination of the winds in the Mediterranean:
• North or Terral wind (N): from 337.5 ° to 22.5 °
• Northeast wind (NE): 22.5 ° to 67.6 °
• East or Levante wind (E): from 67.5 ° to 112.5 °
• Southeast wind (SE): from 112.5 ° to 157.5 °
• South wind (S): from 157.5 ° to 202.5 °
• Southwest wind (SW): 202.5 ° to 247.5 °
• West or west wind (W): from 247.5 ° to 292.5 °
• Northwest wind (NW): 292.5 ° to 337.5 °
With the icons I have no problem adding new icons with the addresses and ranges, as if it were a dimmer or a blind.
I know that if I make icons instead of arrows with the text I could do it, but it doesn't seem like a very elegant solution.
And using a custom gauge like the compass rose?
Any suggestions on how to do it?
a greeting