312Re: VB code for history parser
- Nov 1, 2005Has anyone tried using Perl to do the parsing ?
Also, I was just curious if anyone out there has written an RS232 driver using Perl ?
--- In firstname.lastname@example.org, "stevech" <stevech@s...> wrote:
> If someone would send me some WS23xx history.dat files I'll try to make my
> program support it and the WS36xx and perhaps US/Metric.
> -----Original Message-----
> From: email@example.com
> [mailto:firstname.lastname@example.org] On Behalf Of wuhu_software
> Sent: Saturday, October 22, 2005 12:24 PM
> To: email@example.com
> Subject: [wuhu_software_group] Re: VB code for history parser
> Defintely upload your source if you want to. Feel free to add
> whatever you want to the files section. If you need more space, I
> have a bit at the alternative download site (comcast gives you 30megs
> of space there).
> There are some cool activex objects out there for graphing, TChart is
> one that comes to mind. I have not used it in 4-5 years, but it had
> just about any feature you can think of. It was $150 for unlimited
> license back then, not sure what it is up to now. The nice thing is
> you can distribute it with your app.
> As far as the format used by the WS23xx, it is defintely a bit
> different. It seems the relative pressure is not stored in each
> record (absolute pressure is). I suspect that the last entry in the
> file may contain an offset from the absolute pressure so that you can
> determine relative pressure. I do not understand why HW would do
> this, but that is apparently the case.
> If I can figure that piece of the puzzle out, I could write the CVS
> and history.dat uploader for the WS23xx stations as well as other
> Here is what I found on the net:
> HeavyWeather V2.0 beta
> La Crosse WS-2310 and WS-2315 weather stations
> Each row of data is stored in 36 byte chunks starting from the
> beginning of
> the file (no header).
> Offset Type Name Unit
> ------ --------- ---------------- -----
> 00 ULong  unknown - (Value is always 1)
> 04 ULong  Timestamp seconds from 1/1/1900 00:00:00
> 08 Float  Abs Pressure hectopascals (millibars)
> 12 Float  Wind Speed meters/second
> 16 ULong  Wind Direction see below
> 20 Float  Total Rainfall millimeters
> 24 Float  Indoor Temp Celsius
> 28 Float  Outdoor Temp Celsius
> 32 UWord  Indoor Humidity %
> 34 UWord  Outdoor Humidity %
> At the end of the file is an additional 28 bytes providing
> information about the dataset as a whole.
> Offset Type Description
> ------ --------- ----------------
> 00 ULong  unknown
> 04 Ulong  unknown (0)
> 08 Float  unknown (5.698)
> 12 ULong  unknown (0)
> 16 ULong  Number of rows
> 20 ULong  Timestamp of the first row of data
> 24 ULong  Timestamp of the last row of data
> --- In firstname.lastname@example.org, "stevech" stevech@s...
> > I too have written MS Visual Basic 6 (VB6) code to parse the WS36xx
> > file. At the moment, the program displays all the data in a big
> > table and also writes it out to a file as plain text (i.e., to go
> in to
> > Excel or whatever). I'm working on having the program generate
> graphs and
> > save them as JPGs which can be referenced in a web page.
> > Making this program read WS23xx instead of WS36xx is trivial.
> > I'll send this and the source code to anyone who wants it, or I can
> > it. The graphing part isn't done, as I'm trying to get all the
> options and
> > flexibility I want. The reason I'm not using one of the weather
> > programs out there is that I want my graphs in forms that these
> > don't do- I tried them. Primarily - formatted with large fonts
> suitable for
> > display on my home LAN web server which has a lot of info on it (TV
> > listings, webcams around the world, etc) and this must use large
> fonts for
> > viewing on the TV. The web server feeds VGA->video to the TVs.
> > Anyway, that's my work in progress.
> > Parsing the history data file turns out to be simple- the floating
> > format is exactly that used in MS's VB and C languages so I
> simply "cast"
> > the byte array to a "single" within a user-defined structure.
> > Steve
> Yahoo! Groups Links
- << Previous post in topic Next post in topic >>