<%@ LANGUAGE = "JavaScript" EnableSessionState=False %> <% var geabios = Request.Cookies()( "GEABIOS" ); if( geabios == "" ) Response.End(); var sessionFlag = false; var dsn = "GeaBios"; var dbCN, dbRS, ssRS = dsn + "RS", ssCN = dsn + "CN"; var re = new RegExp(); function Beaufort(bf,kmhl,kmhu) { this.bf = bf; this.msl = kmhl / 3.6; this.msu = kmhu / 3.6; } var beaufort = new Array( new Beaufort(0,0,1), new Beaufort(1,1,6), new Beaufort(2,6,12), new Beaufort(3,12,20), new Beaufort(4,20,29), new Beaufort(5,29,39), new Beaufort(6,39,50), new Beaufort(7,50,62), new Beaufort(8,62,75), new Beaufort(9,75,89), new Beaufort(10,89,103), new Beaufort(11,103,118), new Beaufort(12,118,1000) ); function MS2BF( msstr ) { var ms = parseFloat( msstr ); var i; for( i = 0; i < beaufort.length; i++ ) { if( ms >= beaufort[i].msl && ms < beaufort[i].msu ) return "" + beaufort[i].bf; } return "-"; } function interpretacija( tmpstr ) { var rezultat = ""; if( tmpstr.indexOf("pretezno vedro") != -1 ) rezultat += "mainly clear "; else if( tmpstr.indexOf("vedro") != -1) rezultat += "clear "; else if( tmpstr.indexOf("umjereno oblacno") != -1) rezultat += "partly cloudy "; else if( tmpstr.indexOf("pretezno oblacno") != -1) rezultat += "mainly cloudy "; else if( tmpstr.indexOf("potpuno oblacno") != -1) rezultat += "overcast "; if( tmpstr.indexOf("sumaglica") != -1) rezultat += "event: haze "; if( tmpstr.indexOf("magla uz vidljivo nebo") != -1) rezultat += "clouds 0/0
event: fog "; else if( tmpstr.indexOf("magla") != -1) rezultat += "event: fog "; if( tmpstr.indexOf("vjetrovito") != -1) rezultat += "windy "; if( tmpstr.indexOf("jaka kisa") != -1) rezultat += "heavy rain "; if( tmpstr.indexOf("slaba kisa") != -1) rezultat += "light rain "; if( tmpstr.indexOf("grmljavina bez oborina") != -1) rezultat += "thunderstorm, no precipitation "; if( tmpstr.indexOf("jaka grmljavina s oborinom") != -1) rezultat += "heavy thunderstorm, with precipitation "; else if( tmpstr.indexOf("grmljavina s oborinom") != -1) rezultat += "thunderstorm, with precipitation "; return rezultat; } var astroFlag = false; try { if( sessionFlag ) { dbCN = Session( ssCN ); dbRS = Session( ssRS ); } else { dbCN = Server.CreateObject( "ADODB.Connection" ); dbRS = Server.CreateObject( "ADODB.Recordset" ); dbCN.Open( 'DSN=GeaBios;uid=toni;pwd=toni;' ); } Response.ContentType="text/html; charset=UTF-8"; Response.CacheControl="no-cache"; xml = 'GeaBios - Adriatic Sea - Weather Data'; xml += ''; xml += '

Adriatic Sea - Weather Data

The table is sortable, click on description field. At the text that looks like the text in the brackets (Astro Data), you can get additional information about the subject.

'; xml += '

'; xml += '' xml += ''; xml += ''; if( astroFlag ) xml += ''; xml += ''; Response.Write( xml ); if( dbRS.State == adStateOpen ) dbRS.Close(); var sql = "SELECT location, cc, lon, lat, updtime, winddir, windspeed, temperature, seatemperature, presure, presuretrend, humidity, weather FROM vima WHERE lon BETWEEN -10 AND 20 AND lat BETWEEN 10 AND 57 ORDER BY location"; dbRS.Open( sql, dbCN, adOpenStatic, adLockReadOnly, adCmdText ); xml = ''; Response.Write( xml ); while( !(dbRS.EOF) ) { if( dbRS(4).value != null ) { if( (dbRS(1).value == "HR" || dbRS(0).value == 'Piran') ) { xml = ''; var xml = ''; xml += ''; xml += '':' '); xml += '':' '); if( dbRS(9).value != null ) xml += ''; else xml += ''; xml += '':' '); xml += '':' '); var weatherdesc = (( dbRS(12).value != null ) ? dbRS(12).value.replace( re.compile( "&","g"), "&" ):" "); xml += ''; if( astroFlag ) xml += ''; xml += ''; Response.Write( xml ); } } dbRS.MoveNext(); } var dHead = '

Remote sensing is the determination of a quantity by detecting it from a distance. A common application of remote sensing is the use of satellite-borne instruments to determine the location and amount of resources on the surface of the Earth. We are using satellite data to measure temperature of the sea surface in this case.

'; var dTail = '

We are interpreting data from Russian satellite at every crossing (calibrating according surface measurement on certain locations). Missing values (because of cloud cover) are calcualted according to Laplace\'s Equation.

' + '

Laplace\'s equation is a partial differential equation named after its discoverer Pierre-Simon Laplace. Solutions of Laplace\'s equation are important in many fields of science, notably the fields of electromagnetism, astronomy, and fluid dynamics because they describe the behavior of gravitational, electric, and fluid potentials.

' xml = '
Loc.Time CET/CESTTSeaPressureWindHum.DescriptionAstro
" )+'\');return false;">' + dbRS(0).value + '' + dbRS(4).value.replace( re.compile( ":00$","g"), "" ) + ' ' + (( dbRS(7).value != null ) ? dbRS(7).value+'°C' + (( dbRS(8).value != null ) ? dbRS(8).value+'°C' + dbRS(9).value + 'hPa' + dbRS(10).value +' ' + (( dbRS(6).value != null ) ? dbRS(6).value+'m/s(' + MS2BF( dbRS(6).value ) + 'bf) ' + dbRS(5).value + '' + (( dbRS(11).value != null ) ? dbRS(11).value+'%' + interpretacija( weatherdesc ) + ' ' + sunAndMoonLong( parseFloat(dbRS(2).value), parseFloat(dbRS(3).value) ).replace(re.compile("\n","g"), "
" ) + '

Remote Sensing

'+dHead+'
'+dTail+'

Cloud Cover







'; Response.Write( xml ); if( dbRS.State == adStateOpen ) dbRS.Close(); if( !sessionFlag ) { dbRS = null; dbCN.Close(); dbCN = null; } } catch(e){} delete( re ); Response.End(); %>