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

Re: WUHU History.dat format?

Expand Messages
  • scruzphreak
    ... C# gives 5/30/2008 20:00, and the lst file says its Mon Jun 02 01:07:01 2008 -
    Message 1 of 11 , Jun 3, 2008
    • 0 Attachment
      >>
      C# gives 5/30/2008 20:00, and the lst file says its Mon Jun
      02 01:07:01 2008 -
      <<

      You're off by 5 hours. What time zone are you in? Are you in eastern
      time (GMT-5)?

      What C# routine are you using to parse the date?

      -ms

      --- In wuhu_software_group@yahoogroups.com, "Syd" <sydkahn@...> wrote:
      >
      >
      > It looks like i will have to fall back to using either the LST file
      or
      > mock up a template.
      >
      > C# has a problem converting the date from the dat file. I am using
      the
      > FromOADate function of the datetime type and its not converting the
      date
      > properly. C# gives 5/30/2008 20:00, and the lst file says its Mon
      Jun
      > 02 01:07:01 2008 - I'll have to work on that.
      >
      > In the mean time i looked at the LST file and it has just about
      every
      > kind of conversion of every data point - shame its in the INI file
      > format - The coder in me wants to do an INI to XML convertion and
      then
      > some sort of XSLT - before you say it - i know i can do the same
      thing
      > with a template - but whats the fun in that?
      >
      > Thanks for the super software, without it could not do any of this
      > easily.
      >
      >
      > --- In wuhu_software_group@yahoogroups.com, "wuhu_software"
      > <wuhu_software@> wrote:
      > >
      > > Syd,
      > >
      > > There are several ways to access the weather data from WUHU.
      > >
      > > 1) Parse the history.dat file output by WUHU. You could monitor
      this
      > > file for changes then read the last fixed-length record to get the
      > > latest data.
      > >
      > > 2) You could output a CSV file using a template and On Update
      Action.
      > > The target file can be re-written or appended.
      > >
      > > 3) You can use an action (On Update Data action) to send live
      data to
      > > your web server. Using replacement strings, you can send a URL
      > > containing live data.
      > >
      > > I guess the method of data retrieval depends on whether or not you
      > > want the live data or archived data as well.
      > >
      > >
      > > --- In wuhu_software_group@yahoogroups.com, "Syd" sydkahn@ wrote:
      > > >
      > > > My goal is to put up a C# asmx webservice I can reference from
      some
      > > > of my public web sites. I make the asumption that WUHU maintains
      > > a
      > > > rs232 connection to the weather station and the webservice would
      > > need
      > > > to get its data from the dat file(s). Probably will just convert
      > > the
      > > > dat to some database records on a periodic basis. The weather
      > > > doesn't change all that fast ;-) ...
      > > >
      > > > I managed to get a google gadget to display a Weather
      underground
      > > > thingy (technical term :) and wanted to try my hand at
      something a
      > > > little more elaborate.
      > > >
      > > > It depends on what project as to what language - C# or Java (or
      vb6
      > > > or Javascript) web and gui is done in Micro$oft, command line
      > > > utilities are done in java. I get paid to do Java on a daily
      basis
      > > as
      > > > much as I hate it.
      > > >
      > > >
      > > >
      > > >
      > > >
      > > >
      > > > --- In wuhu_software_group@yahoogroups.com, "wuhu_software"
      > > > <wuhu_software@> wrote:
      > > > >
      > > > >
      > > > > Syd,
      > > > >
      > > > > The WUHU History.dat is used for internal use only. It holds
      the
      > > > > weather data for the past X hours where X is the "Hours of
      > > Weather
      > > > > Data in Memory" setting in the general settings.
      > > > >
      > > > > If you want to work with history files, you will probably
      want to
      > > > > work with the history.dat that can be output by WUHU. The
      format
      > > of
      > > > > this file is the same as used by Heavyweather Pro.
      > > > >
      > > > > Are you looking to develop an add-on application that
      processes
      > > > > history files? If so, which development language will you be
      > > using?
      > > > >
      > > > >
      > > > > --- In wuhu_software_group@yahoogroups.com, "Syd" <sydkahn@>
      > > wrote:
      > > > > >
      > > > > > I wonder what the format for WUHU History.dat is? I looked
      in
      > > > the
      > > > > > files and searched the messages. Just a mention of the file.
      > > > > >
      > > > >
      > > >
      > >
      >
    • fikkaud
      I m monitoring the currdat.lst on update, and updating a MySql database every 5min. Then sky s the limit when it comes to presenting and pulling stats on the
      Message 2 of 11 , Jun 4, 2008
      • 0 Attachment
        I'm monitoring the currdat.lst on update, and updating a MySql
        database every 5min.
        Then sky's the limit when it comes to presenting and pulling stats
        on the web.

        I wrote a PERL script to accomplish the data storage, and pull what
        I need for my website with php.

        regards
        Audun
        http://vindkast.no


        --- In wuhu_software_group@yahoogroups.com, "scruzphreak" <ms@...>
        wrote:
        >
        > >>
        > C# gives 5/30/2008 20:00, and the lst file says its Mon Jun
        > 02 01:07:01 2008 -
        > <<
        >
        > You're off by 5 hours. What time zone are you in? Are you in
        eastern
        > time (GMT-5)?
        >
        > What C# routine are you using to parse the date?
        >
        > -ms
        >
        > --- In wuhu_software_group@yahoogroups.com, "Syd" <sydkahn@> wrote:
        > >
        > >
        > > It looks like i will have to fall back to using either the LST
        file
        > or
        > > mock up a template.
        > >
        > > C# has a problem converting the date from the dat file. I am
        using
        > the
        > > FromOADate function of the datetime type and its not converting
        the
        > date
        > > properly. C# gives 5/30/2008 20:00, and the lst file says its
        Mon
        > Jun
        > > 02 01:07:01 2008 - I'll have to work on that.
        > >
        > > In the mean time i looked at the LST file and it has just about
        > every
        > > kind of conversion of every data point - shame its in the INI
        file
        > > format - The coder in me wants to do an INI to XML convertion
        and
        > then
        > > some sort of XSLT - before you say it - i know i can do the same
        > thing
        > > with a template - but whats the fun in that?
        > >
        > > Thanks for the super software, without it could not do any of
        this
        > > easily.
        > >
        > >
        > > --- In wuhu_software_group@yahoogroups.com, "wuhu_software"
        > > <wuhu_software@> wrote:
        > > >
        > > > Syd,
        > > >
        > > > There are several ways to access the weather data from WUHU.
        > > >
        > > > 1) Parse the history.dat file output by WUHU. You could
        monitor
        > this
        > > > file for changes then read the last fixed-length record to get
        the
        > > > latest data.
        > > >
        > > > 2) You could output a CSV file using a template and On Update
        > Action.
        > > > The target file can be re-written or appended.
        > > >
        > > > 3) You can use an action (On Update Data action) to send live
        > data to
        > > > your web server. Using replacement strings, you can send a URL
        > > > containing live data.
        > > >
        > > > I guess the method of data retrieval depends on whether or not
        you
        > > > want the live data or archived data as well.
        > > >
        > > >
        > > > --- In wuhu_software_group@yahoogroups.com, "Syd" sydkahn@
        wrote:
        > > > >
        > > > > My goal is to put up a C# asmx webservice I can reference
        from
        > some
        > > > > of my public web sites. I make the asumption that WUHU
        maintains
        > > > a
        > > > > rs232 connection to the weather station and the webservice
        would
        > > > need
        > > > > to get its data from the dat file(s). Probably will just
        convert
        > > > the
        > > > > dat to some database records on a periodic basis. The weather
        > > > > doesn't change all that fast ;-) ...
        > > > >
        > > > > I managed to get a google gadget to display a Weather
        > underground
        > > > > thingy (technical term :) and wanted to try my hand at
        > something a
        > > > > little more elaborate.
        > > > >
        > > > > It depends on what project as to what language - C# or Java
        (or
        > vb6
        > > > > or Javascript) web and gui is done in Micro$oft, command line
        > > > > utilities are done in java. I get paid to do Java on a daily
        > basis
        > > > as
        > > > > much as I hate it.
        > > > >
        > > > >
        > > > >
        > > > >
        > > > >
        > > > >
        > > > > --- In wuhu_software_group@yahoogroups.com, "wuhu_software"
        > > > > <wuhu_software@> wrote:
        > > > > >
        > > > > >
        > > > > > Syd,
        > > > > >
        > > > > > The WUHU History.dat is used for internal use only. It
        holds
        > the
        > > > > > weather data for the past X hours where X is the "Hours of
        > > > Weather
        > > > > > Data in Memory" setting in the general settings.
        > > > > >
        > > > > > If you want to work with history files, you will probably
        > want to
        > > > > > work with the history.dat that can be output by WUHU. The
        > format
        > > > of
        > > > > > this file is the same as used by Heavyweather Pro.
        > > > > >
        > > > > > Are you looking to develop an add-on application that
        > processes
        > > > > > history files? If so, which development language will you
        be
        > > > using?
        > > > > >
        > > > > >
        > > > > > --- In wuhu_software_group@yahoogroups.com, "Syd"
        <sydkahn@>
        > > > wrote:
        > > > > > >
        > > > > > > I wonder what the format for WUHU History.dat is? I
        looked
        > in
        > > > > the
        > > > > > > files and searched the messages. Just a mention of the
        file.
        > > > > > >
        > > > > >
        > > > >
        > > >
        > >
        >
      • Syd Kahn
        If you look at the dates - one is 5/30 and the other 6/02 - sigh... in actuality - this are the wo lines that do the work double ts = br.ReadDouble();
        Message 3 of 11 , Jun 4, 2008
        • 0 Attachment
          If you look at the dates - one is 5/30 and the other 6/02 - sigh...

          in actuality - this are the wo lines that do the work

          double

          ts = br.ReadDouble();
          S.Timestamp =
          DateTime.FromOADate(ts);
          On Tue, Jun 3, 2008 at 10:41 AM, scruzphreak <ms@...> wrote:

          >>
          C# gives 5/30/2008 20:00, and the lst file says its Mon Jun
          02 01:07:01 2008 -
          <<

          You're off by 5 hours. What time zone are you in? Are you in eastern
          time (GMT-5)?

          What C# routine are you using to parse the date?

          -ms


          --- In wuhu_software_group@yahoogroups.com, "Syd" <sydkahn@...> wrote:
          >
          >
          > It looks like i will have to fall back to using either the LST file
          or
          > mock up a template.
          >
          > C# has a problem converting the date from the dat file. I am using
          the
          > FromOADate function of the datetime type and its not converting the
          date
          > properly. C# gives 5/30/2008 20:00, and the lst file says its Mon
          Jun
          > 02 01:07:01 2008 - I'll have to work on that.
          >
          > In the mean time i looked at the LST file and it has just about
          every
          > kind of conversion of every data point - shame its in the INI file
          > format - The coder in me wants to do an INI to XML convertion and
          then
          > some sort of XSLT - before you say it - i know i can do the same
          thing
          > with a template - but whats the fun in that?
          >
          > Thanks for the super software, without it could not do any of this
          > easily.
          >
          >
          > --- In wuhu_software_group@yahoogroups.com, "wuhu_software"
          > <wuhu_software@> wrote:
          > >
          > > Syd,
          > >
          > > There are several ways to access the weather data from WUHU.
          > >
          > > 1) Parse the history.dat file output by WUHU. You could monitor
          this
          > > file for changes then read the last fixed-length record to get the
          > > latest data.
          > >
          > > 2) You could output a CSV file using a template and On Update
          Action.
          > > The target file can be re-written or appended.
          > >
          > > 3) You can use an action (On Update Data action) to send live
          data to
          > > your web server. Using replacement strings, you can send a URL
          > > containing live data.
          > >
          > > I guess the method of data retrieval depends on whether or not you
          > > want the live data or archived data as well.
          > >
          > >
          > > --- In wuhu_software_group@yahoogroups.com, "Syd" sydkahn@ wrote:
          > > >
          > > > My goal is to put up a C# asmx webservice I can reference from
          some
          > > > of my public web sites. I make the asumption that WUHU maintains
          > > a
          > > > rs232 connection to the weather station and the webservice would
          > > need
          > > > to get its data from the dat file(s). Probably will just convert
          > > the
          > > > dat to some database records on a periodic basis. The weather
          > > > doesn't change all that fast ;-) ...
          > > >
          > > > I managed to get a google gadget to display a Weather
          underground
          > > > thingy (technical term :) and wanted to try my hand at
          something a
          > > > little more elaborate.
          > > >
          > > > It depends on what project as to what language - C# or Java (or
          vb6
          > > > or Javascript) web and gui is done in Micro$oft, command line
          > > > utilities are done in java. I get paid to do Java on a daily
          basis
          > > as
          > > > much as I hate it.
          > > >
          > > >
          > > >
          > > >
          > > >
          > > >
          > > > --- In wuhu_software_group@yahoogroups.com, "wuhu_software"
          > > > <wuhu_software@> wrote:
          > > > >
          > > > >
          > > > > Syd,
          > > > >
          > > > > The WUHU History.dat is used for internal use only. It holds
          the
          > > > > weather data for the past X hours where X is the "Hours of
          > > Weather
          > > > > Data in Memory" setting in the general settings.
          > > > >
          > > > > If you want to work with history files, you will probably
          want to
          > > > > work with the history.dat that can be output by WUHU. The
          format
          > > of
          > > > > this file is the same as used by Heavyweather Pro.
          > > > >
          > > > > Are you looking to develop an add-on application that
          processes
          > > > > history files? If so, which development language will you be
          > > using?
          > > > >
          > > > >
          > > > > --- In wuhu_software_group@yahoogroups.com, "Syd" <sydkahn@>
          > > wrote:
          > > > > >
          > > > > > I wonder what the format for WUHU History.dat is? I looked
          in
          > > > the
          > > > > > files and searched the messages. Just a mention of the file.
          > > > > >
          > > > >
          > > >
          > >
          >




          --
          ---------------------------------------------------------------------
          http://www.Whatididwas.com , http://www.sydkahn.com ,
          http://whatididwas.blogspot.com
        • wuhu_software
          Syd, Which field in the INI file are you reading to extract the timestamp? Is it the following? [time] last_actualisation = 3421587681 ... eastern ...
          Message 4 of 11 , Jun 4, 2008
          • 0 Attachment
            Syd,

            Which field in the INI file are you reading to extract the timestamp?

            Is it the following?

            [time]
            last_actualisation = 3421587681



            --- In wuhu_software_group@yahoogroups.com, "Syd Kahn" <sydkahn@...>
            wrote:
            >
            > If you look at the dates - one is 5/30 and the other 6/02 - sigh...
            >
            > in actuality - this are the wo lines that do the work
            >
            > double ts = br.ReadDouble();
            > S.Timestamp = DateTime.FromOADate(ts);
            >
            > On Tue, Jun 3, 2008 at 10:41 AM, scruzphreak <ms@...> wrote:
            >
            > > >>
            > > C# gives 5/30/2008 20:00, and the lst file says its Mon Jun
            > > 02 01:07:01 2008 -
            > > <<
            > >
            > > You're off by 5 hours. What time zone are you in? Are you in
            eastern
            > > time (GMT-5)?
            > >
            > > What C# routine are you using to parse the date?
            > >
            > > -ms
            > >
            > >
            > > --- In wuhu_software_group@yahoogroups.com<wuhu_software_group%
            40yahoogroups.com>,
            > > "Syd" <sydkahn@> wrote:
            > > >
            > > >
            > > > It looks like i will have to fall back to using either the LST
            file
            > > or
            > > > mock up a template.
            > > >
            > > > C# has a problem converting the date from the dat file. I am
            using
            > > the
            > > > FromOADate function of the datetime type and its not converting
            the
            > > date
            > > > properly. C# gives 5/30/2008 20:00, and the lst file says its
            Mon
            > > Jun
            > > > 02 01:07:01 2008 - I'll have to work on that.
            > > >
            > > > In the mean time i looked at the LST file and it has just about
            > > every
            > > > kind of conversion of every data point - shame its in the INI
            file
            > > > format - The coder in me wants to do an INI to XML convertion
            and
            > > then
            > > > some sort of XSLT - before you say it - i know i can do the same
            > > thing
            > > > with a template - but whats the fun in that?
            > > >
            > > > Thanks for the super software, without it could not do any of
            this
            > > > easily.
            > > >
            > > >
            > > > --- In wuhu_software_group@yahoogroups.com<wuhu_software_group%
            40yahoogroups.com>,
            > > "wuhu_software"
            > > > <wuhu_software@> wrote:
            > > > >
            > > > > Syd,
            > > > >
            > > > > There are several ways to access the weather data from WUHU.
            > > > >
            > > > > 1) Parse the history.dat file output by WUHU. You could
            monitor
            > > this
            > > > > file for changes then read the last fixed-length record to
            get the
            > > > > latest data.
            > > > >
            > > > > 2) You could output a CSV file using a template and On Update
            > > Action.
            > > > > The target file can be re-written or appended.
            > > > >
            > > > > 3) You can use an action (On Update Data action) to send live
            > > data to
            > > > > your web server. Using replacement strings, you can send a URL
            > > > > containing live data.
            > > > >
            > > > > I guess the method of data retrieval depends on whether or
            not you
            > > > > want the live data or archived data as well.
            > > > >
            > > > >
            > > > > --- In
            wuhu_software_group@yahoogroups.com<wuhu_software_group%
            40yahoogroups.com>,
            > > "Syd" sydkahn@ wrote:
            > > > > >
            > > > > > My goal is to put up a C# asmx webservice I can reference
            from
            > > some
            > > > > > of my public web sites. I make the asumption that WUHU
            maintains
            > > > > a
            > > > > > rs232 connection to the weather station and the webservice
            would
            > > > > need
            > > > > > to get its data from the dat file(s). Probably will just
            convert
            > > > > the
            > > > > > dat to some database records on a periodic basis. The
            weather
            > > > > > doesn't change all that fast ;-) ...
            > > > > >
            > > > > > I managed to get a google gadget to display a Weather
            > > underground
            > > > > > thingy (technical term :) and wanted to try my hand at
            > > something a
            > > > > > little more elaborate.
            > > > > >
            > > > > > It depends on what project as to what language - C# or Java
            (or
            > > vb6
            > > > > > or Javascript) web and gui is done in Micro$oft, command
            line
            > > > > > utilities are done in java. I get paid to do Java on a daily
            > > basis
            > > > > as
            > > > > > much as I hate it.
            > > > > >
            > > > > >
            > > > > >
            > > > > >
            > > > > >
            > > > > >
            > > > > > --- In
            wuhu_software_group@yahoogroups.com<wuhu_software_group%
            40yahoogroups.com>,
            > > "wuhu_software"
            > > > > > <wuhu_software@> wrote:
            > > > > > >
            > > > > > >
            > > > > > > Syd,
            > > > > > >
            > > > > > > The WUHU History.dat is used for internal use only. It
            holds
            > > the
            > > > > > > weather data for the past X hours where X is the "Hours of
            > > > > Weather
            > > > > > > Data in Memory" setting in the general settings.
            > > > > > >
            > > > > > > If you want to work with history files, you will probably
            > > want to
            > > > > > > work with the history.dat that can be output by WUHU. The
            > > format
            > > > > of
            > > > > > > this file is the same as used by Heavyweather Pro.
            > > > > > >
            > > > > > > Are you looking to develop an add-on application that
            > > processes
            > > > > > > history files? If so, which development language will you
            be
            > > > > using?
            > > > > > >
            > > > > > >
            > > > > > > --- In
            wuhu_software_group@yahoogroups.com<wuhu_software_group%
            40yahoogroups.com>,
            > > "Syd" <sydkahn@>
            > > > > wrote:
            > > > > > > >
            > > > > > > > I wonder what the format for WUHU History.dat is? I
            looked
            > > in
            > > > > > the
            > > > > > > > files and searched the messages. Just a mention of the
            file.
            > > > > > > >
            > > > > > >
            > > > > >
            > > > >
            > > >
            > >
            > >
            > >
            >
            >
            >
            > --
            > --------------------------------------------------------------------
            -
            > http://www.Whatididwas.com , http://www.sydkahn.com ,
            > http://whatididwas.blogspot.com
            >
          • Syd Kahn
            I am going directly to the dat file - reading the binary data. Like this: public struct HwProStruct { public DateTime Timestamp; //00 Double [8]
            Message 5 of 11 , Jun 5, 2008
            • 0 Attachment
              I am going directly to the dat file - reading the binary data. Like this:


              public struct HwProStruct
                  {
                      public DateTime Timestamp;       //00    Double [8]  Timestamp          days from 12/30/1899 00:00:00 (GMT)  
                      public float AbsPressure;      //08    Float  [4]  Abs Pressure       hectopascals (millibars)
                      public float RelativePressure; //12    Float  [4]  Relative Pressure  hectopascals (millibars)
                      public float WindSpeed;      //16    Float  [4]  Wind Speed         meters/second
                      public ulong WindDirection;    //20    ULong  [4]  Wind Direction     see below
                      public float WindGust;         //24    Float  [4]  Wind Gust          meters/second
                      public float TotalRainfall;    //28    Float  [4]  Total Rainfall     millimeters
                      public float NewRainfall;      //32    Float  [4]  New Rainfall       millimeters
                      public float IndoorTemp;       //36    Float  [4]  Indoor Temp        celsius
                      public float OutdoorTemp;      //40    Float  [4]  Outdoor Temp       celsius
                      public float IndoorHumidity;   //44    Float  [4]  Indoor Humidity    %
                      public float OutdoorHumidity;  //48    Float  [4]  Outdoor Humidity   %
                      public float Unknown;          //52    ULong  [4]  unknown            - (Value is always 0)



                      public static HwProStruct FromBinaryReaderField(BinaryReader br)
                      {
                          HwProStruct s = new HwProStruct();
                          double ts = br.ReadDouble();
                          s.Timestamp = DateTime.FromOADate(ts);
                          //s.Timestamp = DateTime.FromOADate(br.ReadDouble());
                          //DateTime d = Convert.ToDateTime(s.Timestamp);
                          s.AbsPressure = br.ReadSingle();
                          s.RelativePressure = br.ReadSingle();
                          s.WindSpeed = br.ReadSingle();
                          s.WindDirection = br.ReadUInt32();
                          s.WindGust = br.ReadSingle();
                          s.TotalRainfall = br.ReadSingle();
                          s.NewRainfall = br.ReadSingle();
                          s.IndoorTemp = br.ReadSingle();
                          s.OutdoorTemp = br.ReadSingle();
                          s.IndoorHumidity = br.ReadSingle();
                          s.OutdoorHumidity = br.ReadSingle();
                          s.Unknown = br.ReadUInt32();
                          return s;
                      }




















              On Wed, Jun 4, 2008 at 1:02 PM, wuhu_software <wuhu_software@...> wrote:


              Syd,

              Which field in the INI file are you reading to extract the timestamp?

              Is it the following?

              [time]
              last_actualisation = 3421587681

              --- In wuhu_software_group@yahoogroups.com, "Syd Kahn" <sydkahn@...>
              wrote:


              >
              > If you look at the dates - one is 5/30 and the other 6/02 - sigh...
              >
              > in actuality - this are the wo lines that do the work
              >
              > double ts = br.ReadDouble();
              > S.Timestamp = DateTime.FromOADate(ts);
              >
              > On Tue, Jun 3, 2008 at 10:41 AM, scruzphreak <ms@...> wrote:
              >
              > > >>
              > > C# gives 5/30/2008 20:00, and the lst file says its Mon Jun
              > > 02 01:07:01 2008 -
              > > <<
              > >
              > > You're off by 5 hours. What time zone are you in? Are you in
              eastern
              > > time (GMT-5)?
              > >
              > > What C# routine are you using to parse the date?
              > >
              > > -ms
              > >
              > >
              > > --- In wuhu_software_group@yahoogroups.com<wuhu_software_group%
              40yahoogroups.com>,

              > > "Syd" <sydkahn@> wrote:
              > > >
              > > >
              > > > It looks like i will have to fall back to using either the LST
              file
              > > or
              > > > mock up a template.
              > > >
              > > > C# has a problem converting the date from the dat file. I am
              using
              > > the
              > > > FromOADate function of the datetime type and its not converting
              the
              > > date
              > > > properly. C# gives 5/30/2008 20:00, and the lst file says its
              Mon
              > > Jun
              > > > 02 01:07:01 2008 - I'll have to work on that.
              > > >
              > > > In the mean time i looked at the LST file and it has just about
              > > every
              > > > kind of conversion of every data point - shame its in the INI
              file
              > > > format - The coder in me wants to do an INI to XML convertion
              and
              > > then
              > > > some sort of XSLT - before you say it - i know i can do the same
              > > thing
              > > > with a template - but whats the fun in that?
              > > >
              > > > Thanks for the super software, without it could not do any of
              this
              > > > easily.
              > > >
              > > >
              > > > --- In wuhu_software_group@yahoogroups.com<wuhu_software_group%
              40yahoogroups.com>,

              > > "wuhu_software"
              > > > <wuhu_software@> wrote:
              > > > >
              > > > > Syd,
              > > > >
              > > > > There are several ways to access the weather data from WUHU.
              > > > >
              > > > > 1) Parse the history.dat file output by WUHU. You could
              monitor
              > > this
              > > > > file for changes then read the last fixed-length record to
              get the
              > > > > latest data.
              > > > >
              > > > > 2) You could output a CSV file using a template and On Update
              > > Action.
              > > > > The target file can be re-written or appended.
              > > > >
              > > > > 3) You can use an action (On Update Data action) to send live
              > > data to
              > > > > your web server. Using replacement strings, you can send a URL
              > > > > containing live data.
              > > > >
              > > > > I guess the method of data retrieval depends on whether or
              not you
              > > > > want the live data or archived data as well.
              > > > >
              > > > >
              > > > > --- In
              wuhu_software_group@yahoogroups.com<wuhu_software_group%
              40yahoogroups.com>,

              > > "Syd" sydkahn@ wrote:
              > > > > >
              > > > > > My goal is to put up a C# asmx webservice I can reference
              from
              > > some
              > > > > > of my public web sites. I make the asumption that WUHU
              maintains
              > > > > a
              > > > > > rs232 connection to the weather station and the webservice
              would
              > > > > need
              > > > > > to get its data from the dat file(s). Probably will just
              convert
              > > > > the
              > > > > > dat to some database records on a periodic basis. The
              weather
              > > > > > doesn't change all that fast ;-) ...
              > > > > >
              > > > > > I managed to get a google gadget to display a Weather
              > > underground
              > > > > > thingy (technical term :) and wanted to try my hand at
              > > something a
              > > > > > little more elaborate.
              > > > > >
              > > > > > It depends on what project as to what language - C# or Java
              (or
              > > vb6
              > > > > > or Javascript) web and gui is done in Micro$oft, command
              line
              > > > > > utilities are done in java. I get paid to do Java on a daily
              > > basis
              > > > > as
              > > > > > much as I hate it.
              > > > > >
              > > > > >
              > > > > >
              > > > > >
              > > > > >
              > > > > >
              > > > > > --- In
              wuhu_software_group@yahoogroups.com<wuhu_software_group%
              40yahoogroups.com>,

              > > "wuhu_software"
              > > > > > <wuhu_software@> wrote:
              > > > > > >
              > > > > > >
              > > > > > > Syd,
              > > > > > >
              > > > > > > The WUHU History.dat is used for internal use only. It
              holds
              > > the
              > > > > > > weather data for the past X hours where X is the "Hours of
              > > > > Weather
              > > > > > > Data in Memory" setting in the general settings.
              > > > > > >
              > > > > > > If you want to work with history files, you will probably
              > > want to
              > > > > > > work with the history.dat that can be output by WUHU. The
              > > format
              > > > > of
              > > > > > > this file is the same as used by Heavyweather Pro.
              > > > > > >
              > > > > > > Are you looking to develop an add-on application that
              > > processes
              > > > > > > history files? If so, which development language will you
              be
              > > > > using?
              > > > > > >
              > > > > > >
              > > > > > > --- In
              wuhu_software_group@yahoogroups.com<wuhu_software_group%
              40yahoogroups.com>,

              > > "Syd" <sydkahn@>
              > > > > wrote:
              > > > > > > >
              > > > > > > > I wonder what the format for WUHU History.dat is? I
              looked
              > > in
              > > > > > the
              > > > > > > > files and searched the messages. Just a mention of the
              file.
              > > > > > > >
              > > > > > >
              > > > > >
              > > > >
              > > >
              > >
              > >
              > >
              >
              >
              >
              > --
              > ----------------------------------------------------------



              --
              ---------------------------------------------------------------------
              http://www.Whatididwas.com , http://www.sydkahn.com ,
              http://whatididwas.blogspot.com
            • wuhu_software
              Syd, Here is the function used to convert from time_t to double. As I recall, La Crosse did something weird like adjusting the time to GMT local time. If you
              Message 6 of 11 , Jun 5, 2008
              • 0 Attachment
                Syd,

                Here is the function used to convert from time_t to double.

                As I recall, La Crosse did something weird like adjusting the time to
                GMT local time.

                If you figure it out, let me know.

                ---

                double Convert_time_t_To_DateTime2(time_t vtime_t)

                {
                double fresult;
                // 25569 days from Saturday, December 30, 1899 to Sunday, January 1,
                1970 (where time_t seconds counts from)
                double fDeltaDays = 25569 + (vtime_t / (60 * 60 * 24));
                double fFractionDays = (vtime_t % (60 * 60 * 24)) / (double)(60 * 60 *
                24);
                fresult = fDeltaDays+fFractionDays;
                return (fresult);
                }


                --- In wuhu_software_group@yahoogroups.com, "Syd Kahn" <sydkahn@...>
                wrote:
                >
                > I am going directly to the dat file - reading the binary data. Like
                this:
                >
                >
                > public struct HwProStruct
                > {
                > public DateTime Timestamp; //00 Double [8]
                > Timestamp days from 12/30/1899 00:00:00 (GMT)
                > public float AbsPressure; //08 Float [4] Abs
                > Pressure hectopascals (millibars)
                > public float RelativePressure; //12 Float [4] Relative
                > Pressure hectopascals (millibars)
                > public float WindSpeed; //16 Float [4] Wind Speed
                > meters/second
                > public ulong WindDirection; //20 ULong [4] Wind
                > Direction see below
                > public float WindGust; //24 Float [4] Wind
                > Gust meters/second
                > public float TotalRainfall; //28 Float [4] Total
                > Rainfall millimeters
                > public float NewRainfall; //32 Float [4] New
                > Rainfall millimeters
                > public float IndoorTemp; //36 Float [4] Indoor
                > Temp celsius
                > public float OutdoorTemp; //40 Float [4] Outdoor
                > Temp celsius
                > public float IndoorHumidity; //44 Float [4] Indoor
                > Humidity %
                > public float OutdoorHumidity; //48 Float [4] Outdoor
                > Humidity %
                > public float Unknown; //52 ULong [4]
                > unknown - (Value is always 0)
                >
                >
                >
                > public static HwProStruct FromBinaryReaderField(BinaryReader br)
                > {
                > HwProStruct s = new HwProStruct();
                > double ts = br.ReadDouble();
                > s.Timestamp = DateTime.FromOADate(ts);
                > //s.Timestamp = DateTime.FromOADate(br.ReadDouble());
                > //DateTime d = Convert.ToDateTime(s.Timestamp);
                > s.AbsPressure = br.ReadSingle();
                > s.RelativePressure = br.ReadSingle();
                > s.WindSpeed = br.ReadSingle();
                > s.WindDirection = br.ReadUInt32();
                > s.WindGust = br.ReadSingle();
                > s.TotalRainfall = br.ReadSingle();
                > s.NewRainfall = br.ReadSingle();
                > s.IndoorTemp = br.ReadSingle();
                > s.OutdoorTemp = br.ReadSingle();
                > s.IndoorHumidity = br.ReadSingle();
                > s.OutdoorHumidity = br.ReadSingle();
                > s.Unknown = br.ReadUInt32();
                > return s;
                > }
                >
                >
                >
                >
                >
                >
                >
                >
                >
                >
                >
                >
                >
                >
                >
                >
                >
                >
                >
                >
                > On Wed, Jun 4, 2008 at 1:02 PM, wuhu_software wuhu_software@...
                > wrote:
                >
                > >
                > > Syd,
                > >
                > > Which field in the INI file are you reading to extract the
                timestamp?
                > >
                > > Is it the following?
                > >
                > > [time]
                > > last_actualisation = 3421587681
                > >
                > > --- In
                wuhu_software_group@yahoogroups.com<wuhu_software_group%40yahoogroups.co\
                m>,
                > > "Syd Kahn" sydkahn@
                > > wrote:
                > >
                > > >
                > > > If you look at the dates - one is 5/30 and the other 6/02 -
                sigh...
                > > >
                > > > in actuality - this are the wo lines that do the work
                > > >
                > > > double ts = br.ReadDouble();
                > > > S.Timestamp = DateTime.FromOADate(ts);
                > > >
                > > > On Tue, Jun 3, 2008 at 10:41 AM, scruzphreak ms@ wrote:
                > > >
                > > > > >>
                > > > > C# gives 5/30/2008 20:00, and the lst file says its Mon Jun
                > > > > 02 01:07:01 2008 -
                > > > > <<
                > > > >
                > > > > You're off by 5 hours. What time zone are you in? Are you in
                > > eastern
                > > > > time (GMT-5)?
                > > > >
                > > > > What C# routine are you using to parse the date?
                > > > >
                > > > > -ms
                > > > >
                > > > >
                > > > > --- In
                wuhu_software_group@yahoogroups.com<wuhu_software_group%40yahoogroups.co\
                m>
                > > <wuhu_software_group%
                > > 40yahoogroups.com>,
                > >
                > > > > "Syd" <sydkahn@> wrote:
                > > > > >
                > > > > >
                > > > > > It looks like i will have to fall back to using either the LST
                > > file
                > > > > or
                > > > > > mock up a template.
                > > > > >
                > > > > > C# has a problem converting the date from the dat file. I am
                > > using
                > > > > the
                > > > > > FromOADate function of the datetime type and its not
                converting
                > > the
                > > > > date
                > > > > > properly. C# gives 5/30/2008 20:00, and the lst file says its
                > > Mon
                > > > > Jun
                > > > > > 02 01:07:01 2008 - I'll have to work on that.
                > > > > >
                > > > > > In the mean time i looked at the LST file and it has just
                about
                > > > > every
                > > > > > kind of conversion of every data point - shame its in the INI
                > > file
                > > > > > format - The coder in me wants to do an INI to XML convertion
                > > and
                > > > > then
                > > > > > some sort of XSLT - before you say it - i know i can do the
                same
                > > > > thing
                > > > > > with a template - but whats the fun in that?
                > > > > >
                > > > > > Thanks for the super software, without it could not do any of
                > > this
                > > > > > easily.
                > > > > >
                > > > > >
                > > > > > --- In
                wuhu_software_group@yahoogroups.com<wuhu_software_group%40yahoogroups.co\
                m>
                > > <wuhu_software_group%
                > > 40yahoogroups.com>,
                > > > > "wuhu_software"
                > > > > > <wuhu_software@> wrote:
                > > > > > >
                > > > > > > Syd,
                > > > > > >
                > > > > > > There are several ways to access the weather data from WUHU.
                > > > > > >
                > > > > > > 1) Parse the history.dat file output by WUHU. You could
                > > monitor
                > > > > this
                > > > > > > file for changes then read the last fixed-length record to
                > > get the
                > > > > > > latest data.
                > > > > > >
                > > > > > > 2) You could output a CSV file using a template and On
                Update
                > > > > Action.
                > > > > > > The target file can be re-written or appended.
                > > > > > >
                > > > > > > 3) You can use an action (On Update Data action) to send
                live
                > > > > data to
                > > > > > > your web server. Using replacement strings, you can send a
                URL
                > > > > > > containing live data.
                > > > > > >
                > > > > > > I guess the method of data retrieval depends on whether or
                > > not you
                > > > > > > want the live data or archived data as well.
                > > > > > >
                > > > > > >
                > > > > > > --- In
                > >
                wuhu_software_group@yahoogroups.com<wuhu_software_group%40yahoogroups.co\
                m>
                > > <wuhu_software_group%
                > > 40yahoogroups.com>,
                > >
                > > > > "Syd" sydkahn@ wrote:
                > > > > > > >
                > > > > > > > My goal is to put up a C# asmx webservice I can reference
                > > from
                > > > > some
                > > > > > > > of my public web sites. I make the asumption that WUHU
                > > maintains
                > > > > > > a
                > > > > > > > rs232 connection to the weather station and the webservice
                > > would
                > > > > > > need
                > > > > > > > to get its data from the dat file(s). Probably will just
                > > convert
                > > > > > > the
                > > > > > > > dat to some database records on a periodic basis. The
                > > weather
                > > > > > > > doesn't change all that fast ;-) ...
                > > > > > > >
                > > > > > > > I managed to get a google gadget to display a Weather
                > > > > underground
                > > > > > > > thingy (technical term :) and wanted to try my hand at
                > > > > something a
                > > > > > > > little more elaborate.
                > > > > > > >
                > > > > > > > It depends on what project as to what language - C# or
                Java
                > > (or
                > > > > vb6
                > > > > > > > or Javascript) web and gui is done in Micro$oft, command
                > > line
                > > > > > > > utilities are done in java. I get paid to do Java on a
                daily
                > > > > basis
                > > > > > > as
                > > > > > > > much as I hate it.
                > > > > > > >
                > > > > > > >
                > > > > > > >
                > > > > > > >
                > > > > > > >
                > > > > > > >
                > > > > > > > --- In
                > >
                wuhu_software_group@yahoogroups.com<wuhu_software_group%40yahoogroups.co\
                m>
                > > <wuhu_software_group%
                > > 40yahoogroups.com>,
                > > > > "wuhu_software"
                > > > > > > > <wuhu_software@> wrote:
                > > > > > > > >
                > > > > > > > >
                > > > > > > > > Syd,
                > > > > > > > >
                > > > > > > > > The WUHU History.dat is used for internal use only. It
                > > holds
                > > > > the
                > > > > > > > > weather data for the past X hours where X is the "Hours
                of
                > > > > > > Weather
                > > > > > > > > Data in Memory" setting in the general settings.
                > > > > > > > >
                > > > > > > > > If you want to work with history files, you will
                probably
                > > > > want to
                > > > > > > > > work with the history.dat that can be output by WUHU.
                The
                > > > > format
                > > > > > > of
                > > > > > > > > this file is the same as used by Heavyweather Pro.
                > > > > > > > >
                > > > > > > > > Are you looking to develop an add-on application that
                > > > > processes
                > > > > > > > > history files? If so, which development language will
                you
                > > be
                > > > > > > using?
                > > > > > > > >
                > > > > > > > >
                > > > > > > > > --- In
                > >
                wuhu_software_group@yahoogroups.com<wuhu_software_group%40yahoogroups.co\
                m>
                > > <wuhu_software_group%
                > > 40yahoogroups.com>,
                > > > > "Syd" <sydkahn@>
                > > > > > > wrote:
                > > > > > > > > >
                > > > > > > > > > I wonder what the format for WUHU History.dat is? I
                > > looked
                > > > > in
                > > > > > > > the
                > > > > > > > > > files and searched the messages. Just a mention of the
                > > file.
                > > > > > > > > >
                > > > > > > > >
                > > > > > > >
                > > > > > >
                > > > > >
                > > > >
                > > > >
                > > > >
                > > >
                > > >
                > > >
                > > > --
                > > > ----------------------------------------------------------
                > > -
                > > > http://www.Whatididwas.com , http://www.sydkahn.com ,
                > > > http://whatididwas.blogspot.com
                > > >
                > >
                > >
                > >
                >
                >
                >
                > --
                > ---------------------------------------------------------------------
                > http://www.Whatididwas.com , http://www.sydkahn.com ,
                > http://whatididwas.blogspot.com
                >
              Your message has been successfully submitted and would be delivered to recipients shortly.