The "missing" year 2024 in the Weather 34 template

All about the standard Meteobridge devices based on mobile routers from TP-Link, D-Link, ASUS

Moderator: Mattk

weatherist34
Platinum Boarder
Platinum Boarder
Posts: 1693
Joined: Tue Mar 28, 2017 6:57 am

Re: The "missing" year 2024 in the Weather 34 template

Post by weatherist34 »

ToTo wrote: Fri Jan 03, 2025 11:17 am Local Airport no longer works or remains without output, I have not yet found out why.
Hello Toto the checkwx API output is short so do this

goto edit file metar34get.php

find the two lines

$metar34vismiles = number_format($metar34visibility*0.000621371,1) ;
$metar34viskm = number_format($metar34visibility*0.001,1) ;

and basically do this put two // at beggining of each line so it ends up like this

// $metar34vismiles = number_format($metar34visibility*0.000621371,1) ;
// $metar34viskm = number_format($metar34visibility*0.001,1) ;

screenshot of code in file
metarfiledit.png
metarfiledit.png (201.39 KiB) Viewed 2694 times


ends up like this :-) edit the file on Paul Wilmans site https://www.paulwilman.com/pw/weather34 ... yout-3.php

pwmetar.png
pwmetar.png (238.34 KiB) Viewed 2694 times

i will look into it further to see if its a permanent solution which is quick and remove the visibility string in the display.

edit: found it the API string change in Visibility from numerical to text , so used the float string in the output and converted the miles to km where required..

see Paul wilmans site should be showing ok now with visibility..brian



have a nice evening..brian
User avatar
jasonmfarrow
Gold Boarder
Gold Boarder
Posts: 249
Joined: Mon May 25, 2020 4:21 pm
Contact:

Re: The "missing" year 2024 in the Weather 34 template

Post by jasonmfarrow »

The API has "meters_float" for the visibility:

Code: Select all

{"results":1,"data":[{"icao":"EGVO","barometer":{"hg":30.21,"hpa":1023.0,"kpa":102.3,"mb":1023.03},"clouds":[{"code":"CLR","text":"Clear skies"}],"dewpoint":{"celsius":-1,"fahrenheit":30},"elevation":{"feet":387.0,"meters":118.0},"flight_category":"VFR","humidity":{"percent":81},"observed":"2025-01-03T16:20:00","station":{"geometry":{"coordinates":[-0.942825,51.2341],"type":"Point"},"location":"Hart, England, United Kingdom","name":"RAF Odiham","type":"Airport"},"temperature":{"celsius":2,"fahrenheit":36},"raw_text":"EGVO 031620Z AUTO 24006KT 9999 NCD 02/M01 Q1023","visibility":{"miles":"Greater than 10","miles_float":10.0,"meters":"Greater than 10,000","meters_float":9999.0},"wind":{"degrees":240,"speed_kph":11,"speed_kts":6,"speed_mph":7,"speed_mps":3}}]}
If the METAR visibility value (9999 in the case of good visibility, beyond 9999m no one in aviation cares) is desired then this line of code (line 41 in metar34get.php) needs to be changed:
from

Code: Select all

$metar34visibility        = $parsed_json->{'data'}[0]->{'visibility'}->{'meters'};
to

Code: Select all

$metar34visibility        = $parsed_json->{'data'}[0]->{'visibility'}->{'meters_float'};
Which fixes it without commenting out the two lines which I know Brian has suggested as a temporary bypass.
Regards
Jason
https://jmfweather.uk | @jasonmfarrow
ToTo
Gold Boarder
Gold Boarder
Posts: 243
Joined: Wed Apr 03, 2019 9:24 am
Location: Magdeburg, Germany
Contact:

Re: The "missing" year 2024 in the Weather 34 template

Post by ToTo »

Thanks worked :wink:
weatherist34
Platinum Boarder
Platinum Boarder
Posts: 1693
Joined: Tue Mar 28, 2017 6:57 am

Re: The "missing" year 2024 in the Weather 34 template

Post by weatherist34 »

alexeysailman wrote: Fri Jan 03, 2025 9:57 am I don't know if you'll like my idea of charts for the year. Each time we are talking about editing a bunch of files with reference to a specific year, the release of updates... You mentioned the "automated solution for the new year showing the charts of the previous year." Can Aurora Mateo bridge setup screen implement this mechanism in a "manual version"? Eg: do you specify the path to the almanac storage folder, and then, when opening the annual charts screen, simply select the desired year from the drop-down list, which was manually added in the settings? The number of added years is unlimited and depends only on the number of files. My poor PHP skills may not allow me to express my thoughts more concretely.
good morning Alex

your idea is good unfortunately I have gone down a different route to just simplify it for future change of year (Janury 1ST). I have set it up to run until end of 2027 without the need of modifying files each end of year so its all automated or normal until end of 2027 if time permits i will add more code to run until end of 2030 think thats sufficient and doesn't require any end user of writing code which always adds a risk for those not familiar with PHP etc fine if you are but not everyone is familiar. please don't be offended just I have compiled the method before your idea sprang up so not really keen on starting again BUT I DO APPRECIATE YOUR INPUT so thank you for the idea.

Please note the next simple update end of January contains other minor changes (mostly to comply with PHP 8.5)

New Features in PHP 8.5

Curl: New curl_multi_get_handles function (*significant for aurora template)
New PHP_BUILD_DATE constant



reference metar its a simple change and implemented at https://www.paulwilman.com/pw/weather34 ... yout-3.php nothing significant or complex .again this will come in the end of month simple update.


so hopefully i can get all the charts for years all running up till 2030 I'm at 2027 now so a couple of more hours in front of computer and all will be done.

please note I've spent more time on template or computer in the last week than i probably did for the whole of last year so as you can see I'm no so active these days think my approach these days if ain't broke don't fix it or no news is good news.


for reference metar screen nothing significant..have a good day..brian


Screenshot at Jan 04 10-15-23.png
Screenshot at Jan 04 10-15-23.png (215.55 KiB) Viewed 2645 times
lorenz1982
Expert Boarder
Expert Boarder
Posts: 136
Joined: Thu Apr 24, 2014 2:34 pm
Location: Trento / Trient - Northern Italy
Contact:

Re: The "missing" year 2024 in the Weather 34 template

Post by lorenz1982 »

weatherist34 wrote: Wed Jan 01, 2025 8:19 pm Simple Update December 2024 download link

https://www.mediafire.com/file/qtdd4sd8 ... e.zip/file

1.2024 charts
2.minor PHP changes
3.preparation for automated solution to new year showing previous year charts (will complete by end of January).
4.this update will appear in due course through meteobridge admin panel along with a updated Master version.

ps Paul Wilman I updated your site :-)
https://www.paulwilman.com/pw/consolecharts.php


brian


Screenshot at Jan 01 21-20-43.png


Screenshot at Jan 01 20-19-02.png

Screenshot at Jan 01 21-19-20.png
Good morning. Sorry but I only saw the update today but the link doesn't work anymore.
Thanks.
weatherist34
Platinum Boarder
Platinum Boarder
Posts: 1693
Joined: Tue Mar 28, 2017 6:57 am

Re: The "missing" year 2024 in the Weather 34 template

Post by weatherist34 »

lorenz1982 wrote: Thu Jan 09, 2025 10:55 am
weatherist34 wrote: Wed Jan 01, 2025 8:19 pm Simple Update December 2024 download link

https://www.mediafire.com/file/qtdd4sd8 ... e.zip/file

1.2024 charts
2.minor PHP changes
3.preparation for automated solution to new year showing previous year charts (will complete by end of January).
4.this update will appear in due course through meteobridge admin panel along with a updated Master version.

ps Paul Wilman I updated your site :-)
https://www.paulwilman.com/pw/consolecharts.php


brian


Screenshot at Jan 01 21-20-43.png


Screenshot at Jan 01 20-19-02.png

Screenshot at Jan 01 21-19-20.png
Good morning. Sorry but I only saw the update today but the link doesn't work anymore.
Thanks.
see viewtopic.php?t=18537

brian
Post Reply