Page 16 of 102
Re: Weather34 Aurora Version(english supported only)
Posted: Sun Dec 13, 2020 2:55 pm
by prestwickwx
HI Brian,
The new Direction Compass really Pops
Thanks,
Chuck
Re: Weather34 Aurora Version(english supported only)
Posted: Sun Dec 13, 2020 3:22 pm
by weatherist34
thanks something i wanted todo long ago was to add more cardinals now the languages are not required less code easier to accomplish. this is just pure css no images svg etc just a simple css circle with layered borders on top of each other with some transparency or in css known as opacity..anyway that was my stay at home 72 hour project . i just pushed another GIT basically cleans up code you kind of accumulate when putting something together.
your solution for metrics if it works for you then go for it . have a great weekend whats left of it ..
Re: Weather34 Aurora Version(english supported only)
Posted: Sun Dec 13, 2020 4:43 pm
by weatherist34
for those curious chuck if referring to this

- compa.jpg (153.35 KiB) Viewed 3735 times
Re: Weather34 Aurora Version(english supported only)
Posted: Thu Dec 17, 2020 5:29 am
by gand
Hi
In the gustmod.php module it seems the Wind Run Today is displayed in Miles. In the setup I have chosen KM. Do you know where I can change that.
Thanks
Gert
Re: Weather34 Aurora Version(english supported only)
Posted: Thu Dec 17, 2020 10:51 am
by xray77
Hello Gand,
you can test following code (replace the existing code at line 113:
<?php //windrun
if ($weather["wind_units"]=='kts'){echo"<div class=tempmodulehome0-5c>". " ".(number_format($weather["windrun34"]*1.852,1)).''.'<smalltempunit2> ';};
if ($weather["wind_units"]=='km/h'){echo"<div class=tempmodulehome0-5c>". " ".(number_format($weather["windrun34"],1)).''.'<smalltempunit2> ';};
if ($weather["wind_units"]=='mph'){echo"<div class=tempmodulehome0-5c>". " ".(number_format($weather["windrun34"],1)).''.'<smalltempunit2> ';};
if ($weather["wind_units"]=='km/h'){echo 'km';};
if ($weather["wind_units"]=='mph'){echo 'mi';};
if ($weather["wind_units"]=='kts'){echo 'km';};?></div></div></div>
it runs for me, have select kt's (Knots) as prior unit, it should also run with the other units.

- Bildschirmfoto 2020-12-17 um 09.46.24.png (79.5 KiB) Viewed 3682 times
don't forget to make a backup of the file before.. The little differences in the screenshots are due to different times of creating it.
Re: Weather34 Aurora Version(english supported only)
Posted: Thu Dec 17, 2020 11:54 am
by gand
Hi xray77
Thanks a lot, test later today?
Gert
Re: Weather34 Aurora Version(english supported only)
Posted: Thu Dec 17, 2020 1:08 pm
by weatherist34
above script doesnt take into account the screenshot you provided using m/s also if the user is wanting kts and for example in uk then there forced into a kmh output. uk users 90% w want mph. this forces
if ($weather["wind_units"]=='kts'){echo 'km';};?></div></div></div>
so wait a day or so ill add in a universal script for all scenarios so each simple update doesnt break the hardcoded method each time.im all for ideas , solutions but these solutions have to be universal otherwise if everyone starts sharing code and we end up with all different code then each update will cause inconvenience. that said dont misread by all means adapt,modify for your own liking but please dont complain the updates break your personal modifications.I just try to establish a universal way for all so we are on the same boat and can apply fixes and updates with ease.
as always raise issues and ill fix them one way or the other especially if i can replicate those . personal modifications can not be replicated locally and experience tells me ill be chasing something locally for hours that dont exist.
been a long time since i looked at windrun its an original piece of code from 2016 !!!
@xrayy77 please don’t misunderstand its much appreciated and gives me an idea what to look for without having to refresh my brain.
take a trip back in time
https://weather34.com/homeweatherstatio ... eline.html
Re: Weather34 Aurora Version(english supported only)
Posted: Thu Dec 17, 2020 1:43 pm
by xray77
Brian,
I fully understand your reasoning, which is why I declared my proposal to be a test. In German-speaking countries, most people don't know what to do with miles; here, km are much more common.
I thought, the internal meteobridge-output for the API is m/s, isn't it?
Yes, you are right, the code forces km if the user select kt's as output-unit.., this is an requirement fo me and probably not recommended for the most.., but it puzzles me that users who prefer mph would then take knots as the output unit and mph as the windrun, but of course it should be possible.
I had also considered posting this at all, but then decided to do so. If you want, I can remove the post.
It works fine for me, even for the other units. Of course, it's best if you adapt the code universally as you explained.
Best regards
Mike
Re: Weather34 Aurora Version(english supported only)
Posted: Thu Dec 17, 2020 2:38 pm
by weatherist34
its no problem no need to remove just have to look at the wider audience to see if that messes up there preference. its not easy catering for various metrics i.e kmh,kts,ms,mph,bft and so on just have to find the right combination so it works out of the box.
I was always dubious of that wind run script perhaps I should just rewrite the whole thing from the ground up or find something to replace it .
is it of much use relevance to anyone ??
Re: Weather34 Aurora Version(english supported only)
Posted: Thu Dec 17, 2020 4:07 pm
by xray77
Brian,
it would not necessary for me and some others, but some wind-power-recipients would find this information helpful I think so..

I didn't really understand how it works, the script obviously doesn't add up the sum of the wind path up to the current time but estimates the wind path based on the current wind?

Because the result of the script can also decrease during the course of the day, I came up with this...
Stay healthy and wish you relaxing and happy holidays,
Mike
Re: Weather34 Aurora Version(english supported only)
Posted: Thu Dec 17, 2020 6:07 pm
by weatherist34
ok lets just simplify FOR EVERYONE so it delivers something of value for 99% of scenarios without getting screwed up in metrics vs mph,ms,kts,bft,kmh
so I simply removed existing formula then simplified it into two lines
used the default api position meteobridge(158) m/s rolling day average
used miles as the default formula driver then simply converted one extra output to km
so we simply have both displayed without getting lost in options and it doesn't break or change appearance of modules .
so what do you think ? screenshot below it requires no change in options, setup, css etc would just apply via the simple update
im sure some awkward git

gonna ask for it in meters

- Screenshot at Dec 17 19-00-38.png (63.07 KiB) Viewed 3645 times
Re: Weather34 Aurora Version(english supported only)
Posted: Thu Dec 17, 2020 6:13 pm
by prestwickwx
Hi Brian,
Looks good to me
Chuck
Re: Weather34 Aurora Version(english supported only)
Posted: Thu Dec 17, 2020 6:52 pm
by weatherist34
i think its a safer option for 99% as it doesnt really matter wether your using kmh,mph,ms,kts etc it simply uses the meteobridge default ms output in the formula the output is always the same .just adds a single multiplier to convert from miles to kilometers .
for the hardcore enthusiast if you want meters just simply convert(multiply) miles to meters ... 1 mile = 1609.34 meters.
Re: Weather34 Aurora Version(english supported only)
Posted: Thu Dec 17, 2020 9:12 pm
by xray77
Brian,
you''ve found the best solution as you do in most of cases.
it seem's looks good for all!
Mike
Re: Weather34 Aurora Version(english supported only)
Posted: Fri Dec 18, 2020 8:12 am
by alexeysailman
Hi Brian! After the last update, something strange happened with the temperature forecast. I have selected the item in the settings "important set units for Weather Underground API" - Scandinavia.