Page 25 of 102

Re: Weather34 Aurora Version(english supported only)

Posted: Tue Jan 05, 2021 10:36 am
by alexeysailman
Hi, Brian! I also really like MK2. I have accumulated a few comments:
1. Do these colored bars show the difference? And between what and what?
2. When you select the cloud height in meters in the settings, the screen is still displayed in feet.
3. The dimension of atmospheric pressure on the pop-up window (extra button) in hpa, although mmHg is selected.
4. Can make it possible to select the range of atmospheric pressure, when selecting any units of measurement in the settings? In the sense that the user himself sets the minimum and maximum for his area and the visualization of the pressure scale becomes clearer.

Re: Weather34 Aurora Version(english supported only)

Posted: Tue Jan 05, 2021 10:50 am
by jasonmfarrow
Graham,

I had a thought last night that it's not the most efficient code in directionmod.php. It only caters for adding one zero. A better fix would be to use the php str_pad() function and always pad to three digits with leading zeros:

Original code:

Code: Select all

<div class="windvalue1" id="windvalue"><?php echo $weather["wind_direction"],"&deg;";?></div></div> 
New code:

Code: Select all

<div class="windvalue1" id="windvalue"><?php echo str_pad($weather["wind_direction"],3,"0",STR_PAD_LEFT),"&deg;";?></div></div>
This works on my site https://jmfweather.uk

Re: Weather34 Aurora Version(english supported only)

Posted: Tue Jan 05, 2021 12:01 pm
by woolfg
Hi Jason

Thanks - I notice you are using Version 1 and i am using Version 2 - will this still work

Also when you hover the mouse over the wind direction charts it still shows two digits

Regards

Graham

Re: Weather34 Aurora Version(english supported only)

Posted: Tue Jan 05, 2021 1:15 pm
by jasonmfarrow
woolfg wrote: Tue Jan 05, 2021 12:01 pm Hi Jason

Thanks - I notice you are using Version 1 and i am using Version 2 - will this still work

Also when you hover the mouse over the wind direction charts it still shows two digits

Regards

Graham
There will be identical code in Aurora mk2. The same str_pad() code will work there or anywhere you need to pad zeros or other characters. We only modified the presentation of the data from the weather34API not the actual data itself. The charts use the stored raw data in the various files in the /weather34charts folder.

If you are looking to have the hover-over details in the various charts showing wind direction then you'll need to modify the chart javascript code eg. /weather34charts/todaywinddirectionmodulechart2.php where you'll need to modify the datapoints to use the String.prototype.padStart() javascript function. Read about that here: https://developer.mozilla.org/en-US/doc ... g/padStart

Unfortunately javascript is not my forte and I can't see an easy way to apply this function in the datapoints1.push line of code(around line 80) which is where it needs to go.

Re: Weather34 Aurora Version(english supported only)

Posted: Tue Jan 05, 2021 1:24 pm
by woolfg
Hi Jason

Thanks - it looks like I have a new project for lockdown :) :) :) :)

Regards

Graham

Re: Weather34 Aurora Version(english supported only)

Posted: Tue Jan 05, 2021 1:46 pm
by woolfg
Hi Jason

I cant seem to get the average values to work - I dont think my syntax is correct

echo "<br><div class=tempconverter1><div class=windirectiondata>".echo str_pad($weather["wind_direction_avg"],3,"0",STR_PAD_LEFT),"&deg; &nbsp;<winddirectionvalueword>";

Regards

Graham

Re: Weather34 Aurora Version(english supported only)

Posted: Tue Jan 05, 2021 3:35 pm
by woolfg
Hi Brian

Thanks for the wind update :P :P :P

Regards

Graham

Re: Weather34 Aurora Version(english supported only)

Posted: Tue Jan 05, 2021 3:41 pm
by weatherist34
graham use the simple update for MKII ... Jason its important and smoother going forward to make things universally optional via setup screen where possible, simply build it like screenshot.

charts can be done but beware the scatter position is based on 0-360 whole numbers only is it really worth doing ? do I want to pick up the broken web sites ? NO so please think about universal options

I am all for ideas and will quite happily implement where possible but they need to be implemented optionally not fixed hardcode because every update is going to break your hard work and others too .
atc.png
atc.png (226.8 KiB) Viewed 4824 times

Re: Weather34 Aurora Version(english supported only)

Posted: Tue Jan 05, 2021 4:07 pm
by jasonmfarrow
Brian, universality is always preferred.

It wasn't obvious from your original response to Graham's request as to whether you were going to implement this as an option. Thus I provided the simplest fix for Graham to implement at his leisure and I also warned, as did you, that it's a caveat emptor situation.

Now that you have implemented it there's no need for any user-customisation to the modules.

I agree with you that it's not worth the effort for the chart pop-ups.

Re: Weather34 Aurora Version(english supported only)

Posted: Tue Jan 05, 2021 4:49 pm
by woolfg
Hi Brian

I also agree - dont worry about the charts

Graham

Re: Weather34 Aurora Version(english supported only)

Posted: Tue Jan 05, 2021 5:25 pm
by weatherist34
alexeysailman wrote: Tue Jan 05, 2021 10:36 am Hi, Brian! I also really like MK2. I have accumulated a few comments:
1. Do these colored bars show the difference? And between what and what?
2. When you select the cloud height in meters in the settings, the screen is still displayed in feet.
3. The dimension of atmospheric pressure on the pop-up window (extra button) in hpa, although mmHg is selected.
4. Can make it possible to select the range of atmospheric pressure, when selecting any units of measurement in the settings? In the sense that the user himself sets the minimum and maximum for his area and the visualization of the pressure scale becomes clearer.
Alex have just fixed the cloudbase meters/feet.
answer to question 3 ill look at it tomorrow not using mmHg as anything default these things will happen you will have to tolerate it as you are the only mmHg user im aware of but I will fix things as and when.
sorry I dont have time at present to dive into more options and I will digest your other questions and answer when I have some idea ...

*note there are two important files updated in update file they are updater4.php and updater5.php if you have customized for your own purpose directly these then it will probably break your layout.

Re: Weather34 Aurora Version(english supported only)

Posted: Tue Jan 05, 2021 8:07 pm
by weatherist34
updates / fixes today MKII version

* Align Purple Air in month/year charts (9:02pm).
* Fix mmHg units in almanac ref Alex (9:02pm).
* Fix cloudbase meters or feet ref Alex (6:15pm).
* Important update reorganized charts for year/month (6:08pm).
* updater4.php , updater5.php updated (6:08pm).
* Add ATC format option for direction Ref Graham (4:24pm).
* Removes decimal format for KNOTS Ref Kyle (10:44am).

Re: Weather34 Aurora Version(english supported only)

Posted: Wed Jan 06, 2021 12:10 am
by ConligWX
Hi Brian. Thanks for the hard work! new Aurora template looks great!

Re: Weather34 Aurora Version(english supported only)

Posted: Wed Jan 06, 2021 6:56 am
by weatherist34
good morning simon thank you getting there . i noticed your site always says offline ?

Re: Weather34 Aurora Version(english supported only)

Posted: Wed Jan 06, 2021 10:12 pm
by Taralas
Anyone else getting a display anomaly with the Jan 6th update for MKII?
Post-Jan-6th.png
Post-Jan-6th.png (463.27 KiB) Viewed 4728 times
I included the previous version as well, from December 31st.
Pre-Jan-6th.png
Pre-Jan-6th.png (455.71 KiB) Viewed 4728 times
I am able to revert to the previous version, but I am wondering what is causing the issue.

Thanks in advance.