Re: 'Bug' with weather icons (images.inc)
Brought to you by:
iridium
|
From: Ray v. B. <r_v...@ho...> - 2002-03-12 20:26:21
|
Hi Kevin,
>Using the following METAR:
>
>KMTO 112053Z AUTO 18009KT 10SM OVC090 06/M04 A3007 RMK AO2 SLP190 T00561039
>56031
>
>the images.inc (get_sky_image) function returns the 0cloud.gif image
>instead
>of the 4cloud_norain.gif image. The cloud_layer1_condition is 'overcast'
>(OVC), and the weather is null.
Hmmmm, I glued your metar in my own script (down below) and it shows ok
(overcast). Maybe I did something wrong with scope of variables, more than
one include files or something in that direction....
>I will dig through to code a bit more later on.
Good idea, I'm sorry I can't help from here right now. Please let us know
what you find (either good or bad).
>I'm glad someone else write it, though! :)
No problem, let me know when it's operational (and the URL).
>Thanks!
Thank you!
Ray
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body topmargin="4">
<?php
include('./locale_en.inc');
include('./images.inc');
include('./phpweather.inc');
//$metar = get_metar('EHEH');
$metar = 'KMTO 112053Z AUTO 18009KT 10SM OVC090 06/M04 A3007 RMK AO2 SLP190
T00561039 56031';
$decoded_metar = process_metar($metar);
?>
<table class=weather bgcolor="#FEF9B8" cellpadding=4 cellspacing=0
width=100%>
<tr valign=top>
<td>
<table class=weather cellpadding=2 cellspacing=0 width=120>
<tr bgcolor="#C4BF06">
<td colspan=3 ><b>Temperatuur:</b></td>
</tr>
<tr height=1px bgcolor="#FEF9B8"></tr>
<tr height=59 valign=top bgcolor="#C4BF06">
<td> </td>
<td><? printf("%4.1f",$decoded_metar['temp_c']) ?> °C</td>
<td><img src="<? get_temp_image($decoded_metar) ?>" height="50"
width="20" border=1></td>
</tr>
</table>
</td>
<td>
<table class=weather cellpadding=2 cellspacing=0 width=120>
<tr bgcolor="#C4BF06">
<td colspan=3><b>Wind:</b></td>
</tr>
<tr height=1px bgcolor="#FEF9B8"></tr>
<tr height=59 valign=top bgcolor="#C4BF06">
<td> </td>
<td>
<? printf(get_beaufort()) ?> Bft, <?
printf($decoded_metar['wind_dir_text_short']) ?><br>
<?
printf("%3.1f",$decoded_metar['wind_meters_per_second']) ?> m/s<br>
<?
printf("%3.1f",$decoded_metar['wind_meters_per_second']*3600/1000) ?> km/h
</td>
<td>
<img src="<? get_winddir_image($decoded_metar) ?>" height="40"
width="40" border=1>
</td>
</tr>
</table>
</td>
<td>
<table class=weather cellpadding=2 cellspacing=0 width=120>
<tr bgcolor="#C4BF06">
<td colspan=3><b>Bewolking:</b></td>
</tr>
<tr height=1px bgcolor="#FEF9B8"></tr>
<tr height=59 valign=top bgcolor="#C4BF06">
<td> </td>
<td colspan=2>
<img src="<? get_sky_image($decoded_metar) ?>" height="50" width="80"
border=1>
</td>
</tr>
</table>
</td>
<td width=100%>
</td>
</tr>
</table>
</body>
</html>
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
|