Loading ...
Sorry, an error occurred while loading the content.

312Re: VB code for history parser

Expand Messages
  • sbillie1
    Nov 1, 2005
    • 0 Attachment
      Has anyone tried using Perl to do the parsing ?

      Also, I was just curious if anyone out there has written an RS232 driver using Perl ?

      Thanks,



      Bill






      --- In wuhu_software_group@yahoogroups.com, "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: wuhu_software_group@yahoogroups.com
      > [mailto:wuhu_software_group@yahoogroups.com] On Behalf Of wuhu_software
      > Sent: Saturday, October 22, 2005 12:24 PM
      > To: wuhu_software_group@yahoogroups.com
      > Subject: [wuhu_software_group] Re: VB code for history parser
      >
      >
      > Steve,
      >
      > 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
      > apps.
      >
      > ----
      >
      > 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).
      >
      > Row
      > Offset Type Name Unit
      > ------ --------- ---------------- -----
      > 00 ULong [4] unknown - (Value is always 1)
      > 04 ULong [4] Timestamp seconds from 1/1/1900 00:00:00
      > (GMT)
      > 08 Float [4] Abs Pressure hectopascals (millibars)
      > 12 Float [4] Wind Speed meters/second
      > 16 ULong [4] Wind Direction see below
      > 20 Float [4] Total Rainfall millimeters
      > 24 Float [4] Indoor Temp Celsius
      > 28 Float [4] Outdoor Temp Celsius
      > 32 UWord [2] Indoor Humidity %
      > 34 UWord [2] 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 [4] unknown
      > 04 Ulong [4] unknown (0)
      > 08 Float [4] unknown (5.698)
      > 12 ULong [4] unknown (0)
      > 16 ULong [4] Number of rows
      > 20 ULong [4] Timestamp of the first row of data
      > 24 ULong [4] Timestamp of the last row of data
      >
      >
      > --- In wuhu_software_group@yahoogroups.com, "stevech" stevech@s...
      > wrote:
      > >
      > > I too have written MS Visual Basic 6 (VB6) code to parse the WS36xx
      > history
      > > file. At the moment, the program displays all the data in a big
      > scrolled
      > > 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
      > upload
      > > 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
      > graphing
      > > programs out there is that I want my graphs in forms that these
      > programs
      > > 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
      > point
      > > 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
      >
    • Show all 15 messages in this topic