Web Weather > Weather Web Site Help

Saratgoa template trends - show wind in MPH?

(1/1)

jasonmfarrow:
I've recently started using the Saratoga template and population of data from my Meteobridge is working. By default the incoming wind speed from the Meteobidge is provided in m/s.

I can get wind displayed as MPH on the index.php page by using: 'var useMPH = true;' in ajaxMBwx.js.

I cannot find any such toggle or code that will enable me to display wind as mpH on the wxtrends.php which is driven by MB-trends-inc.php.

Does anyone, who is using Meteobridge with the Saratoga template, have a solution?

saratogaWX:
It's correct that the MBrealtime.txt file used by ajaxMBwx.js JavaScript uses m/s in it's uploaded data, the units used for the site in MBtags.php are solely determined by the entries in Settings.php.

Follow the guide at https://saratoga-weather.org/wxtemplates/setup-Meteobridge.php to generate a template for MBtags.php that uses your chosen units for display by PHP pages (including the wxtrends.php page), and keep the setting in ajaxMBwx.js to force MPH instead of the default for AJAX updates.

jasonmfarrow:
Hi Ken,

I finally understood what was asked. I had to change $uomWind = ' mph'; in gen-MBtags.php to mph and re-load the template in the Meteobidge FTP event for it to pick-up the new settings.

Thank you.

Navigation

[0] Message Index

Go to full version