Index: trunk/BNC/src/PPP_SSR_I/pppClient.cpp
===================================================================
--- trunk/BNC/src/PPP_SSR_I/pppClient.cpp	(revision 8482)
+++ trunk/BNC/src/PPP_SSR_I/pppClient.cpp	(revision 8483)
@@ -408,5 +408,5 @@
     bncTime ToT = satData->tt - prange / t_CST::c - clkSat;
 
-    ColumnVector xc(4);
+    ColumnVector xc(7);
     ColumnVector vv(3);
     if (getSatPos(ToT, satData->prn, xc, vv) != success) {
Index: trunk/BNC/src/RTCM/rtcm_utils.cpp
===================================================================
--- trunk/BNC/src/RTCM/rtcm_utils.cpp	(revision 8482)
+++ trunk/BNC/src/RTCM/rtcm_utils.cpp	(revision 8483)
@@ -10,12 +10,12 @@
 
 void resolveEpoch (double secsHour,
-                   int  refWeek,   double  refSecs,  
+                   int  refWeek,   double  refSecs,
                    int& epochWeek, double& epochSecs) {
 
-  const double secsPerWeek = 604800.0;                            
+  const double secsPerWeek = 604800.0;
 
   epochWeek = refWeek;
   epochSecs = secsHour + 3600.0*(floor((refSecs-secsHour)/3600.0+0.5));
-  
+
   if (epochSecs<0          ) { epochWeek--; epochSecs+=secsPerWeek; };
   if (epochSecs>secsPerWeek) { epochWeek++; epochSecs-=secsPerWeek; };
@@ -29,11 +29,11 @@
            double& xSat, double& ySat, double& zSat, double& clkSat) {
 
-  const double omega_earth = 7292115.1467e-11; 
-  const double secsPerWeek = 604800.0;                            
+  const double omega_earth = 7292115.1467e-11;
+  const double secsPerWeek = 604800.0;
 
   // Initial values
   // --------------
   rho = 0.0;
-  ColumnVector xc(4);
+  ColumnVector xc(7);
   ColumnVector vv(3);
   eph->getCrd(bncTime(GPSWeek, GPSWeeks), xc, vv, false);
@@ -45,5 +45,5 @@
   ////cout << "----- cmpRho -----\n";
   ////eph->print(cout);
-  ////cout << "  pos " << setw(4)  << GPSWeek 
+  ////cout << "  pos " << setw(4)  << GPSWeek
   ////     << " "      << setw(14) << setprecision(6) << GPSWeeks
   ////     << " "      << setw(13) << setprecision(3) << xSat
@@ -57,10 +57,10 @@
   do {
     rhoLast = rho;
-    
+
     // Correction station position due to Earth Rotation
     // -------------------------------------------------
     double dPhi = omega_earth * rho / c_light;
-    double xRec = stax * cos(dPhi) - stay * sin(dPhi); 
-    double yRec = stay * cos(dPhi) + stax * sin(dPhi); 
+    double xRec = stax * cos(dPhi) - stay * sin(dPhi);
+    double yRec = stay * cos(dPhi) + stax * sin(dPhi);
     double zRec = staz;
 
@@ -81,5 +81,5 @@
       GPSWeek_tot  += 1;
     }
-      
+
     eph->getCrd(bncTime(GPSWeek_tot, GPSWeeks_tot), xc, vv, false);
     xSat   = xc(1);
@@ -94,5 +94,5 @@
     rho = sqrt(dx*dx + dy*dy + dz*dz);
 
-    ////cout << "  scrd "   << setw(4)  << GPSWeek_tot 
+    ////cout << "  scrd "   << setw(4)  << GPSWeek_tot
     ////	 << " "         << setw(15) << setprecision(8) << GPSWeeks_tot
     ////	 << " "         << setw(13) << setprecision(3) << xSat
@@ -108,9 +108,9 @@
     ////	 << " rho "     << setw(13) << setprecision(3) << rho
     ////	 << endl;
-    
+
 
     ////cout.setf(ios::fixed);
     ////
-    ////cout << "niter " << setw(3) << ++niter 
+    ////cout << "niter " << setw(3) << ++niter
     ////         << " " << setw(14) << setprecision(3) << rhoLast
     ////         << " " << setw(14) << setprecision(3) << rho
Index: trunk/BNC/src/bncclockrinex.cpp
===================================================================
--- trunk/BNC/src/bncclockrinex.cpp	(revision 8482)
+++ trunk/BNC/src/bncclockrinex.cpp	(revision 8483)
@@ -41,5 +41,6 @@
 ////////////////////////////////////////////////////////////////////////////
 t_irc bncClockRinex::write(int GPSweek, double GPSweeks, const QString& prn,
-                           double sp3Clk) {
+                           double clkRnx, double clkRnxRate, double clkRnxAcc,
+                           double clkRnxSig, double clkRnxRateSig, double clkRnxAccSig) {
 
   if (reopen(GPSweek, GPSweeks) == success) {
@@ -48,8 +49,30 @@
       double sec = fmod(GPSweeks, 60.0);
 
+      int numValues = 1;
+      if (clkRnxSig && clkRnxRate && clkRnxRateSig) {
+        numValues += 3;
+      }
+      if (clkRnxAcc && clkRnxAccSig) {
+        numValues += 2;
+      }
+
       _out << "AS " << prn.toLatin1().data()
            << datTim.toString("  yyyy MM dd hh mm").toLatin1().data()
            << fixed      << setw(10) << setprecision(6)  << sec
-           << "  1   "   << fortranFormat(sp3Clk, 19, 12).toLatin1().data() << endl;
+           << "  " << numValues << "   "
+           << fortranFormat(clkRnx, 19, 12).toLatin1().data();
+
+      if (numValues >=2) {
+        _out << " " << fortranFormat(clkRnxSig, 19, 12).toLatin1().data() << endl;
+      }
+      if (numValues == 4) {
+        _out << fortranFormat(clkRnxRate, 19, 12).toLatin1().data() << " ";
+        _out << fortranFormat(clkRnxRateSig, 19, 12).toLatin1().data() << " ";
+      }
+      if (numValues == 6) {
+        _out << fortranFormat(clkRnxAcc, 19, 12).toLatin1().data() << " ";
+        _out << " " << fortranFormat(clkRnxAccSig, 19, 12).toLatin1().data();
+      }
+      _out << endl;
 
     return success;
Index: trunk/BNC/src/bncclockrinex.h
===================================================================
--- trunk/BNC/src/bncclockrinex.h	(revision 8482)
+++ trunk/BNC/src/bncclockrinex.h	(revision 8483)
@@ -4,6 +4,5 @@
 #include <fstream>
 #include <newmat.h>
-
-#include <QDateTime>
+#include <QtCore>
 
 #include "bncoutf.h"
@@ -13,6 +12,7 @@
   bncClockRinex(const QString& sklFileName, const QString& intr, int sampl);
   virtual ~bncClockRinex();
-  virtual t_irc write(int GPSweek, double GPSweeks, const QString& prn, 
-                      double sp3Clk);
+  virtual t_irc write(int GPSweek, double GPSweeks, const QString& prn,
+      double clkRnx, double clkRnxRate, double clkRnxAcc,
+      double clkRnxSig, double clkRnxRateSig, double clkRnxAccSig);
 
  private:
Index: trunk/BNC/src/bncephuser.cpp
===================================================================
--- trunk/BNC/src/bncephuser.cpp	(revision 8482)
+++ trunk/BNC/src/bncephuser.cpp	(revision 8483)
@@ -187,5 +187,5 @@
   // Simple Check - check satellite radial distance
   // ----------------------------------------------
-  ColumnVector xc(4);
+  ColumnVector xc(7);
   ColumnVector vv(3);
   if (eph->getCrd(eph->TOC(), xc, vv, false) != success) {
Index: trunk/BNC/src/bnchelp.html
===================================================================
--- trunk/BNC/src/bnchelp.html	(revision 8482)
+++ trunk/BNC/src/bnchelp.html	(revision 8483)
@@ -4016,12 +4016,14 @@
 <table>
   <tr><td><i>Key&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</i></td><td><i>Values</i></td></tr>
-  <tr><td>APC</td><td>Satellite Antenna Phase Center coordinates in meters</td></tr>
-  <tr><td>Clk</td><td>Satellite clock correction in meters, relativistic correction applied like in broadcast clocks</td></tr>
-  <tr><td>Vel</td><td>Satellite velocity in meters per second</td></tr>
-  <tr><td>CoM</td><td>Satellite Center of Mass coordinates in meters</td></tr>
+  <tr><td>APC</td><td>Satellite Antenna Phase Center coordinate components in meters</td></tr>
+  <tr><td>Clk</td><td>Satellite clock correction components in meters, meters per seconds and meters per sec&#178 (relativistic correction applied like in broadcast clocks)</td></tr>
+  <tr><td>ClkSig</td><td>Standard deviation for satellite clock correction components in meters, meters per seconds and meters per sec&#178 (required for Clock RINEX file only) /td></tr>
+  <tr><td>Vel</td><td>Satellite velocity components in meters per second</td></tr>
+  <tr><td>CoM</td><td>Satellite Center of Mass coordinate components in meters</td></tr>
+  <tr><td>Ura</td><td>User range accuracy value in meters</td></tr>
   <tr><td>CodeBias</td><td>Satellite Code Biases in meters with two characters for frequency and tracking mode per bias as defined in RINEX 3 and preceded by total number of biases</td></tr>
-  <tr><td>YawAngle</td><td>Satellite Yaw Angle in radian, restricted to be in [0, 2&#960] which shall be used for the computation of phase wind-up correction</td></tr>
+  <tr><td>PhaseBias</td><td>Satellite Phase Biases in meters with two characters for frequency and tracking mode per bias as defined in RINEX 3, preceded by total number of biases and followed by Signal Integer Indicator, Signals Wilde-Lane Integer Indicator as well as Signal Discontinuity Counter</td></tr>
+  <tr><td>YawAngle</td><td>Satellite Yaw Angle in radian, restricted to be in [0, 2&#960], which shall be used for the computation of phase wind-up correction</td></tr>
   <tr><td>YawRate</td><td>Satellite Yaw Rate in radian per second which is the rate of Yaw Angle</td></tr>
-  <tr><td>PhaseBias</td><td>Satellite Phase Biases in meters with two characters for frequency and tracking mode per bias as defined in RINEX 3, preceded by total number of biases and followed by Signal Integer Indicator, Signals Wilde-Lane Integer Indicator as well as Signal Discontinuity Counter</td></tr>
 </table>
 <p>
Index: trunk/BNC/src/bncsp3.cpp
===================================================================
--- trunk/BNC/src/bncsp3.cpp	(revision 8482)
+++ trunk/BNC/src/bncsp3.cpp	(revision 8483)
@@ -64,5 +64,6 @@
 ////////////////////////////////////////////////////////////////////////////
 t_irc bncSP3::write(int GPSweek, double GPSweeks, const QString& prn,
-                    const ColumnVector& xCoM, double sp3Clk) {
+                    const ColumnVector& xCoM, double sp3Clk,
+                    const ColumnVector& v, double sp3ClkRate) {
 
   if (reopen(GPSweek, GPSweeks) == success) {
@@ -88,9 +89,18 @@
 
     _out << "P" << prn.toLatin1().data()
-         << setw(14) << setprecision(6) << xCoM(1) / 1000.0
-         << setw(14) << setprecision(6) << xCoM(2) / 1000.0
-         << setw(14) << setprecision(6) << xCoM(3) / 1000.0
-         << setw(14) << setprecision(6) << sp3Clk * 1e6 << endl;
-
+         << setw(14) << setprecision(6) << xCoM(1) / 1000.0 // [km]
+         << setw(14) << setprecision(6) << xCoM(2) / 1000.0 // [km]
+         << setw(14) << setprecision(6) << xCoM(3) / 1000.0 // [km]
+         << setw(14) << setprecision(6) << sp3Clk * 1e6     // microseconds
+         << endl;
+
+    if (sp3ClkRate) {
+      _out << "V" << prn.toLatin1().data()
+           << setw(14) << setprecision(6) << v(1) * 10.0      // [dm/s]
+           << setw(14) << setprecision(6) << v(2) * 10.0      // [dm/s]
+           << setw(14) << setprecision(6) << v(3) * 10.0      // [dm/s]
+           << setw(14) << setprecision(6) << sp3ClkRate * 1e2 // 10^⁻4 microseconds/sec
+           << endl;
+    }
     return success;
   }
Index: trunk/BNC/src/bncsp3.h
===================================================================
--- trunk/BNC/src/bncsp3.h	(revision 8482)
+++ trunk/BNC/src/bncsp3.h	(revision 8483)
@@ -16,5 +16,5 @@
    public:
     t_sp3Sat() {
-      _xyz.ReSize(3); 
+      _xyz.ReSize(3);
       _xyz      = 0.0;
       _clk      = 0.0;
@@ -43,6 +43,7 @@
   bncSP3(const QString& sklFileName, const QString& intr, int sampl); // output
   virtual ~bncSP3();
-  t_irc write(int GPSweek, double GPSweeks, const QString& prn, 
-              const ColumnVector& xCoM, double sp3Clk);
+  t_irc write(int GPSweek, double GPSweeks, const QString& prn,
+              const ColumnVector& xCoM, double sp3Clk,
+              const ColumnVector& v, double sp3ClkRate);
   const t_sp3Epoch* nextEpoch();
   const t_sp3Epoch* currEpoch() const {return _currEpoch;}
Index: trunk/BNC/src/combination/bnccomb.cpp
===================================================================
--- trunk/BNC/src/combination/bnccomb.cpp	(revision 8482)
+++ trunk/BNC/src/combination/bnccomb.cpp	(revision 8483)
@@ -449,9 +449,9 @@
   }
 
-  ColumnVector oldXC(4);
+  ColumnVector oldXC(7);
   ColumnVector oldVV(3);
   corr->_eph->getCrd(corr->_time, oldXC, oldVV, false);
 
-  ColumnVector newXC(4);
+  ColumnVector newXC(7);
   ColumnVector newVV(3);
   lastEph->getCrd(corr->_time, newXC, newVV, false);
@@ -688,5 +688,5 @@
     const t_eph* eph = corr->_eph;
     if (eph) {
-      ColumnVector xc(4);
+      ColumnVector xc(7);
       ColumnVector vv(3);
       eph->getCrd(_resTime, xc, vv, false);
@@ -740,5 +740,5 @@
     clkCorrections.push_back(clkCorr);
 
-    ColumnVector xc(4);
+    ColumnVector xc(7);
     ColumnVector vv(3);
     corr->_eph->setClkCorr(dynamic_cast<const t_clkCorr*>(&clkCorr));
Index: trunk/BNC/src/ephemeris.cpp
===================================================================
--- trunk/BNC/src/ephemeris.cpp	(revision 8482)
+++ trunk/BNC/src/ephemeris.cpp	(revision 8483)
@@ -368,4 +368,8 @@
   double tc = tt - _TOC;
   xc[3] = _clock_bias + _clock_drift*tc + _clock_driftrate*tc*tc;
+
+  xc[4] = _clock_bias;
+  xc[5] = _clock_drift;
+  xc[6] = _clock_driftrate;
 
   // Velocity
@@ -651,4 +655,8 @@
   xc[3] = -_tau + _gamma * dtClk;
 
+  xc[4] = -_tau;
+  xc[5] = _gamma;
+  xc[6] = 0.0;
+
   return success;
 }
@@ -964,4 +972,8 @@
   xc[3] = _clock_bias + _clock_drift*tc + _clock_driftrate*tc*tc;
 
+  xc[4] = _clock_bias;
+  xc[5] = _clock_drift;
+  xc[6] = _clock_driftrate;
+
   // Velocity
   // --------
@@ -1306,4 +1318,8 @@
 
   xc[3] = _agf0 + _agf1 * dt;
+
+  xc[4] = _agf0;
+  xc[5] = _agf1;
+  xc[6] = 0.0;
 
   return success;
@@ -1657,4 +1673,8 @@
   xc[3] = _clock_bias + _clock_drift*tc + _clock_driftrate*tc*tc;
 
+  xc[4] = _clock_bias;
+  xc[5] = _clock_drift;
+  xc[6] = _clock_driftrate;
+
   // dotC  = _clock_drift + _clock_driftrate*tc
   //       - 4.442807633e-10*_e*sqrt(a0)*cos(E) * dEdM * n;
Index: trunk/BNC/src/rinex/reqcanalyze.cpp
===================================================================
--- trunk/BNC/src/rinex/reqcanalyze.cpp	(revision 8482)
+++ trunk/BNC/src/rinex/reqcanalyze.cpp	(revision 8483)
@@ -351,5 +351,5 @@
   }
   if (eph) {
-    ColumnVector xc(4);
+    ColumnVector xc(7);
     ColumnVector vv(3);
     if ( xyzSta.size() == 3 && (xyzSta[0] != 0.0 || xyzSta[1] != 0.0 || xyzSta[2] != 0.0) &&
@@ -1101,5 +1101,5 @@
       for (epoTime = startTime - interval; epoTime < endTime;
            epoTime = epoTime + interval) {
-        ColumnVector xc(4);
+        ColumnVector xc(7);
         ColumnVector vv(3);
         if ( xyzSta.size() == 3 && (xyzSta[0] != 0.0 || xyzSta[1] != 0.0 || xyzSta[2] != 0.0) &&
Index: trunk/BNC/src/satObs.cpp
===================================================================
--- trunk/BNC/src/satObs.cpp	(revision 8482)
+++ trunk/BNC/src/satObs.cpp	(revision 8483)
@@ -18,5 +18,5 @@
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 void t_clkCorr::writeEpoch(ostream* out, const QList<t_clkCorr>& corrList) {
@@ -43,5 +43,5 @@
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 void t_clkCorr::readEpoch(const string& epoLine, istream& inStream, QList<t_clkCorr>& corrList) {
@@ -62,5 +62,5 @@
     getline(inStream, line);
     istringstream in(line.c_str());
-    
+
     in >> corr._prn >> corr._iod >> corr._dClk >> corr._dotDClk >> corr._dotDotDClk;
     if (corr._prn.system() == 'E') {
@@ -85,5 +85,5 @@
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 void t_orbCorr::writeEpoch(ostream* out, const QList<t_orbCorr>& corrList) {
@@ -113,5 +113,5 @@
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 void t_orbCorr::readEpoch(const string& epoLine, istream& inStream, QList<t_orbCorr>& corrList) {
@@ -132,7 +132,7 @@
     getline(inStream, line);
     istringstream in(line.c_str());
-    
+
     in >> corr._prn      >> corr._iod
-       >> corr._xr[0]    >> corr._xr[1]    >> corr._xr[2]   
+       >> corr._xr[0]    >> corr._xr[1]    >> corr._xr[2]
        >> corr._dotXr[0] >> corr._dotXr[1] >> corr._dotXr[2];
 
@@ -144,5 +144,62 @@
 }
 
-// 
+// Constructor
+////////////////////////////////////////////////////////////////////////////
+t_URA::t_URA() {
+  _updateInt  = 0;
+  _iod        = 0;
+  _ura        = 0.0;
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+void t_URA::writeEpoch(ostream* out, const QList<t_URA>& corrList) {
+  if (!out || corrList.size() == 0) {
+    return;
+  }
+  out->setf(ios::fixed);
+  bncTime epoTime;
+  QListIterator<t_URA> it(corrList);
+  while (it.hasNext()) {
+    const t_URA& corr = it.next();
+    if (!epoTime.valid()) {
+      epoTime = corr._time;
+      *out << "> URA " << epoTime.datestr(' ') << ' ' << epoTime.timestr(1,' ') << " "
+          <<  corr._updateInt <<  " "
+           << corrList.size() << ' ' << corr._staID << endl;
+    }
+    *out << corr._prn.toString() << ' ' << setw(11) << corr._iod << ' '
+         << setw(10) << setprecision(4) << corr._ura << endl;
+  }
+  out->flush();
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+void t_URA::readEpoch(const string& epoLine, istream& inStream, QList<t_URA>& corrList) {
+  bncTime      epoTime;
+  unsigned int updateInt;
+  int          numCorr;
+  string       staID;
+  if (t_corrSSR::readEpoLine(epoLine, epoTime, updateInt, numCorr, staID) != t_corrSSR::URA) {
+    return;
+  }
+  for (int ii = 0; ii < numCorr; ii++) {
+    t_URA corr;
+    corr._time      = epoTime;
+    corr._updateInt = updateInt;
+    corr._staID     = staID;
+
+    string line;
+    getline(inStream, line);
+    istringstream in(line.c_str());
+
+    in >> corr._prn >> corr._iod >> corr._ura;
+
+    corrList.push_back(corr);
+  }
+}
+
+//
 ////////////////////////////////////////////////////////////////////////////
 void t_satCodeBias::writeEpoch(ostream* out, const QList<t_satCodeBias>& biasList) {
@@ -172,5 +229,5 @@
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 void t_satCodeBias::readEpoch(const string& epoLine, istream& inStream, QList<t_satCodeBias>& biasList) {
@@ -191,5 +248,5 @@
     getline(inStream, line);
     istringstream in(line.c_str());
-    
+
     int numBias;
     in >> satCodeBias._prn >> numBias;
@@ -207,5 +264,5 @@
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 void t_satPhaseBias::writeEpoch(ostream* out, const QList<t_satPhaseBias>& biasList) {
@@ -242,6 +299,6 @@
   out->flush();
 }
-  
-// 
+
+//
 ////////////////////////////////////////////////////////////////////////////
 void t_satPhaseBias::readEpoch(const string& epoLine, istream& inStream, QList<t_satPhaseBias>& biasList) {
@@ -290,5 +347,5 @@
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 void t_vTec::write(ostream* out, const t_vTec& vTec) {
@@ -306,6 +363,6 @@
          << setw(2)  << layer._C.Nrows()-1 << ' '
          << setw(2)  << layer._C.Ncols()-1 << ' '
-         << setw(10) << setprecision(1) << layer._height << endl  
-         << setw(10) << setprecision(4) << layer._C 
+         << setw(10) << setprecision(1) << layer._height << endl
+         << setw(10) << setprecision(4) << layer._C
          << setw(10) << setprecision(4) << layer._S;
   }
@@ -313,5 +370,5 @@
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 void t_vTec::read(const string& epoLine, istream& inStream, t_vTec& vTec) {
@@ -357,7 +414,7 @@
 }
 
-// 
-////////////////////////////////////////////////////////////////////////////
-t_corrSSR::e_type t_corrSSR::readEpoLine(const string& line, bncTime& epoTime, 
+//
+////////////////////////////////////////////////////////////////////////////
+t_corrSSR::e_type t_corrSSR::readEpoLine(const string& line, bncTime& epoTime,
                                          unsigned int& updateInt, int& numEntries,
                                          string& staID) {
@@ -370,5 +427,5 @@
   double sec;
 
-  inLine >> epoChar >> typeString 
+  inLine >> epoChar >> typeString
          >> year >> month >> day >> hour >> min >> sec >> updateInt >> numEntries >> staID;
 
@@ -390,4 +447,7 @@
       return vTec;
     }
+    else if (typeString == "URA") {
+      return URA;
+    }
   }
 
Index: trunk/BNC/src/satObs.h
===================================================================
--- trunk/BNC/src/satObs.h	(revision 8482)
+++ trunk/BNC/src/satObs.h	(revision 8483)
@@ -110,4 +110,17 @@
 };
 
+class t_URA {
+ public:
+  t_URA();
+  static void writeEpoch(std::ostream* out, const QList<t_URA>& corrList);
+  static void readEpoch(const std::string& epoLine, std::istream& in, QList<t_URA>& corrList);
+  std::string    _staID;
+  t_prn          _prn;
+  unsigned int   _iod;
+  bncTime        _time;
+  unsigned int   _updateInt;
+  double         _ura;
+};
+
 class t_frqCodeBias {
  public:
@@ -189,5 +202,5 @@
 class t_corrSSR {
  public:
-  enum e_type {clkCorr, orbCorr, codeBias, phaseBias, vTec, unknown};
+  enum e_type {clkCorr, orbCorr, codeBias, phaseBias, vTec, URA, unknown};
   static e_type readEpoLine(const std::string& line, bncTime& epoTime,
                             unsigned int& updateInt, int& numEntries, std::string& staID);
Index: trunk/BNC/src/upload/bncrtnetuploadcaster.cpp
===================================================================
--- trunk/BNC/src/upload/bncrtnetuploadcaster.cpp	(revision 8482)
+++ trunk/BNC/src/upload/bncrtnetuploadcaster.cpp	(revision 8483)
@@ -333,8 +333,10 @@
   for (int ii = 1; ii < lines.size(); ii++) {
     QString key;  // prn or key VTEC, IND (phase bias indicators)
-    ColumnVector rtnAPC;
-    ColumnVector rtnVel;
-    ColumnVector rtnCoM;
-    double rtnClk;
+    double rtnUra;          // [m]
+    ColumnVector rtnAPC;    // [m, m, m]
+    ColumnVector rtnVel;    // [m/s, m/s, m/s]]
+    ColumnVector rtnCoM;    // [m, m, m]
+    ColumnVector rtnClk;    // [m, m/s, m/s²]
+    ColumnVector rtnClkSig; // [m, m/s, m/s²]
     t_prn prn;
 
@@ -435,8 +437,28 @@
           }
         }
-        else if (key == "Clk") {
+        else if (key == "Ura") {
           in >> numVal;
           if (numVal == 1)
-            in >> rtnClk;
+            in >> rtnUra;
+        }
+        else if (key == "Clk") {
+          rtnClk.ReSize(3);
+          for (int ii = 0; ii < 3; ii++) {
+            rtnClk[ii] = 0.0;
+          }
+          in >> numVal;
+          for (int ii = 0; ii < numVal; ii++) {
+            in >> rtnClk[ii];
+          }
+        }
+        else if (key == "ClkSig") {
+          rtnClkSig.ReSize(3);
+          for (int ii = 0; ii < 3; ii++) {
+            rtnClkSig[ii] = 0.0;
+          }
+          in >> numVal;
+          for (int ii = 0; ii < numVal; ii++) {
+            in >> rtnClkSig[ii];
+          }
         }
         else if (key == "Vel") {
@@ -526,6 +548,6 @@
       if (sd) {
         QString outLine;
-        processSatellite(eph, epoTime.gpsw(), epoTime.gpssec(), prnStr, rtnAPC,
-            rtnClk, rtnVel, rtnCoM, sd, outLine);
+        processSatellite(eph, epoTime.gpsw(), epoTime.gpssec(), prnStr, rtnAPC, rtnUra,
+            rtnClk, rtnVel, rtnCoM, rtnClkSig, sd, outLine);
       }
 
@@ -2243,10 +2265,11 @@
 void bncRtnetUploadCaster::processSatellite(const t_eph* eph, int GPSweek,
     double GPSweeks, const QString& prn, const ColumnVector& rtnAPC,
-    double rtnClk, const ColumnVector& rtnVel, const ColumnVector& rtnCoM,
+    double rtnUra, const ColumnVector& rtnClk, const ColumnVector& rtnVel,
+    const ColumnVector& rtnCoM, const ColumnVector& rtnClkSig,
     struct ClockOrbit::SatData* sd, QString& outLine) {
 
   // Broadcast Position and Velocity
   // -------------------------------
-  ColumnVector xB(4);
+  ColumnVector xB(7);
   ColumnVector vB(3);
   eph->getCrd(bncTime(GPSweek, GPSweeks), xB, vB, false);
@@ -2276,32 +2299,41 @@
   // Clock Correction
   // ----------------
-  double dClk = rtnClk - (xB(4) - dc) * t_CST::c;
+  double dClkA0 = rtnClk(1) - (xB(5) - dc) * t_CST::c;
+  double dClkA1 = rtnClk(2) - xB(6) * t_CST::c;
+  double dClkA2 = rtnClk(3) - xB(7) * t_CST::c;
 
   if (sd) {
     sd->ID = prn.mid(1).toInt();
     sd->IOD = eph->IOD();
-    sd->Clock.DeltaA0 = dClk;
-    sd->Clock.DeltaA1 = 0.0; // TODO
-    sd->Clock.DeltaA2 = 0.0; // TODO
-    sd->Orbit.DeltaRadial = rsw(1);
+    sd->Clock.DeltaA0 = dClkA0;
+    sd->Clock.DeltaA1 = dClkA1;
+    sd->Clock.DeltaA2 = dClkA2;
+    sd->UserRangeAccuracy = rtnUra;
+    sd->Orbit.DeltaRadial     = rsw(1);
     sd->Orbit.DeltaAlongTrack = rsw(2);
     sd->Orbit.DeltaCrossTrack = rsw(3);
-    sd->Orbit.DotDeltaRadial = dotRsw(1);
+    sd->Orbit.DotDeltaRadial     = dotRsw(1);
     sd->Orbit.DotDeltaAlongTrack = dotRsw(2);
     sd->Orbit.DotDeltaCrossTrack = dotRsw(3);
   }
 
-  outLine.sprintf("%d %.1f %s  %u  %10.3f  %8.3f %8.3f %8.3f\n", GPSweek,
-      GPSweeks, eph->prn().toString().c_str(), eph->IOD(), dClk, rsw(1), rsw(2),
-      rsw(3));
+  outLine.sprintf("%d %.1f %s  %u  %10.3f %8.3f %8.3f  %8.3f %8.3f %8.3f\n", GPSweek,
+      GPSweeks, eph->prn().toString().c_str(), eph->IOD(), dClkA0, dClkA1, dClkA2,
+      rsw(1), rsw(2), rsw(3));
 
   double relativity = -2.0 * DotProduct(xP, rtnVel) / t_CST::c;
-  double sp3Clk = (rtnClk - relativity) / t_CST::c;  // in seconds
+  double clkRnx     = (rtnClk[0] - relativity) / t_CST::c;  // in seconds
+  double clkRnxRate = rtnClk[1] / t_CST::c;                 // [s/s = -]
+  double clkRnxAcc  = rtnClk[2] / t_CST::c;                 // [s/s² ) -/s]
 
   if (_rnx) {
-    _rnx->write(GPSweek, GPSweeks, prn, sp3Clk);
+    double clkRnxSig     = rtnClkSig[0] / t_CST::c;           // in seconds
+    double clkRnxRateSig = rtnClkSig[1] / t_CST::c;           // [s/s = -]
+    double clkRnxAccSig  = rtnClkSig[2] / t_CST::c;           // [s/s² ) -/s]
+    _rnx->write(GPSweek, GPSweeks, prn, clkRnx, clkRnxRate, clkRnxAcc,
+                clkRnxSig, clkRnxRateSig, clkRnxAccSig);
   }
   if (_sp3) {
-    _sp3->write(GPSweek, GPSweeks, prn, rtnCoM, sp3Clk);
+    _sp3->write(GPSweek, GPSweeks, prn, rtnCoM, clkRnx, rtnVel, clkRnxRate);
   }
 }
Index: trunk/BNC/src/upload/bncrtnetuploadcaster.h
===================================================================
--- trunk/BNC/src/upload/bncrtnetuploadcaster.h	(revision 8482)
+++ trunk/BNC/src/upload/bncrtnetuploadcaster.h	(revision 8483)
@@ -33,7 +33,9 @@
                         double GPSweeks, const QString& prn,
                         const ColumnVector& rtnAPC,
-                        double rtnClk,
+                        double ura,
+                        const ColumnVector& rtnClk,
                         const ColumnVector& rtnVel,
                         const ColumnVector& rtnCoM,
+                        const ColumnVector& rtnClkSig,
                         struct ClockOrbit::SatData* sd,
                         QString& outLine);
