Forum GraphWeather

Forum d'aide GraphWeather
Nous sommes actuellement le Sam Avr 27, 2024 8:51 pm

Le fuseau horaire est UTC+1 heure




Publier un nouveau sujet Répondre au sujet  [ 24 message(s) ]  Aller vers la page 1, 2  Suivant
Auteur Message
 Sujet du message:
MessagePublié: Mer Déc 12, 2007 9:52 am 
i am having a problem draewing the wind direction graph, in each graph that is drawed there is only a circle indicating that the wind blew from each direction similarily?(although the measures tell something different)

and if i am trying to update the database via mysqlweather.php nothing happens.
if i truncate the table and run mysqlweather then, everything works fine and is written in the table. i am using the ws3600.
any hints/suggestions?
bye grug


Haut
  
Répondre en citant  
 Sujet du message:
MessagePublié: Mer Déc 12, 2007 12:31 pm 
Hors-ligne
Site Admin
Avatar de l’utilisateur

Inscription : Lun Mars 20, 2006 11:16 am
Message(s) : 3356
Localisation : Montréal
Hi,

Is your MySQL fields are the same as GW PHP requieres ?

Antoine.


Haut
 Profil  
Répondre en citant  
 Sujet du message:
MessagePublié: Mer Déc 12, 2007 2:39 pm 
Hors-ligne
Membre
Avatar de l’utilisateur

Inscription : Mar Août 22, 2006 8:38 am
Message(s) : 3145
Localisation : 34410 Sérignan - Languedoc
Hi Grug,
There should be no limitation on the size of the history.dat file, but it must loaded in the database in the proper record date order, (oldest record first) because there is a checking on the date of the last uploaded record.
If your DB is already populated and you have missing records, i would suggest that you delete all the records. ( delete from ws3600 ) and reload this db.
*You must expect one hour loading for a 2 year history*

I worked on this a fairly long time ago so i don't remember too well the code i wrote, but as far as i remember it was simple.

I have also a small VB prog which loads the same db with a close to synchrone timing. You may try to access my ftp : ftp://meteozoir.-remove this-homeip.net.
If you find any difficulties, let me know by mail, thru this forum.
Rgds

_________________
Jean

Station : VP2 Pro Console Vue + anémomètre à Ultra-sons
Logiciels : Cumulus 1.9.4 + Cumulus2SQL
Serveur local : Apache + MySQL +PHP
PC : W10
Support Audio : FR

http://meteoserignan.ddns.net
Image
"Aide-toi d'abord toi-même et les autres t'aideront ... peut-être"


Dernière édition par jturlier le Mer Déc 12, 2007 2:50 pm, édité 1 fois.

Haut
 Profil  
Répondre en citant  
 Sujet du message:
MessagePublié: Mer Déc 12, 2007 4:30 pm 
Thanks for the fast help.
Right now i I am trying your hint, but it is most likely that you're right because there are already some orphaned datapieces in my history.dat.
i will write right back then and tell you if it worked.
grug


Haut
  
Répondre en citant  
 Sujet du message:
MessagePublié: Mer Déc 12, 2007 6:15 pm 
ok, i have tried it:
i resetted the ws3600, renamed the old history fild and created an new one.
then i uploaded te new history.dat after truncating the table, and everything was writte n into the db.
i then waited for an hour an uploaded a newer history with exactly one enty more (i write them hourly) and it didn't work.
the history.dat is read correctly(e.g. the number of the entries and the date of the first and last entry) but the database wasn't updated.
where could i search the problem, else?
i changed this line
Code :
 $date=date("YmdHi", $timest);            // il faut retransformer le format en recdate

to

Code :
 $date=date("YmdHis", $timest);            // il faut retransformer le format en recdate

because without the seconds appended thne script wouldn't create a proper graph.
could that cause the problem?


Haut
  
Répondre en citant  
 Sujet du message:
MessagePublié: Jeu Déc 13, 2007 4:43 am 
Hors-ligne
Membre
Avatar de l’utilisateur

Inscription : Mar Août 22, 2006 8:38 am
Message(s) : 3145
Localisation : 34410 Sérignan - Languedoc
No that should not be the pb, except if you did not set the proper format for recdate in GraphWeather. %Y%m%d%H%M for the Mysql pluggin.

_________________
Jean

Station : VP2 Pro Console Vue + anémomètre à Ultra-sons
Logiciels : Cumulus 1.9.4 + Cumulus2SQL
Serveur local : Apache + MySQL +PHP
PC : W10
Support Audio : FR

http://meteoserignan.ddns.net
Image
"Aide-toi d'abord toi-même et les autres t'aideront ... peut-être"


Haut
 Profil  
Répondre en citant  
 Sujet du message:
MessagePublié: Jeu Déc 13, 2007 9:26 am 
i think the problem has to be located somewhere in mysqlweather, hasn't it?
Code :
    $buffer=fread ($handle,8); // time stamp is double so read 8 bytes

is there really no problem when io change the timestamp?
in the originalscript de timestamp entries in the db were like
Code :
200709141200 (YYYYMMDDhhmm)

with that the graph.php couldn't draw a graph.
i changed mysqlweather so the timestamp was written in

Code :
20070914120000 (YYYYMMDDhhmmss)

format.

i just don't know where else to search the problem.
grug


Haut
  
Répondre en citant  
 Sujet du message:
MessagePublié: Jeu Déc 13, 2007 9:45 am 
ok, i found out some more:
with some echoes here:
Code :
    $buffer=fread($handle, 8);

                $date=unpack("d",$buffer);
echo $date;echo "|";
                $date=($date[1]-$DELPHI1970)*86400;
            echo $date;echo "|";
                $timest=(($date[1] -$DELPHI1970)*86400); // il faut retransformer le format en recdate
                $date=date("YmdHis", $timest);            // il faut retransformer le format en recdate
echo $date;echo "|";
                $RECORDS_TO_UPDATE++;

i get these interesting dates:
last entry in history.dat: 13/12/07 10:00:00 (correct)
last update of database: 13/12/01 21:45:52 (wrong, month and time are right, but day and year are wrong)
and my selfcreated echoes above say:
Code :
 Array|1197536400|19011213214552

as far as i can see there's something wrong with the date, because a date of 12 of January 1901 can't quite be?
where can i find the error that kills the correct date?


Haut
  
Répondre en citant  
 Sujet du message:
MessagePublié: Jeu Déc 13, 2007 9:46 am 
Hors-ligne
Membre
Avatar de l’utilisateur

Inscription : Mar Août 22, 2006 8:38 am
Message(s) : 3145
Localisation : 34410 Sérignan - Languedoc
Good morning Grug,
Find herebelow a link to jpg showing parameters for ws3600 mysql table.
(provided by M. Valin (Boucher), I don't have a WS3600 station)
http://meteozoir.homeip.net/plugin.jpg
don't forget to set format with %Y%m%d%H%M

_________________
Jean

Station : VP2 Pro Console Vue + anémomètre à Ultra-sons
Logiciels : Cumulus 1.9.4 + Cumulus2SQL
Serveur local : Apache + MySQL +PHP
PC : W10
Support Audio : FR

http://meteoserignan.ddns.net
Image
"Aide-toi d'abord toi-même et les autres t'aideront ... peut-être"


Haut
 Profil  
Répondre en citant  
 Sujet du message:
MessagePublié: Jeu Déc 13, 2007 10:42 am 
Hors-ligne
Membre
Avatar de l’utilisateur

Inscription : Mar Août 22, 2006 8:38 am
Message(s) : 3145
Localisation : 34410 Sérignan - Languedoc
Grug,
Mysqlweather.php just loads the mysql table from history.dat to ws3600 table.
Data in mysql ws3600 table have a recdate (not a timestamp) formated YYYYMMDDHHmm. No seconds are recorded. When using the proper GraphWeather date format, there should be no pb drawing graph in the standard graphweather application.

This table is not supposed to be processed with graphweather.php which has hard coded timestamp format.

That means that if you whish use the php application, you will have to modify the output recdate format in mysqlweather.php.

Date of january 1901 means that date extracted from yr history.dat file is wrong.
You may have ONE missing bit in yr file.

I suggest you use the readhh exec to visualize this file available at :
ftp://meteozoir.homeip.net It should work today (I got a 12 hour ADSL down time yesterday)

_________________
Jean

Station : VP2 Pro Console Vue + anémomètre à Ultra-sons
Logiciels : Cumulus 1.9.4 + Cumulus2SQL
Serveur local : Apache + MySQL +PHP
PC : W10
Support Audio : FR

http://meteoserignan.ddns.net
Image
"Aide-toi d'abord toi-même et les autres t'aideront ... peut-être"


Dernière édition par jturlier le Jeu Déc 13, 2007 10:43 am, édité 1 fois.

Haut
 Profil  
Répondre en citant  
 Sujet du message:
MessagePublié: Jeu Déc 13, 2007 11:11 am 
perhaps we are talking at cross-purposes?
to avoid misunderstandinsg i tell you what i exactly want to do:
i am using the heavyweather-software to create my history.dat
i transfer that file via ftp to my webspace.
i want to write the data from history.dat into my sql-database using mysqlweather.php
then i want to create the graphs using graphweather.php and graph.php

ok, so far.
things that work:
(uploading the history.dat)
filling the empty sql-table
updating the table (although there are two problems: every row but the first one seems to be updated each time i run the script and the time is one hour differnet from my real time (gmt+1)
the graphs are plot nice, everythiung works here(despite the prevailling wind problem mentioned above).
i shall be happy with that if i get the gmt+1 problem done, and, probably find the script error that always fills the database from scratch except the first row.

but basically it works, so don't bother to find a solution, ylou helped me a lot anyway(although solutions are always welcome;-))

Grug


Haut
  
Répondre en citant  
 Sujet du message:
MessagePublié: Jeu Déc 13, 2007 11:35 am 
Hors-ligne
Membre
Avatar de l’utilisateur

Inscription : Mar Août 22, 2006 8:38 am
Message(s) : 3145
Localisation : 34410 Sérignan - Languedoc
Did you checked in mysql pluggin page "la date inclut le changement d'heure" which means "daylite saving time" on or off ?

_________________
Jean

Station : VP2 Pro Console Vue + anémomètre à Ultra-sons
Logiciels : Cumulus 1.9.4 + Cumulus2SQL
Serveur local : Apache + MySQL +PHP
PC : W10
Support Audio : FR

http://meteoserignan.ddns.net
Image
"Aide-toi d'abord toi-même et les autres t'aideront ... peut-être"


Haut
 Profil  
Répondre en citant  
 Sujet du message:
MessagePublié: Jeu Déc 13, 2007 11:41 am 
i am not using the program itself, but only running the mysqlweather script on my webspace. therefore i can't use that field.
i simply added a correction (-3600) to each function that handles the time and this works.(still the table is always completely updated)


Haut
  
Répondre en citant  
 Sujet du message:
MessagePublié: Jeu Déc 13, 2007 11:50 am 
Hors-ligne
Membre
Avatar de l’utilisateur

Inscription : Mar Août 22, 2006 8:38 am
Message(s) : 3145
Localisation : 34410 Sérignan - Languedoc
Ok I misread the fact that the date pb is in what is recorded in the table.
There is no time-correction between history.dat and the table maybe heavyweather writes using GMT.
You may apply yr correction on line 120
$timest=(($date[1] -$DELPHI1970)*86400);
by adding the number of seconds representing your time difference.
There is no reload of the table each time the srcipt runs, but it has to read each time the entire file from the beginning because file is sequential and i dont think that a solution exists to read a file from its end.

_________________
Jean

Station : VP2 Pro Console Vue + anémomètre à Ultra-sons
Logiciels : Cumulus 1.9.4 + Cumulus2SQL
Serveur local : Apache + MySQL +PHP
PC : W10
Support Audio : FR

http://meteoserignan.ddns.net
Image
"Aide-toi d'abord toi-même et les autres t'aideront ... peut-être"


Haut
 Profil  
Répondre en citant  
 Sujet du message:
MessagePublié: Jeu Déc 13, 2007 12:21 pm 
ok, thank you so much, i will be running everything as is and look if it wokrs with larger files too.
grug


Haut
  
Répondre en citant  
Afficher les messages publiés depuis :  Trier par  
Publier un nouveau sujet Répondre au sujet  [ 24 message(s) ]  Aller vers la page 1, 2  Suivant

Le fuseau horaire est UTC+1 heure


Qui est en ligne ?

Utilisateur(s) parcourant ce forum : Aucun utilisateur inscrit et 24 invité(s)


Vous ne pouvez pas publier de nouveaux sujets dans ce forum
Vous ne pouvez pas répondre aux sujets dans ce forum
Vous ne pouvez pas éditer vos messages dans ce forum
Vous ne pouvez pas supprimer vos messages dans ce forum
Vous ne pouvez pas insérer de pièces jointes dans ce forum

Recherche de:
Aller vers :  
POWERED_BY
Traduction et support en françaisHébergement de site