VP console with real time update

I have been attempting to make the wind conversion from m/s to km/h, using the conversions from this page:

http://www.4wx.com/wxcalc/formulas/windConversion.php

I have had no success, may I have some help, please?

Try change line 68 in the jquery.console.js file

var crwspd = (cr[1] * 0.514444).toFixed(1);

to

var crwspd = (cr[1] * 1.85325).toFixed(1);

and ā€œm/sā€ to ā€œkm/hā€ in line 91 in the vp_console2.php.

I guess that will do the trick?

Attached is a zip file that contains vp_console2.php and jquery.console.js that contain the changes I made to produce the readings for wind in mph, temp in F, rain in inches, and barometer inHg.

[size=100][color=red][b]ADD: I have replaced the attachment as it contained the wrong formula for the barometer. Anyone who already downloaded the archive please change the forumla for the barometer in the jquery.console.js file to:

var crbaro = (cr[6] * 0.0295317).toFixed(2);

[/b][/color][/size]


Archive.zip (5.88 KB)

Is there a idiots guide I wish to have mph, C. mm and mb?

ā€¦and everybody else in the UK probably :slight_smile: :wink: :roll:

Thanks ocl, thanks Dan :slight_smile: Now, my forecast icon is always stuck on cloudy, and I have no moon icon, how do I get them to display properly?

Is there a idiots guide I wish to have mph, C. mm and mb?
First edit vp_console2.php: line 91 - m/s -> mph line 103 - hPa -> mb mm and C is there already.

1 hPa = 1 mb - so thats ok.
We have to change the windreading to show mph.
Edit line 68 in the jquery.console.js file

var crwspd = (cr[1] * 0.514444).toFixed(1);

to

var crwspd = (cr[1] * 1.15155).toFixed(1);

Many thanks oclā€¦ :slight_smile:

Many thanks all working now

Spoke to soon ok in Firefox but not in IE (http://www.gyweather.com/vp_console2.php) also how to I get the change of colour when it updates.

Thanks in advance

Anybody interested in finishing this? ā†’ http://travelingrvwx.com/vue_console.php

I just donā€™t have much time to devote to the project and it needs a lot more addedā€¦shouldnā€™t be hard, just need timeā€¦

If you also want to show seconds in the clock, change this line of jquery.console.js to this

var cu = cr[29]+':'+cr[30]+':'+cr[31]+'    '+cr[35]+'.'+mo;

Look at my page
Bertil

Can anyone tell me what to do to get graph and wind direction working in IE works ok in firefox.

Thanks

There is one more file in the latest zip, i think. You have to upload that file alsoā€¦
Iā€™m at work so cant tell you the filenameā€¦

Back at home nowā€¦
The missing file in the first zip is called excanvas.pack.js and have to be uploaded to the jquery folder on the server to get the VP console to work in IE.

Hi ocl

I have excanvas.pack.js in the jquery folder but still no graph and wind direction
many thanks for you help

I have excanvas.pack.js in the jquery folder but still no graph and wind direction many thanks for you help

Hi
Iā€™ve looked at your site and both graph and wind direction works in IE 8.
Maybe the problem is some of the security settings in your browser?

Ole-Chr

Yes, same here. Looks good in IE8.

OK guys will look further thanks for your help

How do I include this in the narrow template?

My idea for this was to open it in a new window, (see the attached picture)

But I think NBH (Bertil) have managed to get it into the narrow template, http://www.stenestad-vader.com/wx/wxvpconsole.php

That is his modified version of the script, I donā€™t know if any one have managed to get weatherc script into the narrow template yet.