• Welcome to TodayPlus Boards v2.
 

Downloading Radar Imagery

Started by Wichtel, September 23, 2004, 04:16:22 PM

Previous topic - Next topic

Rotlaus

Quote from: BroeselIs it possible, to get a version from radar.exe, that runs under ppc2002 ?

I've tried to put the Preprocessor setings for PPC2002, the result is in the Attachement. It works on my WM2003 PPC, you have to try if it works under PPC2002 too.


Greetings,

Andre

Broesel

Thanks Andre, :-)

cannot test it right now, but will give it a try in the evening and post
the result here ....

Broesel

uk_skinner

I am trying to find a way to download weather image saved in dynamic name or folder.  For example, the radar image from http://www.wetteronline.de.  Could Wichtel or anyone from Germany can help me figure out how do they post their updated radar image?  I know they have image every 15 minutes.  Assume, right now, the time is 13:25, the radar image of 13:15 will be posted.  Am I right?  Also I notice the file name of image looks like 2 hour behind your time.  Here is the example, the url for 13:15 is http://www.wetteronline.de/daten/radar/dwdd/2004/09/281115.gif. Any idea?  Thanks a lot.

Rotlaus

Quote from: uk_skinnerAlso I notice the file name of image looks like 2 hour behind your time.  Here is the example, the url for 13:15 is http://www.wetteronline.de/daten/radar/dwdd/2004/09/281115.gif. Any idea?  Thanks a lot.

I think this is cause the times on the webpage are GMT-times. Here in Germany we are normally GMT+1, in the summer (DST) we are GMT+2.

Hope that helps.

Greetings,

Andre

uk_skinner

Quote from: Rotlaus

I think this is cause the times on the webpage are GMT-times. Here in Germany we are normally GMT+1, in the summer (DST) we are GMT+2.

Hope that helps.

Greetings,

Andre

Andre:

       Thanks. got it.

        While you are here....  I figured out how to get time and date string from the systemtime (UTC) and localtime.  What I don't know is how to write "if else" to convert minute to close "quarter minutes.  For example, if the minute from the systemtime is 09, I would like to use something like this.

if 0 <= minute < 15
  qmin = "15"
else

What is the right codes to do this "if else"?  I know this is a basic question, sorry to take your time... :oops:

Broesel

Quote from: Rotlaus
I think this is cause the times on the webpage are GMT-times. Here in Germany we are normally GMT+1, in the summer (DST) we are GMT+2.

Yes, that seem to be right. The pic should update every 15 Minutes.
But now (13:48 German Time) the pic for 11:45 is not available yet. So
you have to get the pic from 11:30 --> http://www.wetteronline.de/daten/radar/dwdd/2004/09/281130.gif

Greetings Broesel

Edit: At 13:52 the pic for 11:45 was available. (But you should think of,
when summertime is set back 1 hour the german time is gmt +1 again.)

uk_skinner

Quote from: Broesel

Yes, that seem to be right. The pic should update every 15 Minutes.
But now (13:48 German Time) the pic for 11:45 is not available yet. So
you have to get the pic from 11:30 --> http://www.wetteronline.de/daten/radar/dwdd/2004/09/281130.gif

Greetings Broesel

Edit: At 13:52 the pic for 11:45 was available. (But you should think of,
when summertime is set back 1 hour the german time is gmt +1 again.)

Thanks, Broesel.

So, if minute

0 - 15 :  The image will be hour-1 :45
15 - 30: The image will be hour:00
30 - 45: The image will be hour:15
45 - 59: The image will be hour:30

Am I right?  Thanks.

Edit:  Just saw your edit.  So, I think there is probably a way let program to download the latest updated image.

Broesel

Quote from: uk_skinner

So, if minute

0 - 15 :  The image will be hour-1 :45
15 - 30: The image will be hour:00
30 - 45: The image will be hour:15
45 - 59: The image will be hour:30

Am I right?  Thanks.

Yes, I think, that could work ... (and you are max. 15 minutes back)

Broesel

Rotlaus

Quote from: Broesel
Edit: At 13:52 the pic for 11:45 was available. (But you should think of,
when summertime is set back 1 hour the german time is gmt +1 again.)

@uk_skinner You can use the function GetTimeZoneInformation to get the offset from GMT.

Standard if statement in c:


if(( minute>= 0 ) &&  ( minute<=15 )){
  // do your math
}else{
  if(( minute> 15 ) &&  ( minute<=30 )){
     //do your math
  }else{
     // here the next comparison, and so on...

  }

}



Andre

uk_skinner

Quote from: Rotlaus
Quote from: Broesel
Edit: At 13:52 the pic for 11:45 was available. (But you should think of,
when summertime is set back 1 hour the german time is gmt +1 again.)

@uk_skinner You can use the function GetTimeZoneInformation to get the offset from GMT.

Standard if statement in c:


if(( minute>= 0 ) &&  ( minute<=15 )){
  // do your math
}else{
  if(( minute> 15 ) &&  ( minute<=30 )){
     //do your math
  }else{
     // here the next comparison, and so on...

  }

}



Andre

Thanks, Andre, yes, I will do my math.... :wink:

Broesel

Quote from: Rotlaus
I've tried to put the Preprocessor setings for PPC2002, the result is in the Attachement. It works on my WM2003 PPC, you have to try if it works under PPC2002 too.

Hi Andre, the program runs, but says  "cannot start ezdownload for ..."

Where has the ezdownload.exe to be located ?

Greetings Broesel

Rotlaus

Quote from: BroeselWhere has the ezdownload.exe to be located ?

In the Windows Directory.

Broesel

Yes, works .........   :approve:

thank you very much ...  :D

Greetings Broesel

uk_skinner

Hi, I would like to ask anyone who is interesting to download radar image from http://www.wetteronline.de/radar.htm try this exe.  The systemtime (I believe is UTC and it is matched GMT time zone) was used to calculate the URL for downloading.  Hopefully, it will download the most updated radar image from that site. Please give a try and let me know the result.

Just unzip the file and run exe.  At this moment the file pathway for downloaded image was set to /My Documents/g1.gif.  The new version will allow you to chose where to put your image file just like the one Rotlaus came up.  Please check the folder and see the time shown up in image matches the one on the website.  Please also post the time you do the downloading, then it will help to pinpoint the way they post their updated image.  Thanks.

Rotlaus

Works like a charme. Good work.  :D