WXforum.net

Web Weather => Weather Web Site Help => Topic started by: Jester on December 02, 2019, 05:34:48 PM

Title: Saratoga Real time Wind update
Post by: Jester on December 02, 2019, 05:34:48 PM
I can't for the life of me figure out why my wind speed doesn't update near real time on my home page, compass updates fine HTTPS://www.castletonweather.net  I understand about the gust setting and why as Ken explained it, that setting is fine and it should be. Any ideas?
Title: Re: Saratoga Real time Wind update
Post by: saratogaWX on December 02, 2019, 06:48:32 PM
For Meteobridge sites, the upload of conditions (including wind-speed/direction) are done via the conds.php on your website.

I just watched the wind direction icon/value change with several updates while the value for wind-speed remained the same.

The wind speed is updated (in ajaxMBwx.js) by
Code: [Select]
var wind = convertWind(realtime[5]); and direction by
Code: [Select]
var val = windDir(realtime[7]); from the MBrealtime.txt  (fields 6 and 8, starting count at 1).

MBrealtime.txt uses
Quote
5    wspeed   [wind0avgwind-act]
6    wlatest   [wind0wind-act]
7    bearing   [wind0dir-act]
for the wind, so to get the 'instant' wind (instead of the average windspeed), you can change ajaxMBwx.js
Code: [Select]
var wind = convertWind(realtime[5]); to
Code: [Select]
var wind = convertWind(realtime[6]); to get the current (non averaged) windspeed.
Title: Re: Saratoga Real time Wind update
Post by: Jester on December 02, 2019, 07:56:23 PM
For Meteobridge sites, the upload of conditions (including wind-speed/direction) are done via the conds.php on your website.

I just watched the wind direction icon/value change with several updates while the value for wind-speed remained the same.

The wind speed is updated (in ajaxMBwx.js) by
Code: [Select]
var wind = convertWind(realtime[5]); and direction by
Code: [Select]
var val = windDir(realtime[7]); from the MBrealtime.txt  (fields 6 and 8, starting count at 1).

MBrealtime.txt uses
Quote
5    wspeed   [wind0avgwind-act]
6    wlatest   [wind0wind-act]
7    bearing   [wind0dir-act]
for the wind, so to get the 'instant' wind (instead of the average windspeed), you can change ajaxMBwx.js
Code: [Select]
var wind = convertWind(realtime[5]); to
Code: [Select]
var wind = convertWind(realtime[6]); to get the current (non averaged) windspeed.

That did the trick! Thanks for the quick reply Ken! I would have never figured that out. This scripting is all new to me.

R/
William