Index: trunk/FACT++/src/HeadersTNGWeather.h
===================================================================
--- trunk/FACT++/src/HeadersTNGWeather.h	(revision 18338)
+++ trunk/FACT++/src/HeadersTNGWeather.h	(revision 18339)
@@ -19,16 +19,22 @@
 
         float  fTemperature;
+        float  fTempTrend;
         float  fDewPoint;
         float  fHumidity;
         float  fAirPressure;
-        float  fTrend;
         float  fWindSpeed;
         float  fWindDirection;
         float  fDustTotal;
-        double fSeeingMjd;
+        float  fSolarimeter;
+
+    } __attribute__((__packed__));
+
+    struct DimSeeing
+    {
+        DimSeeing() { memset(this, 0, sizeof(DimSeeing)); }
+
         float  fSeeing;
         float  fSeeingMed;
         float  fSeeingStdev;
-        float  fSolarimeter;
 
     } __attribute__((__packed__));
Index: trunk/FACT++/src/tngweather.cc
===================================================================
--- trunk/FACT++/src/tngweather.cc	(revision 18338)
+++ trunk/FACT++/src/tngweather.cc	(revision 18339)
@@ -43,4 +43,8 @@
     }
 
+    virtual void UpdateSeeing(const Time &, const DimSeeing &)
+    {
+    }
+
     virtual void UpdateDust(const Time &, const float &)
     {
@@ -56,4 +60,6 @@
     Time fLastReport;
     Time fLastReception;
+
+    Time fLastSeeing;
 
     void HandleRead(const boost::system::error_code& err, size_t bytes_received)
@@ -168,10 +174,6 @@
 
         DimWeather w;
-        w.fSeeingMjd     = Time(mjd.text().toStdString()).Mjd();
-        w.fSeeing        = see  .text().toFloat();
-        w.fSeeingMed     = med  .text().toFloat();
-        w.fSeeingStdev   = sdev .text().toFloat();
         w.fDustTotal     = dust .text().toFloat();
-        w.fTrend         = trend.text().toFloat();
+        w.fTempTrend     = trend.text().toFloat();
         w.fAirPressure   = pres .text().toFloat();
         w.fDewPoint      = dew  .text().toFloat();
@@ -182,50 +184,76 @@
         w.fSolarimeter   = solar.text().toFloat();
 
-        const string obj = date.text().toStdString();
-
-        Time time(obj);
-        if (!time.IsValid())
+        DimSeeing s;
+        s.fSeeing        = see  .text().toFloat();
+        s.fSeeingMed     = med  .text().toFloat();
+        s.fSeeingStdev   = sdev .text().toFloat();
+
+        const string dateObj = date.text().toStdString();
+        const string dateSee = mjd .text().toStdString();
+
+        Time timeObj(dateObj);
+        Time timeSee(dateSee);
+        if (!timeObj.IsValid())
         {
             struct tm tm;
 
             vector<char> buf(255);
-            if (strptime(obj.c_str(), "%c", &tm))
-                time = Time(tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday,
-                            tm.tm_hour,      tm.tm_min,   tm.tm_sec);
-        }
-
-        if (!time.IsValid())
-            throw runtime_error("time invalid");
-
-        if (time!=fLastReport && fIsVerbose)
+            if (strptime(dateObj.c_str(), "%c", &tm))
+                timeObj = Time(tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday,
+                               tm.tm_hour,      tm.tm_min,   tm.tm_sec);
+        }
+
+        if (!timeSee.IsValid())
+        {
+            struct tm tm;
+
+            vector<char> buf(255);
+            if (strptime(dateSee.c_str(), "%c", &tm))
+                timeSee = Time(tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday,
+                               tm.tm_hour,      tm.tm_min,   tm.tm_sec);
+
+            Warn("Seeing time invalid ["+dateObj+"]");
+        }
+
+        if (!timeObj.IsValid())
+            throw runtime_error("object time invalid");
+
+        if (timeObj!=fLastReport && fIsVerbose)
         {
             Out() << endl;
-            Out() << "Date:           " << time             << endl;
-            Out() << "Seeing:         " << w.fSeeing << " [" << Time(w.fSeeingMjd) << "]" << endl;
-            Out() << "Seeing:         " << w.fSeeingMed << " +- " << w.fSeeingStdev << endl;
-            Out() << "DustTotal:      " << w.fDustTotal     << endl;
-            Out() << "AirPressure:    " << w.fAirPressure   << endl;
-            Out() << "Trend:          " << w.fTrend         << endl;
-            Out() << "DewPoint:       " << w.fDewPoint      << endl;
-            Out() << "WindDirection:  " << w.fWindDirection << endl;
-            Out() << "WindSpeed:      " << w.fWindSpeed     << endl;
-            Out() << "Humidity:       " << w.fHumidity      << endl;
-            Out() << "Temperature:    " << w.fTemperature   << endl;
-            Out() << "Solarimeter:    " << w.fSolarimeter   << endl;
+            Out() << "Date:           " << timeObj          << endl;
+            Out() << "DustTotal:      " << w.fDustTotal     << " ugr/m^2" << endl;
+            Out() << "AirPressure:    " << w.fAirPressure   << " mbar"    << endl;
+            Out() << "DewPoint:       " << w.fDewPoint      << " deg C"   << endl;
+            Out() << "WindDirection:  " << w.fWindDirection << " deg"     << endl;
+            Out() << "WindSpeed:      " << w.fWindSpeed     << " m/s"     << endl;
+            Out() << "Humidity:       " << w.fHumidity      << "%"        << endl;
+            Out() << "Temperature:    " << w.fTemperature   << " deg C"   << endl;
+            Out() << "TempTrend 24h:  " << w.fTempTrend     << " deg C"   << endl;
+            Out() << "Solarimeter:    " << w.fSolarimeter   << " W/m^2"   << endl;
             Out() << endl;
-        }
-
-        fLastReport = time;
-
-        UpdateWeather(time, w);
+            Out() << "Seeing:         " << s.fSeeing << " arcsec [" << timeSee << "]" << endl;
+            Out() << "Seeing:         " << s.fSeeingMed << " +- " << s.fSeeingStdev << endl;
+            Out() << endl;
+        }
+
+        fLastReport = timeObj;
+
+        UpdateWeather(timeObj, w);
+
+        if (timeSee.IsValid() && fLastSeeing!=timeSee)
+        {
+            UpdateSeeing(timeSee, s);
+            fLastSeeing = timeSee;
+        }
 
         if (fDust==w.fDustTotal)
             return;
 
-        UpdateDust(time, w.fDustTotal);
+        UpdateDust(timeObj, w.fDustTotal);
         fDust = w.fDustTotal;
 
         ostringstream out;
-        out << setprecision(3) << "Dust: " << fDust << "ug/m^3 [" << time << "]";
+        out << setprecision(3) << "Dust: " << fDust << "ug/m^3 [" << timeObj << "]";
         Message(out);
     }
@@ -246,5 +274,5 @@
             "User-Agent: FACT tngweather\r\n"
             "Accept: */*\r\n"
-            "Host: "+Address()+"\r\n"
+            "Host: "+URL()+"\r\n"
             "Connection: close\r\n"//Keep-Alive\r\n"
             "Content-Type: application/rss+xml\r\n"
@@ -315,5 +343,5 @@
     ConnectionWeather(ba::io_service& ioservice, MessageImp &imp) : Connection(ioservice, imp()),
         fIsVerbose(true), fDust(-1),
-        fLastReport(Time::none), fLastReception(Time::none),
+        fLastReport(Time::none), fLastReception(Time::none), fLastSeeing(Time::none),
         fKeepAlive(ioservice)
     {
@@ -360,4 +388,5 @@
     DimDescribedService fDimWeather;
     DimDescribedService fDimAtmosphere;
+    DimDescribedService fDimSeeing;
 
     virtual void UpdateWeather(const Time &t, const DimWeather &data)
@@ -371,4 +400,10 @@
         fDimAtmosphere.setData(&dust, sizeof(float));
         fDimAtmosphere.Update(t);
+    }
+
+    virtual void UpdateSeeing(const Time &t, const DimSeeing &see)
+    {
+        fDimSeeing.setData(&see, sizeof(DimSeeing));
+        fDimSeeing.Update(t);
     }
 
@@ -376,20 +411,20 @@
     ConnectionDimWeather(ba::io_service& ioservice, MessageImp &imp) :
         ConnectionWeather(ioservice, imp),
-        fDimWeather("TNG_WEATHER/DATA", "F:1;F:1;F:1;F:1;F:1;F:1;F:1;F:1;D:1;F:1;F:1;F:1;F:1",
+        fDimWeather("TNG_WEATHER/DATA", "F:1;F:1;F:1;F:1;F:1;F:1;F:1;F:1;F:1",
                      "|T[deg C]:Temperature"
+                     "|DeltaT[deg C]:Temperature trend 24h"
                      "|T_dew[deg C]:Dew point"
                      "|H[%]:Humidity"
                      "|P[mbar]:Air pressure"
-                     "|Trend"
                      "|v[km/h]:Wind speed"
                      "|d[deg]:Wind direction (N-E)"
                      "|Dust[ug/m^3]:Dust (total)"
-                     "|SeeingDate[mjd]:Seeing MJD"
-                     "|Seeing[arcsec]:Seeing"
-                     "|Seeing[arcsec]:Seeing Median"
-                     "|SeeingStdev[arcsec]:Seeing Stdev"
                      "|Solarimeter[W/m^2]:Solarimeter"),
         fDimAtmosphere("TNG_WEATHER/DUST", "F:1",
-                       "|Dust[ug/m^3]:Dust (total)")
+                       "|Dust[ug/m^3]:Dust (total)"),
+        fDimSeeing("TNG_WEATHER/SEEING", "F:1;F:1;F:1",
+                   "|Seeing[arcsec]:Seeing"
+                   "|Seeing[arcsec]:Seeing Median"
+                   "|SeeingStdev[arcsec]:Seeing Stdev")
     {
     }
