Index: /branches/BNC_2.12/src/bncfigure.cpp
===================================================================
--- /branches/BNC_2.12/src/bncfigure.cpp	(revision 9126)
+++ /branches/BNC_2.12/src/bncfigure.cpp	(revision 9127)
@@ -141,5 +141,5 @@
   int xMax = 640;
   int yMin =   0;
-  int yMax = 140;
+  int yMax =  90;
   float xLine = .60;
 
@@ -203,5 +203,5 @@
     painter.translate(xx-13, int(yMax-yMin)*xLine+65);
     painter.rotate(-90);
-    painter.drawText(0,0,65,50,Qt::AlignRight,staID.left(5) + "   ");
+    painter.drawText(-30,0,95,50,Qt::AlignRight,staID.left(10) + "   ");
     painter.restore();
 
Index: /branches/BNC_2.12/src/bncfigurelate.cpp
===================================================================
--- /branches/BNC_2.12/src/bncfigurelate.cpp	(revision 9126)
+++ /branches/BNC_2.12/src/bncfigurelate.cpp	(revision 9127)
@@ -29,5 +29,5 @@
  * Class:      bncFigureLate
  *
- * Purpose:    
+ * Purpose:
  *
  * Author:     Perlt, Mervart
@@ -35,5 +35,5 @@
  * Created:    11-Nov-2009
  *
- * Changes:    
+ * Changes:
  *
  * -----------------------------------------------------------------------*/
@@ -41,5 +41,5 @@
 #include <iostream>
 
-#include "bncfigurelate.h" 
+#include "bncfigurelate.h"
 #include "bncsettings.h"
 
@@ -60,8 +60,8 @@
 // Destructor
 ////////////////////////////////////////////////////////////////////////////
-bncFigureLate::~bncFigureLate() { 
+bncFigureLate::~bncFigureLate() {
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 void bncFigureLate::updateMountPoints() {
@@ -81,5 +81,5 @@
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 void bncFigureLate::slotNewLatency(const QByteArray staID, double clate) {
@@ -90,5 +90,5 @@
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 void bncFigureLate::slotNextAnimationFrame() {
@@ -98,5 +98,5 @@
 }
 
-// 
+//
 ////////////////////////////////////////////////////////////////////////////
 void bncFigureLate::paintEvent(QPaintEvent *) {
@@ -105,5 +105,5 @@
   int xMax = 640;
   int yMin =   0;
-  int yMax = 140;
+  int yMax =  90;
   float xLine = .60;
 
@@ -165,6 +165,5 @@
       int yy = int(yLength * (it.value() / maxLateRounded));
       QColor color = QColor::fromHsv(180,200,120+_ran[2][anchor]);
-      painter.fillRect(xx-13, int((yMax-yMin)*xLine)-yy, 9, yy, 
-                       QBrush(color,Qt::SolidPattern));
+      painter.fillRect(xx-13, int((yMax-yMin)*xLine)-yy, 9, yy, QBrush(color,Qt::SolidPattern));
       painter.setPen(Qt::black);
       if(it.value()<=0) {
@@ -176,5 +175,5 @@
     painter.translate(xx-13, int(yMax-yMin)*xLine+65);
     painter.rotate(-90);
-    painter.drawText(0,0,65,50,Qt::AlignRight,staID.left(5) + "   ");
+    painter.drawText(-30,0,95,50,Qt::AlignRight,staID.left(10) + "   ");
     painter.restore();
 
Index: /branches/BNC_2.12/src/bncgetthread.cpp
===================================================================
--- /branches/BNC_2.12/src/bncgetthread.cpp	(revision 9126)
+++ /branches/BNC_2.12/src/bncgetthread.cpp	(revision 9127)
@@ -290,14 +290,15 @@
   if (!_staID.isEmpty() && _latencycheck) {
     _latencyChecker = new latencyChecker(_staID);
-    obs = false;
-    ssrOrb = false;
-    ssrClk = false;
-    ssrOrbClk = false;
-    ssrCbi = false;
-    ssrPbi = false;
-    ssrVtec = false;
-    ssrUra = false;
-    ssrHr = false;
-    _ssrEpoch = 0;
+    _rtcmObs       = false;
+    _rtcmSsrOrb    = false;
+    _rtcmSsrClk    = false;
+    _rtcmSsrOrbClk = false;
+    _rtcmSsrCbi    = false;
+    _rtcmSsrPbi    = false;
+    _rtcmSsrVtec   = false;
+    _rtcmSsrUra    = false;
+    _rtcmSsrHr     = false;
+    _rtcmSsrIgs    = false;
+    _ssrEpoch      = 0;
   } else {
     _latencyChecker = 0;
@@ -465,4 +466,5 @@
           BNC_CORE->stopCombination();
           BNC_CORE->stopPPP();
+          sleep(1);
           ::exit(0);
         }
@@ -515,35 +517,39 @@
         _ssrEpoch = static_cast<int>(decoder()->corrGPSEpochTime());
         if (_ssrEpoch != -1) {
-          if (ssrOrb) {
+          if (_rtcmSsrOrb) {
             _latencyChecker->checkCorrLatency(_ssrEpoch, 1057);
-            ssrOrb = false;
-          }
-          if (ssrClk) {
+            _rtcmSsrOrb = false;
+          }
+          if (_rtcmSsrClk) {
             _latencyChecker->checkCorrLatency(_ssrEpoch, 1058);
-            ssrClk = false;
-          }
-          if (ssrOrbClk) {
+            _rtcmSsrClk = false;
+          }
+          if (_rtcmSsrOrbClk) {
             _latencyChecker->checkCorrLatency(_ssrEpoch, 1060);
-            ssrOrbClk = false;
-          }
-          if (ssrCbi) {
+            _rtcmSsrOrbClk = false;
+          }
+          if (_rtcmSsrCbi) {
             _latencyChecker->checkCorrLatency(_ssrEpoch, 1059);
-            ssrCbi = false;
-          }
-          if (ssrPbi) {
+            _rtcmSsrCbi = false;
+          }
+          if (_rtcmSsrPbi) {
             _latencyChecker->checkCorrLatency(_ssrEpoch, 1265);
-            ssrPbi = false;
-          }
-          if (ssrVtec) {
+            _rtcmSsrPbi = false;
+          }
+          if (_rtcmSsrVtec) {
             _latencyChecker->checkCorrLatency(_ssrEpoch, 1264);
-            ssrVtec = false;
-          }
-          if (ssrUra) {
+            _rtcmSsrVtec = false;
+          }
+          if (_rtcmSsrUra) {
             _latencyChecker->checkCorrLatency(_ssrEpoch, 1061);
-            ssrUra = false;
-          }
-          if (ssrHr) {
+            _rtcmSsrUra = false;
+          }
+          if (_rtcmSsrHr) {
             _latencyChecker->checkCorrLatency(_ssrEpoch, 1062);
-            ssrHr = false;
+            _rtcmSsrHr = false;
+          }
+          if (_rtcmSsrIgs) {
+            _latencyChecker->checkCorrLatency(_ssrEpoch, 4076);
+            _rtcmSsrIgs = false;
           }
         }
@@ -553,36 +559,40 @@
               (rtcmType >= 1009 && rtcmType <= 1012) || // legacy RTCM OBS
               (rtcmType >= 1071 && rtcmType <= 1137)) { // MSM RTCM OBS
-            obs = true;
+            _rtcmObs = true;
           } else if ((rtcmType >= 1057 && rtcmType <= 1068) ||
-                     (rtcmType >= 1240 && rtcmType <= 1270)) {
+                     (rtcmType >= 1240 && rtcmType <= 1270) ||
+					 (rtcmType == 4076)) {
             switch (rtcmType) {
               case 1057: case 1063: case 1240: case 1246: case 1252: case 1258:
-                ssrOrb = true;
+                _rtcmSsrOrb = true;
                 break;
               case 1058: case 1064: case 1241: case 1247: case 1253: case 1259:
-                ssrClk = true;
+                _rtcmSsrClk = true;
                 break;
               case 1060: case 1066: case 1243: case 1249: case 1255: case 1261:
-                ssrOrbClk = true;
+                _rtcmSsrOrbClk = true;
                 break;
-              case 1059: case 1065: case 1242:   case 1248: case 1254: case 1260:
-                ssrCbi = true;
+              case 1059: case 1065: case 1242: case 1248: case 1254: case 1260:
+                _rtcmSsrCbi = true;
                 break;
               case 1265: case 1266: case 1267: case 1268: case 1269: case 1270:
-                ssrPbi = true;
+                _rtcmSsrPbi = true;
                 break;
               case 1264:
-                ssrVtec = true;
+                _rtcmSsrVtec = true;
                 break;
               case 1061: case 1067: case 1244: case 1250: case 1256: case 1262:
-                ssrUra = true;
+                _rtcmSsrUra = true;
                 break;
               case 1062: case 1068: case 1245: case 1251: case 1257: case 1263:
-                ssrHr = true;
+                _rtcmSsrHr = true;
                 break;
-            }
-          }
-        }
-        if (obs) {
+              case 4076:
+            	_rtcmSsrIgs = true;
+            	break;
+            }
+          }
+        }
+        if (_rtcmObs) {
           _latencyChecker->checkObsLatency(decoder()->_obsList);
         }
@@ -632,5 +642,4 @@
           _prnLastEpo[prn] = obsTime;
         }
-
 
         decoder()->dumpRinexEpoch(obs, _format);
Index: /branches/BNC_2.12/src/bncgetthread.h
===================================================================
--- /branches/BNC_2.12/src/bncgetthread.h	(revision 9126)
+++ /branches/BNC_2.12/src/bncgetthread.h	(revision 9127)
@@ -125,10 +125,14 @@
    QextSerialPort*            _serialPort;
    bool                       _isToBeDeleted;
-   bool obs;
-   bool ssrOrb, ssrClk, ssrOrbClk;
-   bool ssrCbi, ssrPbi;
-   bool ssrVtec;
-   bool ssrUra;
-   bool ssrHr;
+   bool                       _rtcmObs;
+   bool                       _rtcmSsrOrb;
+   bool                       _rtcmSsrClk;
+   bool                       _rtcmSsrOrbClk;
+   bool                       _rtcmSsrCbi;
+   bool                       _rtcmSsrPbi;
+   bool                       _rtcmSsrVtec;
+   bool                       _rtcmSsrUra;
+   bool                       _rtcmSsrHr;
+   bool                       _rtcmSsrIgs;
    latencyChecker*            _latencyChecker;
    QString                    _miscMount;
Index: /branches/BNC_2.12/src/ephemeris.cpp
===================================================================
--- /branches/BNC_2.12/src/ephemeris.cpp	(revision 9126)
+++ /branches/BNC_2.12/src/ephemeris.cpp	(revision 9127)
@@ -354,5 +354,5 @@
       return failure;
     }
-  } while ( fabs(E-E_last)*a0 > 0.001 );
+  } while ( fabs(E-E_last)*a0 > 0.001);
   double v      = 2.0*atan( sqrt( (1.0 + _e)/(1.0 - _e) )*tan( E/2 ) );
   double u0     = v + _omega;
@@ -405,6 +405,7 @@
   // -----------------------
   // correspondent to IGS convention and GPS ICD (and SSR standard)
-  xc[3] -= 2.0 * (xc[0]*vv[0] + xc[1]*vv[1] + xc[2]*vv[2]) / t_CST::c / t_CST::c;
-
+  // xc[3] -= 2.0 * (xc[0]*vv[0] + xc[1]*vv[1] + xc[2]*vv[2]) / t_CST::c / t_CST::c;
+  xc[3] -= 4.442807633e-10 * _e * sqrt(a0) *sin(E);
+  // correspondent to IGS-SSR
   xc[4] = _clock_drift + _clock_driftrate*tc;
   xc[5] = _clock_driftrate;
Index: /branches/BNC_2.12/src/latencychecker.cpp
===================================================================
--- /branches/BNC_2.12/src/latencychecker.cpp	(revision 9126)
+++ /branches/BNC_2.12/src/latencychecker.cpp	(revision 9127)
@@ -396,5 +396,5 @@
         l._followSec = true;
       }
-      l._oldSec    = l._newSec;
+      l._oldSec = l._newSec;
     }
     _lObs = l;
@@ -407,31 +407,43 @@
 void latencyChecker::checkCorrLatency(int corrGPSEpochTime, int type) {
   if (corrGPSEpochTime < 0) {
-    return ;
+    return;
   }
   t_latency& l = _lOrb; // init
   switch (type) {
     case 1057: case 1063: case 1240: case 1246: case 1252: case 1258:
-      l = _lOrb; l._type =  "Orbit";
+      l = _lOrb;
+      l._type =  "RtcmSsrOrbit     ";
       break;
     case 1058: case 1064: case 1241: case 1247: case 1253: case 1259:
-      l = _lClk; l._type =  "Clock";
+      l = _lClk;
+      l._type = "RtcmSsrClock      ";
       break;
     case 1060: case 1066: case 1243: case 1249: case 1255: case 1261:
-      l = _lClkOrb; l._type = "Clock&Orbit";
+      l = _lClkOrb;
+      l._type = "RtcmSsrClock&Orbit";
       break;
     case 1059: case 1065: case 1242: case 1248: case 1254: case 1260:
-      l = _lCb; l._type = "CodeBiases";
-      break;
-    case 1265: case 1266: case 1267: case 1268: case 1269: case 1270:
-      l = _lPb; l._type = "PhaseBiases";
+      l = _lCb;
+      l._type = "RtcmSsrCodeBiases ";
+      break;
+    case 1265: case 1266: case 1267:  case 1268: case 1269: case 1270:
+      l = _lPb;
+      l._type = "RtcmSsrPhaseBiases";
       break;
     case 1264:
-      l = _lVtec; l._type = "VTEC";
+      l = _lVtec;
+      l._type = "RtcmSsrVTEC       ";
       break;
     case 1061: case 1067: case 1244: case 1250: case 1256: case 1262:
-      l = _lUra; l._type = "URA";
+      l = _lUra;
+      l._type = "RtcmSsrURA        ";
       break;
     case 1062: case 1068: case 1245: case 1251: case 1257: case 1263:
-      l = _lHr; l._type = "HrClock";
+      l = _lHr;
+      l._type = "RtcmSsrHrClock    ";
+      break;
+    case 4076:
+      l = _lSsrIgs;
+      l._type = "RtcmSsrIgs4076    ";
       break;
     default:
@@ -474,5 +486,4 @@
         l.init();
       }
-
       if (l._followSec) {
         l._diffSec += l._newSec - l._oldSec;
@@ -512,31 +523,34 @@
     }
     l._oldSec = l._newSec;
-    }
-    switch (type) {
-       case 1057: case 1063: case 1240: case 1246: case 1252: case 1258:
-         _lOrb = l;
-         break;
-       case 1058: case 1064: case 1241: case 1247: case 1253: case 1259:
-         _lClk = l;
-         break;
-       case 1060: case 1066: case 1243: case 1249: case 1255: case 1261:
-         _lClkOrb = l;
-         break;
-       case 1059: case 1065: case 1242: case 1248: case 1254: case 1260:
-         _lCb = l;
-         break;
-       case 1265: case 1266: case 1267: case 1268: case 1269: case 1270:
-         _lPb = l;
-         break;
-       case 1264:
-         _lVtec = l;
-         break;
-       case 1061: case 1067: case 1244: case 1250: case 1256: case 1262:
-         _lUra = l;
-         break;
-       case 1062: case 1068: case 1245: case 1251: case 1257: case 1263:
-         _lHr = l;
-         break;
-     }
+  }
+  switch (type) {
+     case 1057: case 1063: case 1240: case 1246: case 1252: case 1258:
+       _lOrb = l;
+       break;
+     case 1058: case 1064: case 1241: case 1247: case 1253: case 1259:
+       _lClk = l;
+       break;
+     case 1060: case 1066: case 1243: case 1249: case 1255: case 1261:
+       _lClkOrb = l;
+       break;
+     case 1059: case 1065: case 1242: case 1248: case 1254: case 1260:
+       _lCb = l;
+       break;
+     case 1265: case 1266: case 1267: case 1268: case 1269: case 1270:
+       _lPb = l;
+       break;
+     case 1264:
+       _lVtec = l;
+       break;
+     case 1061: case 1067: case 1244: case 1250: case 1256: case 1262:
+       _lUra = l;
+       break;
+     case 1062: case 1068: case 1245: case 1251: case 1257: case 1263:
+       _lHr = l;
+       break;
+     case 4076:
+       _lSsrIgs = l;
+       break;
+   }
 }
 
Index: /branches/BNC_2.12/src/latencychecker.h
===================================================================
--- /branches/BNC_2.12/src/latencychecker.h	(revision 9126)
+++ /branches/BNC_2.12/src/latencychecker.h	(revision 9127)
@@ -106,5 +106,6 @@
   t_latency _lUra;
   t_latency _lHr;
-
+  t_latency _lSsrIgs;
+  
   void setCurrentLatency(double lat) {
     _curLat = lat;
Index: /branches/BNC_2.12/src/upload/bncrtnetuploadcaster.cpp
===================================================================
--- /branches/BNC_2.12/src/upload/bncrtnetuploadcaster.cpp	(revision 9126)
+++ /branches/BNC_2.12/src/upload/bncrtnetuploadcaster.cpp	(revision 9127)
@@ -56,4 +56,5 @@
 
   _ssrFormat = ssrFormat;
+  
   _ssrCorr = 0;
   if      (_ssrFormat == "IGS-SSR") {
@@ -378,6 +379,6 @@
 
   co.UpdateInterval = clkUpdInd;
-  bias.UpdateInterval = clkUpdInd;
-  phasebias.UpdateInterval = clkUpdInd;
+  bias.UpdateInterval = ephUpdInd;
+  phasebias.UpdateInterval = ephUpdInd;
 
   for (int ii = 1; ii < lines.size(); ii++) {
@@ -473,4 +474,5 @@
       QList<phaseBiasSignal> phaseBiasList;
       phaseBiasesSat pbSat;
+      bool phaseBiasInformationDecoded = false;
 
       while (true) {
@@ -531,4 +533,5 @@
         }
         else if (key == "YawAngle") {
+          phaseBiasInformationDecoded = true;
           in >> numVal >> pbSat.yawAngle;
           if      (pbSat.yawAngle < 0.0) {
@@ -543,4 +546,5 @@
         }
         else if (key == "PhaseBias") {
+          phaseBiasInformationDecoded = true;
           in >> numVal;
           for (int ii = 0; ii < numVal; ii++) {
@@ -701,5 +705,5 @@
       }
 
-      if (phasebiasSat) {
+      if (phasebiasSat && phaseBiasInformationDecoded) {
         phasebias.DispersiveBiasConsistencyIndicator = dispersiveBiasConsistenyIndicator;
         phasebias.MWConsistencyIndicator = mwConsistencyIndicator;
