Author Topic: Saratoga Real time Wind update  (Read 151 times)

0 Members and 1 Guest are viewing this topic.

Offline Jester

  • Pony Up!
  • Contributor
  • ***
  • Posts: 135
  • US NAVY Retired
    • Castleton Weather, Virginia Beach, VA.
Saratoga Real time Wind update
« 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 http://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?
MADIS D4557
CWOP DW4557
Wunderground KVAVIRGI57
CoCoRaHS VA-VBC-13
WeatherBug p09270
Davis VP2+ 6163 VWS 15.0


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 7518
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga Real time Wind update
« Reply #1 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.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Jester

  • Pony Up!
  • Contributor
  • ***
  • Posts: 135
  • US NAVY Retired
    • Castleton Weather, Virginia Beach, VA.
Re: Saratoga Real time Wind update
« Reply #2 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
MADIS D4557
CWOP DW4557
Wunderground KVAVIRGI57
CoCoRaHS VA-VBC-13
WeatherBug p09270
Davis VP2+ 6163 VWS 15.0