Page 1 sur 1

StatIC

Posté : 15 déc. 2011, 10:14
par Gagcbr
Bonjour à tous

certains d'entre vous font certainement partie du réseau StatIC d'Infoclimat.
J'ai fait la demande d'adhésion en précisant que j'utilisais Wswin en direct.
Est ce qu'ils fournissent le fichier custom ou est ce que c'est à moi de le créer?

Re: StatIC

Posté : 15 déc. 2011, 20:30
par webmaster
Bonsoir,
Ne t’inquiète pas, ils vont te le fournir !
Il existe deux versions, une qui génère un fichier TXT et l'autre un fichier PHP.

Re: StatIC

Posté : 15 déc. 2011, 20:39
par Tudgur
Bonsoir,

Infoclimat ne fournit pas de custom pour StatIC.
Pour je ne sais quelle raison (peut-être parce qu'ils ne maitrisent pas du tout ce logiciel), il ne fournissent qu'un template pour weatherlink.
Cependant, certains utilisent un mix de weatherlink et wswin pour les rafales...
Perso, c'est un fichier Php qu'ils viennent "chercher" sur mon site, mais avec un problème d'heure UTC qu'ils n'ont pas su gérer...

Re: StatIC

Posté : 15 déc. 2011, 22:52
par webmaster
Tudgur a écrit : Infoclimat ne fournit pas de custom pour StatIC.
Ne fournit plus alors, car je peux t'assurer qu'il m'avait été fourni !
Je me souviens y avoir apporté des corrections avant de l'avoir renvoyé à l’expéditeur.
Il y a avait même un fichier Word également en pièce jointe avec les différentes procédures suivant le type de fichier choisi.
Je ne l'ai pas sur ce PC, mais si je l'ai gardé je vous le mettrais à disposition ce week-end.

Code : Tout sélectionner

<!-- %customfile=statIC.php% -->   
<!-- StatIC 1.55 13.08.08 -->
<html>
<body>
%unit_off%
%curminmaxhour_on%
<b>%ws_location%</b> %ws_year%-%ws_month2%-%ws_day2% %ws_hour2%:%ws_minute2%<br> <br>   
<b>tmp;pressure;Hum;dew point;actual wind;wind direction;wind gust 10m;wind gust 1h;rain day;max rain rate/1h;rainrate</b><br>
%curval[2]%;
%curval[33]%;
%curval[18]%;
%curval[43]%;
%curval[35]%;
%curval[36]%;

<?php 
$liste ="%ws_arraygust[5]% "; # 10/step WsWin
$tableau = explode(" ", $liste); 
for($i=0;$i<5;$i=$i+1){ 
$tableau[$i]=0.0; 
} 
rsort($tableau); 
$max= $tableau[0] * 1.852; 
$max= round($max*10) / 10; 
echo "$max;"; 
?>

%curminmaxhour[2,1,45]%; 
%rain24h%;
%ws_setmem[1]=%curminmaxhour[2,1,34]%%
%ws_calc1[*]=%ws_calc[/]=60~2~2%~%ws_getmem[1]%~1%;
%rainrate%<br>
<br>
%unit_on%


<?php
$timeutc=date('Z');
$utc=$timeutc / 3600;
$fichier="yesterday.txt"; // Fichier Template WsWin Yesterday
$fp = fopen ("$fichier",'r');
$content = fread ($fp,filesize($fichier));
$fichier=explode("-------------------------------------------------------------------------------------------" , $content);
$tabfich=explode("
", $fichier[1]);
$b= count($tabfich)-1;
$tempmax0y=-30.0;
$tempmin0y=50.0;
$tempmin66=50.0;
$tempmax66=-30.0;
$tempmax186=-30.0;
$tempmin186=50.0;
$tempmax618=-30.0;
$tempmin618=50.0;
$p0y=0.0;
$p0d=0.0;
$p66=0.0;
$p186=0.0;
$p618=0.0;

for ($i=1;$i<$b;$i++) {
$ligne=explode(";" ,$tabfich[$i]);
$heur=explode(":" ,$ligne[0]);
$heure=$heur[0];
$time=$ligne[0];
$temp=$ligne[1];
$pluie=$ligne[2];

//min max hier entre 0h et 0h
if ($temp > $tempmax0y) {$tempmax0y=$temp;}
if ($temp < $tempmin0y) {$tempmin0y=$temp;}
$p0y=$p0y+$pluie;

//min max hier aprs 6h
if ($heure >= (6+$utc)) {
	if ($temp > $tempmax66) {$tempmax66=$temp;}
	if ($temp < $tempmin66) {$tempmin66=$temp;}
$p66=$p66+$pluie;
		 }

//min max hier aprs 18h
if ($heure >= (18+$utc)) {
	if ($temp > $tempmax186) {$tempmax186=$temp;}
	if ($temp < $tempmin186) {$tempmin186=$temp;}
$p186=$p186+$pluie;
		 }
}

$fichier="day.txt"; // Fichier Template WsWin Day
$fp = fopen ("$fichier",'r');
$content = fread ($fp,filesize($fichier));
$fichier=explode("-------------------------------------------------------------------------------------------" , $content);
$tabfich=explode("
", $fichier[1]);
$b= count($tabfich)-1;
$tempmin0d= 50;
$tempmax0d=-30;

for ($i=1;$i<$b;$i++) {
$ligne=explode(";" ,$tabfich[$i]);
$heur=explode(":" ,$ligne[0]);
$heure=$heur[0];

$time=$ligne[0];
$temp=$ligne[1];
$pluie=$ligne[2];
//min max aujourd'hui entre 0h et 0h
if ($temp > $tempmax0d) {$tempmax0d=$temp;}
if ($temp < $tempmin0d) {$tempmin0d=$temp;}
$p0d=$p0d+$pluie;

//min max aujourd'hui avant 6h
if ($heure < (6+$utc)) {
	if ($temp > $tempmax66) {$tempmax66=$temp;}
	if ($temp < $tempmin66) {$tempmin66=$temp;}
	if ($temp > $tempmax186) {$tempmax186=$temp;}
	if ($temp < $tempmin186) {$tempmin186=$temp;}
$p186=$p186+$pluie;
$p66=$p66+$pluie;
		 }


//min max aujourd'hui entre 6h et 18h
if (($heure < (18+$utc))&&($heure >= (6+$utc))) {
	if ($temp > $tempmax618) {$tempmax618=$temp;}
	if ($temp < $tempmin618) {$tempmin618=$temp;}
$p618=$p618+$pluie;
		 }
}

echo"
06h  06h UTC:$tempmin66;$tempmax66;$p66<br>
18h  06h UTC:$tempmin186;$tempmax186;$p186<br>
06h  18h UTC:$tempmin618;$tempmax618;$p618<br>
0h  0h UTC:$tempmin0y;$tempmax0y;$p0y<br>";
?>

%curminmaxhour_off%
</body>
</html>

Re: StatIC

Posté : 16 déc. 2011, 08:54
par Tudgur
Bonjour,

C'est assez étrange...
Seb, d'Infoclimat, voulait mon custom de wswin pour le "distribuer" mais étant donné que le problème d'heure UTC n'a jamais été réglé, je ne l'ai pas donné.
Ludovic leur avait aussi posté des corrections qui n'ont jamais été apportées...

Re: StatIC

Posté : 16 déc. 2011, 09:02
par Gagcbr
c'est bon je fais partie du réseau
ils m'ont tout fourni juste à l'insérer au milieu de mes customs
a+

Re: StatIC

Posté : 16 déc. 2011, 11:32
par Tudgur
Gagcbr a écrit :ils m'ont tout fourni juste à l'insérer au milieu de mes customs
Ben ça alors !
Pourrais-tu coller le code ici, s'il te plait ?

Re: StatIC

Posté : 03 janv. 2012, 21:55
par Gagcbr

Code : Tout sélectionner

1.1.1	fichier StatIC.txt sans PHP
<!-- %customfile=statIC.html% -->   
<!-- StatIC 1.4 16.08.08 -->
<html>
<body>
%unit_off%
%curminmaxhour_on%
<b>%ws_location%</b>
 %ws_year%-%ws_month2%-%ws_day2% %ws_hour2%:%ws_minute2%<br> <br>   
<b>tmp;pressure;Hum;dew point;actual wind;wind direction;wind gust 1h;rain day;max rain rate/1h;rainrate</b><br>
%curval[2]%;
%curval[33]%;
%curval[18]%;
%curval[43]%;
%curval[35]%;
%curval[36]%;
%curminmaxhour[2,1,45]%; 
%rain24h%;
%ws_setmem[1]=%curminmaxhour[2,1,34]%%
%ws_calc1[*]=%ws_calc[/]=60~2~2%~%ws_getmem[1]%~1%;
%rainrate%
<br>
%unit_on%
%curminmaxhour_off%
</body>
</html>

Re: StatIC

Posté : 03 janv. 2012, 22:03
par Gagcbr
Il y a une chose qui me chiffonne quand même...le %rainrate% de la dernière ligne
par exemple, ce soir il y a eu un bon passage pluvieux, 8mm
le max rain rate/1h a été de 6mm
alors que le rainrate de maxi 4mm aux envois du fichier static...
Jusque là, ok, l'intensité n'a pas été assez forte (il faut une intensité de 5 mm au moment de l'envoi du fichier si je ne me trompe pas)

Mais quand je regarde les station statIC des alentours : Fillé, St Aaron, laillé, Trelly
malgré de faibles intensités pluvio, ils obtiennent quand même un picto sur la carte météo alerte.
ex : station de Trelly (50) : picto avec intensité de 1.2mm --> http://www.infoclimat.fr/tableaux-stati ... 000C1.html

quels sont ceux d'entre vous qui ont la même config que moi : VP2 + WSWIN sans surveillance + static.txt (identique au message au dessus)?

a+

Re: StatIC

Posté : 10 avr. 2012, 10:57
par Gagcbr
Bonjour

N'ayant pas de réponses, je me permet de faire un petit up

Si certains d'entre vous ont la même config pour éclairer mes lanternes

cordialement

Re: StatIC

Posté : 10 avr. 2012, 17:00
par deule-climat
Bonjour,

Je ne peux pas t'aider, malheureusement. Par contre, tu peux poster ta question sur le forum d'Infoclimat.
Tu auras plus de chance d'avoir une réponse.

Re: StatIC

Posté : 11 avr. 2012, 17:33
par Gagcbr
ok merci