// Working 7:30 am July 14, 2018 to move weather page to my domain of www.legacyfamilytree.ca/Anderson/weather.html
// due to the demise of Marc Noels fine website at : www.oksailing.com
// The KYCweather.html webbpage file and all 17 Davis .gif files now working through http://www.legacyfamilytree.ca/Anderson/weather.html
//
// Conceived, designed and implemented by James C Anderson of Kelowna BC, Canada, tel 250-763-6012, ja6012@telus.net in 2008 with enhancements continuing in 2016/2017/2019.
// KYC member #225 email=ja6012@telus.net, revision March 22, 2019
// March 27, 2016, modified for by use by KYC, wide screens and the Castanet webcam image or the KYC dock-crane cam.
// Oct 25, 2009, modified code for a separate version for the Central Okanagan Sailing Association (COSA)
// March 11, 2009 disabled slide show until new photos taken.
// Jan 8, 2009, doubled up the display of the rooftop cam during slide show.
// Dec 15, added another slide (webcamf.jpg) Roses Pub
// Dec 14, added a 3 second delay before showing initial live image to allow credits to be seen.
// Dec 13, chose to only show credits at start of slide show.
// Dec 13, streamlined slide show forcing refresh only on live camera.
// Dec 8, added slide show after dark.
// Dec 5, 2008, added seasonal time shifting.
// March 11, 2009 turned off slide show for the summer
// July 15, 2009, added a line to function Live(0) to allow a maintenance image to display if required.
// previous working version was saved as webcam7Dec2008.htm
// get the Universal hour of the day
// var camera =0 //initial setting is for live camera
// var d = new Date();
// var month = d.getUTCMonth();
// var UTCHours = d.getUTCHours();
// var UTCMinutes =d.getUTCMinutes();
//preload specific images below.
//and the other webcams are slides to be displayed during the night.
var myimages=new Array();
//myimages[0]="webcam.jpg"; //COSA roof camera
myimages[0]="http://castanet.net/scenic-web-cams/assets/cameras/scenic5/now.jpg" //Castanet Sails camera
//myimages[0]="http://www.castanet.net/scenic-web-cams/assets/cameras/scenic6/now.jpg" //Castanet Knox Mt camera
myimages[1]="webcamTitle.jpg"; //opening title image
myimages[2]="webcamb.jpg"; //harbour lights
myimages[3]="webcamc.jpg"; //harbour lights
myimages[4]="webcam.jpg"; //rooftop cam at KYC
myimages[5]="webcamd.jpg"; //Rose's pub
myimages[6]="webcame.jpg"; //Fintry Queen
myimages[9]="webcamunavailable.jpg"; //out of service slide
//start of function based on Universal Time to determine available hours with enough light for live camera.
function selectwebcam(){;
// get Universal time
var d = new Date();
var UTCMonth = d.getUTCMonth();
var UTCHours = d.getUTCHours();
var UTCMinutes = d.getUTCMinutes();
//camera =1 ; //set slide show as default
camera =0 ; //disabled slide show until new photos taken.. jca, March 11, 2009
if (UTCMonth ==0 && UTCHours ==15 && UTCMinutes >19) {camera=0}; //go live at 7:20 AM in January
if (UTCMonth ==0 && UTCHours >=16 && UTCHours <=23) {camera=0}; if (UTCMonth ==0 && UTCHours >=0 && UTCHours <2 && UTCMinutes <15) {camera=0}; //extend live camera until 5:15 pm local time in late January if (UTCMonth ==1 && UTCHours ==15 && UTCMinutes >9) {camera=0}; //go live at 7:10 AM in February
if (UTCMonth ==1 && UTCHours >=16 && UTCHours <=23) {camera=0}; if (UTCMonth ==1 && UTCHours >=0 && UTCHours <2 && UTCMinutes <50) {camera=0}; //extend live camera until 5:50 pm local time in February if (UTCMonth ==2 && UTCHours >=14 && UTCHours <=23) {camera=0}; if (UTCMonth ==2 && UTCHours >=0 && UTCHours <4) {camera=0}; //extend live camera until 7 pm local time in March (daylight savings starts) if (UTCMonth ==3 && UTCHours >=13 && UTCHours <=23) {camera=0}; if (UTCMonth ==3 && UTCHours >=0 && UTCHours <4) {camera=0}; if (UTCMonth ==4 && UTCHours >=12 && UTCHours <=23) {camera=0}; if (UTCMonth ==4 && UTCHours >=0 && UTCHours <5 ) {camera=0}; if (UTCMonth ==5 && UTCHours >=11 && UTCHours <=23) {camera=0}; if (UTCMonth ==5 && UTCHours >=0 && UTCHours <5) {camera=0}; if (UTCMonth ==6 && UTCHours >=11 && UTCHours <=23) {camera=0}; if (UTCMonth ==6 && UTCHours >=0 && UTCHours <5 ) {camera=0}; if (UTCMonth ==7 && UTCHours >=12 && UTCHours <=23) {camera=0}; if (UTCMonth ==7 && UTCHours >=0 && UTCHours <4 ) {camera=0}; if (UTCMonth ==8 && UTCHours >=13 && UTCHours <=23) {camera=0}; if (UTCMonth ==8 && UTCHours >=0 && UTCHours <3 ) {camera=0}; if (UTCMonth ==9 && UTCHours >=14 && UTCHours <=23) {camera=0}; if (UTCMonth ==9 && UTCHours >=0 && UTCHours <2 ) {camera=0}; if (UTCMonth ==10 && UTCHours >=15 && UTCHours <=23) {camera=0}; //live camera at 7 am in November if (UTCMonth ==10 && UTCHours >=0 && UTCHours <1 && UTCMinutes <25) {camera=0}; //extend live camera until 4:25 pm local time in November if (UTCMonth ==11 && UTCHours ==15 && UTCMinutes >19) {camera=0}; //go live at 7:20 AMlocal time in December
if (UTCMonth ==11 && UTCHours >=16 && UTCHours <=23) {camera=0}; // stay live until 4 pm if (UTCMonth ==11 && UTCHours >=0 && UTCHours <1 && UTCMinutes <25) {camera=0}; //extend live camera until 4:25 pm local time in December //alert (UTCMonth + ":" + UTCHours +":" + camera) //just for debugging purposes.. } // end of selectwebcam function function Live() { ; var t = 60; // interval in seconds (1 minutes) image = myimages[camera]; //name of the image if (!document.images) return; selectwebcam(); //recheck UTC time for appropriate webcam images //alert ("Live Routine " + "camera " + camera); //code for debugging code // switched off slide show March 11, 2009 for the summer.. jca camera =0; if (camera != 0) {location.reload()}; //time to refesh web page and allow the slideshow tmp = new Date(); tmp = "?"+tmp.getTime() ; //using "?+"tmp ensures that refresh grabs the most recent image. creates unique id for document.images document.images["refresh"].src = myimages[camera]+ tmp; // refresh or replace webcam image 1 on screen //document.images["refresh"].src = myimages[9]; //display webcam unavailable slide setTimeout("Live()", t*1000) ; } function Slideshow(){; var t = 10 ;// interval in seconds image = myimages[slide]; //name of the image if (!document.images) return; selectwebcam(); //recheck UTC time for appropriate webcam images //alert ("Slideshow Routine " + "camera " + camera + ":" + "slide = " +slide); for debugging code if (camera == 0 ) {location.reload()}; // time to start over and go live camera.. if (slide==0 || slide==4) { tmp = new Date() tmp = "?"+tmp.getTime() document.images["refresh"].src = myimages[slide] +tmp} //refresh latest live image during slide show as well else { document.images["refresh"].src = myimages[slide]}; // cycle slide images on screen slide++ if (slide >6) {slide=0};
if (slide == 1) slide++ // skip credits on repeated cycles after initial credit.
setTimeout("Slideshow()", t*1000) ;
}
This current
and trending weather display is provided for the safety of our Okanagan boaters. |
The weather
data is updated from the main dock of the Kelowna Yacht Club. |
Weather graphics
refresh automatically every 5 minutes. |
The webcam image refreshes |
Stay informed of all Okanagan Lake boating/sailing events by simply adding yourself to our email list today. Does your nautical group have an event that could use some promotion ? Then send an email to ja6012@telus.net Your event details will be re-sent to our complete Okanagan Lake email list. The Kelowna waterfront live-images are generously supplied by Castanet |
1 knot of wind speed = 1.852 km/hr = 1.15 mph |
|||
Environment
|
Canada
Lightning Strike Map