Index: trunk/BNC/GPSS/hassDecoder.cpp
===================================================================
--- trunk/BNC/GPSS/hassDecoder.cpp	(revision 3519)
+++ trunk/BNC/GPSS/hassDecoder.cpp	(revision 3520)
@@ -19,4 +19,5 @@
 #include "hassDecoder.h"
 #include "bnctime.h"
+#include "bncutils.h"
 
 using namespace std;
@@ -57,11 +58,15 @@
     int     mjd, IOD;
     double  daySec;
-    double  deltaX, deltaY, deltaZ, deltaClk;
-    double  rateDeltaX, rateDeltaY, rateDeltaZ;
+    ColumnVector dx(3);
+    ColumnVector dxRate(3);
+    double clkFull;
+
     QString prn;
     
-    in >> mjd >> daySec >> prn >> IOD >> deltaX >> deltaY >> deltaZ
-       >> deltaClk >> rateDeltaX >> rateDeltaY >> rateDeltaZ;
+    in >> mjd >> daySec >> prn >> IOD >> dx[0] >> dx[1] >> dx[2] >> clkFull
+       >> dxRate[0] >> dxRate[1] >> dxRate[2];
 
+    // Correction Time
+    // ---------------
     bncTime tt; 
     tt.setmjd(daySec, mjd);
@@ -70,13 +75,45 @@
     long coTime = tt.gpsw() * 7*24*3600 + long(floor(_GPSweeks+0.5));
 
+    // Transform Correction
+    // --------------------
+    dx     = -dx;
+    dxRate = -dxRate;
+
+    t_eph* eph = 0;
+    if (_eph.contains(prn)) {
+      if      (_eph.value(prn)->last && _eph.value(prn)->last->IOD() == IOD) {
+        eph = _eph.value(prn)->last;
+      }
+      else if (_eph.value(prn)->prev && _eph.value(prn)->prev->IOD() == IOD) {
+        eph = _eph.value(prn)->prev;
+      }
+    }
+    if (!eph) {
+      continue;
+    }
+
+    ColumnVector xc(4);
+    ColumnVector vv(3);
+    eph->position(tt.gpsw(), tt.gpssec(), xc.data(), vv.data());
+
+    ColumnVector rao(3);
+    XYZ_to_RSW(xc.Rows(1,3), vv, dx,     rao);
+
+    ColumnVector dotRao(3);
+    XYZ_to_RSW(xc.Rows(1,3), vv, dxRate, dotRao);
+
+    double dClk = clkFull - xc[3] * t_CST::c;
+
+    // Print Correction Line
+    // ---------------------
     QString corrLine;
 
-    int updateInterval =  0;
-    int messageType = 0;
+    int updateInterval = 0;
+    int messageType    = 0;
     if      (prn[0] == 'G') {
-      messageType = -COTYPE_GPSCOMBINED;
+      messageType = COTYPE_GPSCOMBINED;
     }
     else if (prn[0] == 'R') {
-      messageType = -COTYPE_GLONASSCOMBINED;
+      messageType = COTYPE_GLONASSCOMBINED;
     }
 
@@ -88,6 +125,6 @@
                      messageType, updateInterval, tt.gpsw(), _GPSweeks,
                      prn.toAscii().data(), IOD, 
-                     deltaClk, deltaX, deltaY, deltaZ, 
-                     0.0, rateDeltaX, rateDeltaY, rateDeltaZ, 0.0);
+                     dClk, rao[0], rao[1], rao[2],
+                     0.0, dotRao[0], dotRao[1], dotRao[2], 0.0);
 
     reopen(_fileNameSkl, _fileName, _out);    
Index: trunk/BNC/RTCM3/RTCM3coDecoder.h
===================================================================
--- trunk/BNC/RTCM3/RTCM3coDecoder.h	(revision 3519)
+++ trunk/BNC/RTCM3/RTCM3coDecoder.h	(revision 3520)
@@ -31,4 +31,5 @@
 #include <QtNetwork>
 
+#include "bncephuser.h"
 #include "RTCM/GPSDecoder.h"
 
@@ -37,5 +38,5 @@
 }
 
-class RTCM3coDecoder : public QObject, public GPSDecoder {
+class RTCM3coDecoder : public bncEphUser, public GPSDecoder {
 Q_OBJECT
  public:
