Web Weather > Weather Website PHP/AJAX scripting
Davis 'Live' Console script
BCJKiwi:
You should be posting on the cumulus Forum.
scudwatcher:
Just installed this script yesterday, and running fine at:
https://csraweather.org/davconvp2CW.php
In the process of changing the button texts and pages. I do have a question though: How do I change the wind units from mph to knots? Thank You in advance
PaulMy:
Brian's Downloads page is here Silver Acorn Weather - Auckland, New Zealand - Scripts
Re the wind units, I use the Cumulus version KomokaWeather and assume it is the same for WD. From Brian's HowTo:
--- Quote ---
1. The units and Units of Measure legend displayed (kph/mph, deg C/F etc) will
match the units set in CumulusMX
--- End quote ---
Enjoy,
Paul
scudwatcher:
My wind units are set for kts in Cumulus1, CumulusMX, WeatherLink.com and Weatherlink LIVE. My Davcon wind units are in mph. I will download and install davcon for Cumulus 1 next week.
the beteljuice:
Your page says you are using WD ?
--- Code: ---<script type="text/javascript">
var wxsoftware = 'WD'
var dataurl = 'clientraw.txt'
...
var uomsys = 'I'
--- End code ---
If that really is the case ....
jquery.davconsoleCW.js says:
// ### WEATHER DISPLAY CLIENTRAW.TXT ##################################
// default configuration is for Metric units.
// Options shown remmed out
// To change to your units to match your station if different, replace unwanted units with wanted units.
--- Code: ---// WIND
// var crwspd = (cr[1] * 1).toFixed(1); // knots (average)
// var crwspd = (cr[1] * 0.5144444).toFixed(2); // knots -> m/s
var crwspd = (uomsys != 'I') ? (cr[1] * 1.852).toFixed(1) : (cr[1] * 1.1507794).toFixed(1); // knots -> km/hr : mph
var crwindu = (uomsys != 'I') ? 'KPH' : 'MPH'; // KPH : MPH
$("#cajaxwind").html( crwspd);
// would become
// WIND
var crwspd = (cr[1] * 1).toFixed(1); // knots (average)
// var crwspd = (cr[1] * 0.5144444).toFixed(2); // knots -> m/s
// var crwspd = (uomsys != 'I') ? (cr[1] * 1.852).toFixed(1) : (cr[1] * 1.1507794).toFixed(1); // knots -> km/hr : mph
// var crwindu = (uomsys != 'I') ? 'KPH' : 'MPH'; // KPH : MPH
var crwindu = 'KT';
$("#cajaxwind").html( crwspd);
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version