Index: /trunk/BNC/Example_Configs/29_PPPAR_CNES.bnc
===================================================================
--- /trunk/BNC/Example_Configs/29_PPPAR_CNES.bnc	(revision 10791)
+++ /trunk/BNC/Example_Configs/29_PPPAR_CNES.bnc	(revision 10791)
@@ -0,0 +1,193 @@
+[General]
+adviseFail=15
+adviseObsRate=
+adviseReco=5
+adviseScript=
+autoStart=0
+casterUrlList=http://Example:Configs@products.igs-ip.net:2101, http://bkg:realtime06@igs-ip.net:2101, http://bkg:realtime06@euref-ip.net:2101
+cmbBds=2
+cmbBsxFile=
+cmbGal=2
+cmbGlo=2
+cmbGps=2
+cmbLogpath=
+cmbMaxdisplacement=
+cmbMaxres=
+cmbMethod=Kalman Filter
+cmbNavic=0
+cmbQzss=0
+cmbSampl=1 sec
+cmbSbas=0
+cmbStreams=
+corrIntr=1 day
+corrPath=
+corrPort=
+ephIntr=1 day
+ephOutPort=
+ephPath=
+ephVersion=4
+font=
+logFile=Output/PPP.log
+miscIntr=
+miscMount=
+miscPort=
+miscScanRTCM=0
+mountPoints=//Example:Configs@euref-ip.net:2101/WTZR00DEU0 RTCM_3.3 DEU 49.14 12.88 no 2, //Example:Configs@products.igs-ip.net:2101/BCEP00BKG0 RTCM_3.3 DEU 50.09 8.66 no 2, //Example:Configs@products.igs-ip.net:2101/SSRA00CNE1 RTCM_3.1 FRA 43.56 1.48 no 2
+ntripVersion=2
+onTheFlyInterval=no
+outFile=
+outLockTime=0
+outPort=
+outSampl=1 sec
+outUPort=
+outWait=1
+proxyHost=
+proxyPort=
+rawOutFile=Output/raw.rtcm
+reqcAction=
+reqcComment=
+reqcEndDateTime=2099-01-01T00:00:00
+reqcLogSummaryOnly=0
+reqcNavFile=
+reqcNewAntennaName=
+reqcNewAntennaNumber=
+reqcNewAntennadE=
+reqcNewAntennadN=
+reqcNewAntennadU=
+reqcNewMarkerName=
+reqcNewReceiverName=
+reqcNewReceiverNumber=
+reqcObsFile=
+reqcOldAntennaName=
+reqcOldAntennaNumber=
+reqcOldAntennadE=
+reqcOldAntennadN=
+reqcOldAntennadU=
+reqcOldMarkerName=
+reqcOldReceiverName=
+reqcOldReceiverNumber=
+reqcOutLogFile=
+reqcOutNavFile=
+reqcOutObsFile=
+reqcPlotDir=
+reqcRnxVersion=
+reqcRunBy=
+reqcSampling=1 sec
+reqcSkyPlotSignals=G:1&2&5 R:1&2&3 E:1&7 C:2&6 J:1&2 I:5&9 S:1&5
+reqcStartDateTime=1967-11-02T00:00:00
+reqcUseObsTypes=
+reqcV2Priority=G:12&PWCSLX G:5&IQX R:12&PC R:3&IQX R:46&ABX E:16&BCXZ E:578&IQX J:1&SLXCZ J:26&SLX J:5&IQX C:267&IQX C:18&DPX I:ABCX S:1&C S:5&IQX
+rnxAppend=0
+rnxIntr=1 day
+rnxOnlyWithSKL=0
+rnxPath=
+rnxSampl=1 sec
+rnxScript=
+rnxSkel=skl
+rnxSkelPath=
+rnxV2Priority=G:12&PWCSLX G:5&IQX R:12&PC R:3&IQX R:46&ABX E:16&BCXZ E:578&IQX J:1&SLXCZ J:26&SLX J:5&IQX C:267&IQX C:18&DPX I:ABCX S:1&C S:5&IQX
+rnxVersion=4
+serialAutoNMEA=Auto
+serialBaudRate=9600
+serialDataBits=8
+serialFileNMEA=
+serialFlowControl=OFF
+serialHeightNMEA=
+serialManualNMEASampling=10
+serialMountPoint=
+serialNMEASampling=0
+serialParity=NONE
+serialPortName=
+serialStopBits=1
+sp3CompExclude=
+sp3CompFile=
+sp3CompOutLogFile=
+sp3CompSummaryOnly=0
+sslCaCertPath=
+sslClientCertPath=
+sslIgnoreErrors=0
+startTab=12
+statusTab=3
+trafo_dx=
+trafo_dxr=
+trafo_dy=
+trafo_dyr=
+trafo_dz=
+trafo_dzr=
+trafo_ox=
+trafo_oxr=
+trafo_oy=
+trafo_oyr=
+trafo_oz=
+trafo_ozr=
+trafo_sc=
+trafo_scr=
+trafo_t0=
+uploadAntexFile=
+uploadEphMountpointsOut=
+uploadIntr=1 day
+uploadMountpointsOut=
+uploadRawMountpointsOut=
+uploadSamplBiaSnx=5
+uploadSamplClkRnx=0
+uploadSamplRtcmEph=5
+uploadSamplRtcmEphCorr=5 sec
+uploadSamplSp3=30 sec
+
+[PPP]
+antexFile=Input/igs20.atx
+arBDS=0
+arGPS=2
+arGalileo=2
+arMaxFrac=0.01
+arMaxSig=0.001
+arMinEle=10
+arMinNumEpo=30
+arMinNumSat=5
+arUseYaw=0
+audioResponse=
+biasFile=
+biasMount=
+blqFile=Input/BNC.BLQ
+constraints=no
+corrFile=
+corrMount=SSRA00CNE1
+corrWaitTime=5
+crdFile=Input/BNC_IGS20.CRD
+dataSource=Real-Time Streams
+eleWgtCode=2
+eleWgtPhase=2
+ionoFile=
+ionoMount=
+lcBDS=P26&L26
+lcGLONASS=Pi&Li
+lcGPS=P12&L125
+lcGalileo=P15&L1576
+logMode=normal
+logPath=Output
+mapSpeedSlider=100
+mapWinDotColor=red
+mapWinDotSize=6
+maxResC1=3.0
+maxResGIM=5.0
+maxResL1=0.03
+minEle=10
+minObs=5
+modelObs=Uncombined PPP
+nmeaPath=
+plotCoordinates=WTZR00DEU0
+pseudoObs=no
+rinexNav=
+rinexObs=
+seedingTime=0
+sigmaC1=1.0
+sigmaGIM=5.0
+sigmaL1=0.02
+snxtroAc=
+snxtroCampId=
+snxtroIntr=1 hour
+snxtroPath=
+snxtroSampl=1 sec
+snxtroSolId=
+snxtroSolType=
+staTable="WTZR00DEU0,100.0,100.0,100.0,100.0,100.0,100.0,0.1,3e-6,0,G:1&C G:2&W G5:I E:16&C E:57&Q C:26&I,"
Index: /trunk/BNC/Example_Configs/30_PPPAR_WHU.bnc
===================================================================
--- /trunk/BNC/Example_Configs/30_PPPAR_WHU.bnc	(revision 10791)
+++ /trunk/BNC/Example_Configs/30_PPPAR_WHU.bnc	(revision 10791)
@@ -0,0 +1,193 @@
+[General]
+adviseFail=15
+adviseObsRate=
+adviseReco=5
+adviseScript=
+autoStart=0
+casterUrlList=http://Example:Configs@products.igs-ip.net:2101, http://bkg:realtime06@igs-ip.net:2101, http://bkg:realtime06@euref-ip.net:2101
+cmbBds=2
+cmbBsxFile=
+cmbGal=2
+cmbGlo=2
+cmbGps=2
+cmbLogpath=
+cmbMaxdisplacement=
+cmbMaxres=
+cmbMethod=Kalman Filter
+cmbNavic=0
+cmbQzss=0
+cmbSampl=1 sec
+cmbSbas=0
+cmbStreams=
+corrIntr=1 day
+corrPath=
+corrPort=
+ephIntr=1 day
+ephOutPort=
+ephPath=
+ephVersion=4
+font=
+logFile=Output/PPP.log
+miscIntr=
+miscMount=
+miscPort=
+miscScanRTCM=0
+mountPoints=//Example:Configs@euref-ip.net:2101/WTZR00DEU0 RTCM_3.3 DEU 49.14 12.88 no 2, //Example:Configs@products.igs-ip.net:2101/BCEP00BKG0 RTCM_3.3 DEU 50.09 8.66 no 2, //Example:Configs@products.igs-ip.net:2101/OSBC00WHU1 RTCM_3.1 DEU 30.52 114.35 no 2, //Example:Configs@products.igs-ip.net:2101/SSRA00WHU0 RTCM_3.1 FRA 43.56 1.48 no 2
+ntripVersion=2
+onTheFlyInterval=no
+outFile=
+outLockTime=0
+outPort=
+outSampl=1 sec
+outUPort=
+outWait=1
+proxyHost=
+proxyPort=
+rawOutFile=Output/raw.rtcm
+reqcAction=
+reqcComment=
+reqcEndDateTime=2099-01-01T00:00:00
+reqcLogSummaryOnly=0
+reqcNavFile=
+reqcNewAntennaName=
+reqcNewAntennaNumber=
+reqcNewAntennadE=
+reqcNewAntennadN=
+reqcNewAntennadU=
+reqcNewMarkerName=
+reqcNewReceiverName=
+reqcNewReceiverNumber=
+reqcObsFile=
+reqcOldAntennaName=
+reqcOldAntennaNumber=
+reqcOldAntennadE=
+reqcOldAntennadN=
+reqcOldAntennadU=
+reqcOldMarkerName=
+reqcOldReceiverName=
+reqcOldReceiverNumber=
+reqcOutLogFile=
+reqcOutNavFile=
+reqcOutObsFile=
+reqcPlotDir=
+reqcRnxVersion=
+reqcRunBy=
+reqcSampling=1 sec
+reqcSkyPlotSignals=G:1&2&5 R:1&2&3 E:1&7 C:2&6 J:1&2 I:5&9 S:1&5
+reqcStartDateTime=1967-11-02T00:00:00
+reqcUseObsTypes=
+reqcV2Priority=G:12&PWCSLX G:5&IQX R:12&PC R:3&IQX R:46&ABX E:16&BCXZ E:578&IQX J:1&SLXCZ J:26&SLX J:5&IQX C:267&IQX C:18&DPX I:ABCX S:1&C S:5&IQX
+rnxAppend=0
+rnxIntr=1 day
+rnxOnlyWithSKL=0
+rnxPath=
+rnxSampl=1 sec
+rnxScript=
+rnxSkel=skl
+rnxSkelPath=
+rnxV2Priority=G:12&PWCSLX G:5&IQX R:12&PC R:3&IQX R:46&ABX E:16&BCXZ E:578&IQX J:1&SLXCZ J:26&SLX J:5&IQX C:267&IQX C:18&DPX I:ABCX S:1&C S:5&IQX
+rnxVersion=4
+serialAutoNMEA=Auto
+serialBaudRate=9600
+serialDataBits=8
+serialFileNMEA=
+serialFlowControl=OFF
+serialHeightNMEA=
+serialManualNMEASampling=10
+serialMountPoint=
+serialNMEASampling=0
+serialParity=NONE
+serialPortName=
+serialStopBits=1
+sp3CompExclude=
+sp3CompFile=
+sp3CompOutLogFile=
+sp3CompSummaryOnly=0
+sslCaCertPath=
+sslClientCertPath=
+sslIgnoreErrors=0
+startTab=12
+statusTab=3
+trafo_dx=
+trafo_dxr=
+trafo_dy=
+trafo_dyr=
+trafo_dz=
+trafo_dzr=
+trafo_ox=
+trafo_oxr=
+trafo_oy=
+trafo_oyr=
+trafo_oz=
+trafo_ozr=
+trafo_sc=
+trafo_scr=
+trafo_t0=
+uploadAntexFile=
+uploadEphMountpointsOut=
+uploadIntr=1 day
+uploadMountpointsOut=
+uploadRawMountpointsOut=
+uploadSamplBiaSnx=5
+uploadSamplClkRnx=0
+uploadSamplRtcmEph=5
+uploadSamplRtcmEphCorr=5 sec
+uploadSamplSp3=30 sec
+
+[PPP]
+antexFile=Input/igs20.atx
+arBDS=2
+arGPS=2
+arGalileo=2
+arMaxFrac=0.01
+arMaxSig=0.001
+arMinEle=10
+arMinNumEpo=30
+arMinNumSat=5
+arUseYaw=0
+audioResponse=
+biasFile=
+biasMount=OSBC00WHU1
+blqFile=Input/BNC.BLQ
+constraints=no
+corrFile=
+corrMount=SSRA00WHU0
+corrWaitTime=5
+crdFile=Input/BNC_IGS20.CRD
+dataSource=Real-Time Streams
+eleWgtCode=2
+eleWgtPhase=2
+ionoFile=
+ionoMount=
+lcBDS=P1256&L1256
+lcGLONASS=no
+lcGPS=P125&L125
+lcGalileo=P15768&L15768
+logMode=normal
+logPath=Output
+mapSpeedSlider=100
+mapWinDotColor=red
+mapWinDotSize=6
+maxResC1=3.0
+maxResGIM=5.0
+maxResL1=0.03
+minEle=10
+minObs=5
+modelObs=Uncombined PPP
+nmeaPath=
+plotCoordinates=WTZR00DEU0
+pseudoObs=no
+rinexNav=
+rinexObs=
+seedingTime=0
+sigmaC1=1.0
+sigmaGIM=5.0
+sigmaL1=0.02
+snxtroAc=
+snxtroCampId=
+snxtroIntr=1 hour
+snxtroPath=
+snxtroSampl=1 sec
+snxtroSolId=
+snxtroSolType=
+staTable="WTZR00DEU0,100.0,100.0,100.0,100.0,100.0,100.0,0.1,3e-6,0,G:1&C G:2&W G5:Q E:16&C E:578&Q C:267&I C:15&X,"
Index: /trunk/BNC/bnc.pro
===================================================================
--- /trunk/BNC/bnc.pro	(revision 10790)
+++ /trunk/BNC/bnc.pro	(revision 10791)
@@ -4,5 +4,5 @@
 TEMPLATE = subdirs
 
-CONFIG += c++11
+CONFIG += c++17
 CONFIG += ordered
 
Index: /trunk/BNC/newmat/bandmat.cpp
===================================================================
--- /trunk/BNC/newmat/bandmat.cpp	(revision 10790)
+++ /trunk/BNC/newmat/bandmat.cpp	(revision 10791)
@@ -29,6 +29,6 @@
 #endif
 
-static inline int my_min(int x, int y) { return x < y ? x : y; }
-static inline int my_max(int x, int y) { return x > y ? x : y; }
+////static inline int my_min(int x, int y) { return x < y ? x : y; }
+////static inline int my_max(int x, int y) { return x > y ? x : y; }
 
 
@@ -360,5 +360,6 @@
    // while (i--) { sum *= *a; a += w; }
    if (i) for (;;) { sum *= *a; if (!(--i)) break; a += w; }
-   if (!d) sum.ChangeSign(); return sum;
+   if (!d) sum.ChangeSign();
+   return sum;
 }
 
Index: /trunk/BNC/newmat/myexcept.cpp
===================================================================
--- /trunk/BNC/newmat/myexcept.cpp	(revision 10790)
+++ /trunk/BNC/newmat/myexcept.cpp	(revision 10791)
@@ -21,4 +21,5 @@
 
 #include "myexcept.h"                  // for exception handling
+#include "newmat.h"                  // for exception handling
 
 #ifdef use_namespace
@@ -51,84 +52,103 @@
 
 
-unsigned long BaseException::Select;
-char* BaseException::what_error;
-int BaseException::SoFar;
-int BaseException::LastOne;
-
-BaseException::BaseException(const char* a_what)
-{
-   Select++; SoFar = 0;
-   if (!what_error)                   // make space for exception message
-   {
-      LastOne = 511;
-      what_error = new char[512];
-      if (!what_error)                // fail to make space
-      {
-         LastOne = 0;
-         what_error = (char *)"No heap space for exception message\n";
-      }
-   }
-   AddMessage("\n\nAn exception has been thrown\n");
-   AddMessage(a_what);
-   if (a_what) Tracer::AddTrace();
-}
-
-void BaseException::AddMessage(const char* a_what)
-{
-   if (a_what)
-   {
-      int l = strlen(a_what); int r = LastOne - SoFar;
-      if (l < r) { strcpy(what_error+SoFar, a_what); SoFar += l; }
-      else if (r > 0)
-      {
-         strncpy(what_error+SoFar, a_what, r);
-         what_error[LastOne] = 0;
-         SoFar = LastOne;
-      }
-   }
-}
-
-void BaseException::AddInt(int value)
-{
-   bool negative;
-   if (value == 0) { AddMessage("0"); return; }
-   else if (value < 0) { value = -value; negative = true; }
-   else negative = false;
-   int n = 0; int v = value;        // how many digits will we need?
-   while (v > 0) { v /= 10; n++; }
-   if (negative) n++;
-   if (LastOne-SoFar < n) { AddMessage("***"); return; }
-
-   SoFar += n; n = SoFar; what_error[n] = 0;
-   while (value > 0)
-   {
+BaseException::BaseException(const char* a_what) {
+  _what = new char[MAXSIZE];
+  if (!_what) {                // fail to make space
+    _what = (char *)"No heap space for exception message\n";
+    _deleteMe = false;
+  }
+  else {
+    _deleteMe = true;
+  }
+  AddMessage("\n\nAn exception has been thrown\n");
+  AddMessage(a_what);
+}
+
+BaseException::BaseException(const BaseException& oth) {
+  _what = new char[MAXSIZE];
+  if (!_what) {                // fail to make space
+    _what = (char *)"No heap space for exception message\n";
+    _deleteMe = false;
+  }
+  else {
+    _deleteMe = true;
+    strcpy(_what, oth._what);
+  }
+}
+  
+BaseException& BaseException::operator=(const BaseException& oth) {
+  if (this == &oth) return *this; 
+  _what = new char[MAXSIZE];
+  if (!_what) {                // fail to make space
+    _what = (char *)"No heap space for exception message\n";
+    _deleteMe = false;
+  }
+  else {
+    _deleteMe = true;
+    strcpy(_what, oth._what);
+  }
+  return *this;
+}
+  
+BaseException::~BaseException() {
+  if (_deleteMe) delete[] _what;
+}
+
+void BaseException::AddMessage(const char* a_what) {
+  if (a_what) {
+    size_t nn = MAXSIZE - strlen(_what) - 1;
+    strncat(_what, a_what, nn);
+  }
+}
+
+void BaseException::AddInt(int value) {
+  bool negative = false;
+   if (value == 0) {
+     AddMessage("0");
+     return;
+   }
+   else if (value < 0) {
+     value = -value;
+     negative = true;
+   }
+   int nn = (negative ? 1 : 0); // how many digits will we need?
+   int vv = value;        
+   while (vv > 0) { vv /= 10; ++nn; }
+   if ((int)(MAXSIZE - strlen(_what)) < nn) {
+     AddMessage("***");
+     return;
+   }
+
+   nn += strlen(_what);
+   _what[nn] = 0;
+   while (value > 0) {
       int nv = value / 10; int rm = value - nv * 10;  value = nv;
-      what_error[--n] = (char)(rm + '0');
-   }
-   if (negative) what_error[--n] = '-';
-   return;
-}
-
-void Tracer::PrintTrace()
-{
-   cout << "\n";
-   for (Tracer* et = last; et; et=et->previous)
-      cout << "  * " << et->entry << "\n";
-}
-
-void Tracer::AddTrace()
-{
-   if (last)
-   {
-      BaseException::AddMessage("Trace: ");
-      BaseException::AddMessage(last->entry);
-      for (Tracer* et = last->previous; et; et=et->previous)
-      {
-         BaseException::AddMessage("; ");
-         BaseException::AddMessage(et->entry);
-      }
-      BaseException::AddMessage(".\n");
-   }
-}
+      _what[--nn] = (char)(rm + '0');
+   }
+   if (negative) _what[--nn] = '-';
+}
+
+  
+void BaseException::MatrixDetails(const GeneralMatrix& A)
+{
+   MatrixBandWidth bw = A.bandwidth();
+   int ubw = bw.upper_val; int lbw = bw.lower_val;
+   AddMessage("MatrixType = ");
+   AddMessage(A.Type().Value());
+   AddMessage("  # Rows = "); BaseException::AddInt(A.Nrows());
+   AddMessage("; # Cols = "); BaseException::AddInt(A.Ncols());
+   if (lbw >=0)
+   {
+      AddMessage("; lower BW = ");
+      AddInt(lbw);
+   }
+   if (ubw >=0)
+   {
+      AddMessage("; upper BW = ");
+      AddInt(ubw);
+   }
+   AddMessage("\n");
+}
+
 
 #ifdef SimulateExceptions
@@ -230,6 +250,4 @@
 {
    cout << "\n\nThere has been an exception with no handler - exiting";
-   const char* what = BaseException::what();
-   if (what) cout << what << "\n";
    exit(1);
 }
@@ -479,4 +497,5 @@
 
 
+unsigned long BaseException::Select;
 unsigned long Logic_error::Select;
 unsigned long Runtime_error::Select;
Index: /trunk/BNC/newmat/myexcept.h
===================================================================
--- /trunk/BNC/newmat/myexcept.h	(revision 10790)
+++ /trunk/BNC/newmat/myexcept.h	(revision 10791)
@@ -63,46 +63,39 @@
 
 class BaseException;
+class GeneralMatrix;
 
 class Tracer                             // linked list showing how
 {                                        // we got here
-   const char* entry;
-   Tracer* previous;
-public:
-   Tracer(const char*);
-   ~Tracer();
-   void ReName(const char*);
-   static void PrintTrace();             // for printing trace
-   static void AddTrace();               // insert trace in exception record
-   static Tracer* last;                  // points to Tracer list
-   friend class BaseException;
-};
-
-
-class BaseException                          // The base exception class
-{
-protected:
-   static char* what_error;              // error message
-   static int SoFar;                     // no. characters already entered
-   static int LastOne;                   // last location in error buffer
-public:
-   static void AddMessage(const char* a_what);
-                                         // messages about exception
-   static void AddInt(int value);        // integer to error message
-   static unsigned long Select;          // for identifying exception
-   BaseException(const char* a_what = 0);
-   static const char* what() { return what_error; }
-                                         // for getting error message
-};
-
+public:
+  Tracer(const char*) {};
+  ~Tracer() {}
+  void ReName(const char*) {}
+  static void PrintTrace() {};             // for printing trace
+  static void AddTrace() {};               // insert trace in exception record
+  static Tracer* last;                  // points to Tracer list
+};
+
+
+class BaseException {                     // The base exception class
+ protected:
+  int    MAXSIZE = 512;
+  char*  _what;                            // error message
+  bool   _deleteMe;
+ public:
+  static unsigned long Select;
+  BaseException(const char* a_what = 0);
+  BaseException(const BaseException& oth);
+  BaseException& operator=(const BaseException& oth);
+  ~BaseException();
+  void AddMessage(const char* a_what);
+  void AddInt(int value);
+  void MatrixDetails(const GeneralMatrix& A);
+  const char* what() { return _what; }
+};
+
+ 
 #ifdef TypeDefException
 typedef BaseException Exception;        // for compatibility with my older libraries
 #endif
-
-inline Tracer::Tracer(const char* e)
-   : entry(e), previous(last) { last = this; }
-
-inline Tracer::~Tracer() { last = previous; }
-
-inline void Tracer::ReName(const char* e) { entry=e; }
 
 #ifdef SimulateExceptions                // SimulateExceptions
Index: /trunk/BNC/newmat/newmat.h
===================================================================
--- /trunk/BNC/newmat/newmat.h	(revision 10790)
+++ /trunk/BNC/newmat/newmat.h	(revision 10791)
@@ -1834,5 +1834,5 @@
    MatrixInput(const MatrixInput& mi) : n(mi.n), r(mi.r) {}
    MatrixInput(int nx, Real* rx) : n(nx), r(rx) {}
-   ~MatrixInput();
+  ~MatrixInput() noexcept(false);
    MatrixInput operator<<(double);
    MatrixInput operator<<(float);
Index: /trunk/BNC/newmat/newmat2.cpp
===================================================================
--- /trunk/BNC/newmat/newmat2.cpp	(revision 10790)
+++ /trunk/BNC/newmat/newmat2.cpp	(revision 10791)
@@ -39,5 +39,7 @@
    REPORT
    int f = mrc.skip; int l = f + mrc.storage; int lx = skip + storage;
-   if (f < skip) f = skip; if (l > lx) l = lx; l -= f;
+   if (f < skip) f = skip;
+   if (l > lx) l = lx;
+   l -= f;
    if (l<=0) return;
    Real* elx=data+(f-skip); Real* el=mrc.data+(f-mrc.skip);
@@ -50,5 +52,7 @@
    // THIS += (mrc * x)
    int f = mrc.skip; int l = f + mrc.storage; int lx = skip + storage;
-   if (f < skip) f = skip; if (l > lx) l = lx; l -= f;
+   if (f < skip) f = skip;
+   if (l > lx) l = lx;
+   l -= f;
    if (l<=0) return;
    Real* elx=data+(f-skip); Real* el=mrc.data+(f-mrc.skip);
@@ -61,5 +65,7 @@
    // THIS -= mrc
    int f = mrc.skip; int l = f + mrc.storage; int lx = skip + storage;
-   if (f < skip) f = skip; if (l > lx) l = lx; l -= f;
+   if (f < skip) f = skip;
+   if (l > lx) l = lx;
+   l -= f;
    if (l<=0) return;
    Real* elx=data+(f-skip); Real* el=mrc.data+(f-mrc.skip);
@@ -72,5 +78,7 @@
    REPORT
    int f = mrc.skip; int l = f + mrc.storage; int lx = skip + storage;
-   if (f < skip) f = skip; if (l > lx) l = lx; l -= f;
+   if (f < skip) f = skip;
+   if (l > lx) l = lx;
+   l -= f;
    if (l<=0) return;
    Real* elx=data+(f-skip); Real* ely=mrc.data+(f-mrc.skip);
@@ -83,5 +91,7 @@
    int f = mrc1.skip; int f2 = mrc2.skip;
    int l = f + mrc1.storage; int l2 = f2 + mrc2.storage;
-   if (f < f2) f = f2; if (l > l2) l = l2; l -= f;
+   if (f < f2) f = f2;
+   if (l > l2) l = l2;
+   l -= f;
    if (l<=0) return 0.0;
 
@@ -97,7 +107,9 @@
    int f = skip; int l = skip + storage;
    int f1 = mrc1.skip; int l1 = f1 + mrc1.storage;
-   if (f1<f) f1=f; if (l1>l) l1=l;
+   if (f1<f) f1=f;
+   if (l1>l) l1=l;
    int f2 = mrc2.skip; int l2 = f2 + mrc2.storage;
-   if (f2<f) f2=f; if (l2>l) l2=l;
+   if (f2<f) f2=f;
+   if (l2>l) l2=l;
    Real* el = data + (f-skip);
    Real* el1 = mrc1.data+(f1-mrc1.skip); Real* el2 = mrc2.data+(f2-mrc2.skip);
@@ -169,7 +181,9 @@
    int f = skip; int l = skip + storage;
    int f1 = mrc1.skip; int l1 = f1 + mrc1.storage;
-   if (f1<f) f1=f; if (l1>l) l1=l;
+   if (f1<f) f1=f;
+   if (l1>l) l1=l;
    int f2 = mrc2.skip; int l2 = f2 + mrc2.storage;
-   if (f2<f) f2=f; if (l2>l) l2=l;
+   if (f2<f) f2=f;
+   if (l2>l) l2=l;
    Real* el = data + (f-skip);
    Real* el1 = mrc1.data+(f1-mrc1.skip); Real* el2 = mrc2.data+(f2-mrc2.skip);
@@ -333,9 +347,12 @@
    int f = skip; int l = skip + storage;
    int f1 = mrc1.skip; int l1 = f1 + mrc1.storage;
-   if (f1<f) f1=f; if (l1>l) l1=l;
+   if (f1<f) f1=f;
+   if (l1>l) l1=l;
    int f2 = mrc2.skip; int l2 = f2 + mrc2.storage;
-   if (f2<f) f2=f; if (l2>l) l2=l;
+   if (f2<f) f2=f;
+   if (l2>l) l2=l;
    Real* el = data + (f-skip); int i;
-   if (f1<f2) f1 = f2; if (l1>l2) l1 = l2;
+   if (f1<f2) f1 = f2;
+   if (l1>l2) l1 = l2;
    if (l1<=f1) { REPORT i = l-f; while (i--) *el++ = 0.0; }  // disjoint
    else
Index: /trunk/BNC/newmat/newmat3.cpp
===================================================================
--- /trunk/BNC/newmat/newmat3.cpp	(revision 10790)
+++ /trunk/BNC/newmat/newmat3.cpp	(revision 10791)
@@ -668,5 +668,7 @@
          Throw(InternalException("SymmetricBandMatrix::GetRow(MatrixRowCol&)"));
       int w = w1+lower_val; s += w-ncols_val; Real* RowCopy;
-      if (s>0) w -= s; mrc.storage = w; int w2 = w-w1;
+      if (s>0) w -= s;
+      mrc.storage = w;
+      int w2 = w-w1;
       if (!(mrc.cw*HaveStore))
       {
@@ -709,5 +711,7 @@
          Throw(InternalException("SymmetricBandMatrix::GetCol(MatrixRowCol&)"));
       int w = w1+lower_val; s += w-ncols_val; Real* ColCopy;
-      if (s>0) w -= s; mrc.storage = w; int w2 = w-w1;
+      if (s>0) w -= s;
+      mrc.storage = w;
+      int w2 = w-w1;
 
       if ( +(mrc.cw*HaveStore) ) { REPORT ColCopy = mrc.data; }
@@ -759,5 +763,7 @@
 
       int w = w1+lower_val; s += w-ncols_val;
-      if (s>0) w -= s; mrc.storage = w; int w2 = w-w1;
+      if (s>0) w -= s;
+      mrc.storage = w;
+      int w2 = w-w1;
 
       Real* ColCopy = mrc.data = mrc.store+mrc.skip;
Index: /trunk/BNC/newmat/newmat5.cpp
===================================================================
--- /trunk/BNC/newmat/newmat5.cpp	(revision 10790)
+++ /trunk/BNC/newmat/newmat5.cpp	(revision 10791)
@@ -488,5 +488,5 @@
    return MatrixInput(n, r+1);
 }
-MatrixInput::~MatrixInput()
+MatrixInput::~MatrixInput() noexcept(false)
 {
    REPORT
Index: /trunk/BNC/newmat/newmat6.cpp
===================================================================
--- /trunk/BNC/newmat/newmat6.cpp	(revision 10790)
+++ /trunk/BNC/newmat/newmat6.cpp	(revision 10791)
@@ -352,5 +352,5 @@
    // MatrixConversionCheck mcc;
    Eq(X,MatrixType::Rt);
-}
+} 
 
 void SquareMatrix::operator=(const BaseMatrix& X)
@@ -429,9 +429,9 @@
    if (&gm == this) { REPORT tag_val = -1; return; }
    REPORT
-   if (indx) { delete [] indx; indx = 0; }
+   if (indx != 0) { delete [] indx; indx = 0; }
    ((CroutMatrix&)gm).get_aux(*this);
    Eq(gm);
 }
-
+   
 
 
Index: /trunk/BNC/newmat/newmat7.cpp
===================================================================
--- /trunk/BNC/newmat/newmat7.cpp	(revision 10790)
+++ /trunk/BNC/newmat/newmat7.cpp	(revision 10791)
@@ -545,5 +545,8 @@
          { REPORT AddDS(gm1,gm2); gm2->tDelete(); gmx = gm1; }
       else if (c2 && gm2->reuse() )
-         { REPORT AddDS(gm2,gm1); if (!c1) gm1->tDelete(); gmx = gm2; }
+        { REPORT AddDS(gm2,gm1);
+           if (!c1) gm1->tDelete();
+           gmx = gm2;
+        }
       else
       {
@@ -552,9 +555,11 @@
          CatchAll
          {
-            if (!c1) gm1->tDelete(); if (!c2) gm2->tDelete();
+            if (!c1) gm1->tDelete();
+            if (!c2) gm2->tDelete();
             ReThrow;
          }
          AddDS(gmx,gm1,gm2);
-         if (!c1) gm1->tDelete(); if (!c2) gm2->tDelete();
+         if (!c1) gm1->tDelete();
+         if (!c2) gm2->tDelete();
          gmx->ReleaseAndDelete();
       }
@@ -616,5 +621,6 @@
       {
          REPORT ReverseSubtractDS(gm2,gm1);
-         if (!c1) gm1->tDelete(); gmx = gm2;
+         if (!c1) gm1->tDelete();
+         gmx = gm2;
       }
       else
@@ -625,9 +631,11 @@
          CatchAll
          {
-            if (!c1) gm1->tDelete(); if (!c2) gm2->tDelete();
+            if (!c1) gm1->tDelete();
+            if (!c2) gm2->tDelete();
             ReThrow;
          }
          SubtractDS(gmx,gm1,gm2);
-         if (!c1) gm1->tDelete(); if (!c2) gm2->tDelete();
+         if (!c1) gm1->tDelete();
+         if (!c2) gm2->tDelete();
          gmx->ReleaseAndDelete();
       }
@@ -695,9 +703,11 @@
          CatchAll
          {
-            if (!c1) gm1->tDelete(); if (!c2) gm2->tDelete();
+            if (!c1) gm1->tDelete();
+            if (!c2) gm2->tDelete();
             ReThrow;
          }
          SPDS(gmx,gm1,gm2);
-         if (!c1) gm1->tDelete(); if (!c2) gm2->tDelete();
+         if (!c1) gm1->tDelete();
+         if (!c2) gm2->tDelete();
          gmx->ReleaseAndDelete();
       }
@@ -779,6 +789,8 @@
    while (i--)
    {
-      if (*s1++ != *s2++) return false; if (*s1++ != *s2++) return false;
-      if (*s1++ != *s2++) return false; if (*s1++ != *s2++) return false;
+      if (*s1++ != *s2++) return false;
+      if (*s1++ != *s2++) return false;
+      if (*s1++ != *s2++) return false;
+      if (*s1++ != *s2++) return false;
    }
    i = n & 3; while (i--) if (*s1++ != *s2++) return false;
@@ -791,6 +803,8 @@
    while (i--)
    {
-      if (*s1++ != *s2++) return false; if (*s1++ != *s2++) return false;
-      if (*s1++ != *s2++) return false; if (*s1++ != *s2++) return false;
+      if (*s1++ != *s2++) return false;
+      if (*s1++ != *s2++) return false;
+      if (*s1++ != *s2++) return false;
+      if (*s1++ != *s2++) return false;
    }
    i = n & 3; while (i--) if (*s1++ != *s2++) return false;
@@ -869,6 +883,8 @@
    while (i--)
    {
-      if (*s++) return false; if (*s++) return false;
-      if (*s++) return false; if (*s++) return false;
+      if (*s++) return false;
+      if (*s++) return false;
+      if (*s++) return false;
+      if (*s++) return false;
    }
    i = storage & 3; while (i--) if (*s++) return false;
Index: /trunk/BNC/newmat/newmat8.cpp
===================================================================
--- /trunk/BNC/newmat/newmat8.cpp	(revision 10790)
+++ /trunk/BNC/newmat/newmat8.cpp	(revision 10791)
@@ -713,5 +713,6 @@
       s += dd;
    }
-   if (!d) sum.ChangeSign(); return sum;
+   if (!d) sum.ChangeSign();
+   return sum;
 
 }
Index: /trunk/BNC/newmat/newmat9.cpp
===================================================================
--- /trunk/BNC/newmat/newmat9.cpp	(revision 10790)
+++ /trunk/BNC/newmat/newmat9.cpp	(revision 10791)
@@ -15,4 +15,8 @@
 #include "newmatio.h"
 #include "newmatrc.h"
+
+#ifdef USE_STD_NAMESPACE
+using namespace std;
+#endif
 
 #ifdef use_namespace
@@ -44,5 +48,5 @@
    MatrixRow mr((GeneralMatrix*)&X, LoadOnEntry);
    int w = s.width();  int nr = X.Nrows();  ios_format_flags f = s.flags();
-   s.setf(ios::fixed, ios::floatfield);
+   /////s.setf(ios::fixed, ios::floatfield);
    for (int i=1; i<=nr; i++)
    {
Index: /trunk/BNC/newmat/newmatex.cpp
===================================================================
--- /trunk/BNC/newmat/newmatex.cpp	(revision 10790)
+++ /trunk/BNC/newmat/newmatex.cpp	(revision 10791)
@@ -29,25 +29,25 @@
 
 
-static void MatrixDetails(const GeneralMatrix& A)
-// write matrix details to Exception buffer
-{
-   MatrixBandWidth bw = A.bandwidth();
-   int ubw = bw.upper_val; int lbw = bw.lower_val;
-   BaseException::AddMessage("MatrixType = ");
-   BaseException::AddMessage(A.Type().Value());
-   BaseException::AddMessage("  # Rows = "); BaseException::AddInt(A.Nrows());
-   BaseException::AddMessage("; # Cols = "); BaseException::AddInt(A.Ncols());
-   if (lbw >=0)
-   {
-      BaseException::AddMessage("; lower BW = ");
-      BaseException::AddInt(lbw);
-   }
-   if (ubw >=0)
-   {
-      BaseException::AddMessage("; upper BW = ");
-      BaseException::AddInt(ubw);
-   }
-   BaseException::AddMessage("\n");
-}
+////static void MatrixDetails(const GeneralMatrix& A)
+////// write matrix details to Exception buffer
+////{
+////   MatrixBandWidth bw = A.bandwidth();
+////   int ubw = bw.upper_val; int lbw = bw.lower_val;
+////   BaseException::AddMessage("MatrixType = ");
+////   BaseException::AddMessage(A.Type().Value());
+////   BaseException::AddMessage("  # Rows = "); BaseException::AddInt(A.Nrows());
+////   BaseException::AddMessage("; # Cols = "); BaseException::AddInt(A.Ncols());
+////   if (lbw >=0)
+////   {
+////      BaseException::AddMessage("; lower BW = ");
+////      BaseException::AddInt(lbw);
+////   }
+////   if (ubw >=0)
+////   {
+////      BaseException::AddMessage("; upper BW = ");
+////      BaseException::AddInt(ubw);
+////   }
+////   BaseException::AddMessage("\n");
+////}
 
 NPDException::NPDException(const GeneralMatrix& A)
Index: /trunk/BNC/newmat/newmatio.h
===================================================================
--- /trunk/BNC/newmat/newmatio.h	(revision 10790)
+++ /trunk/BNC/newmat/newmatio.h	(revision 10791)
@@ -15,14 +15,17 @@
 
 #include "newmat.h"
+#include <iostream>
 
-#ifdef USE_STD_NAMESPACE
-using namespace std;
+#ifdef use_namespace
+namespace NEWMAT {
 #endif
+
+
 
 // **************************** input/output *****************************/
 
-ostream& operator<<(ostream&, const BaseMatrix&);
+std::ostream& operator<<(std::ostream&, const BaseMatrix&);
 
-ostream& operator<<(ostream&, const GeneralMatrix&);
+std::ostream& operator<<(std::ostream&, const GeneralMatrix&);
 
 
Index: /trunk/BNC/scripts/plot_xyz.py
===================================================================
--- /trunk/BNC/scripts/plot_xyz.py	(revision 10791)
+++ /trunk/BNC/scripts/plot_xyz.py	(revision 10791)
@@ -0,0 +1,233 @@
+#!/usr/bin/python3
+
+import sys
+import datetime 
+import matplotlib.pyplot as plt
+import matplotlib.dates  as mdates
+import matplotlib.ticker as mticker
+import numpy             as np
+import pathlib           as pth
+
+import utils
+
+sys.dont_write_bytecode = True
+
+# Data Class
+##########################################################################################
+class Data:
+    def __init__(self):
+        self.epo0     = None
+        self.epo      = []
+        self.dNfix    = []
+        self.dEfix    = []
+        self.dUfix    = []
+        self.dNflt    = []
+        self.dEflt    = []
+        self.dUflt    = []
+        self.nFix     = []
+        self.conv2D   = {}
+
+    def append(self, epo, dN, dE, dU, isFix, nFix, flgReset):
+        self.epo.append(epo)
+        self.nFix.append(nFix)
+        if isFix:
+            self.dNfix.append(dN)
+            self.dEfix.append(dE)
+            self.dUfix.append(dU)
+            self.dNflt.append(np.nan)
+            self.dEflt.append(np.nan)
+            self.dUflt.append(np.nan)
+        else:  
+            self.dNflt.append(dN)
+            self.dEflt.append(dE)
+            self.dUflt.append(dU)
+            self.dNfix.append(np.nan)
+            self.dEfix.append(np.nan)
+            self.dUfix.append(np.nan)
+            
+        if flgReset or self.epo0 is None:
+            self.epo0 = epo
+
+        nSec = int((epo - self.epo0).total_seconds())
+        if nSec not in self.conv2D:
+            self.conv2D[nSec] = []
+        self.conv2D[nSec].append(np.sqrt(dN*dN + dE*dE))
+        
+# Function to generate the plot
+##########################################################################################
+def run_plot_client(staName, data, title, timeStr, pngFile, statFile):
+    cm = 1/2.54 
+    fig, (ax1, ax2, ax3, dummy, ax4) = plt.subplots(5, 1, figsize=(20*cm,20*cm),
+                                                    gridspec_kw={'height_ratios': [1, 1, 1, 0.3, 1.5]})
+    dummy.axis("off")
+
+    ax1.set_title(title)
+    ax1.set_ylabel("North [m]")
+    ax1.tick_params(labelbottom=False)
+    ax1.plot(data.epo, data.dNflt, color = "crimson", linewidth = 1.0)
+    ax1.plot(data.epo, data.dNfix, color = "forestgreen", label = "fixed", linewidth = 1.0)
+
+    ax2.set_ylabel("East [m]")
+    ax2.tick_params(labelbottom=False)
+    ax2.plot(data.epo, data.dEflt, color = "crimson", label = "float", linewidth = 1.0)
+    ax2.plot(data.epo, data.dEfix, color = "forestgreen", linewidth = 1.0)
+
+    ax3.set_xlabel(timeStr)
+    ax3.set_ylabel("Height [m]")
+    ax3.xaxis.set_major_formatter(mdates.DateFormatter('%H:%M'))
+    ax3.plot(data.epo, data.dUflt, color = "crimson", linewidth = 1.0)
+    ax3.plot(data.epo, data.dUfix, color = "forestgreen", linewidth = 1.0)
+
+    ax32 = ax3.twinx()
+    ax32.plot(data.epo, data.nFix, color = "lightskyblue", label = "% fix", linewidth = 0.4)
+    ax32.set_ylim(0,300)
+    ax32.set_yticks([0,50,100])
+    ax32.legend(loc="upper right")
+
+    for ax in [ax1, ax2, ax3]:
+        ax.set_ylim(-0.4, 0.4)
+        hh, ll = ax.get_legend_handles_labels()
+        if len(hh) > 0:
+            ax.legend(loc="upper right")
+        ax.grid(axis = 'y', which = 'both', color = 'grey', linestyle = '--', linewidth = 0.3)
+        ax.set_yticks([x / 10 for x in range(-4, 5, 2)])
+        ax.yaxis.set_minor_locator(mticker.AutoMinorLocator(2))
+
+    maxLen  = 0
+    perc    = {68: [], 95: []}
+    percMin = {10: {68 : 0.0, 95 : 0.0}, 20: {68 : 0.0, 95 : 0.0}, 30: {68 : 0.0, 95 : 0.0}}
+    keyMin  = {10: {68 : 0.0, 95 : 0.0}, 20: {68 : 0.0, 95 : 0.0}, 30: {68 : 0.0, 95 : 0.0}}
+
+    for key in data.conv2D.keys():
+        if len(data.conv2D[key]) > maxLen:
+            maxLen = len(data.conv2D[key])
+
+        for pKey in (68, 95):
+          pp = np.percentile(data.conv2D[key], pKey)
+          perc[pKey].append(pp)
+          for minute in (10, 20, 30):
+              tMin = 60*minute
+              if  key in range(60*minute-10, 60*minute+1):
+                  if abs(key - tMin) < abs(keyMin[minute][pKey] - tMin):
+                      keyMin[minute][pKey] = key
+                      percMin[minute][pKey] = pp
+
+    print("%8s   68: %6.3f %6.3f %6.3f    95: %6.3f %6.3f %6.3f" %
+          (staName, percMin[10][68], percMin[20][68], percMin[30][68],    percMin[10][95], percMin[20][95], percMin[30][95]))
+
+    for ii in range(0, maxLen):
+        dPos = []
+        for key in data.conv2D.keys():
+            if len(data.conv2D[key]) > ii:
+                dPos.append(data.conv2D[key][ii])
+            else:
+                dPos.append(np.nan)
+        ax4.plot(data.conv2D.keys(), dPos, linewidth = 0.5)
+
+    ax4.set_title("Convergence")
+    ax4.plot(data.conv2D.keys(), perc[68], linewidth = 1.0, color = "black", label = "68 %")
+    ax4.plot(data.conv2D.keys(), perc[95], linewidth = 2.0, color = "black", label = "95 %")
+    ax4.legend(loc="upper right")
+    ax4.set_ylim(0, 1.0)
+    ax4.set_xlabel("Seconds after Reset")
+    ax4.set_ylabel("Meters")
+    ax4.text( 0.1, 0.7,
+              "percentile after 10 min:\n68%% : %8.3f m\n95%% : %8.3f m" % (percMin[10][68], percMin[10][95]),
+              transform=ax4.transAxes)
+    ax4.text( 0.4, 0.5,
+              "percentile after 20 min:\n68%% : %8.3f m\n95%% : %8.3f m" % (percMin[20][68], percMin[20][95]),
+              transform=ax4.transAxes)
+    ax4.text( 0.7, 0.3,
+              "percentile after 30 min:\n68%% : %8.3f m\n95%% : %8.3f m" % (percMin[30][68], percMin[30][95]),
+              transform=ax4.transAxes)
+
+    ### plt.show()
+    plt.savefig(pngFile)
+    plt.close()
+
+    # Output Statistics
+    # -----------------
+    if statFile:
+        with open(statFile, 'w') as outStat:
+            print("%s %8.3f %8.3f %8.3f %8.3f %8.3f %8.3f" %
+                  (fileName,
+                   percMin[10][68], percMin[10][95],
+                   percMin[20][68], percMin[20][95],
+                   percMin[30][68], percMin[30][95]), file = outStat)
+            
+
+# Main Program
+##########################################################################################
+if __name__ == '__main__':
+    import sys
+    import argparse
+    
+    parser = argparse.ArgumentParser()
+    parser.add_argument("crdFile")
+    parser.add_argument("fileName")
+    parser.add_argument("--pngFile",  type=str)
+    parser.add_argument("--statFile", type=str)
+    parser.add_argument("--title",    type=str)
+    args = parser.parse_args()
+
+    crdFile  = args.crdFile
+    fileName = args.fileName
+    if args.pngFile is None:
+        pngFile = pth.Path(fileName).with_suffix(".png")
+    else :
+        pngFile  = args.pngFile
+    if args.title is None:
+        title = fileName
+    else:
+        title = args.title
+    statFile = args.statFile
+    
+    dateFmt  = "%Y-%m-%d_%H:%M:%S.%f"
+    dfCrd    = utils.readcrdfile(crdFile)
+    station  = None
+
+    # Read Data
+    # ---------
+    data     = Data()
+    flgReset = True
+    timeStr  = None
+    with open(fileName, 'r') as inFile:
+        for line in inFile:
+        
+            if line.find("RESET FILTER") == 0:
+                flgReset = True
+        
+            elif line.find("X =") >= 0:
+                fields = line.split()
+        
+                dateStr = fields[0]
+                staName = fields[1]
+                xx      = float(fields[4])
+                yy      = float(fields[9])
+                zz      = float(fields[14])
+                isFix   = (fields[32] == "fix")
+                if isFix:
+                  numFix = int(fields[33])
+                else:
+                  numFix = 0
+
+                if station is None:
+                    station = utils.getsta(dfCrd, staName)
+                    if station is None:
+                        raise Exception("Station %s not found" % staName)
+                ell = utils.xyz2ell((xx, yy, zz))
+
+                xyz = (xx - station.xx,
+                       yy - station.yy,
+                       zz - station.zz)
+        
+                neu = utils.xyz2neu(ell, xyz)
+
+                time = datetime.datetime.strptime(dateStr, dateFmt)
+                data.append(time, neu[0], neu[1], neu[2], isFix, numFix, flgReset)
+                flgReset = False
+
+                if timeStr is None:
+                    timeStr = time.strftime("%Y-%m-%d")
+
+    run_plot_client(staName, data, title, timeStr, pngFile, statFile)
Index: /trunk/BNC/scripts/utils.py
===================================================================
--- /trunk/BNC/scripts/utils.py	(revision 10791)
+++ /trunk/BNC/scripts/utils.py	(revision 10791)
@@ -0,0 +1,270 @@
+
+import sys
+import pandas    as pd
+import numpy     as np
+import datetime
+import colorsys
+import matplotlib
+from enum import Enum as Enum
+
+from pandas.plotting import register_matplotlib_converters
+register_matplotlib_converters()
+
+sys.dont_write_bytecode = True
+
+##############################################################################################
+class GenConst:
+    aell = 6378137.000;
+    fInv = 298.2572236;
+    rho_deg = 180.0 / np.pi;
+    def __init__(self):
+        raise TypeError("Constants class cannot be instantiated.")
+    
+    def __setattr__(self, key, value):
+        raise AttributeError("Constants cannot be modified.")    
+
+##############################################################################################
+class RetVal:
+    class Value(Enum):
+        SUCCESS = 0
+        FAILURE = 1
+
+    def __init__(self):
+        self.value  = Value.FAILURE
+        self.errmsg = "Uknown error"
+
+    def is_success(self):
+        return self.value == VALUE.SUCCESS
+
+    def is_failure(self):
+        return self.value == VALUE.FAILURE
+
+    @staticmethod
+    def success():
+        retval = RetVal()
+        retval.value = Value.SUCCESS
+        return retval
+
+    @staticmethod
+    def failure(errmsg):
+        retval = RetVal()
+        retval.value  = Value.FAILURE
+        retval.errmsg = errmsg
+        return retval
+
+##############################################################################################
+class SatId:
+    def __init__(self, sys, svn):
+        if (sys == 'G' or
+            sys == 'R' or
+            sys == 'E' or
+            sys == 'C' or
+            sys == 'J' or
+            sys == 'I') :
+            self.sys = sys
+            self.svn = svn
+        else:
+            self.sys = '?'
+            self.svn = 0
+
+    def set(self, satid):
+        try:
+            if   len(satid) == 0:
+                self.sys = '?'
+                self.svn = 0
+            elif len(satid) == 3:
+                if (satid[0] == 'G' or
+                    satid[0] == 'R' or
+                    satid[0] == 'E' or
+                    satid[0] == 'C' or
+                    satid[0] == 'J' or
+                    satid[0] == 'I') :
+                    self.sys = satid[0]
+                    self.svn = int(satid[1:])
+                else:
+                    RaiseException("")
+            else:
+                RaiseException("")
+        except:
+            self.sys = '?'
+            self.svn = 0
+
+    def __str__(self):
+        return "%s%02d" % (self.sys, self.svn)
+
+    def __hash__(self):
+        return hash((self.sys, self.svn))
+
+    def __eq__(self,other):
+        return self.sys == other.sys and self.svn == other.svn
+    
+
+##############################################################################################
+class StaInfo:
+    def __init__(self, name, xx, yy, zz):
+        self.name = name
+        self.xx   = xx
+        self.yy   = yy
+        self.zz   = zz
+
+    def print(self):
+        print("%6s  %12.3f %12.3f %12.3f" % (self.name, self.xx, self.yy, self.zz))
+
+##############################################################################################
+def readcrdfile(filename):
+    df = pd.read_csv(filename, sep="\\s+", header=None, comment='#')
+    return df.apply(lambda row: StaInfo(row[0], row[1], row[2], row[3]), axis=1).tolist()
+
+##############################################################################################
+def readstatfile(filename):
+    df = pd.read_csv(filename, sep="\\s+", header=None, comment='#')
+    retval= {}
+    for row in df.itertuples():
+        ##retval[row._1[0:4]] = [row._2, row._3, row._4, row._5, row._6, row._7]
+        retval[row._1] = [row._2, row._3, row._4, row._5, row._6, row._7]
+    return retval
+
+##############################################################################################
+def getsta(stalist, name):
+    for sta in stalist:
+        if sta.name == name:
+            return sta
+    return None
+    
+##############################################################################################
+def xyz2ell(xyz):
+  bell = GenConst.aell*(1.0-1.0/GenConst.fInv)
+  e2   = (GenConst.aell*GenConst.aell-bell*bell)/(GenConst.aell*GenConst.aell)
+  e2c  = (GenConst.aell*GenConst.aell-bell*bell)/(bell*bell)
+
+  if (xyz[0] == 0.0 and xyz[1] == 0.0 and xyz[2] == 0.0):
+    return []
+
+  ss    = np.sqrt(xyz[0]*xyz[0]+xyz[1]*xyz[1]) ;
+  zps   = xyz[2]/ss ;
+  theta = np.arctan( (xyz[2]*GenConst.aell) / (ss*bell) );
+  sin3  = np.sin(theta) * np.sin(theta) * np.sin(theta);
+  cos3  = np.cos(theta) * np.cos(theta) * np.cos(theta);
+
+  ell = [0, 0, 0];
+  ell[0] = np.arctan( (xyz[2] + e2c * bell * sin3) / (ss - e2 * GenConst.aell * cos3) );  
+  ell[1] = np.arctan2(xyz[1],xyz[0]) ;
+  nn = GenConst.aell/np.sqrt(1.0-e2*np.sin(ell[0])*np.sin(ell[0])) ;
+  ell[2] = ss / np.cos(ell[0]) - nn;
+
+  for ii in range(10):
+      nn     = GenConst.aell/np.sqrt(1.0-e2*np.sin(ell[0])*np.sin(ell[0]))
+      hOld   = ell[2]
+      phiOld = ell[0]
+      ell[2] = ss/np.cos(ell[0])-nn
+      ell[0] = np.arctan(zps/(1.0-e2*nn/(nn+ell[2])))
+      if ( abs(phiOld-ell[0]) <= 1.0e-11 and abs(hOld-ell[2]) <= 1.0e-5 ):
+          return ell;
+
+##############################################################################################
+def ell2xyz(ell):
+    bell = GenConst.aell*(1.0-1.0/GenConst.fInv) 
+
+    e2     = (GenConst.aell*GenConst.aell-bell*bell)/(GenConst.aell*GenConst.aell) 
+    sinPhi = np.sin(ell[0]) 
+    cosPhi = np.sqrt(1.0-sinPhi*sinPhi) 
+    nn     = GenConst.aell/np.sqrt(1.0-e2*sinPhi*sinPhi) 
+
+    return [ (nn         + ell[2]) * cosPhi * np.cos(ell[1]),
+             (nn         + ell[2]) * cosPhi * np.sin(ell[1]),
+             (nn*(1.0-e2)+ ell[2]) * sinPhi ]
+
+##############################################################################################
+def mjd2datetime(mjd):
+    EPOCH0 = dtatetime.datetime(1980, 1, 6)
+    MJD0   = 44244.0
+    return EPOCH0 + timedelta(days=mjd-MJD0)
+
+##############################################################################################
+def gpswkdow2datetime(gpswk, dow):
+    EPOCH0 = datetime.datetime(1980, 1, 6)
+    return EPOCH0 + timedelta(days=gpswk*7+dow)
+
+##############################################################################################
+def jacobiXyz2neu(ell):
+    sinPhi = np.sin(ell[0])
+    cosPhi = np.cos(ell[0])
+    sinLam = np.sin(ell[1])
+    cosLam = np.cos(ell[1])
+
+    return np.array([[-sinPhi*cosLam, -sinPhi*sinLam, cosPhi],
+                     [-sinLam,         cosLam,        0.0   ],
+                     [cosPhi*cosLam,   cosPhi*sinLam, sinPhi]])
+
+##############################################################################################
+def xyz2neu(ell, xyz):
+    return jacobiXyz2neu(ell).dot(xyz)
+
+##########################################################################################
+def modColor(cc, light, satur):
+    hh, ll, ss = colorsys.rgb_to_hls(*matplotlib.colors.to_rgb(cc))
+    return colorsys.hls_to_rgb(hh, light*ll, satur)
+
+##############################################################################################                                                                                                         
+def currentgpswk():                                                                                                                                                                                    
+    now = datetime.now()                                                                                                                                                                               
+    return gpswk(now)                                                                                                                                                                                  
+                                                                                                                                                                                                       
+##############################################################################################                                                                                                         
+def currentgpswkdow():                                                                                                                                                                                 
+    now = datetime.now()                                                                                                                                                                               
+    return gpswkdow(now)                                                                                                                                                                               
+
+##############################################################################################                                                                                                         
+def getcurrentsp3file(localoutdir):                                                                                                                                                                    
+    tt   = datetime.now(tz=timezone.utc) - timedelta(hours=2)                                                                                                                                          
+    tnow = datetime.now(tz=timezone.utc)                                                                                                                                                               
+                                                                                                                                                                                                       
+    while True:                                                                                                                                                                                        
+        gpsw, dow = gpswkdow(tt)                                                                                                                                                                       
+        hours = tt.hour                                                                                                                                                                                
+        minutes = int(tt.minute  / 15) * 15                                                                                                                                                            
+        sp3filenameLocal = "%s/vmcpp%04d%d_%02d%02d.sp3" % (localoutdir, gpsw, dow, hours, minutes)                                                                                                    
+        sp3filenameSftp  = "%04d/vmcpp%04d%d_%02d%02d.sp3" % (gpsw, gpsw, dow, hours, minutes)                                                                                                         
+                                                                                                                                                                                                       
+        if not os.path.exists(sp3filenameLocal):                                                                                                                                                       
+            command = "echo -e \"lcd %s\\\\n get %s\" | sftp -i ~/.ssh/ocds_archive.rsa ocdsarchive@napeos.correction-products.veripos.com" % (localoutdir, sp3filenameSftp)                           
+            print("Try to download file %s, cmd %s" % (sp3filenameSftp, command))                                                                                                                      
+            return_code = subprocess.run(command, shell=True, stdout = subprocess.DEVNULL, stderr = subprocess.DEVNULL)                                                                                
+            ###return_code = subprocess.run(command, shell=True)                                                                                                                                       
+                                                                                                                                                                                                       
+            if os.path.exists(sp3filenameLocal):                                                                                                                                                       
+                print("  download succeed")                                                                                                                                                            
+            else:                                                                                                                                                                                      
+                print("  download failed")                                                                                                                                                             
+        else:                                                                                                                                                                                          
+            print("File %s exists already\n" % (sp3filenameLocal))                                                                                                                                     
+                                                                                                                                                                                                       
+        tt = tt + timedelta(minutes=15)                                                                                                                                                                
+        if tt > tnow:                                                                                                                                                                                  
+            break                                                                                                                                                                                      
+
+##############################################################################################                                                                                                         
+def deleteoldfiles(extension: str, nhours: float, dirname: str):                                                                                                                                       
+    if not extension.startswith('.'):                                                                                                                                                                  
+        extension = '.' + extension                                                                                                                                                                    
+                                                                                                                                                                                                       
+    dirpath = Path(dirname)                                                                                                                                                                            
+    if not dirpath.is_dir():                                                                                                                                                                           
+        print(f"Error: Directory not found: {dirname}")                                                                                                                                                
+        return                                                                                                                                                                                         
+                                                                                                                                                                                                       
+    # Compute threshold time in seconds                                                                                                                                                                
+    now = time.time()                                                                                                                                                                                  
+    age_limit = now - nhours * 3600                                                                                                                                                                    
+                                                                                                                                                                                                       
+    deleted_count = 0                                                                                                                                                                                  
+    for file in dirpath.glob(f"*{extension}"):                                                                                                                                                         
+        try:                                                                                                                                                                                           
+            mtime = file.stat().st_mtime                                                                                                                                                               
+            if mtime < age_limit:                                                                                                                                                                      
+                file.unlink()                                                                                                                                                                          
+                deleted_count += 1                                                                                                                                                                     
+                print(f"Deleted: {file}")                                                                                                                                                              
+        except Exception as e:                                                                                                                                                                         
+            print(f"Failed to delete {file}: {e}")                                                                                                                                                     
Index: /trunk/BNC/src/PPP/ambres.cpp
===================================================================
--- /trunk/BNC/src/PPP/ambres.cpp	(revision 10791)
+++ /trunk/BNC/src/PPP/ambres.cpp	(revision 10791)
@@ -0,0 +1,260 @@
+#include <set>
+#include <algorithm>
+#include <math.h>
+#include <newmatio.h>
+
+#include "ambres.h"
+#include "bncutils.h"
+#include "lambda.h"
+#include "pppClient.h"
+
+using namespace std;
+using namespace BNC_PPP;
+
+//
+//////////////////////////////////////////////////////////////////////////////////////////
+AmbRes::AmbRes() {
+  reset();
+}
+
+//
+//////////////////////////////////////////////////////////////////////////////////////////
+AmbRes::~AmbRes() {
+}
+
+//
+//////////////////////////////////////////////////////////////////////////////////////////
+bool AmbRes::isResolvable(const t_pppParam* amb) {
+  if ( amb->ambNumEpo() >= OPT->_ar._minNumEpo && amb->ambEleSat() >= OPT->_ar._minEle) {
+    return true;
+  }
+  else {
+    return false;
+  }
+}
+
+//
+//////////////////////////////////////////////////////////////////////////////////////////
+bool AmbRes::isFixable(double xx, double sigma, bool* checked) {
+  if (OPT->_ar._maxFrac <= 0.0 || OPT->_ar._maxSig <= 0.0) {
+    if (checked) {
+      *checked = false;
+    }
+    return true;
+  }
+  else {
+    if (checked) {
+      *checked = true;
+    }
+    return  ( fabs(xx - nint(xx)) <= OPT->_ar._maxFrac && sigma <= OPT->_ar._maxSig );
+  }
+}
+
+//
+//////////////////////////////////////////////////////////////////////////////////////////
+void AmbRes::addToGroup(const t_pppParam* amb) {
+  t_lc LC  = amb->LC();
+  char       sys = amb->prn().system();
+  AmbGroup* p_ambGroup = 0;
+  for (AmbGroup& ambGroup : _ambGroups) {
+    if (ambGroup._system == sys && ambGroup._LC == LC) {
+      p_ambGroup = &ambGroup;
+      break;
+    }
+  }
+  if (!p_ambGroup) {
+    _ambGroups.emplace_back(AmbGroup(sys, LC));
+    p_ambGroup = &_ambGroups.back();
+  }
+  p_ambGroup->_zdAmbs.push_back(ZdAmb(amb));
+
+  _numZdAmbs += 1;
+}
+
+// Select Reference Ambiguity
+////////////////////////////////////////////////////////////////////////////////////////////
+void AmbRes::selectReference(AmbGroup& ambGroup) {
+
+  // Compute sum of variances of all double-difference ambiguities
+  // -------------------------------------------------------------
+  double minVarSum = 0.0;
+  for (const ZdAmb& zdAmb1 : ambGroup._zdAmbs) {
+    int i1 = zdAmb1.index();
+    double varSum = 0.0;
+    for (const ZdAmb& zdAmb2 : ambGroup._zdAmbs) {
+      int i2 = zdAmb2.index();
+      varSum += _QQ[i1][i1] - 2.0 * _QQ(i1+1,i2+1) + _QQ[i2][i2];
+    }
+    if (ambGroup._zdAmbRef == 0 || minVarSum > varSum) {
+      ambGroup._zdAmbRef  = &zdAmb1;
+      minVarSum           = varSum;
+    }
+  }
+}
+
+//
+//////////////////////////////////////////////////////////////////////////////////////////
+t_irc AmbRes::run(const bncTime&                  epoTime, 
+                  const std::vector<t_pppParam*>& params,
+                  SymmetricMatrix&                QFinal, 
+                  ColumnVector&                   xFinal,
+                  double&                         fixRatio,
+                  std::ostream&                   msg) {
+  reset();
+  fixRatio = 0.0;
+  
+  msg << string(epoTime) << " Ambiguity Resolution (BIE)" << endl;
+  
+  // Resolvable ambiguities
+  // ----------------------
+  map<char, set<t_prn>> usedPrns;
+  for (char system : OPT->_ar._systems) {
+    for (const auto& par : params) {
+      if (par->type() == t_pppParam::amb && par->prn().system() == system) {
+        if (isResolvable(par)) {
+          addToGroup(par);
+        }
+      }
+    }
+  }
+
+  // Remove Groups with less than 2 ambiguities
+  // ------------------------------------------
+  auto iGrp = _ambGroups.begin();
+  while (iGrp != _ambGroups.end()) {
+    if (iGrp->_zdAmbs.size() < 2) {
+      _numZdAmbs -= iGrp->_zdAmbs.size();
+      iGrp = _ambGroups.erase(iGrp);
+    }
+    else {
+      ++iGrp;
+    }
+  }
+
+  // Check number of zero-difference ambiguities
+  // -------------------------------------------
+  bool hasEnoughAmbs = false;
+  for (const auto& ambGroup : _ambGroups) {
+    if (int(ambGroup._zdAmbs.size()) >= OPT->_ar._minNumSat) {
+      hasEnoughAmbs = true;
+      break;
+    }
+  }
+  if (!hasEnoughAmbs) {
+    msg << "    not enough resolvable ambiguities" << endl;
+    return t_irc::failure;
+  }
+
+  // Construct the variance-covariance matrix of ambiguities
+  // -------------------------------------------------------
+  Matrix ZD(_numZdAmbs, params.size()); ZD = 0.0;
+  int idx = -1;
+  for (auto& ambGroup : _ambGroups) {
+    for (auto& zdAmb : ambGroup._zdAmbs) {
+      idx += 1;
+      zdAmb.setIndex(idx);
+      ZD[idx][zdAmb.indexGlobal()] = 1.0;
+    }
+  }
+  _xx =  ZD * xFinal;
+  _QQ << ZD * QFinal * ZD.t();
+
+  // Select and Constrain Reference Ambiguities
+  // ------------------------------------------
+  Matrix       HH(_ambGroups.size(), _numZdAmbs); HH = 0.0;
+  ColumnVector hh(_ambGroups.size());
+  for (unsigned iGrp = 0; iGrp < _ambGroups.size(); ++iGrp) {
+    AmbGroup& ambGroup = _ambGroups[iGrp];
+    selectReference(ambGroup);
+    HH[iGrp][ambGroup._zdAmbRef->index()] = 1.0;
+    hh[iGrp]                              = nint(_xx[ambGroup._zdAmbRef->index()]);
+  }
+  DiagonalMatrix PP(HH.nrows()); PP = 1.0 / (sigCon * sigCon);
+  kalman(HH, hh, PP, _QQ, _xx);
+  
+  // Perform the Lambda (BIE) Search
+  // -------------------------------
+  ColumnVector    xBie;
+  SymmetricMatrix covBie;
+  Lambda::search(_xx, _QQ, xBie, covBie);
+  if (xBie.Nrows() == 0) {
+    msg << " BIE search: failed" << endl; 
+    return t_irc::failure;
+  }
+
+  // Print BIE Results
+  // -----------------
+  printBieResults(xBie, covBie, msg);
+
+  // Constrain ambiguities
+  // ---------------------
+  setConstraints(QFinal, xFinal, xBie, covBie, fixRatio, msg);
+
+  return t_irc::success;
+}
+
+// Print single-difference ambiguities and AR results
+////////////////////////////////////////////////////////////////////////////////////////////
+void AmbRes::printBieResults(const ColumnVector& xBie, const SymmetricMatrix& covBie,
+                             ostream& msg) const {
+  msg.setf(ios::fixed);
+  for (const AmbGroup& ambGroup : _ambGroups) {
+    msg <<  "  Group " << ambGroup._LC.toString() << endl;
+    
+    for (const ZdAmb& zdAmb: ambGroup._zdAmbs) {
+      int idx = zdAmb.index();
+      msg << "  " << zdAmb.prn().toString() << ' ' << setw(7) << setprecision(2) << _xx[idx];
+      if (&zdAmb == ambGroup._zdAmbRef) {
+        msg << " ref";
+      }
+      else {
+        msg << " +- ";
+      }
+      msg << setw(6) << setprecision(2) << sqrtMod(_QQ[idx][idx]) << ' '
+          << setw(7) << setprecision(2) << xBie[idx] << ' '
+          << setw(9) << setprecision(6) << sqrtMod(covBie[idx][idx]);
+      if (isFixable(xBie[idx], sqrtMod(covBie[idx][idx]))) {
+        msg << " fix ";
+      }
+      msg << endl;
+    }
+  }
+}
+
+// 
+////////////////////////////////////////////////////////////////////////////////////////////
+void AmbRes::setConstraints(SymmetricMatrix& QFinal, ColumnVector& xFinal,
+                            const ColumnVector& xBie, const SymmetricMatrix& covBie, 
+                            double& fixRatio, ostream& /*msg*/) {
+
+  fixRatio = 0.0;
+  
+  vector<unique_ptr<const RowVector>> CC;
+  vector<double>                      cc;
+  vector<double>                      Sc;
+  int numSdAmbs   = 0;
+  int numFixSdAll = 0;
+  for (const AmbGroup& ambGroup : _ambGroups) {
+    numSdAmbs += ambGroup._zdAmbs.size() - 1;
+    for (const ZdAmb& zdAmb : ambGroup._zdAmbs) {
+      int idx = zdAmb.index();
+      if (isFixable(xBie[idx], sqrtMod(covBie[idx][idx]))) {
+        if (ambGroup._zdAmbRef->indexGlobal() != zdAmb.indexGlobal()) {
+          numFixSdAll += 1;
+        }
+        RowVector* pCC;
+        CC.emplace_back(pCC = new RowVector(xFinal.Nrows()));
+        cc.push_back(xBie[idx]);
+        Sc.push_back(sigCon);
+        (*pCC)                      = 0.0;
+        (*pCC)[zdAmb.indexGlobal()] = 1.0;
+      }
+    }
+  }
+  if (CC.size() > 0) {
+    kalman(CC, cc, Sc, QFinal, xFinal);
+  }
+  if (numSdAmbs > 0) {
+    fixRatio = double(numFixSdAll) / double(numSdAmbs);
+  }
+}
Index: /trunk/BNC/src/PPP/ambres.h
===================================================================
--- /trunk/BNC/src/PPP/ambres.h	(revision 10791)
+++ /trunk/BNC/src/PPP/ambres.h	(revision 10791)
@@ -0,0 +1,95 @@
+#ifndef AMBRES_H
+#define AMBRES_H
+
+#include <iostream>
+#include <map>
+#include <newmat.h>
+#include "pppInclude.h"
+#include "pppParlist.h"
+
+namespace BNC_PPP {
+
+  class AmbRes {
+  public:
+    AmbRes();
+    ~AmbRes();
+
+    t_irc run(const bncTime&                  epoTime, 
+              const std::vector<t_pppParam*>& params,
+              SymmetricMatrix&                QFinal, 
+              ColumnVector&                   xFinal,
+              double&                         fixRatio,
+              std::ostream&                   msg);
+
+  private:
+    static constexpr double sigCon = 1e-4;
+
+    class ZdAmb {
+    public:
+      ZdAmb(const t_pppParam* amb) : _amb(amb), _index(-1) {}
+      t_prn             prn() const {return _amb->prn();}
+      t_lc              LC() const {return _amb->LC();}
+      double            valueApr() const {return _amb->x0();}
+      int               index() const {return _index;}
+      int               indexGlobal() const {return _amb->indexNew();}
+      void              setIndex(int index) {_index = index;}
+      bncTime           firstObsTime() const {return _amb->firstObsTime();}
+      const t_pppParam* ambGlobal() const {return _amb;}
+    private:
+      const t_pppParam* _amb;
+      int               _index;
+    };
+  
+    class SdAmb {
+    public:
+      SdAmb(const ZdAmb& zdAmb1, const ZdAmb& zdAmb2,
+            const ColumnVector& xBie, const SymmetricMatrix& covBie);
+      t_lc              _LC;
+      t_prn             _prn1;
+      t_prn             _prn2;
+      double            _aprVal;
+      double            _bieValue;
+      double            _bieSigma;
+      bool              _fixed;
+      bncTime           _firstObsTime;
+      const t_pppParam* _ambGlobal[2];
+    };
+  
+    class AmbGroup {
+    public:
+      AmbGroup(char sys, const t_lc& LC) : _system(sys), _LC(LC), _zdAmbRef(0) {};
+      char               _system;
+      t_lc               _LC;
+      const ZdAmb*       _zdAmbRef;
+      std::vector<ZdAmb> _zdAmbs;
+      std::vector<SdAmb> _sdAmbs;
+    };
+
+    static bool isResolvable(const t_pppParam* amb);
+    static bool isFixable(double xx, double sigma, bool* checked = 0);
+
+    void reset() {
+      _numZdAmbs = 0;
+      _ambGroups.clear();
+      _QQ.cleanup();
+      _xx.cleanup();
+    }
+
+    void addToGroup(const t_pppParam* amb);
+    void selectReference(AmbGroup& ambGroup);
+    void printBieResults(const ColumnVector& xBie, const SymmetricMatrix& covBie,
+                         std::ostream& msg) const;
+    void setConstraints(SymmetricMatrix& QFinal, ColumnVector& xFinal,
+                        const ColumnVector& xBie, const SymmetricMatrix& covBie, 
+                        double& fixRatio, std::ostream& msg);
+
+    unsigned              _numZdAmbs;
+    std::vector<AmbGroup> _ambGroups;
+    SymmetricMatrix       _QQ;
+    ColumnVector          _xx;
+
+  };
+
+}
+
+#endif
Index: /trunk/BNC/src/PPP/lambda.cpp
===================================================================
--- /trunk/BNC/src/PPP/lambda.cpp	(revision 10791)
+++ /trunk/BNC/src/PPP/lambda.cpp	(revision 10791)
@@ -0,0 +1,430 @@
+
+#include <iostream>
+#include <iomanip>
+#include <newmatio.h>
+#include <cmath>
+
+#include "lambda.h"
+
+using namespace BNC_PPP;
+using namespace std;
+
+// Gauss Error Function
+/////////////////////////////////////////////////////////////////////////////////////////
+double Lambda::erf(double xx) {
+  static const double a1 =  0.254829592;
+  static const double a2 = -0.284496736;
+  static const double a3 =  1.421413741;
+  static const double a4 = -1.453152027;
+  static const double a5 =  1.061405429;
+  static const double pp =  0.3275911;
+
+  int sign = (xx < 0) ? -1 : 1;
+  xx = fabs(xx);
+
+  double tt = 1.0/(1.0 + pp*xx);
+  double yy = 1.0 - (((((a5*tt + a4)*tt) + a3)*tt + a2)*tt + a1)*tt*exp(-xx*xx);
+
+  return sign * yy;
+}
+
+// Cumulative Distribution Function (Normal Distribution)
+/////////////////////////////////////////////////////////////////////////////////////////
+double Lambda::normcdf(double x, double mu, double sigma) {
+  static const double root_two = sqrt(2.0);
+  return 0.5 * ( 1.0 + erf( (x-mu) / (sigma*root_two) ) );
+}
+
+// Auxiliary functions
+/////////////////////////////////////////////////////////////////////////////////////////
+void Lambda::swap(double& a, double& b) {
+  double t(a); a = b; b = t; 
+}
+double Lambda::sign(double a) {
+  if      (a < 0.0) {
+    return -1.0;
+  }
+  else if (a > 0.0) {
+    return 1.0;
+  }
+  else {
+    return 0.0;
+  }
+}
+double Lambda::nint(double val) {
+  return ((val < 0.0) ? -floor(fabs(val)+0.5) : floor(val+0.5));
+}
+
+// LAMBDA/BIE Search
+/////////////////////////////////////////////////////////////////////////////////////////
+void Lambda::search(ColumnVector aFlt, const SymmetricMatrix& QQ,
+                    ColumnVector& aFix, SymmetricMatrix& covBie) {
+
+  int nn = QQ.Nrows();
+
+  // Remove integer numbers from float solution (for computational convenience only)
+  // -------------------------------------------------------------------------------
+  ColumnVector incr(nn);
+  for (int ii = 0; ii < nn; ii++) {
+    incr[ii] = nint(aFlt[ii]);
+    aFlt[ii] = aFlt[ii] - incr[ii];
+  }
+  
+  // Compute ZZ matrix based on the decomposition  Q=LL^T*D*LL; The transformed
+  // float solution: zFlt = ZZ^T *aFlt, QzFlt = ZZ^T * QQ * ZZ
+  // -----------------------------------------------------------------------
+  SymmetricMatrix       QzFlt;
+  Matrix                ZZ;
+  LowerTriangularMatrix LL;
+  DiagonalMatrix        DD;
+  ColumnVector          zFlt;
+  Matrix                iZt;
+  decorrel(QQ, aFlt, QzFlt, ZZ, LL, DD, zFlt, iZt);
+  
+  // Perform the search
+  // ------------------
+  Info info;
+  BIE(zFlt, LL, DD, info);
+
+  // Perform the back-transformation and add the increments
+  // ------------------------------------------------------
+  aFix = iZt * info.zBie + incr;
+  info.zBie = ZZ.t() * aFix;
+  info.aFix = iZt * info.zFix; 
+  for (int iCand = 1; iCand <= info.zFix.Ncols(); iCand++) {
+    info.aFix.column(iCand) += incr;
+  }
+  info.zFix = ZZ.t() * info.aFix;
+
+#ifdef LAMBDA_MAIN_TEST
+  cout.setf(ios::fixed);
+  cout << "aFix(3 cand)= \n"  << setw(10) << setprecision(2) << info.aFix.columns(1,3) << endl;
+#endif  
+  
+  // Variances of ambiguities
+  // ------------------------
+  static const double sigCon = 1e-6;
+  DiagonalMatrix covZ(info.zFix.Nrows()); covZ = 0.0;
+  for (int ia = 0; ia < info.zFix.Nrows(); ia++) { // loop over all ambiguities
+    for (int ic = 0; ic < info.zFix.Ncols(); ic++) { // loop over all candidates
+      double dZ = info.zBie[ia] - info.zFix[ia][ic];
+      covZ[ia] += info.wgt[ic] * dZ * dZ;
+    }
+    if (covZ[ia] < sigCon*sigCon) { // make the matrix positive-definite
+      covZ[ia] = sigCon*sigCon;
+    }
+  }
+  Matrix invZ = ZZ.i();
+  covBie << invZ.t() * covZ * invZ;
+}
+
+// Best Integer Equivariant Estimator
+/////////////////////////////////////////////////////////////////////////////////////////
+void Lambda::BIE(const ColumnVector& zFlt,        // Original ambiguities
+                 const LowerTriangularMatrix& LL, // L matrix from L'DL-decomposition of QzFlt
+                 const DiagonalMatrix& DD,        // D matrix from L'DL-decomposition of QzFlt
+                 Info& info) {                  
+
+  int          nn     = zFlt.Nrows();
+  int          ncands = 100;
+  ColumnVector sqnorm;
+  info.wgt.ReSize(ncands); info.wgt  = 0.0;
+  info.zBie.ReSize(nn);    info.zBie = 0.0;
+
+  ssearch(zFlt, LL, DD, ncands, info.zFix, sqnorm);
+
+  LowerTriangularMatrix Li = LL.i();
+  SymmetricMatrix QzFltInv; QzFltInv << Li * DD.i() * Li.t();
+
+  info.zBie.ReSize(nn); info.zBie = 0.0;
+  double wgtSum = 0.0;
+  double norm1  = 0.0;
+  for (int ic = 1; ic <= ncands; ic++) {
+
+    ColumnVector da     = zFlt - info.zFix.column(ic);
+    double       daNorm = DotProduct(da, QzFltInv * da);
+
+    if (ic == 1) {
+      norm1 = daNorm;
+      info.wgt(ic) = 1.0;
+    }
+    else {
+      info.wgt(ic) = exp(-0.5 * (daNorm-norm1));  // weights scaled by exp(0.5 * norm1)
+    }
+
+    wgtSum += info.wgt(ic);
+
+    for (int ia = 1; ia <= info.zFix.Nrows(); ia++) {
+      info.zBie(ia) += info.wgt(ic) * info.zFix(ia,ic);
+    }
+  }
+
+  info.zBie /= wgtSum;
+  info.wgt  /= wgtSum;
+}
+
+// Decomposition Q = L'DL  (L is lower triangular)
+/////////////////////////////////////////////////////////////////////////////////////////
+void Lambda::ldldecom(const SymmetricMatrix& QQ, LowerTriangularMatrix& LL, DiagonalMatrix& DD) {
+
+  const int n = QQ.Nrows();
+
+  Matrix QC = QQ;
+
+  LL.ReSize(n); LL = 0.0;
+  DD.resize(n); DD = 0.0;
+  
+  for (int i = n-1; i >= 0; i--) {
+    DD[i] = QC[i][i];
+    if ( DD[i] <= 0.0 ) {
+      throw "ldldecom problem";
+    }
+    double temp = sqrt(DD[i]);
+    for (int j = 0; j <= i; j++) {
+      LL[i][j] = QC[i][j]/temp;
+    }
+    for (int j = 0; j <= i-1; j++) {
+      for(int k = 0; k <= j; k++) {
+        QC[j][k] -= LL[i][k] * LL[i][j];
+      }
+    }
+    for (int j = 0; j <= i; j++) {
+      LL[i][j] /= LL[i][i];
+    }
+  }
+}
+
+// 
+/////////////////////////////////////////////////////////////////////////////////////////
+void Lambda::decorrel(const SymmetricMatrix& QQ, // Variance-covariance matrix of ambiguities
+                        const ColumnVector& aFlt,  // Original ambiguities
+                        SymmetricMatrix& QzFlt,    // Cov. matrix of decorrelated ambiguities
+                        Matrix& ZZ,                // ZZ-transformation matrix
+                        LowerTriangularMatrix& LL, // L matrix from L'DL-decomposition of QzFlt
+                        DiagonalMatrix& DD,        // D matrix from L'DL-decomposition of QzFlt
+                        ColumnVector& zFlt,        // Transformed ambiguities
+                        Matrix& iZt) {             // ZZ.t().i() transformation matrix
+
+  // L'DL Decomposition
+  // ------------------
+  ldldecom(QQ, LL, DD);
+
+  // Reduction
+  // ---------
+  int n = DD.Nrows();
+
+  iZt.ReSize(n,n); iZt = 0.0; 
+  for (int i = 0; i < n; i++) {
+    iZt[i][i] = 1.0;
+  }
+
+  int  i1 = n - 1;
+  bool sw = true;
+  while (sw) {
+
+    int i = n;   // loop for column from n to 1
+    sw = false;
+
+    while ( !sw && i > 1) {
+
+      i = i - 1;  // the ith column
+      if (i <= i1) {
+        for (int j = i+1; j <= n; j++) {
+          double mu = nint(LL(j,i));
+          if (mu != 0.0) {
+            for (int k = j; k <= n; k++) {
+              LL(k,i) = LL(k,i) - mu * LL(k,j);
+            }
+            for (int k = 1; k <= n; k++) {
+              iZt(k,j) = iZt(k,j) + mu * iZt(k,i);
+            }
+          }
+        }
+      }
+
+      double delta = DD(i) + LL(i+1,i) * LL(i+1,i) * DD(i+1);
+      if (delta < DD(i+1)) {
+        double lambda = DD(i+1) * LL(i+1,i) / delta;
+        double eta    = DD(i) / delta;
+        DD(i)         = eta * DD(i+1);
+        DD(i+1)       = delta;
+
+        Matrix hlp(2,2); hlp << -LL(i+1,i) << 1.0
+                             <<     eta    << lambda;
+
+        LL.submatrix(i,i+1,1,i-1) = hlp * LL.submatrix(i,i+1,1,i-1);
+
+        LL(i+1,i) = lambda;
+
+        for (int k = i+2; k <= n; k++) swap( LL(k,i),  LL(k,i+1));
+        for (int k = 1;   k <= n; k++) swap(iZt(k,i), iZt(k,i+1));
+        i1 = i;
+        sw = true;
+      }
+    }
+  }
+
+  // Transformed Q-matrix, transformation-matrix, and decorrelated ambiguities
+  // -------------------------------------------------------------------------
+  ZZ = iZt.i().t();
+  for (int i = 0; i < ZZ.Nrows(); i++) {
+    for (int j = 0; j < ZZ.Nrows(); j++) {
+      ZZ[i][j] = nint(ZZ[i][j]);
+    }
+  }
+
+  QzFlt << ZZ.t() * QQ * ZZ;  // it is also L'DL
+  zFlt = ZZ.t() * aFlt;
+}
+
+// Integer ambiguity vector search by employing the search-and-shrink technique
+/////////////////////////////////////////////////////////////////////////////////////////
+void Lambda::ssearch(const ColumnVector& zFlt,        // Original ambiguities
+                       const LowerTriangularMatrix& LL, // L matrix from L'DL-decomposition of QzFlt
+                       const DiagonalMatrix& DD,        // D matrix from L'DL-decomposition of QzFlt
+                       int ncands,                      // Number of requested candidates
+                       Matrix& zFix,                    // estimated integers (n x ncands )   
+                       ColumnVector& sqnorm) {          // squared norms (ascendantly sorted)
+
+  // Initialize outputs
+  // ------------------
+  int n = zFlt.Nrows();
+  zFix.ReSize(n, ncands); zFix   = 0.0;
+  sqnorm.ReSize(ncands);  sqnorm = 0.0;
+  
+  // Initializing the variables for searching
+  // ----------------------------------------
+  double       Chi2 = 1.0e+18;         // start search with an infinite chi^2
+  ColumnVector dist(n); dist(n) = 0.0; // dist(k)=sum_{j=k+1}^{n}(a_j-acond_j)^2/d_j 
+  bool         endsearch = false;
+  int          count = 0;              // the number of candidates
+  
+  ColumnVector acond(n); acond(n) = zFlt(n);
+  ColumnVector zcond(n); zcond(n) = nint(acond(n));
+  double left = acond(n) - zcond(n);
+  ColumnVector step(n); step(n) = sign(left);
+
+  // For a very occasional case when the value of float solution zFlt(n) == 0, we
+  // compusively give a positive step to continue.
+  if (step(n) == 0.0) {
+    step(n) = 1;
+  }
+  
+  int    imax = ncands;       // initially, the maximum F(z) is at ncands
+  Matrix SS(n, n); SS = 0.0;  // used to compute conditional ambiguities
+  
+  int k = n;
+  
+  // Start the main search-loop
+  // --------------------------
+  while (!endsearch) {
+    double newdist = dist(k) + left*left / DD(k);
+    if (newdist < Chi2) {
+      if (k != 1) { // Case 1: move down
+        k = k - 1;
+        dist(k)  = newdist;
+        for (int j = 1; j <= k; j++) {
+          SS(k,j) = SS(k+1,j) + (zcond(k+1)-acond(k+1)) * LL(k+1,j);
+        }
+        
+        acond(k) = zFlt(k) + SS(k, k);
+        zcond(k) = round(acond(k));
+        left     = acond(k) - zcond(k);
+        step(k)  = sign(left);
+              
+        if (step(k) == 0) {
+          step(k) = 1.0;
+        }
+      }
+      else { // Case 2: store the found candidate and try next valid integer
+        if (count < ncands - 1) {
+          count = count + 1;
+          zFix.column(count) = zcond;
+          sqnorm(count)        = newdist;
+        }           
+        else {
+          zFix.column(imax) = zcond;
+          sqnorm(imax)        = newdist;
+          Chi2 = sqnorm.maximum1(imax);
+        }
+        zcond(1) =  zcond(1) + step(1);  // next valid integer
+        left     =  acond(1) - zcond(1);
+        step(1)  = -step(1)  - sign(step(1)); 
+      }
+    }
+    else { // Case 3: exit or move up
+      if (k == n) {
+        endsearch = true;
+      }
+      else {
+        k        =  k + 1;               // move up
+        zcond(k) =  zcond(k) + step(k);  // next valid integer
+        left     =  acond(k) - zcond(k);
+        step(k)  = -step(k)  - sign(step(k));
+      }
+    }
+  }
+  
+  // Sort
+  // ----
+  for (int i = 0; i < ncands-1; i++) {
+    for (int j = i+1; j < ncands; j++) {
+      if (sqnorm[i] > sqnorm[j]) {
+        swap(sqnorm[i],sqnorm[j]);
+        for (k = 0; k < n; k++) {
+          swap(zFix[k][i], zFix[k][j]);
+        }
+      }
+    }
+  }
+}
+
+#ifdef LAMBDA_MAIN_TEST
+// Main test program
+// compile: g++ -DLAMBDA_MAIN_TEST -I../../newmat ../../newmat/*.cpp arLambda.cpp
+/////////////////////////////////////////////////////////////////////////////////////////
+int main(int argc, char* argv[]) {
+
+  const int nn = 12;
+
+  SymmetricMatrix QQ(nn);
+  QQ <<  1.90688560e+04                                                                                                                                                                                                                  
+     << -1.57839723e+04 <<  5.90277038e+04                                                                                                                                                                                               
+     << -1.73342006e+04 <<  3.81426928e+04 <<  2.81775654e+04                                                                                                                                                                            
+     <<  1.44119240e+04 <<  5.62717388e+02 << -7.00050220e+03 <<  1.56055082e+04                                                                                                                                                         
+     <<  1.00557170e+04 << -1.38300856e+04 << -1.16958674e+04 <<  5.03970282e+03 <<  6.82077251e+03                                                                                                                                      
+     << -1.42592953e+04 <<  2.73734263e+04 <<  2.18861681e+04 << -9.64896531e+03 << -6.88024051e+03 <<  2.32465490e+04                                                                                                                   
+     <<  1.48588484e+04 << -1.22991994e+04 << -1.35071695e+04 <<  1.12300704e+04 <<  7.83562345e+03 << -1.11111394e+04 <<  1.15783237e+04                                                                                                
+     << -1.22991994e+04 <<  4.59956130e+04 <<  2.97215786e+04 <<  4.38480888e+02 << -1.07766903e+04 <<  2.13299424e+04 << -9.58379157e+03 <<  3.58407377e+04                                                                             
+     << -1.35071695e+04 <<  2.97215786e+04 <<  2.19565441e+04 << -5.45493698e+03 << -9.11366311e+03 <<  1.70541567e+04 << -1.05250670e+04 <<  2.31596718e+04 <<  1.71089957e+04                                                          
+     <<  1.12300704e+04 <<  4.38480887e+02 << -5.45493698e+03 <<  1.21601359e+04 <<  3.92704096e+03 << -7.51867446e+03 <<  8.75070439e+03 <<  3.41673570e+02 << -4.25060009e+03 <<  9.47543087e+03                                       
+     <<  7.83562345e+03 << -1.07766903e+04 << -9.11366311e+03 <<  3.92704096e+03 <<  5.31488728e+03 << -5.36122657e+03 <<  6.10568076e+03 << -8.39742084e+03 << -7.10155552e+03 <<  3.06003207e+03 <<  4.14147091e+03                    
+     << -1.11111394e+04 <<  2.13299424e+04 <<  1.70541567e+04 << -7.51867446e+03 << -5.36122657e+03 <<  1.81141936e+04 << -8.65803054e+03 <<  1.66207345e+04 <<  1.32889535e+04 << -5.85870722e+03 << -4.17757899e+03 <<  1.41149564e+04;
+
+  ColumnVector aa(nn);
+  aa << -2.84908567e+04
+     <<  6.57526299e+04
+     <<  3.88303667e+04
+     <<  5.00370834e+03
+     << -2.91960699e+04
+     << -2.97658932e+02
+     << -2.22010284e+04
+     <<  5.12358375e+04
+     <<  3.02577810e+04
+     <<  3.89940332e+03
+     << -2.27491854e+04
+     << -1.59278780e+02;
+
+  ColumnVector    aBie;
+  SymmetricMatrix covBie;
+
+  Lambda::search(aa, QQ, aBie, covBie);
+
+  cout.setf(ios::fixed);
+  cout << "aFlt = \n"    << setw(10) << setprecision(2) << aa     << endl;
+  cout << "aBie = \n"    << setw(10) << setprecision(2) << aBie   << endl;
+  cout << "covBie = \n"  << setw( 7) << setprecision(2) << covBie << endl;
+
+  return 0;
+}
+#endif
Index: /trunk/BNC/src/PPP/lambda.h
===================================================================
--- /trunk/BNC/src/PPP/lambda.h	(revision 10791)
+++ /trunk/BNC/src/PPP/lambda.h	(revision 10791)
@@ -0,0 +1,47 @@
+#ifndef LAMBDA_H
+#define LAMBDA_H
+
+#include <newmat.h>
+
+namespace BNC_PPP {
+
+  class Lambda {
+  public:
+    static void search(ColumnVector aFlt, const SymmetricMatrix& QaFlt,
+                       ColumnVector& aFix, SymmetricMatrix& covBie);
+
+  private:
+    class Info {
+    public:
+      Matrix       aFix;
+      Matrix       zFix;
+      ColumnVector zBie;
+      ColumnVector wgt;
+    };
+
+    static double erf(double xx);
+
+    static double normcdf(double xx, double mu = 0.0, double sigma = 1.0);
+
+    static void ldldecom(const SymmetricMatrix& QQ, LowerTriangularMatrix& LL, DiagonalMatrix& DD);
+
+    static void decorrel(const SymmetricMatrix& QaFlt, const ColumnVector& aFlt, 
+                         SymmetricMatrix& QzFlt, Matrix& ZZ, LowerTriangularMatrix& LL, 
+                         DiagonalMatrix& DD, ColumnVector& zFlt, Matrix& iZt);
+
+    static void ssearch(const ColumnVector& zFlt, const LowerTriangularMatrix& LL, 
+                        const DiagonalMatrix& DD, int ncands, Matrix& zFix, ColumnVector& sqnorm);
+
+    static inline double nint(double val);
+
+    static inline void swap(double& a, double& b);
+
+    static inline double sign(double a);
+
+    static void BIE(const ColumnVector& zFlt, const LowerTriangularMatrix& LL, 
+                    const DiagonalMatrix& DD, Info& info);
+  };
+
+}
+
+#endif
Index: /trunk/BNC/src/PPP/pppClient.cpp
===================================================================
--- /trunk/BNC/src/PPP/pppClient.cpp	(revision 10790)
+++ /trunk/BNC/src/PPP/pppClient.cpp	(revision 10791)
@@ -117,4 +117,7 @@
 //////////////////////////////////////////////////////////////////////////////
 void t_pppClient::putOrbCorrections(const vector<t_orbCorr*>& corr) {
+  if (OPT->_logMode == t_pppOptions::normal && corr.size() > 0) {
+    LOG << "orbCorrections " << string(corr[0]->_time) << ' ' << corr.size() << endl;
+  }
   for (unsigned ii = 0; ii < corr.size(); ii++) {
     _ephPool->putOrbCorrection(new t_orbCorr(*corr[ii]));
@@ -125,4 +128,7 @@
 //////////////////////////////////////////////////////////////////////////////
 void t_pppClient::putClkCorrections(const vector<t_clkCorr*>& corr) {
+  if (OPT->_logMode == t_pppOptions::normal && corr.size() > 0) {
+    LOG << "clkCorrections " << string(corr[0]->_time) << ' ' << corr.size() << endl;
+  }
   for (unsigned ii = 0; ii < corr.size(); ii++) {
     _ephPool->putClkCorrection(new t_clkCorr(*corr[ii]));
@@ -133,6 +139,16 @@
 //////////////////////////////////////////////////////////////////////////////
 void t_pppClient::putCodeBiases(const vector<t_satCodeBias*>& biases) {
+  if (OPT->_logMode == t_pppOptions::normal && biases.size() > 0) {
+    LOG << "codeBiases     " << string(biases[0]->_time) << ' ' << biases.size() << endl;
+  }
+  set<char> systems;
   for (unsigned ii = 0; ii < biases.size(); ii++) {
-    _obsPool->putCodeBias(new t_satCodeBias(*biases[ii]));
+    t_satCodeBias* newBias = new t_satCodeBias(*biases[ii]);
+    char sys = newBias->_prn.system();
+    if (systems.find(sys) == systems.end()) {
+      _obsPool->clearCodeBiases(sys);
+      systems.insert(sys);
+    }
+    _obsPool->putCodeBias(newBias);
   }
 }
@@ -141,6 +157,16 @@
 //////////////////////////////////////////////////////////////////////////////
 void t_pppClient::putPhaseBiases(const vector<t_satPhaseBias*>& biases) {
+  if (OPT->_logMode == t_pppOptions::normal && biases.size() > 0) {
+    LOG << "phaseBiases    " << string(biases[0]->_time) << ' ' << biases.size() << endl;
+  }
+  set<char> systems;
   for (unsigned ii = 0; ii < biases.size(); ii++) {
-    _obsPool->putPhaseBias(new t_satPhaseBias(*biases[ii]));
+    t_satPhaseBias* newBias = new t_satPhaseBias(*biases[ii]);
+    char sys = newBias->_prn.system();
+    if (systems.find(sys) == systems.end()) {
+      _obsPool->clearPhaseBiases(sys);
+      systems.insert(sys);
+    }
+    _obsPool->putPhaseBias(newBias);
   }
 }
@@ -211,38 +237,15 @@
     }
   }
-/*
-  vector<t_pppSatObs*>::iterator it = obsVector.begin();
-  while (it != obsVector.end()) {
-    t_pppSatObs* satObs = *it;
-    satObs->printObsMinusComputed();
-    it++;
-  }
-*/
+
+  if (OPT->_logMode == t_pppOptions::all) {
+    vector<t_pppSatObs*>::iterator it = obsVector.begin();
+    while (it != obsVector.end()) {
+      t_pppSatObs* satObs = *it;
+      satObs->printObsMinusComputed();
+      it++;
+    }
+  }
   return pseudoObsIono;
 }
-
-//
-//////////////////////////////////////////////////////////////////////////////
-void t_pppClient::useObsWithCodeBiasesOnly(std::vector<t_pppSatObs*>& obsVector) {
-
-  vector<t_pppSatObs*>::iterator it = obsVector.begin();
-  while (it != obsVector.end()) {
-    t_pppSatObs* pppSatObs = *it;
-    bool codeBiasesAvailable = false;
-    if (pppSatObs->getCodeBias(pppSatObs->fType1()) &&
-        pppSatObs->getCodeBias(pppSatObs->fType2())) {
-        codeBiasesAvailable = true;
-    }
-    if (codeBiasesAvailable) {
-      ++it;
-    }
-    else {
-      it = obsVector.erase(it);
-      delete pppSatObs;
-    }
-  }
-  return;
-}
-
 
 // Compute the Bancroft position, check for blunders
@@ -251,5 +254,5 @@
                                   vector<t_pppSatObs*>& obsVector,
                                   ColumnVector& xyzc, bool print) {
-  t_lc::type tLC = t_lc::dummy;
+
   int  numBancroft = obsVector.size();
 
@@ -259,16 +262,6 @@
     for (unsigned ii = 0; ii < obsVector.size(); ii++) {
       const t_pppSatObs* satObs = obsVector.at(ii);
-      if (tLC == t_lc::dummy) {
-        if (satObs->isValid(t_lc::cIF)) {
-          tLC = t_lc::cIF;
-        }
-        else if (satObs->isValid(t_lc::c1)) {
-          tLC = t_lc::c1;
-        }
-        else if (satObs->isValid(t_lc::c2)) {
-          tLC = t_lc::c2;
-        }
-      }
-      if ( satObs->isValid(tLC) &&
+      t_lc LC = satObs->rangeLC();
+      if ( satObs->isValid(LC) &&
           (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle) ) {
         ++iObs;
@@ -276,5 +269,5 @@
         BB[iObs][1] = satObs->xc()[1];
         BB[iObs][2] = satObs->xc()[2];
-        BB[iObs][3] = satObs->obsValue(tLC) - satObs->cmpValueForBanc(tLC);
+        BB[iObs][3] = satObs->obsValue(LC) - satObs->cmpValueForBanc(LC);
       }
     }
@@ -297,8 +290,9 @@
     for (unsigned ii = 0; ii < obsVector.size(); ii++) {
       const t_pppSatObs* satObs = obsVector.at(ii);
-      if (satObs->isValid() &&
+      t_lc LC = satObs->rangeLC();
+      if (satObs->isValid(LC) &&
           (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle) ) {
         ColumnVector rr = satObs->xc().Rows(1,3) - xyzc.Rows(1,3);
-        double res = rr.NormFrobenius() - satObs->obsValue(tLC)
+        double res = rr.NormFrobenius() - satObs->obsValue(LC)
                    - (satObs->xc()[3] - xyzc[3]) * t_CST::c;
         if (fabs(res) > maxRes) {
@@ -354,5 +348,5 @@
 //
 //////////////////////////////////////////////////////////////////////////////
-void t_pppClient::finish(t_irc irc, int ind) {
+void t_pppClient::finish(t_irc irc, int /*ind*/) {
 #ifdef BNC_DEBUG_PPP
   LOG << "t_pppClient::finish(" << ind << "): " << irc << endl;
@@ -463,9 +457,10 @@
       }
     }
-    // use observations only if satellite code biases are available
-    /* ------------------------------------------------------------
-    if (!_opt->_corrMount.empty() {
-        useObsWithCodeBiasesOnly(_obsRover);
-    }*/
+
+    // Use observations only if satellite code biases are available
+    // ------------------------------------------------------------
+    if (_opt->ambRes()) {
+      useObsWithBiasesOnly(_obsRover);
+    }
 
     if (int(_obsRover.size()) < _opt->_minObs) {
@@ -613,2 +608,18 @@
 
 }
+
+//
+//////////////////////////////////////////////////////////////////////////////
+void t_pppClient::useObsWithBiasesOnly(vector<t_pppSatObs*>& obsVector) const {
+  vector<t_pppSatObs*>::iterator it = obsVector.begin();
+  while (it != obsVector.end()) {
+    t_pppSatObs* pppSatObs = *it;
+    if (pppSatObs->hasBiases()) {
+      ++it;
+    }
+    else {
+      it = obsVector.erase(it);
+      delete pppSatObs;
+    }
+  }
+}
Index: /trunk/BNC/src/PPP/pppClient.h
===================================================================
--- /trunk/BNC/src/PPP/pppClient.h	(revision 10790)
+++ /trunk/BNC/src/PPP/pppClient.h	(revision 10791)
@@ -52,5 +52,4 @@
                    std::vector<t_pppSatObs*>& obsVector, bncTime& epoTime);
   bool  preparePseudoObs(std::vector<t_pppSatObs*>& obsVector);
-  void  useObsWithCodeBiasesOnly(std::vector<t_pppSatObs*>& obsVector);
   t_irc cmpModel(t_pppStation* station, const ColumnVector& xyzc,
                  std::vector<t_pppSatObs*>& obsVector);
@@ -61,5 +60,5 @@
   double cmpOffGal(std::vector<t_pppSatObs*>& obsVector);
   double cmpOffBds(std::vector<t_pppSatObs*>& obsVector);
-
+  void   useObsWithBiasesOnly(std::vector<t_pppSatObs*>& obsVector) const;
 
   t_output*                 _output;
@@ -75,5 +74,4 @@
   t_tides*                  _tides;
   bool                      _pseudoObsIono;
-  QMap<char, int>           _usedSystems;
   bool                      _running;
 };
Index: /trunk/BNC/src/PPP/pppEphPool.cpp
===================================================================
--- /trunk/BNC/src/PPP/pppEphPool.cpp	(revision 10790)
+++ /trunk/BNC/src/PPP/pppEphPool.cpp	(revision 10791)
@@ -16,4 +16,5 @@
 
 #include <iostream>
+#include <iomanip>
 #include "pppEphPool.h"
 #include "pppInclude.h"
@@ -41,4 +42,7 @@
   if (corr) {
     _satEphPool[corr->_prn.toInt()].putOrbCorrection(corr);
+    if (OPT->_logMode > t_pppOptions::normal) {
+      LOG << "orbCorr " << string(corr->_time) << ' ' << corr->_prn.toString() << endl;
+    }
   }
 }
@@ -49,4 +53,9 @@
   if (corr) {
     _satEphPool[corr->_prn.toInt()].putClkCorrection(corr);
+    if (OPT->_logMode > t_pppOptions::normal) {
+      LOG.setf(ios::fixed);
+      LOG << "clkCorr " << string(corr->_time) << ' ' << corr->_prn.toString() << ' '
+          << setw(7) << setprecision(3) << corr->_dClk * t_CST::c << endl;
+    }
   }
 }
Index: /trunk/BNC/src/PPP/pppFilter.cpp
===================================================================
--- /trunk/BNC/src/PPP/pppFilter.cpp	(revision 10790)
+++ /trunk/BNC/src/PPP/pppFilter.cpp	(revision 10791)
@@ -16,4 +16,5 @@
 
 #include <iostream>
+#include <sstream>
 #include <iomanip>
 #include <cmath>
@@ -28,4 +29,5 @@
 #include "pppStation.h"
 #include "pppClient.h"
+#include "ambres.h"
 
 using namespace BNC_PPP;
@@ -107,9 +109,29 @@
   }
 
-  // close epoch processing
+  // Dillution of Precision
   // ----------------------
   cmpDOP(allObs);
-  _parlist->printResult(_epoTime, _QFlt, _xFlt);
+  
+  // Ambiguity Resolution
+  // --------------------
+  if (OPT->ambRes()) {
+    AmbRes ambRes;
+    ostringstream msg;
+    ColumnVector    xFix     = _xFlt;
+    SymmetricMatrix QFix     = _QFlt;
+    double          fixRatio = 0.0;
+    ambRes.run(_epoTime, _parlist->params(), QFix, xFix, fixRatio, msg);
+    LOG << msg.str();
+    _parlist->printResult(_epoTime, QFix, xFix, fixRatio);
+  }
+
+  // Float Solution
+  // --------------
+  else {
+    _parlist->printResult(_epoTime, _QFlt, _xFlt);
+  }
+
   _lastEpoTimeOK = _epoTime; // remember time of last successful epoch processing
+
   return success;
 }
@@ -117,5 +139,5 @@
 // Process Selected LCs
 ////////////////////////////////////////////////////////////////////////////
-t_irc t_pppFilter::processSystem(const vector<t_lc::type> &LCs,
+t_irc t_pppFilter::processSystem(const vector<t_lc>& LCs,
                                  const vector<t_pppSatObs*> &obsVector,
                                  bool pseudoObsIonoAvailable) {
@@ -158,5 +180,5 @@
     int iObs = -1;
     vector<t_pppSatObs*> usedObs;
-    vector<t_lc::type> usedTypes;
+    vector<t_lc>         usedTypes;
 
     // Real Observations
@@ -171,18 +193,21 @@
         nSat++;
         for (unsigned jj = 0; jj < usedLCs; jj++) {
-          const t_lc::type tLC = LCs[jj];
-          if (tLC == t_lc::GIM) {
+          const t_lc LC = LCs[jj];
+          if (LC._type == t_lc::GIM) {
+            continue;
+          }
+          if (LC._frq1 == t_frequency::G5 && !obs->isValid(LC)) {
             continue;
           }
           ++iObs;
           usedObs.push_back(obs);
-          usedTypes.push_back(tLC);
+          usedTypes.push_back(LC);
           for (unsigned iPar = 0; iPar < nPar; iPar++) {
             const t_pppParam *par = params[iPar];
-            AA[iObs][iPar] = par->partial(_epoTime, obs, tLC);
-          }
-
-          ll[iObs] = obs->obsValue(tLC) - obs->cmpValue(tLC) - DotProduct(_x0, AA.Row(iObs + 1));
-          PP[iObs] = 1.0 / (obs->sigma(tLC) * obs->sigma(tLC));
+            AA[iObs][iPar] = par->partial(_epoTime, obs, LC);
+          }
+
+          ll[iObs] = obs->obsValue(LC) - obs->cmpValue(LC) - DotProduct(_x0, AA.Row(iObs + 1));
+          PP[iObs] = 1.0 / (obs->sigma(LC) * obs->sigma(LC));
         }
       }
@@ -202,6 +227,6 @@
         if (!obs->outlier()) {
           for (unsigned jj = 0; jj < usedLCs; jj++) {
-            const t_lc::type tLC = LCs[jj];
-            if (tLC == t_lc::GIM) {
+            const t_lc LC = LCs[jj];
+            if (LC._type == t_lc::GIM) {
               ++iObs;
             } else {
@@ -209,11 +234,11 @@
             }
             usedObs.push_back(obs);
-            usedTypes.push_back(tLC);
+            usedTypes.push_back(LC);
             for (unsigned iPar = 0; iPar < nPar; iPar++) {
               const t_pppParam *par = params[iPar];
-              AA[iObs][iPar] = par->partial(_epoTime, obs, tLC);
+              AA[iObs][iPar] = par->partial(_epoTime, obs, LC);
             }
-            ll[iObs] = obs->obsValue(tLC) - obs->cmpValue(tLC) - DotProduct(_x0, AA.Row(iObs + 1));
-            PP[iObs] = 1.0 / (obs->sigma(tLC) * obs->sigma(tLC));
+            ll[iObs] = obs->obsValue(LC) - obs->cmpValue(LC) - DotProduct(_x0, AA.Row(iObs + 1));
+            PP[iObs] = 1.0 / (obs->sigma(LC) * obs->sigma(LC));
           }
         }
@@ -236,13 +261,13 @@
     double maxOutlier = 0.0;
     int maxOutlierIndex = -1;
-    t_lc::type maxOutlierLC = t_lc::dummy;
+    t_lc maxOutlierLC;
     for (unsigned ii = 0; ii < usedObs.size(); ii++) {
-      const t_lc::type tLC = usedTypes[ii];
+      const t_lc LC = usedTypes[ii];
       double res = fabs(vv[ii]);
-      if (res > usedObs[ii]->maxRes(tLC)) {
+      if (res > usedObs[ii]->maxRes(LC)) {
         if (res > fabs(maxOutlier)) {
           maxOutlier = vv[ii];
           maxOutlierIndex = ii;
-          maxOutlierLC = tLC;
+          maxOutlierLC = LC;
         }
       }
@@ -254,12 +279,12 @@
       t_pppSatObs *obs = usedObs[maxOutlierIndex];
       t_pppParam *par = 0;
-      LOG << epoTimeStr << " Outlier " << t_lc::toString(maxOutlierLC) << ' '
+      LOG << epoTimeStr << " Outlier " << maxOutlierLC.toString() << ' '
           << obs->prn().toString() << ' ' << setw(8) << setprecision(4)
           << maxOutlier << endl;
       for (unsigned iPar = 0; iPar < nPar; iPar++) {
-        t_pppParam *hlp = params[iPar];
+        t_pppParam* hlp = params[iPar];
         if (hlp->type() == t_pppParam::amb &&
             hlp->prn()  == obs->prn() &&
-            hlp->tLC()  == usedTypes[maxOutlierIndex]) {
+            hlp->LC()   == usedTypes[maxOutlierIndex]) {
           par = hlp;
         }
@@ -277,10 +302,10 @@
         for (unsigned jj = 0; jj < LCs.size(); jj++) {
           for (unsigned ii = 0; ii < usedObs.size(); ii++) {
-            const t_lc::type tLC = usedTypes[ii];
-            t_pppSatObs *obs = usedObs[ii];
-            if (tLC == LCs[jj]) {
-              obs->setRes(tLC, vv[ii]);
+            const t_lc LC = usedTypes[ii];
+            t_pppSatObs* obs = usedObs[ii];
+            if (LC == LCs[jj]) {
+              obs->setRes(LC, vv[ii]);
               LOG << epoTimeStr << " RES " << left << setw(3)
-                  << t_lc::toString(tLC) << right << ' '
+                  << LC.toString() << right << ' '
                   << obs->prn().toString() << ' '
                   << setw(8) << setprecision(4) << vv[ii] << endl;
@@ -296,5 +321,5 @@
 // Cycle-Slip Detection
 ////////////////////////////////////////////////////////////////////////////
-t_irc t_pppFilter::detectCycleSlips(const vector<t_lc::type> &LCs,
+t_irc t_pppFilter::detectCycleSlips(const vector<t_lc>& LCs,
                                     const vector<t_pppSatObs*> &obsVector) {
 
@@ -309,9 +334,8 @@
   SLIP *= fac;
   string epoTimeStr = string(_epoTime);
-  const vector<t_pppParam*> &params = _parlist->params();
 
   for (unsigned ii = 0; ii < LCs.size(); ii++) {
-    const t_lc::type &tLC = LCs[ii];
-    if (t_lc::includesPhase(tLC)) {
+    const t_lc& LC = LCs[ii];
+    if (LC.includesPhase()) {
       for (unsigned iObs = 0; iObs < obsVector.size(); iObs++) {
         const t_pppSatObs *obs = obsVector[iObs];
@@ -343,24 +367,6 @@
         // --------
         if (slip) {
-          resetAmb(obs->prn(), obsVector, tLC);
-        }
-
-        // Check Pre-Fit Residuals
-        /* -----------------------
-        else {
-          ColumnVector AA(params.size());
-          for (unsigned iPar = 0; iPar < params.size(); iPar++) {
-            const t_pppParam* par = params[iPar];
-            AA[iPar] = par->partial(_epoTime, obs, tLC);
-          }
-          double ll = obs->obsValue(tLC) - obs->cmpValue(tLC) - DotProduct(_x0, AA);
-          double vv = DotProduct(AA, _xFlt) - ll;
-
-          if (fabs(vv) > SLIP) {
-            LOG << epoTimeStr << " cycle slip detected " << t_lc::toString(tLC) << ' '
-                << obs->prn().toString() << ' ' << setw(8) << setprecision(4) << vv << endl;
-            resetAmb(obs->prn(), obsVector, tLC);
-          }
-        }*/
+          resetAmb(obs->prn(), obsVector, t_lc());
+        }
       }
     }
@@ -371,5 +377,5 @@
 // Reset Ambiguity Parameter (cycle slip)
 ////////////////////////////////////////////////////////////////////////////
-t_irc t_pppFilter::resetAmb(const t_prn prn, const vector<t_pppSatObs*> &obsVector, t_lc::type lc,
+t_irc t_pppFilter::resetAmb(const t_prn prn, const vector<t_pppSatObs*> &obsVector, t_lc lc,
                             SymmetricMatrix *QSav, ColumnVector *xSav) {
 
@@ -386,8 +392,8 @@
       (par->firstObsTime().undef()) ?
         firstObsTime = lastObsTime : firstObsTime = par->firstObsTime();
-      t_lc::type tLC = par->tLC();
-      if (tLC != lc) {continue;}
+      t_lc LC = par->LC();
+      if (lc.valid() && LC != lc) {continue;}
       LOG << string(_epoTime) << " RESET " << par->toString() << endl;
-      delete par; par = new t_pppParam(t_pppParam::amb, prn, tLC, &obsVector);
+      delete par; par = new t_pppParam(t_pppParam::amb, prn, LC, &obsVector);
       par->setIndex(ind);
       par->setFirstObsTime(firstObsTime);
@@ -436,5 +442,5 @@
         for (unsigned iPar = 0; iPar < numPar; iPar++) {
           t_pppParam* par = _parlist->params()[iPar];
-          AA[_numSat - 1][iPar] = par->partial(_epoTime, obs, t_lc::c1);
+          AA[_numSat - 1][iPar] = par->partial(_epoTime, obs, obs->rangeLC());
           if      (par->type() == t_pppParam::crdX) {
             parX = par;
Index: /trunk/BNC/src/PPP/pppFilter.h
===================================================================
--- /trunk/BNC/src/PPP/pppFilter.h	(revision 10790)
+++ /trunk/BNC/src/PPP/pppFilter.h	(revision 10791)
@@ -73,12 +73,12 @@
   };
 
-  t_irc processSystem(const std::vector<t_lc::type>& LCs,
+  t_irc processSystem(const std::vector<t_lc>& LCs,
                       const std::vector<t_pppSatObs*>& obsVector,
                       bool pseudoObsIonoAvailable);
 
-  t_irc detectCycleSlips(const std::vector<t_lc::type>& LCs,
+  t_irc detectCycleSlips(const std::vector<t_lc>& LCs,
                          const std::vector<t_pppSatObs*>& obsVector);
 
-  t_irc resetAmb(t_prn prn, const std::vector<t_pppSatObs*>& obsVector, t_lc::type lc,
+  t_irc resetAmb(t_prn prn, const std::vector<t_pppSatObs*>& obsVector, t_lc lc,
                  SymmetricMatrix* QSav = 0, ColumnVector* xSav = 0);
 
Index: /trunk/BNC/src/PPP/pppObsPool.cpp
===================================================================
--- /trunk/BNC/src/PPP/pppObsPool.cpp	(revision 10790)
+++ /trunk/BNC/src/PPP/pppObsPool.cpp	(revision 10791)
@@ -15,5 +15,7 @@
  * -----------------------------------------------------------------------*/
 
+#include <iomanip>
 #include "pppObsPool.h"
+#include "pppClient.h"
 
 using namespace BNC_PPP;
@@ -74,4 +76,11 @@
   delete _satCodeBiases[iPrn];
   _satCodeBiases[iPrn] = satCodeBias;
+  if (OPT->_logMode > t_pppOptions::normal) {
+    LOG << "codeBias " << string(satCodeBias->_time) << ' ' << satCodeBias->_prn.toString();
+    for (const auto& bias : satCodeBias->_bias) {
+      LOG << "  " << bias._rnxType2ch << ' ' << setw(7) << setprecision(3) << bias._value;
+    }
+    LOG << endl;
+  }
 }
 
@@ -82,4 +91,45 @@
   delete _satPhaseBiases[iPrn];
   _satPhaseBiases[iPrn] = satPhaseBias;
+  if (OPT->_logMode > t_pppOptions::normal) {
+    LOG.setf(ios::fixed);
+    LOG << "phaseBias " << string(satPhaseBias->_time) << ' ' << satPhaseBias->_prn.toString()
+        << ' ' << setw(7) << setprecision(2) << satPhaseBias->_yaw     * 180.0 / M_PI
+        << ' ' << setw(7) << setprecision(3) << satPhaseBias->_yawRate * 180.0 / M_PI;
+    for (const auto& bias : satPhaseBias->_bias) {
+      LOG << "  " << bias._rnxType2ch << ' ' << setw(2) << bias._jumpCounter;
+      if (bias._fixIndicator) {
+        LOG << " x ";
+      }
+      else {
+        LOG << " . ";
+      }
+      LOG << setw(6) << setprecision(3) << bias._value;
+    }
+    LOG << endl;
+  }
+}
+
+//
+/////////////////////////////////////////////////////////////////////////////
+void t_pppObsPool::clearCodeBiases(char sys) {
+  for (unsigned iPrn = 1; iPrn <= t_prn::MAXPRN; ++iPrn) {
+    t_prn prn; prn.set(iPrn);
+    if (prn.system() == sys) {
+      delete _satCodeBiases[iPrn];
+      _satCodeBiases[iPrn] = 0;
+    }
+  }
+}
+
+//
+/////////////////////////////////////////////////////////////////////////////
+void t_pppObsPool::clearPhaseBiases(char sys) {
+  for (unsigned iPrn = 1; iPrn <= t_prn::MAXPRN; ++iPrn) {
+    t_prn prn; prn.set(iPrn);
+    if (prn.system() == sys) {
+      delete _satPhaseBiases[iPrn];
+      _satPhaseBiases[iPrn] = 0;
+    }
+  }
 }
 
Index: /trunk/BNC/src/PPP/pppObsPool.h
===================================================================
--- /trunk/BNC/src/PPP/pppObsPool.h	(revision 10790)
+++ /trunk/BNC/src/PPP/pppObsPool.h	(revision 10791)
@@ -33,4 +33,6 @@
   void putPhaseBias(t_satPhaseBias* satPhaseBias);
   void putTec(t_vTec* _vTec);
+  void clearCodeBiases(char sys);
+  void clearPhaseBiases(char sys);
 
   void putEpoch(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector,
Index: /trunk/BNC/src/PPP/pppParlist.cpp
===================================================================
--- /trunk/BNC/src/PPP/pppParlist.cpp	(revision 10790)
+++ /trunk/BNC/src/PPP/pppParlist.cpp	(revision 10791)
@@ -34,10 +34,11 @@
 // Constructor
 ////////////////////////////////////////////////////////////////////////////
-t_pppParam::t_pppParam(e_type type, const t_prn& prn, t_lc::type tLC,
+t_pppParam::t_pppParam(e_type type, const t_prn& prn, t_lc LC,
                        const vector<t_pppSatObs*>* obsVector) {
 
   _type     = type;
   _prn      = prn;
-  _tLC      = tLC;
+  _sys      = '?';
+  _LC       = LC;
   _x0       = 0.0;
   _indexOld = -1;
@@ -47,70 +48,49 @@
 
   switch (_type) {
-   case crdX:
-     _epoSpec = false;
-     _sigma0  = OPT->_aprSigCrd[0];
-     _noise   = OPT->_noiseCrd[0];
-     break;
-   case crdY:
-     _epoSpec = false;
-     _sigma0  = OPT->_aprSigCrd[1];
-     _noise   = OPT->_noiseCrd[1];
-     break;
-   case crdZ:
-     _epoSpec = false;
-     _sigma0  = OPT->_aprSigCrd[2];
-     _noise   = OPT->_noiseCrd[2];
-     break;
-   case rClkG:
-     _epoSpec = true;
-     _sigma0  = OPT->_aprSigClk;
-     break;
-   case rClkR:
-     _epoSpec = true;
-     _sigma0  = OPT->_aprSigClk;
-     break;
-   case rClkE:
-     _epoSpec = true;
-     _sigma0  = OPT->_aprSigClk;
-     break;
-   case rClkC:
-     _epoSpec = true;
-     _sigma0  = OPT->_aprSigClk;
-     break;
-   case amb:
-     _epoSpec = false;
-     _sigma0  = OPT->_aprSigAmb;
-     if (obsVector) {
-       for (unsigned ii = 0; ii < obsVector->size(); ii++) {
-         const t_pppSatObs* obs = obsVector->at(ii);
-         if (obs->prn() == _prn) {
-           _x0 = floor((obs->obsValue(tLC) - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5);
-           break;
-         }
-       }
-     }
-     break;
-   case trp:
-     _epoSpec = false;
-     _sigma0  = OPT->_aprSigTrp;
-     _noise   = OPT->_noiseTrp;
-     break;
-    case ion:
-      _epoSpec = false;
-      _sigma0  = OPT->_aprSigIon;
-      _noise   = OPT->_noiseIon;
-     break;
-    case cBiasG1:   case cBiasR1:   case cBiasE1:   case cBiasC1:
-    case cBiasG2:   case cBiasR2:   case cBiasE2:   case cBiasC2:
-      _epoSpec = false;
-      _sigma0  = OPT->_aprSigCodeBias;
-      _noise   = OPT->_noiseCodeBias;
-      break;
-    case pBiasG1:   case pBiasR1:   case pBiasE1:   case pBiasC1:
-    case pBiasG2:   case pBiasR2:   case pBiasE2:   case pBiasC2:
-      _epoSpec = false;
-      _sigma0  = OPT->_aprSigPhaseBias;
-      _noise   = OPT->_noisePhaseBias;
-      break;
+  case crdX:
+    _epoSpec = false;
+    _sigma0  = OPT->_aprSigCrd[0];
+    _noise   = OPT->_noiseCrd[0];
+    break;
+  case crdY:
+    _epoSpec = false;
+    _sigma0  = OPT->_aprSigCrd[1];
+    _noise   = OPT->_noiseCrd[1];
+    break;
+  case crdZ:
+    _epoSpec = false;
+    _sigma0  = OPT->_aprSigCrd[2];
+    _noise   = OPT->_noiseCrd[2];
+    break;
+  case rClk:
+    _epoSpec = true;
+    _sigma0  = OPT->_aprSigClk;
+    break;
+  case amb:
+    _epoSpec = false;
+    _sigma0  = OPT->_aprSigAmb;
+    if (obsVector) {
+      for (unsigned ii = 0; ii < obsVector->size(); ii++) {
+        const t_pppSatObs* obs = obsVector->at(ii);
+        if (obs->prn() == _prn) {
+          _x0 = floor((obs->obsValue(LC) - obs->cmpValue(LC)) / obs->lambda(LC) + 0.5);
+          break;
+        }
+      }
+    }
+    break;
+  case trp:
+    _epoSpec = false;
+    _sigma0  = OPT->_aprSigTrp;
+    _noise   = OPT->_noiseTrp;
+    break;
+  case ion:
+    _epoSpec = true;
+    _sigma0  = OPT->_aprSigIon;
+    break;
+  case bias:
+    _epoSpec = true;
+    _sigma0  = OPT->_aprSigCodeBias;
+    break;
   }
 }
@@ -124,10 +104,21 @@
 ////////////////////////////////////////////////////////////////////////////
 double t_pppParam::partial(const bncTime& /* epoTime */, const t_pppSatObs* obs,
-                           const t_lc::type& tLC) const {
+                           const t_lc& obsLC) const {
 
   // Special Case - Melbourne-Wuebbena
   // ---------------------------------
-  if (tLC == t_lc::MW && _type != amb) {
+  if (obsLC._type == t_lc::MW && _type != amb) {
     return 0.0;
+  }
+
+  // Special Case - GIM
+  // ------------------
+  if (obsLC._type == t_lc::GIM) {
+    if (_type == ion) {
+      return 1.0;
+    }
+    else {
+      return 0.0;
+    }
   }
 
@@ -138,126 +129,39 @@
   map<t_frequency::type, double> phaseCoeff;
   map<t_frequency::type, double> ionoCoeff;
-  obs->lcCoeff(tLC, codeCoeff, phaseCoeff, ionoCoeff);
-
+  obs->lcCoeff(obsLC, codeCoeff, phaseCoeff, ionoCoeff);
+  
   switch (_type) {
   case crdX:
-    if (tLC == t_lc::GIM) {return 0.0;}
     return (sta->xyzApr()[0] - obs->xc()[0]) / rhoV.NormFrobenius();
   case crdY:
-    if (tLC == t_lc::GIM) {return 0.0;}
     return (sta->xyzApr()[1] - obs->xc()[1]) / rhoV.NormFrobenius();
   case crdZ:
-    if (tLC == t_lc::GIM) {return 0.0;}
     return (sta->xyzApr()[2] - obs->xc()[2]) / rhoV.NormFrobenius();
-  case rClkG:
-    if (tLC == t_lc::GIM) {return 0.0;}
-    return (obs->prn().system() == 'G') ? 1.0 : 0.0;
-  case rClkR:
-    if (tLC == t_lc::GIM) {return 0.0;}
-    return (obs->prn().system() == 'R') ? 1.0 : 0.0;
-  case rClkE:
-    if (tLC == t_lc::GIM) {return 0.0;}
-    return (obs->prn().system() == 'E') ? 1.0 : 0.0;
-  case rClkC:
-    if (tLC == t_lc::GIM) {return 0.0;}
-    return (obs->prn().system() == 'C') ? 1.0 : 0.0;
+  case rClk:
+    return (_sys != obsLC.system() || obsLC.isGeometryFree()) ? 0.0 : 1.0;
   case amb:
-    if (tLC == t_lc::GIM) {
-      return 0.0;
-    }
-    else {
-      if (obs->prn() == _prn) {
-        if      (tLC == _tLC) {
-          return (obs->lambda(tLC));
-        }
-        else if (tLC == t_lc::lIF && _tLC == t_lc::MW) {
-          return obs->lambda(t_lc::lIF) * obs->lambda(t_lc::MW) / obs->lambda(t_lc::l2);
-        }
-        else {
-          if      (_tLC == t_lc::l1) {
-            return obs->lambda(t_lc::l1) * phaseCoeff[obs->fType1()];
-          }
-          else if (_tLC == t_lc::l2) {
-            return obs->lambda(t_lc::l2) * phaseCoeff[obs->fType2()];
-          }
-        }
+    if (obs->prn() == _prn) {
+      if      (obsLC == _LC) {
+        return (obs->lambda(obsLC));
+      }
+      else if (_LC._type == t_lc::phase) {
+        return obs->lambda(_LC) * phaseCoeff[_LC._frq1];
+      }
+      else if (obsLC._type == t_lc::phaseIF && _LC._type == t_lc::MW) {
+        return obs->lambda(obsLC) * obs->lambda(_LC) / obs->lambda(t_lc(t_lc::phase, _LC._frq2));
       }
     }
     break;
   case trp:
-    if      (tLC == t_lc::GIM) {
-      return 0.0;
-    }
-    else {
-      return 1.0 / sin(obs->eleSat());
-    }
+    return 1.0 / sin(obs->eleSat());
   case ion:
     if (obs->prn() == _prn) {
-      if      (tLC == t_lc::c1) {
-        return ionoCoeff[obs->fType1()];
-      }
-      else if (tLC == t_lc::c2) {
-        return ionoCoeff[obs->fType2()];
-      }
-      else if (tLC == t_lc::l1) {
-        return ionoCoeff[obs->fType1()];
-      }
-      else if (tLC == t_lc::l2) {
-        return ionoCoeff[obs->fType2()];
-      }
-      else if (tLC == t_lc::GIM) {
-        return 1.0;
-      }
-    }
-    break;
-  case cBiasG1:
-    if ((obs->prn().system() == 'G') && (tLC == t_lc::c1)) {return 1.0;} else {return 0.0;}
-    break;
-  case cBiasR1:
-    if ((obs->prn().system() == 'R') && (tLC == t_lc::c1)) {return 1.0;} else {return 0.0;}
-    break;
-  case cBiasE1:
-    if ((obs->prn().system() == 'E') && (tLC == t_lc::c1)) {return 1.0;} else {return 0.0;}
-    break;
-  case cBiasC1:
-    if ((obs->prn().system() == 'C') && (tLC == t_lc::c1)) {return 1.0;} else {return 0.0;}
-    break;
-  case cBiasG2:
-    if ((obs->prn().system() == 'G') && (tLC == t_lc::c2)) {return 1.0;} else {return 0.0;}
-    break;
-  case cBiasR2:
-    if ((obs->prn().system() == 'R') && (tLC == t_lc::c2)) {return 1.0;} else {return 0.0;}
-    break;
-  case cBiasE2:
-    if ((obs->prn().system() == 'E') && (tLC == t_lc::c2)) {return 1.0;} else {return 0.0;}
-        break;
-  case cBiasC2:
-    if ((obs->prn().system() == 'C') && (tLC == t_lc::c2)) {return 1.0;} else {return 0.0;}
-    break;
-  case pBiasG1:
-    if ((obs->prn().system() == 'G') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;}
-    break;
-  case pBiasR1:
-    if ((obs->prn().system() == 'R') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;}
-    break;
-  case pBiasE1:
-    if ((obs->prn().system() == 'E') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;}
-    break;
-  case pBiasC1:
-    if ((obs->prn().system() == 'C') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;}
-    break;
-  case pBiasG2:
-    if ((obs->prn().system() == 'G') && (tLC == t_lc::l2)) {return 1.0;} else {return 0.0;}
-    break;
-  case pBiasR2:
-    if ((obs->prn().system() == 'R') && (tLC == t_lc::l2)) {return 1.0;} else {return 0.0;}
-    break;
-  case pBiasE2:
-    if ((obs->prn().system() == 'E') && (tLC == t_lc::l2)) {return 1.0;} else {return 0.0;}
-    break;
-  case pBiasC2:
-    if ((obs->prn().system() == 'C') && (tLC == t_lc::l2)) {return 1.0;} else {return 0.0;}
-    break;
-
+      if (obsLC._type == t_lc::code || obsLC._type == t_lc::phase) {
+        return ionoCoeff[obsLC._frq1];
+      }
+    }
+    break;
+  case bias:
+    return (_LC == obsLC ? 1.0 : 0.0);
   }
   return 0.0;
@@ -278,15 +182,6 @@
     ss << "CRD_Z";
     break;
-  case rClkG:
-    ss << "REC_CLK  G  ";
-    break;
-  case rClkR:
-    ss << "REC_CLK  R  ";
-    break;
-  case rClkE:
-    ss << "REC_CLK  E  ";
-    break;
-  case rClkC:
-    ss << "REC_CLK  C  ";
+  case rClk:
+    ss << "REC_CLK  " << _sys << "  ";
     break;
   case trp:
@@ -294,24 +189,12 @@
     break;
   case amb:
-    ss << "AMB  " << left << setw(3) << t_lc::toString(_tLC) << right << ' ' << _prn.toString();
+    ss << "AMB  " << left << setw(3) << _LC.toString() << right << ' ' << _prn.toString();
     break;
   case ion:
-    ss << "ION  " << left << setw(3) << t_lc::toString(_tLC) << right << ' ' << _prn.toString();
-    break;
-  case cBiasG1:  case pBiasG1:
-  case cBiasG2:  case pBiasG2:
-    ss << "BIA  " << left << setw(3) << t_lc::toString(_tLC) << right << " G  ";
-    break;
-  case cBiasR1:  case pBiasR1:
-  case cBiasR2:  case pBiasR2:
-    ss << "BIA  " << left << setw(3) << t_lc::toString(_tLC) << right << " R  ";
-    break;
-  case cBiasE1:  case pBiasE1:
-  case cBiasE2:  case pBiasE2:
-    ss << "BIA  " << left << setw(3) << t_lc::toString(_tLC) << right << " E  ";
-    break;
-  case cBiasC1:  case pBiasC1:
-  case cBiasC2:  case pBiasC2:
-    ss << "BIA  " << left << setw(3) << t_lc::toString(_tLC) << right << " C  ";
+    ss << "ION  " << left << setw(3) << _LC.toString() << right << ' ' << _prn.toString();
+    break;
+  case bias:
+    char sys = t_frequency::toSystem(_LC._frq1);
+    ss << "BIA  " << left << setw(3) << _LC.toString() << right << ' ' << sys << "  ";
     break;
   }
@@ -353,17 +236,5 @@
              par->type() == t_pppParam::crdY ||
              par->type() == t_pppParam::crdZ ||
-             par->type() == t_pppParam::ion  ||
-             par->type() == t_pppParam::cBiasC1 ||
-             par->type() == t_pppParam::cBiasC2 ||
-             par->type() == t_pppParam::cBiasE1 ||
-             par->type() == t_pppParam::cBiasE2 ||
-             par->type() == t_pppParam::cBiasR1 ||
-             par->type() == t_pppParam::cBiasR2 ||
-             par->type() == t_pppParam::pBiasC1 ||
-             par->type() == t_pppParam::pBiasC2 ||
-             par->type() == t_pppParam::pBiasE1 ||
-             par->type() == t_pppParam::pBiasE2 ||
-             par->type() == t_pppParam::pBiasR1 ||
-             par->type() == t_pppParam::pBiasR2) {
+             par->type() == t_pppParam::ion  ) {
       if (par->lastObsTime().valid() && (epoTime - par->lastObsTime() > 60.0)) {
         remove = true;
@@ -383,15 +254,16 @@
   }
 
-  // check which systems have observations
+  // Check which systems have observations
   // -------------------------------------
-  _usedSystems['G'] = _usedSystems['R'] = _usedSystems['E'] = _usedSystems['C'] = 0;
-  for (unsigned jj = 0; jj < obsVector.size(); jj++) {
-    const t_pppSatObs* satObs = obsVector[jj];
-    char sys = satObs->prn().system();
-    if (OPT->LCs(sys).size()) {
-      _usedSystems[sys]++;
+  vector<char> systems = OPT->systems();
+  for (char sys : systems) {
+    _usedSystems[sys] = 0;
+    for (unsigned jj = 0; jj < obsVector.size(); jj++) {
+      const t_pppSatObs* satObs = obsVector[jj];
+      if (satObs->prn().system() == sys) {
+        _usedSystems[sys]++;
+      }
     }
   };
-
 
   // Check whether parameters have observations
@@ -425,31 +297,22 @@
   // Coordinates
   // -----------
-  required.push_back(new t_pppParam(t_pppParam::crdX, t_prn(), t_lc::dummy));
-  required.push_back(new t_pppParam(t_pppParam::crdY, t_prn(), t_lc::dummy));
-  required.push_back(new t_pppParam(t_pppParam::crdZ, t_prn(), t_lc::dummy));
+  required.push_back(new t_pppParam(t_pppParam::crdX, t_prn()));
+  required.push_back(new t_pppParam(t_pppParam::crdY, t_prn()));
+  required.push_back(new t_pppParam(t_pppParam::crdZ, t_prn()));
 
   // Receiver Clocks
   // ---------------
-   if (_usedSystems['G']) {
-   //if (OPT->useSystem('G')) {
-     required.push_back(new t_pppParam(t_pppParam::rClkG, t_prn(), t_lc::dummy));
-   }
-   if (_usedSystems['R']) {
-   //if (OPT->useSystem('R')) {
-     required.push_back(new t_pppParam(t_pppParam::rClkR, t_prn(), t_lc::dummy));
-   }
-   if (_usedSystems['E']) {
-   //if (OPT->useSystem('E')) {
-     required.push_back(new t_pppParam(t_pppParam::rClkE, t_prn(), t_lc::dummy));
-   }
-   if (_usedSystems['C']) {
-   //if (OPT->useSystem('C')) {
-     required.push_back(new t_pppParam(t_pppParam::rClkC, t_prn(), t_lc::dummy));
-   }
+  for (const auto& [sys, numObs] : _usedSystems) {
+    if (numObs > 0) {
+      t_pppParam* clk = new t_pppParam(t_pppParam::rClk, t_prn());
+      clk->setSystem(sys);
+      required.push_back(clk);
+    }
+  }
 
   // Troposphere
   // -----------
   if (OPT->estTrp()) {
-    required.push_back(new t_pppParam(t_pppParam::trp, t_prn(), t_lc::dummy));
+    required.push_back(new t_pppParam(t_pppParam::trp, t_prn()));
   }
 
@@ -459,12 +322,15 @@
     for (unsigned jj = 0; jj < obsVector.size(); jj++) {
       const t_pppSatObs* satObs = obsVector[jj];
-      char sys = satObs->prn().system();
-      std::vector<t_lc::type> LCs = OPT->LCs(sys);
-      if (std::find(LCs.begin(), LCs.end(), t_lc::cIF) == LCs.end() &&
-          std::find(LCs.begin(), LCs.end(), t_lc::lIF) == LCs.end()) {
-        required.push_back(new t_pppParam(t_pppParam::ion, satObs->prn(), t_lc::dummy));
-      }
-    }
-  }
+      std::vector<t_lc> LCs = OPT->LCs(satObs->prn().system());
+      for (auto it = LCs.begin(); it != LCs.end(); ++it) {
+        const t_lc& lc = *it;
+        if (!lc.isIonoFree()) {
+          required.push_back(new t_pppParam(t_pppParam::ion, satObs->prn()));
+          break;
+        }
+      }
+    }
+  }
+  
   // Ambiguities
   // -----------
@@ -472,116 +338,40 @@
     const t_pppSatObs*  satObs = obsVector[jj];
     char sys = satObs->prn().system();
-    const vector<t_lc::type>& ambLCs = OPT->ambLCs(sys);
+    const vector<t_lc>& ambLCs = OPT->ambLCs(sys);
     for (unsigned ii = 0; ii < ambLCs.size(); ii++) {
+      if (ambLCs[ii]._frq1 == t_frequency::G5 && !satObs->isValid(ambLCs[ii])) {
+        continue;
+      }
       required.push_back(new t_pppParam(t_pppParam::amb, satObs->prn(), ambLCs[ii], &obsVector));
     }
   }
 
-  // Receiver Code Biases
-  // --------------------
-    if (OPT->_ionoModelType == OPT->PPP_RTK) {
-    std::vector<t_lc::type> lc;
-    if (OPT->useSystem('G')) {
-      lc = OPT->LCs('G');
-      if (std::find(lc.begin(), lc.end(), t_lc::c1) != lc.end()) {
-        required.push_back(new t_pppParam(t_pppParam::cBiasG1, t_prn(), t_lc::c1));
-      }
-      if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) {
-        required.push_back(new t_pppParam(t_pppParam::cBiasG2, t_prn(), t_lc::c2));
-      }
-    }
-    if (OPT->useSystem('R')) {
-      lc = OPT->LCs('R');
-      if (std::find(lc.begin(), lc.end(), t_lc::c1) != lc.end()) {
-        required.push_back(new t_pppParam(t_pppParam::cBiasR1, t_prn(), t_lc::c1));
-      }
-      if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) {
-        required.push_back(new t_pppParam(t_pppParam::cBiasR2, t_prn(), t_lc::c2));
-      }
-    }
-    if (OPT->useSystem('E')) {
-      lc = OPT->LCs('E');
-      if (std::find(lc.begin(), lc.end(), t_lc::c1) != lc.end()) {
-        required.push_back(new t_pppParam(t_pppParam::cBiasE1, t_prn(), t_lc::c1));
-      }
-      if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) {
-        required.push_back(new t_pppParam(t_pppParam::cBiasE2, t_prn(), t_lc::c2));
-      }
-    }
-    if (OPT->useSystem('C')) {
-      lc = OPT->LCs('C');
-      if (std::find(lc.begin(), lc.end(), t_lc::c1) != lc.end()) {
-        required.push_back(new t_pppParam(t_pppParam::cBiasC1, t_prn(), t_lc::c1));
-      }
-      if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) {
-        required.push_back(new t_pppParam(t_pppParam::cBiasC2, t_prn(), t_lc::c2));
-      }
-    }
-  }
-
-  if (OPT->_pseudoObsIono) {
-    std::vector<t_lc::type> lc;
-    if (OPT->useSystem('G')) {
-      lc = OPT->LCs('G');
-      if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) {
-        required.push_back(new t_pppParam(t_pppParam::cBiasG2, t_prn(), t_lc::c2));
-      }
-    }
-    if (OPT->useSystem('R')) {
-      lc = OPT->LCs('R');
-      if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) {
-        required.push_back(new t_pppParam(t_pppParam::cBiasR2, t_prn(), t_lc::c2));
-      }
-    }
-    if (OPT->useSystem('E')) {
-      lc = OPT->LCs('E');
-      if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) {
-        required.push_back(new t_pppParam(t_pppParam::cBiasE2, t_prn(), t_lc::c2));
-      }
-    }
-    if (OPT->useSystem('C')) {
-      lc = OPT->LCs('C');
-      if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) {
-        required.push_back(new t_pppParam(t_pppParam::cBiasC2, t_prn(), t_lc::c2));
-      }
-    }
-  }
-
-  if (OPT->_ionoModelType == OPT->PPP_RTK) {
-    std::vector<t_lc::type> lc;
-    if (OPT->useSystem('G')) {
-      lc = OPT->LCs('G');
-      if (std::find(lc.begin(), lc.end(), t_lc::l1) != lc.end()) {
-        required.push_back(new t_pppParam(t_pppParam::pBiasG1, t_prn(), t_lc::l1));
-      }
-      if (std::find(lc.begin(), lc.end(), t_lc::l2) != lc.end()) {
-        required.push_back(new t_pppParam(t_pppParam::pBiasG2, t_prn(), t_lc::l2));
-      }
-    }
-    if (OPT->useSystem('R')) {
-      lc = OPT->LCs('R');
-      if (std::find(lc.begin(), lc.end(), t_lc::l1) != lc.end()) {
-        required.push_back(new t_pppParam(t_pppParam::pBiasR1, t_prn(), t_lc::l1));
-      }
-      if (std::find(lc.begin(), lc.end(), t_lc::l2) != lc.end()) {
-        required.push_back(new t_pppParam(t_pppParam::pBiasR2, t_prn(), t_lc::l2));
-      }
-    }
-    if (OPT->useSystem('E')) {
-      lc = OPT->LCs('E');
-      if (std::find(lc.begin(), lc.end(), t_lc::l1) != lc.end()) {
-        required.push_back(new t_pppParam(t_pppParam::pBiasE1, t_prn(), t_lc::l1));
-      }
-      if (std::find(lc.begin(), lc.end(), t_lc::l2) != lc.end()) {
-        required.push_back(new t_pppParam(t_pppParam::pBiasE2, t_prn(), t_lc::l2));
-      }
-    }
-    if (OPT->useSystem('C')) {
-      lc = OPT->LCs('C');
-      if (std::find(lc.begin(), lc.end(), t_lc::l1) != lc.end()) {
-        required.push_back(new t_pppParam(t_pppParam::pBiasC1, t_prn(), t_lc::l1));
-      }
-      if (std::find(lc.begin(), lc.end(), t_lc::l2) != lc.end()) {
-        required.push_back(new t_pppParam(t_pppParam::pBiasC2, t_prn(), t_lc::l2));
+  // Biases
+  // ------
+  int maxSkip = (OPT->_pseudoObsIono ? 1 : 2);
+  for (const auto& [sys, numObs] : _usedSystems) {
+    if (numObs > 0) {
+      bool ar   = OPT->arSystem(sys);
+      int  skip = 0;
+      vector<t_lc> LCs = OPT->LCs(sys);
+      for (const t_lc& lc : LCs) {
+        if (ar) {
+          if (skip < maxSkip && lc.includesPhase()) {
+            skip += 1;
+          }
+          else {
+            required.push_back(new t_pppParam(t_pppParam::bias, t_prn(), lc));
+          }
+        }
+        else {
+          if (lc.includesCode()) {
+            if (skip < maxSkip) {
+              skip += 1;
+            }
+            else {
+              required.push_back(new t_pppParam(t_pppParam::bias, t_prn(), lc));
+            }
+          }
+        }
       }
     }
@@ -605,7 +395,4 @@
     }
     else {
-#ifdef BNC_DEBUG_PPP
-      //LOG << "push_back  parReq " << parReq->toString() << std::endl;
-#endif
       _params.push_back(parReq);
     }
@@ -634,5 +421,5 @@
 ////////////////////////////////////////////////////////////////////////////
 void t_pppParlist::printResult(const bncTime& epoTime, const SymmetricMatrix& QQ,
-                               const ColumnVector& xx) const {
+                               const ColumnVector& xx, double fixRatio) const {
 
   string epoTimeStr = string(epoTime);
@@ -703,7 +490,14 @@
 
         << " dU = " << setprecision(4) << neu[2] << " +- "
-        << setprecision(4) << sqrt(QQneu[2][2])
-
-        << endl;
+        << setprecision(4) << sqrt(QQneu[2][2]);
+
+    if (fixRatio > 0.0) {
+      LOG << " fix " <<  int(100*fixRatio) << " %";
+    }
+    else {
+      LOG << " flt ";
+    }
+
+    LOG << endl;
   }
   return;
Index: /trunk/BNC/src/PPP/pppParlist.h
===================================================================
--- /trunk/BNC/src/PPP/pppParlist.h	(revision 10790)
+++ /trunk/BNC/src/PPP/pppParlist.h	(revision 10791)
@@ -14,18 +14,15 @@
 class t_pppParam {
  public:
-  enum e_type {crdX, crdY, crdZ, rClkG, rClkR, rClkE, rClkC, trp, ion, amb,
-               cBiasG1, cBiasR1, cBiasE1, cBiasC1, pBiasG1, pBiasR1, pBiasE1, pBiasC1,
-               cBiasG2, cBiasR2, cBiasE2, cBiasC2, pBiasG2, pBiasR2, pBiasE2, pBiasC2};
+  enum e_type {crdX, crdY, crdZ, rClk, trp, ion, amb, bias};
 
-  t_pppParam(e_type type, const t_prn& prn, t_lc::type tLC, const std::vector<t_pppSatObs*>* obsVector = 0);
+  t_pppParam(e_type type, const t_prn& prn, t_lc LC = t_lc(), const std::vector<t_pppSatObs*>* obsVector = 0);
   ~t_pppParam();
 
   e_type type() const {return _type;}
   double x0()  const {return _x0;}
-  double partial(const bncTime& epoTime, const t_pppSatObs* obs,
-                 const t_lc::type& tLC) const;
+  double partial(const bncTime& epoTime, const t_pppSatObs* obs, const t_lc& LC) const;
   bool   epoSpec() const {return _epoSpec;}
   bool   isEqual(const t_pppParam* par2) const {
-    return (_type == par2->_type && _prn == par2->_prn && _tLC == par2->_tLC);
+    return (_type == par2->_type && _prn == par2->_prn && _LC == par2->_LC && _sys == par2->_sys);
   }
   void   setIndex(int indexNew) {
@@ -36,10 +33,10 @@
     _indexOld = -1;
   }
-  int indexOld() const {return _indexOld;}
-  int indexNew() const {return _indexNew;}
-  double sigma0() const {return _sigma0;}
-  double noise() const {return _noise;}
-  t_lc::type tLC() const {return _tLC;}
-  t_prn prn() const {return _prn;}
+  int         indexOld() const {return _indexOld;}
+  int         indexNew() const {return _indexNew;}
+  double      sigma0() const {return _sigma0;}
+  double      noise() const {return _noise;}
+  t_lc        LC() const {return _LC;}
+  t_prn       prn() const {return _prn;}
   std::string toString() const;
 
@@ -55,4 +52,16 @@
   unsigned ambNumEpo() const           {return _ambInfo ? _ambInfo->_numEpo : 0;}
   void     stepAmbNumEpo()             {if (_ambInfo) _ambInfo->_numEpo += 1;}
+  char     system() const {
+    if (_prn.valid()) {
+      return _prn.system();
+    }
+    else if (_LC.valid()) {
+      return _LC.system();
+    }
+    else {
+      return _sys;
+    }
+  }
+  void     setSystem(char sys) {_sys = sys;}
 
   static bool sortFunction(const t_pppParam* p1, const t_pppParam* p2) {
@@ -60,6 +69,6 @@
       return p1->_type < p2->_type;
     }
-    else if (p1->_tLC != p2->_tLC) {
-      return p1->_tLC < p2->_tLC;
+    else if (p1->_LC != p2->_LC) {
+      return p1->_LC < p2->_LC;
     }
     else if (p1->_prn != p2->_prn) {
@@ -84,5 +93,6 @@
   e_type       _type;
   t_prn        _prn;
-  t_lc::type   _tLC;
+  char         _sys;
+  t_lc         _LC;
   double       _x0;
   bool         _epoSpec;
@@ -104,12 +114,11 @@
   const std::vector<t_pppParam*>& params() const {return _params;}
   std::vector<t_pppParam*>& params() {return _params;}
-  const QMap<char, int>& usedSystems() const {return _usedSystems;}
   void printResult(const bncTime& epoTime, const SymmetricMatrix& QQ,
-                   const ColumnVector& xx) const;
+                   const ColumnVector& xx, double fixRatio = 0.0) const;
   void printParams(const bncTime& epoTime);
 
  private:
   std::vector<t_pppParam*> _params;
-  QMap<char, int>          _usedSystems;
+  std::map<char, int>      _usedSystems;
 };
 
Index: /trunk/BNC/src/PPP/pppSatObs.cpp
===================================================================
--- /trunk/BNC/src/PPP/pppSatObs.cpp	(revision 10790)
+++ /trunk/BNC/src/PPP/pppSatObs.cpp	(revision 10791)
@@ -19,4 +19,6 @@
 #include <iomanip>
 #include <cmath>
+#include <algorithm>
+#include <set>
 #include <newmatio.h>
 
@@ -43,5 +45,4 @@
   _reference  = false;
   _stecSat    = 0.0;
-  _signalPriorities = QString::fromStdString(OPT->_signalPriorities);
   for (unsigned ii = 0; ii < t_frequency::max; ii++) {
     _obs[ii] = 0;
@@ -60,72 +61,77 @@
 //
 ////////////////////////////////////////////////////////////////////////////
-void t_pppSatObs::prepareObs(const t_satObs& pppSatObs) {
+bool t_pppSatObs::isBetter(const t_frqObs* aa, t_frqObs* bb, const string& trkModes) const {
+
+  if (!trkModes.empty()) {
+    size_t posA = trkModes.find(aa->trkChar());
+    size_t posB = trkModes.find(bb->trkChar());
+    if (posA != posB) {
+      if      (posA == string::npos) {
+        return false;
+      }
+      else if (posB == string::npos) {
+        return true;
+      }
+      else {
+        return posA < posB;
+      }
+    }
+  }
+      
+  unsigned numValA = 0;
+  if (aa->_codeValid)  numValA += 1;
+  if (aa->_phaseValid) numValA += 1;
+
+  unsigned numValB = 0;
+  if (bb->_codeValid)  numValB += 1;
+  if (bb->_phaseValid) numValB += 1;
+
+  if (numValA != numValB) {
+    return numValA > numValB;
+  }
+
+  return false;
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+void t_pppSatObs::prepareObs(const t_satObs& satObs) {
 
   _model.reset();
 
-  std::vector<char> bb = OPT->frqBands(_prn.system());
-  char frqNum1 = '0';
-  if (bb.size() >= 1) {
-    frqNum1 = bb[0];
-  }
-  char frqNum2 = '0';
-  if (bb.size() == 2) {
-    frqNum2 = bb[1];
-  }
-
-  // Select pseudo-ranges and phase observations
-  // -------------------------------------------
-  QStringList priorList = _signalPriorities.split(" ", Qt::SkipEmptyParts);
-  string preferredAttrib;
-  for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) {
-    t_frequency::type frqType = static_cast<t_frequency::type>(iFreq);
-    char frqSys = t_frequency::toString(frqType)[0]; //cout << "frqSys: " << frqSys << endl;
-    char frqNum = t_frequency::toString(frqType)[1]; //cout << "frqNum: " << frqNum << endl;
-    if (frqSys != _prn.system()) {
-      continue;
-    }
-    if (frqNum != frqNum1 &&
-        frqNum != frqNum2 ) {
-      continue;
-    }
-    QStringList hlp;
-    for (int ii = 0; ii < priorList.size(); ii++) {
-      if (priorList[ii].indexOf(":") != -1) {
-        hlp = priorList[ii].split(":", Qt::SkipEmptyParts);
-        if (hlp.size() == 2 && hlp[0].length() == 1 && hlp[0][0] == frqSys) {
-          hlp = hlp[1].split("&", Qt::SkipEmptyParts);
-        }
-        if (hlp.size() == 2 && hlp[0].indexOf(frqNum) != -1) {
-          preferredAttrib = hlp[1].toStdString(); //cout << "preferredAttrib: " << preferredAttrib << endl;
-        }
-      }
-      for (unsigned iPref = 0; iPref < preferredAttrib.length(); iPref++) {
-        QString obsType = QString("%1").arg(frqNum) + preferredAttrib[iPref];  //cout << "obstype: " << obsType.toStdString().c_str() << endl;
-        if (_obs[iFreq] == 0) {
-          for (unsigned ii = 0; ii < pppSatObs._obs.size(); ii++) {
-            const t_frqObs* obs = pppSatObs._obs[ii];
-            //cout << "observation2char: " << obs->_rnxType2ch << " vs. " << obsType.toStdString().c_str()<< endl;
-            if (obs->_rnxType2ch == obsType.toStdString() &&
-                obs->_codeValid  && obs->_code &&
-                obs->_phaseValid && obs->_phase) {
-              _obs[iFreq] = new t_frqObs(*obs); //cout << "================> newObs: " << obs->_rnxType2ch << " obs->_lockTime: " << obs->_lockTime << endl;
-            }
-          }
-        }
-      }
-    }
-  }
-
-  // Used frequency types
-  // --------------------
-  _fType1 = t_frqBand::toFreq(_prn.system(), frqNum1);
-  _fType2 = t_frqBand::toFreq(_prn.system(), frqNum2);
-
+  const t_pppOptions::SysTrkModes* sysTrkModes = OPT->sysTrkModes(_prn.system());
+  using FrqTrkModes = t_pppOptions::SysTrkModes::FrqTrkModes;
+  
+  for (const t_frqObs* obs : satObs._obs) {
+    if ( (obs->_codeValid || obs->_phaseValid)) {
+      t_frequency::type frq = t_frequency::toFreq(_prn.system(), obs->frqChar());
+      if (frq == t_frequency::dummy) {
+        continue;
+      }
+      string trkModes;
+      if (sysTrkModes) {
+        const vector<FrqTrkModes>& frqTrkModes = sysTrkModes->_frqTrkModes;
+        auto it = find_if(frqTrkModes.begin(), frqTrkModes.end(),
+                          [frq](const FrqTrkModes& mm){return mm._frq == frq;});
+        if (it != frqTrkModes.end()) {
+          trkModes = it->_trkModes;
+        }
+      }
+      if (_obs[frq] == 0 || isBetter(obs, _obs[frq], trkModes)) {
+        delete _obs[frq];  
+        _obs[frq] = new t_frqObs(*obs);
+      }
+    }
+  }
+  
   // Check whether all required frequencies available
   // ------------------------------------------------
-  for (unsigned ii = 0; ii < OPT->LCs(_prn.system()).size(); ii++) {
-    t_lc::type tLC = OPT->LCs(_prn.system())[ii];
-    if (tLC == t_lc::GIM) {continue;}
-    if (!isValid(tLC)) {
+  const std::vector<t_lc>& LCs = OPT->LCs(_prn.system());
+  for (unsigned ii = 0; ii < LCs.size(); ii++) {
+    t_lc LC = LCs[ii];
+    if (LC._type == t_lc::GIM) {
+      continue;
+    }
+    if (LC._frq1 != t_frequency::G5 && !isValid(LC)) {
       _valid = false;
       return;
@@ -148,19 +154,28 @@
   bool totOK  = false;
   ColumnVector satPosOld(6); satPosOld = 0.0;
-  t_lc::type tLC = t_lc::dummy;
-  if (isValid(t_lc::cIF)) {
-    tLC = t_lc::cIF;
-  }
-  if (tLC == t_lc::dummy && isValid(t_lc::c1)) {
-      tLC = t_lc::c1;
-  }
-  if (tLC == t_lc::dummy && isValid(t_lc::c2)) {
-      tLC = t_lc::c2;
-  }
-  if (tLC == t_lc::dummy) {
-    _valid = false;
+
+  _valid = false;
+  t_frequency::type frq1 = t_frequency::dummy;
+  t_frequency::type frq2 = t_frequency::dummy;
+  OPT->defaultFrqs(_prn.system(), frq1, frq2);
+  if (frq1 != t_frequency::dummy) {
+    t_lc lc1(t_lc::code, frq1);
+    if (isValid(lc1)) {
+      _valid = true;
+      _rangeLC = lc1;
+    }
+    if (frq2 != t_frequency::dummy) {
+      t_lc lcIF(t_lc::codeIF, frq1, frq2);
+      if (isValid(lcIF)) {
+        _valid = true;
+        _rangeLC = lcIF;
+      }
+    }
+  }
+  if (!_valid) {
     return;
   }
-  double prange = obsValue(tLC);
+  
+  double prange = obsValue(_rangeLC);
   for (int ii = 1; ii <= 10; ii++) {
     bncTime ToT = _time - prange / t_CST::c - _xcSat[3];
@@ -188,5 +203,5 @@
 //
 ////////////////////////////////////////////////////////////////////////////
-void t_pppSatObs::lcCoeff(t_lc::type tLC,
+void t_pppSatObs::lcCoeff(t_lc LC,
                           map<t_frequency::type, double>& codeCoeff,
                           map<t_frequency::type, double>& phaseCoeff,
@@ -197,42 +212,34 @@
   ionoCoeff.clear();
 
-  double f1 = t_CST::freq(_fType1, _channel);
-  double f2 = t_CST::freq(_fType2, _channel);
+  double f1 = t_CST::freq(LC._frq1, _channel);
+  double f2 = t_CST::freq(LC._frq2, _channel);
   double f1GPS = t_CST::freq(t_frequency::G1, 0);
 
-  switch (tLC) {
-  case t_lc::l1:
-    phaseCoeff[_fType1] =  1.0;
-    ionoCoeff [_fType1] = -1.0 * pow(f1GPS, 2) / pow(f1, 2);
+  switch (LC._type) {
+  case t_lc::phase:
+    phaseCoeff[LC._frq1] =  1.0;
+    ionoCoeff [LC._frq1] = -1.0 * pow(f1GPS, 2) / pow(f1, 2);
     return;
-  case t_lc::l2:
-    phaseCoeff[_fType2] =  1.0;
-    ionoCoeff [_fType2] = -1.0 * pow(f1GPS, 2) / pow(f2, 2);
+  case t_lc::code:
+    codeCoeff[LC._frq1] = 1.0;
+    ionoCoeff[LC._frq1] = pow(f1GPS, 2) / pow(f1, 2);
     return;
-  case t_lc::lIF:
-    phaseCoeff[_fType1] =  f1 * f1 / (f1 * f1 - f2 * f2);
-    phaseCoeff[_fType2] = -f2 * f2 / (f1 * f1 - f2 * f2);
+  case t_lc::phaseIF:
+    phaseCoeff[LC._frq1] =  f1 * f1 / (f1 * f1 - f2 * f2);
+    phaseCoeff[LC._frq2] = -f2 * f2 / (f1 * f1 - f2 * f2);
+    return;
+  case t_lc::codeIF:
+    codeCoeff[LC._frq1] =  f1 * f1 / (f1 * f1 - f2 * f2);
+    codeCoeff[LC._frq2] = -f2 * f2 / (f1 * f1 - f2 * f2);
     return;
   case t_lc::MW:
-    phaseCoeff[_fType1] =  f1 / (f1 - f2);
-    phaseCoeff[_fType2] = -f2 / (f1 - f2);
-    codeCoeff[_fType1]  = -f1 / (f1 + f2);
-    codeCoeff[_fType2]  = -f2 / (f1 + f2);
+    phaseCoeff[LC._frq1] =  f1 / (f1 - f2);
+    phaseCoeff[LC._frq2] = -f2 / (f1 - f2);
+    codeCoeff [LC._frq1] = -f1 / (f1 + f2);
+    codeCoeff [LC._frq2] = -f2 / (f1 + f2);
     return;
   case t_lc::CL:
-    phaseCoeff[_fType1] =  0.5;
-    codeCoeff [_fType1] =  0.5;
-    return;
-  case t_lc::c1:
-    codeCoeff[_fType1] = 1.0;
-    ionoCoeff[_fType1] = pow(f1GPS, 2) / pow(f1, 2);
-    return;
-  case t_lc::c2:
-    codeCoeff[_fType2] = 1.0;
-    ionoCoeff[_fType2] = pow(f1GPS, 2) / pow(f2, 2);
-    return;
-  case t_lc::cIF:
-    codeCoeff[_fType1] =  f1 * f1 / (f1 * f1 - f2 * f2);
-    codeCoeff[_fType2] = -f2 * f2 / (f1 * f1 - f2 * f2);
+    phaseCoeff[LC._frq1] =  0.5;
+    codeCoeff [LC._frq1] =  0.5;
     return;
   case t_lc::GIM:
@@ -245,7 +252,7 @@
 //
 ////////////////////////////////////////////////////////////////////////////
-bool t_pppSatObs::isValid(t_lc::type tLC) const {
+bool t_pppSatObs::isValid(t_lc LC) const {
   bool valid = true;
-  obsValue(tLC, &valid);
+  obsValue(LC, &valid);
 
   return valid;
@@ -253,5 +260,5 @@
 //
 ////////////////////////////////////////////////////////////////////////////
-double t_pppSatObs::obsValue(t_lc::type tLC, bool* valid) const {
+double t_pppSatObs::obsValue(t_lc LC, bool* valid) const {
 
   double retVal = 0.0;
@@ -259,5 +266,5 @@
 
   // Pseudo observations
-  if (tLC == t_lc::GIM) {
+  if (LC._type == t_lc::GIM) {
     if (_stecSat == 0.0) {
       if (valid) *valid = false;
@@ -272,5 +279,5 @@
   map<t_frequency::type, double> phaseCoeff;
   map<t_frequency::type, double> ionoCoeff;
-  lcCoeff(tLC, codeCoeff, phaseCoeff, ionoCoeff);
+  lcCoeff(LC, codeCoeff, phaseCoeff, ionoCoeff);
 
   map<t_frequency::type, double>::const_iterator it;
@@ -303,22 +310,19 @@
 //
 ////////////////////////////////////////////////////////////////////////////
-double t_pppSatObs::lambda(t_lc::type tLC) const {
-
-  double f1 = t_CST::freq(_fType1, _channel);
-  double f2 = t_CST::freq(_fType2, _channel);
-
-  if      (tLC == t_lc::l1) {
+double t_pppSatObs::lambda(t_lc LC) const {
+
+  double f1 = t_CST::freq(LC._frq1, _channel);
+  double f2 = t_CST::freq(LC._frq2, _channel);
+
+  if      (LC._type == t_lc::phase) {
     return t_CST::c / f1;
   }
-  else if (tLC == t_lc::l2) {
-    return t_CST::c / f2;
-  }
-  else if (tLC == t_lc::lIF) {
+  else if (LC._type == t_lc::phaseIF) {
     return t_CST::c / (f1 + f2);
   }
-  else if (tLC == t_lc::MW) {
+  else if (LC._type == t_lc::MW) {
     return t_CST::c / (f1 - f2);
   }
-  else if (tLC == t_lc::CL) {
+  else if (LC._type == t_lc::CL) {
     return t_CST::c / f1 / 2.0;
   }
@@ -329,5 +333,5 @@
 //
 ////////////////////////////////////////////////////////////////////////////
-double t_pppSatObs::sigma(t_lc::type tLC) const {
+double t_pppSatObs::sigma(t_lc LC) const {
 
   double retVal = 0.0;
@@ -335,7 +339,7 @@
   map<t_frequency::type, double> phaseCoeff;
   map<t_frequency::type, double> ionoCoeff;
-  lcCoeff(tLC, codeCoeff, phaseCoeff, ionoCoeff);
-
-  if (tLC == t_lc::GIM) {
+  lcCoeff(LC, codeCoeff, phaseCoeff, ionoCoeff);
+
+  if (LC._type == t_lc::GIM) {
     retVal = OPT->_sigmaGIM * OPT->_sigmaGIM;
   }
@@ -354,5 +358,5 @@
   // De-Weight R
   // -----------
-  if (_prn.system() == 'R'&& t_lc::includesCode(tLC)) {
+  if (_prn.system() == 'R'&& LC.includesCode()) {
     retVal *= 5.0;
   }
@@ -361,6 +365,6 @@
   // -----------------------------
   double cEle = 1.0;
-  if ( (OPT->_eleWgtCode  && t_lc::includesCode(tLC)) ||
-       (OPT->_eleWgtPhase && t_lc::includesPhase(tLC)) ) {
+  if ( (OPT->_eleWgtCode  && LC.includesCode()) ||
+       (OPT->_eleWgtPhase && LC.includesPhase()) ) {
     double eleD = eleSat()*180.0/M_PI;
     double hlp  = fabs(90.0 - eleD);
@@ -373,5 +377,5 @@
 //
 ////////////////////////////////////////////////////////////////////////////
-double t_pppSatObs::maxRes(t_lc::type tLC) const {
+double t_pppSatObs::maxRes(t_lc LC) const {
   double retVal = 0.0;
 
@@ -379,5 +383,5 @@
   map<t_frequency::type, double> phaseCoeff;
   map<t_frequency::type, double> ionoCoeff;
-  lcCoeff(tLC, codeCoeff, phaseCoeff, ionoCoeff);
+  lcCoeff(LC, codeCoeff, phaseCoeff, ionoCoeff);
 
   map<t_frequency::type, double>::const_iterator it;
@@ -388,5 +392,5 @@
     retVal += it->second * it->second * OPT->_maxResL1 * OPT->_maxResL1;
   }
-  if (tLC == t_lc::GIM) {
+  if (LC._type == t_lc::GIM) {
     retVal = OPT->_maxResGIM * OPT->_maxResGIM + OPT->_maxResGIM * OPT->_maxResGIM;
   }
@@ -517,7 +521,6 @@
         }
         const t_frqObs* obs = _obs[iFreq];
-        if (obs &&
-            obs->_rnxType2ch == bias._rnxType2ch) {
-          _model._codeBias[iFreq]  = bias._value;
+        if (obs && obs->_rnxType2ch == bias._rnxType2ch) {
+          _model._codeBias[iFreq] = (bias._value != 0.0 ? bias._value : ZEROVALUE);
         }
       }
@@ -527,25 +530,31 @@
   // Phase Biases
   // -----------
-  const t_satPhaseBias* satPhaseBias = PPP_CLIENT->obsPool()->satPhaseBias(_prn);
-  double yaw = 0.0;
-  bool ssr = false;
-  if (satPhaseBias) {
-    double dt = station->epochTime() - satPhaseBias->_time;
-    if (satPhaseBias->_updateInt) {
-      dt -= (0.5 * ssrUpdateInt[satPhaseBias->_updateInt]);
-    }
-    yaw = satPhaseBias->_yaw + satPhaseBias->_yawRate * dt;
-    ssr = true;
-    for (unsigned ii = 0; ii < satPhaseBias->_bias.size(); ii++) {
-      const t_frqPhaseBias& bias = satPhaseBias->_bias[ii];
-      for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) {
-        string frqStr = t_frequency::toString(t_frequency::type(iFreq));
-        if (frqStr[0] != _prn.system()) {
-          continue;
-        }
-        const t_frqObs* obs = _obs[iFreq];
-        if (obs &&
-            obs->_rnxType2ch == bias._rnxType2ch) {
-          _model._phaseBias[iFreq]  = bias._value;
+  double yaw    = 0.0;
+  bool   useYaw = false;
+  if (OPT->arSystem(_prn.system())) {
+    const t_satPhaseBias* satPhaseBias = PPP_CLIENT->obsPool()->satPhaseBias(_prn);
+    if (satPhaseBias) {
+      if (OPT->_ar._useYaw) {
+        double dt = station->epochTime() - satPhaseBias->_time;
+        if (satPhaseBias->_updateInt) {
+          dt -= (0.5 * ssrUpdateInt[satPhaseBias->_updateInt]);
+        }
+        yaw = satPhaseBias->_yaw + satPhaseBias->_yawRate * dt;
+        useYaw = true;
+      }
+      for (unsigned ii = 0; ii < satPhaseBias->_bias.size(); ii++) {
+        const t_frqPhaseBias& bias = satPhaseBias->_bias[ii];
+        if (bias._fixIndicator) {  // if AR, biases without fixIndicator not used
+          for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) {
+            string frqStr = t_frequency::toString(t_frequency::type(iFreq));
+            if (frqStr[0] != _prn.system()) {
+              continue;
+            }
+            t_frqObs* obs = _obs[iFreq];
+            if (obs && obs->_rnxType2ch[0] == bias._rnxType2ch[0]) { // allow different tracking mode
+              _model._phaseBias[iFreq] = (bias._value != 0.0 ? bias._value : ZEROVALUE);
+              obs->_biasJumpCounter = bias._jumpCounter;
+            }
+          }
         }
       }
@@ -555,5 +564,5 @@
   // Phase Wind-Up
   // -------------
-  _model._windUp = station->windUp(_time, _prn, rSat, ssr, yaw, vSat) ;
+  _model._windUp = station->windUp(_time, _prn, rSat, useYaw, yaw, vSat) ;
 
   // Relativistic effect due to earth gravity
@@ -574,6 +583,6 @@
   bool vTecUsage = true;
   for (unsigned ii = 0; ii < OPT->LCs(_prn.system()).size(); ii++) {
-    t_lc::type tLC = OPT->LCs(_prn.system())[ii];
-    if (tLC == t_lc::cIF || tLC == t_lc::lIF) {
+    t_lc LC = OPT->LCs(_prn.system())[ii];
+    if (LC._type == t_lc::codeIF || LC._type == t_lc::phaseIF) {
       vTecUsage = false;
     }
@@ -601,5 +610,7 @@
   _model._set = true;
 
-  //printModel();
+  if (OPT->_logMode == t_pppOptions::all) {
+    printModel();
+  }
 
   return success;
@@ -636,6 +647,6 @@
       if (_prn.system() == frqStr[0]) {
       LOG << "PCO           : " << frqStr << setw(12) << setprecision(3) << _model._antPCO[iFreq]       << endl
-          << "BIAS CODE     : " << frqStr << setw(12) << setprecision(3) << _model._codeBias[iFreq]     << "\t(" << _obs[iFreq]->_rnxType2ch[1] << ") " << endl
-          << "BIAS PHASE    : " << frqStr << setw(12) << setprecision(3) << _model._phaseBias[iFreq]    << "\t(" << _obs[iFreq]->_rnxType2ch[1] << ") " << endl
+          << "BIAS CODE     : " << frqStr << setw(12) << setprecision(3) << _model._codeBias[iFreq]     << "\t(" << _obs[iFreq]->trkChar() << ") " << endl
+          << "BIAS PHASE    : " << frqStr << setw(12) << setprecision(3) << _model._phaseBias[iFreq]    << "\t(" << _obs[iFreq]->trkChar() << ") " << endl
           << "IONO CODEDELAY: " << frqStr << setw(12) << setprecision(3) << _model._ionoCodeDelay[iFreq]<< endl;
       }
@@ -652,27 +663,27 @@
   char sys = _prn.system();
   for (unsigned ii = 0; ii < OPT->LCs(sys).size(); ii++) {
-    t_lc::type tLC = OPT->LCs(sys)[ii];
-    LOG << "OBS-CMP " << setw(4) << t_lc::toString(tLC) << ": " << _prn.toString() << " "
-        << setw(12) << setprecision(3) << obsValue(tLC) << " "
-        << setw(12) << setprecision(3) << cmpValue(tLC) << " "
-        << setw(12) << setprecision(3) << obsValue(tLC)  - cmpValue(tLC) << endl;
-  }
-}
-
-//
-////////////////////////////////////////////////////////////////////////////
-double t_pppSatObs::cmpValueForBanc(t_lc::type tLC) const {
-  return cmpValue(tLC) - _model._rho - _model._sagnac - _model._recClkM;
-}
-
-//
-////////////////////////////////////////////////////////////////////////////
-double t_pppSatObs::cmpValue(t_lc::type tLC) const {
+    t_lc LC = OPT->LCs(sys)[ii];
+    LOG << "OBS-CMP " << setw(4) << LC.toString() << ": " << _prn.toString() << " "
+        << setw(12) << setprecision(3) << obsValue(LC) << " "
+        << setw(12) << setprecision(3) << cmpValue(LC) << " "
+        << setw(12) << setprecision(3) << obsValue(LC)  - cmpValue(LC) << endl;
+  }
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+double t_pppSatObs::cmpValueForBanc(t_lc LC) const {
+  return cmpValue(LC) - _model._rho - _model._sagnac - _model._recClkM;
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+double t_pppSatObs::cmpValue(t_lc LC) const {
   double cmpValue;
 
-  if      (!isValid(tLC)) {
+  if      (!isValid(LC)) {
     cmpValue =  0.0;
   }
-  else if (tLC == t_lc::GIM) {
+  else if (LC._type == t_lc::GIM) {
     cmpValue =  _stecSat;
   }
@@ -691,12 +702,9 @@
     map<t_frequency::type, double> phaseCoeff;
     map<t_frequency::type, double> ionoCoeff;
-    lcCoeff(tLC, codeCoeff, phaseCoeff, ionoCoeff);
+    lcCoeff(LC, codeCoeff, phaseCoeff, ionoCoeff);
     map<t_frequency::type, double>::const_iterator it;
     for (it = codeCoeff.begin(); it != codeCoeff.end(); it++) {
       t_frequency::type tFreq = it->first;
       dispPart += it->second * (_model._antPCO[tFreq] - _model._codeBias[tFreq]);
-      if (OPT->PPP_RTK) {
-        dispPart += it->second * (_model._ionoCodeDelay[tFreq]);
-      }
     }
     for (it = phaseCoeff.begin(); it != phaseCoeff.end(); it++) {
@@ -704,7 +712,4 @@
       dispPart += it->second * (_model._antPCO[tFreq] - _model._phaseBias[tFreq] +
                                 _model._windUp * t_CST::lambda(tFreq, _channel));
-      if (OPT->PPP_RTK) {
-        dispPart += it->second * (- _model._ionoCodeDelay[tFreq]);
-      }
     }
     cmpValue = nonDisp + dispPart;
@@ -716,12 +721,12 @@
 //
 ////////////////////////////////////////////////////////////////////////////
-void t_pppSatObs::setRes(t_lc::type tLC, double res) {
-  _res[tLC] = res;
-}
-
-//
-////////////////////////////////////////////////////////////////////////////
-double t_pppSatObs::getRes(t_lc::type tLC) const {
-  map<t_lc::type, double>::const_iterator it = _res.find(tLC);
+void t_pppSatObs::setRes(t_lc LC, double res) {
+  _res[LC] = res;
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+double t_pppSatObs::getRes(t_lc LC) const {
+  map<t_lc, double>::const_iterator it = _res.find(LC);
   if (it != _res.end()) {
     return it->second;
@@ -742,2 +747,21 @@
   return pseudoObsIono;
 }
+
+//
+////////////////////////////////////////////////////////////////////////////
+bool t_pppSatObs::hasBiases() const {
+  bool ar = OPT->arSystem(_prn.system());
+  set<t_frequency::type> frqs;
+  for (const auto& lc : OPT->LCs(_prn.system())) {
+    if (lc._frq1 != t_frequency::dummy) frqs.insert(lc._frq1);
+    if (lc._frq2 != t_frequency::dummy) frqs.insert(lc._frq2);
+  }
+  for (int iFreq : frqs) {
+    if (_obs[iFreq] != 0) {
+      if (_model._codeBias[iFreq] == 0 || (ar && _model._phaseBias[iFreq] == 0)) {
+        return false;
+      }
+    }
+  }
+  return true;
+}
Index: /trunk/BNC/src/PPP/pppSatObs.h
===================================================================
--- /trunk/BNC/src/PPP/pppSatObs.h	(revision 10790)
+++ /trunk/BNC/src/PPP/pppSatObs.h	(revision 10791)
@@ -11,148 +11,148 @@
 namespace BNC_PPP {
 
-class t_pppStation;
+  class t_pppStation;
 
-class t_pppSatObs {
- public:
-  t_pppSatObs(const t_satObs& satObs);
-  ~t_pppSatObs();
-  bool                isValid() const {return _valid;};
-  bool                isValid(t_lc::type tLC) const;
-  bool                isReference() const {return _reference;};
-  void                setAsReference() {_reference = true;};
-  void                resetReference() {_reference = false;};
-  const t_prn&        prn() const {return _prn;}
-  const ColumnVector& xc() const {return _xcSat;}
-  const bncTime&      time() const {return _time;}
-  t_irc               cmpModel(const t_pppStation* station);
-  double              obsValue(t_lc::type tLC, bool* valid = 0) const;
-  double              cmpValue(t_lc::type tLC) const;
-  double              cmpValueForBanc(t_lc::type tLC) const;
-  double              rho() const {return _model._rho;}
-  double              sagnac() const {return _model._sagnac;}
-  double              eleSat() const {return _model._eleSat;}
-  bool                modelSet() const {return _model._set;}
-  void                printModel() const;
-  void                printObsMinusComputed() const;
-  void                lcCoeff(t_lc::type tLC,
-                              std::map<t_frequency::type, double>& codeCoeff,
-                              std::map<t_frequency::type, double>& phaseCoeff,
-                              std::map<t_frequency::type, double>& ionoCoeff) const;
-  double              lambda(t_lc::type tLC) const;
-  double              sigma(t_lc::type tLC) const;
-  double              maxRes(t_lc::type tLC) const;
-  bool                outlier() const {return _outlier;}
-  void                setOutlier() {_outlier = true;}
-  void                resetOutlier() {_outlier = false;}
-  void                setRes(t_lc::type tLC, double res);
-  double              getRes(t_lc::type tLC) const;
-  bool                setPseudoObsIono(t_frequency::type freq);
-  double              getIonoCodeDelay(t_frequency::type freq) {return _model._ionoCodeDelay[freq];}
-  double              getCodeBias(t_frequency::type freq) {return _model._codeBias[freq];}
-  t_frequency::type   fType1() const {return _fType1;}
-  t_frequency::type   fType2() const {return _fType2;} 
+  class t_pppSatObs {
+  public:
+    t_pppSatObs(const t_satObs& satObs);
+    ~t_pppSatObs();
+    bool                isValid() const {return _valid;};
+    bool                isValid(t_lc LC) const;
+    t_lc                rangeLC() const {return _rangeLC;};
+    bool                isReference() const {return _reference;};
+    void                setAsReference() {_reference = true;};
+    void                resetReference() {_reference = false;};
+    const t_prn&        prn() const {return _prn;}
+    const ColumnVector& xc() const {return _xcSat;}
+    const bncTime&      time() const {return _time;}
+    t_irc               cmpModel(const t_pppStation* station);
+    double              obsValue(t_lc LC, bool* valid = 0) const;
+    double              cmpValue(t_lc LC) const;
+    double              cmpValueForBanc(t_lc LC) const;
+    double              rho() const {return _model._rho;}
+    double              sagnac() const {return _model._sagnac;}
+    double              eleSat() const {return _model._eleSat;}
+    bool                modelSet() const {return _model._set;}
+    void                printModel() const;
+    void                printObsMinusComputed() const;
+    void                lcCoeff(t_lc LC,
+                                std::map<t_frequency::type, double>& codeCoeff,
+                                std::map<t_frequency::type, double>& phaseCoeff,
+                                std::map<t_frequency::type, double>& ionoCoeff) const;
+    double              lambda(t_lc LC) const;
+    double              sigma(t_lc LC) const;
+    double              maxRes(t_lc LC) const;
+    bool                outlier() const {return _outlier;}
+    void                setOutlier() {_outlier = true;}
+    void                resetOutlier() {_outlier = false;}
+    void                setRes(t_lc LC, double res);
+    double              getRes(t_lc LC) const;
+    bool                setPseudoObsIono(t_frequency::type freq);
+    double              getIonoCodeDelay(t_frequency::type freq) {return _model._ionoCodeDelay[freq];}
+    double              getCodeBias(t_frequency::type freq) {return _model._codeBias[freq];}
+    bool                hasBiases() const;
 
-  // RINEX
-  bool slip() const {
-    for (unsigned ii = 1; ii < t_frequency::max; ii++) {
-      if (_obs[ii] && _obs[ii]->_slip) {
-        return true;
+    // RINEX
+    bool slip() const {
+      for (unsigned ii = 1; ii < t_frequency::max; ii++) {
+        if (_obs[ii] && _obs[ii]->_slip) {
+          return true;
+        }
       }
+      return false;
     }
-    return false;
-  }
 
-  // RTCM
-  int slipCounter() const {
-    int cnt = -1;
-    for (unsigned ii = 1; ii < t_frequency::max; ii++) {
-      if (_obs[ii] && _obs[ii]->_slipCounter > cnt) {
-        cnt = _obs[ii]->_slipCounter;
+    // RTCM
+    int slipCounter() const {
+      int cnt = -1;
+      for (unsigned ii = 1; ii < t_frequency::max; ii++) {
+        if (_obs[ii] && _obs[ii]->_slipCounter > cnt) {
+          cnt = _obs[ii]->_slipCounter;
+        }
       }
+      return cnt;
     }
-    return cnt;
-  }
 
-  int biasJumpCounter() const {
-    int jmp = -1;
-    for (unsigned ii = 1; ii < t_frequency::max; ii++) {
-      if (_obs[ii] && _obs[ii]->_biasJumpCounter > jmp) {
-        jmp = _obs[ii]->_biasJumpCounter;
+    int biasJumpCounter() const {
+      int jmp = -1;
+      for (unsigned ii = 1; ii < t_frequency::max; ii++) {
+        if (_obs[ii] && _obs[ii]->_biasJumpCounter > jmp) {
+          jmp = _obs[ii]->_biasJumpCounter;
+        }
       }
+      return jmp;
     }
-    return jmp;
-  }
 
- private:
-  class t_model {
-   public:
-    t_model() {reset();}
-    ~t_model() {}
-    void reset() {
-      _set       = false;
-      _rho       = 0.0;
-      _eleSat    = 0.0;
-      _azSat     = 0.0;
-      _elTx      = 0.0;
-      _azTx      = 0.0;
-      _recClkM   = 0.0;
-      _satClkM   = 0.0;
-      _sagnac    = 0.0;
-      _antEcc    = 0.0;
-      _tropo     = 0.0;
-      _tropo0    = 0.0;
-      _tideEarth = 0.0;
-      _tideOcean = 0.0;
-      _windUp    = 0.0;
-      _rel       = 0.0;
-      for (unsigned ii = 0; ii < t_frequency::max; ii++) {
-        _antPCO[ii]        = 0.0;
-        _codeBias[ii]      = 0.0;
-        _phaseBias[ii]     = 0.0;
-        _ionoCodeDelay[ii] = 0.0;
+  private:
+    class t_model {
+    public:
+      t_model() {reset();}
+      ~t_model() {}
+      void reset() {
+        _set       = false;
+        _rho       = 0.0;
+        _eleSat    = 0.0;
+        _azSat     = 0.0;
+        _elTx      = 0.0;
+        _azTx      = 0.0;
+        _recClkM   = 0.0;
+        _satClkM   = 0.0;
+        _sagnac    = 0.0;
+        _antEcc    = 0.0;
+        _tropo     = 0.0;
+        _tropo0    = 0.0;
+        _tideEarth = 0.0;
+        _tideOcean = 0.0;
+        _windUp    = 0.0;
+        _rel       = 0.0;
+        for (unsigned ii = 0; ii < t_frequency::max; ii++) {
+          _antPCO[ii]        = 0.0;
+          _codeBias[ii]      = 0.0;
+          _phaseBias[ii]     = 0.0;
+          _ionoCodeDelay[ii] = 0.0;
+        }
       }
-    }
-    bool   _set;
-    double _rho;
-    double _eleSat;
-    double _azSat;
-    double _elTx;
-    double _azTx;
-    double _recClkM;
-    double _satClkM;
-    double _sagnac;
-    double _antEcc;
-    double _tropo;
-    double _tropo0;
-    double _tideEarth;
-    double _tideOcean;
-    double _windUp;
-    double _rel;
-    double _antPCO[t_frequency::max];
-    double _codeBias[t_frequency::max];
-    double _phaseBias[t_frequency::max];
-    double _ionoCodeDelay[t_frequency::max];
+      bool   _set;
+      double _rho;
+      double _eleSat;
+      double _azSat;
+      double _elTx;
+      double _azTx;
+      double _recClkM;
+      double _satClkM;
+      double _sagnac;
+      double _antEcc;
+      double _tropo;
+      double _tropo0;
+      double _tideEarth;
+      double _tideOcean;
+      double _windUp;
+      double _rel;
+      double _antPCO[t_frequency::max];
+      double _codeBias[t_frequency::max];
+      double _phaseBias[t_frequency::max];
+      double _ionoCodeDelay[t_frequency::max];
+    };
+
+    void prepareObs(const t_satObs& satObs);
+
+    bool isBetter(const t_frqObs* aa, t_frqObs* bb, const std::string& trkModes) const;
+
+    bool                   _valid;
+    bool                   _reference;
+    t_lc                   _rangeLC;
+    t_prn                  _prn;
+    bncTime                _time;
+    int                    _channel;
+    t_frqObs*              _obs[t_frequency::max];
+    ColumnVector           _xcSat;
+    ColumnVector           _vvSat;
+    t_model                _model;
+    bool                   _outlier;
+    std::map<t_lc, double> _res;
+    double                 _signalPropagationTime;
+    double                 _stecSat;
+    double                 _tropo0;
   };
-
-  void prepareObs(const t_satObs& satObs);
-
-  bool                         _valid;
-  bool                         _reference;
-  t_frequency::type            _fType1;
-  t_frequency::type            _fType2;
-  t_prn                        _prn;
-  bncTime                      _time;
-  int                          _channel;
-  t_frqObs*                    _obs[t_frequency::max];
-  ColumnVector                 _xcSat;
-  ColumnVector                 _vvSat;
-  t_model                      _model;
-  bool                         _outlier;
-  std::map<t_lc::type, double> _res;
-  double                       _signalPropagationTime;
-  double                       _stecSat;
-  double                       _tropo0;
-  QString                      _signalPriorities;
-	};
 
 }
Index: /trunk/BNC/src/bncconst.cpp
===================================================================
--- /trunk/BNC/src/bncconst.cpp	(revision 10790)
+++ /trunk/BNC/src/bncconst.cpp	(revision 10791)
@@ -81,2 +81,39 @@
   return c / freq(fType, slotNum);
 }
+
+//
+//////////////////////////////////////////////////////////////////////////////
+t_frequency::type t_frequency::toFreq(char sys, char bb) {
+  switch (bb) {
+  case '1':
+    if      (sys == 'G') return t_frequency::G1;
+    else if (sys == 'R') return t_frequency::R1;
+    else if (sys == 'E') return t_frequency::E1;
+    else if (sys == 'C') return t_frequency::C1;
+    else                 return t_frequency::dummy;
+  case '2':
+    if      (sys == 'G') return t_frequency::G2;
+    else if (sys == 'R') return t_frequency::R2;
+    else if (sys == 'C') return t_frequency::C2;
+    else                 return t_frequency::dummy;
+  case '5':
+    if      (sys == 'G') return t_frequency::G5;
+    else if (sys == 'E') return t_frequency::E5;
+    else if (sys == 'C') return t_frequency::C5;
+    else                 return t_frequency::dummy;
+  case '6':
+    if      (sys == 'E') return t_frequency::E6;
+    else if (sys == 'C') return t_frequency::C6;
+    else                 return t_frequency::dummy;
+  case '7':
+    if      (sys == 'E') return t_frequency::E7;
+    else if (sys == 'C') return t_frequency::C7;
+    else                 return t_frequency::dummy;
+  case '8':
+    if      (sys == 'E') return t_frequency::E8;
+    else if (sys == 'C') return t_frequency::C8;
+    else                 return t_frequency::dummy;
+  }
+  return t_frequency::dummy;
+}
+
Index: /trunk/BNC/src/bncconst.h
===================================================================
--- /trunk/BNC/src/bncconst.h	(revision 10790)
+++ /trunk/BNC/src/bncconst.h	(revision 10791)
@@ -106,4 +106,15 @@
     return std::string();
   }
+
+  static char toSystem(type tt) {
+    std::string str = t_frequency::toString(tt);
+    if (str.length() > 0) {
+      return str[0];
+    }
+    else {
+      return '?';
+    }
+  }
+  
   static enum type toInt(std::string s) {
     // GPS
@@ -141,4 +152,6 @@
     return type();
   }
+
+  static type toFreq(char sys, char frqChar);
 };
 
Index: /trunk/BNC/src/bncmain.cpp
===================================================================
--- /trunk/BNC/src/bncmain.cpp	(revision 10790)
+++ /trunk/BNC/src/bncmain.cpp	(revision 10791)
@@ -249,9 +249,7 @@
         "   PPP/logPath     {Directory for PPP log files [character string]}\n"
         "   PPP/antexFile   {ANTEX file, full path [character string]}\n"
-#ifdef USE_PPP
         "   PPP/blqFile     {BLQ file, full path [character string]}\n"
         "   PPP/ionoMount   {VTEC mountpoint, [char string]}\n"
         "   PPP/ionoFile    {VTEC file, full path [char string]}\n"
-#endif
         "   PPP/nmeaPath      {Directory for NMEA output files [character string]}\n"
         "   PPP/snxtroPath    {Directory for SINEX troposphere output files [character string]}\n"
@@ -278,9 +276,7 @@
         "   PPP/corrWaitTime {Wait for clock corrections [integer number of seconds: 0-20]}\n"
         "   PPP/seedingTime  {Seeding time span for Quick Start [integer number of seconds]}\n"
-#ifdef USE_PPP
         "   PPP/constraints  {Specify, whether ionospheric constraints in form of pseudo-observations shall be added [character string: no|Ionosphere: pseudo-obs]}\n"
         "   PPP/sigmaGIM     {Sigma for GIM pseudo observations in meters [floating-point number]}\n"
         "   PPP/maxResGIM    {Maximal residuum for GIM pseudo observations in meters [floating-point number]}\n"
-#endif
         "\n"
         "PPP Client Panel 3 keys:\n"
Index: /trunk/BNC/src/bncsinextro.cpp
===================================================================
--- /trunk/BNC/src/bncsinextro.cpp	(revision 10790)
+++ /trunk/BNC/src/bncsinextro.cpp	(revision 10791)
@@ -89,27 +89,4 @@
     corr = settings.value("PPP/corrFile").toString();
   }
-  QString signalPriorities = QString::fromStdString(_opt->_signalPriorities);
-  if (!signalPriorities.size()) {
-    signalPriorities = "G:12&CWPSLX R:12&CP E:1&CBX E:5&QIX C:26&IQX";
-  }
-  QStringList priorList = signalPriorities.split(" ", Qt::SkipEmptyParts);
-  QStringList frqStrList;
-  for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) {
-    t_frequency::type frqType = static_cast<t_frequency::type>(iFreq);
-    char frqSys = t_frequency::toString(frqType)[0];
-    char frqNum = t_frequency::toString(frqType)[1];
-    QStringList hlp;
-    for (int ii = 0; ii < priorList.size(); ii++) {
-      if (priorList[ii].indexOf(":") != -1) {
-        hlp = priorList[ii].split(":", Qt::SkipEmptyParts);
-        if (hlp.size() == 2 && hlp[0].length() == 1 && hlp[0][0] == frqSys) {
-          hlp = hlp[1].split("&", Qt::SkipEmptyParts);
-        }
-        if (hlp.size() == 2 && hlp[0].indexOf(frqNum) != -1) {
-          frqStrList.append(QString("%1%2").arg(frqSys).arg(frqNum));
-        }
-      }
-    }
-  }
 
   _out << "%=TRO 2.00 " << ac.toStdString() << " "
Index: /trunk/BNC/src/bncutils.cpp
===================================================================
--- /trunk/BNC/src/bncutils.cpp	(revision 10790)
+++ /trunk/BNC/src/bncutils.cpp	(revision 10791)
@@ -809,4 +809,25 @@
 //
 //////////////////////////////////////////////////////////////////////////////
+void kalman(const vector<unique_ptr<const RowVector>>& vAA, 
+            const vector<double>& vll, const vector<double>& sigma,
+            SymmetricMatrix& QQ, ColumnVector& xx) {
+
+  unsigned nPar = xx.Nrows();
+  unsigned nObs = vAA.size();
+
+  Matrix         AA(nObs, nPar);
+  ColumnVector   ll(nObs);
+  DiagonalMatrix PP(nObs);
+  for (unsigned iObs = 0; iObs < nObs; ++iObs) {
+    ll[iObs]       = vll[iObs];
+    PP[iObs]       = 1.0 / (sigma[iObs] * sigma[iObs]);
+    const RowVector& row = *vAA[iObs];
+    AA.row(iObs+1) = row;
+  }
+   return kalman(AA, ll, PP, QQ, xx);
+}
+
+//
+//////////////////////////////////////////////////////////////////////////////
 void kalman(const Matrix& AA, const ColumnVector& ll, const DiagonalMatrix& PP,
             SymmetricMatrix& QQ, ColumnVector& xx) {
@@ -1104,2 +1125,8 @@
   };
 };
+
+// 
+////////////////////////////////////////////////////////////////////////////
+double sqrtMod(double val) {
+  return val > 0.0 ? std::sqrt(val) : 0.0;
+}
Index: /trunk/BNC/src/bncutils.h
===================================================================
--- /trunk/BNC/src/bncutils.h	(revision 10790)
+++ /trunk/BNC/src/bncutils.h	(revision 10791)
@@ -137,4 +137,8 @@
                     SymmetricMatrix& QQ, ColumnVector& xx);
 
+void         kalman(const std::vector<std::unique_ptr<const RowVector>>& AA, 
+                    const std::vector<double>& ll, const std::vector<double>& sigma,
+                    SymmetricMatrix& QQ, ColumnVector& xx);
+
 double       djul(long j1, long m1, double tt);
 
@@ -157,4 +161,6 @@
 double       factorial(int n);
 
+double       sqrtMod(double val);
+
 /** Convert RTCM3 lock-time indicator to lock time in seconds
 * depending on input message format. Returns -1 if format is
Index: /trunk/BNC/src/bncwindow.cpp
===================================================================
--- /trunk/BNC/src/bncwindow.cpp	(revision 10790)
+++ /trunk/BNC/src/bncwindow.cpp	(revision 10791)
@@ -102,2544 +102,2563 @@
 bncWindow::bncWindow() {
 
-    const static QPalette paletteWhite(QColor(255, 255, 255));
-    const static QPalette paletteGray(QColor(230, 230, 230));
-
-    _caster = 0;
-    _casterEph = 0;
-
-    _bncFigure = new bncFigure(this);
-    _bncFigureLate = new bncFigureLate(this);
-    _bncFigurePPP = new bncFigurePPP(this);
-
-    connect(BNC_CORE, SIGNAL(newPosition(QByteArray, bncTime, QVector<double>)),
-        _bncFigurePPP, SLOT(slotNewPosition(QByteArray, bncTime, QVector<double>)));
-
-    connect(BNC_CORE, SIGNAL(progressRnxPPP(int)), this, SLOT(slotPostProcessingProgress(int)));
-    connect(BNC_CORE, SIGNAL(finishedRnxPPP()), this, SLOT(slotPostProcessingFinished()));
-
-    _runningRealTime = false;
-    _runningPPP = false;
-    _runningEdit = false;
-    _runningQC = false;
-    _runningSp3Comp = false;
-    _reqcActionComboBox = 0; // necessary for enableStartStop()
-
-    _mapWin = 0;
-
-    int ww = QFontMetrics(this->font()).horizontalAdvance('w');
-
-    static const QStringList labels = QString("account, Streams:   resource loader / mountpoint, decoder, country, lat, long, nmea, ntrip, bytes").split(",");
-
-    setMinimumSize(100 * ww, 70 * ww);
-
-    setWindowTitle(tr("BKG Ntrip Client (BNC) Version " BNCVERSION));
-
-    connect(BNC_CORE, SIGNAL(newMessage(QByteArray, bool)),
-        this, SLOT(slotWindowMessage(QByteArray, bool)));
-
-    // Create Actions
-    // --------------
-    _actHelp = new QAction(tr("&Help Contents"), this);
-    connect(_actHelp, SIGNAL(triggered()), SLOT(slotHelp()));
-
-    _actAbout = new QAction(tr("&About BNC"), this);
-    connect(_actAbout, SIGNAL(triggered()), SLOT(slotAbout()));
-
-    _actFlowchart = new QAction(tr("&Flow Chart"), this);
-    connect(_actFlowchart, SIGNAL(triggered()), SLOT(slotFlowchart()));
-
-    _actFontSel = new QAction(tr("Select &Font"), this);
-    connect(_actFontSel, SIGNAL(triggered()), SLOT(slotFontSel()));
-
-    _actSaveOpt = new QAction(tr("&Reread && Save Configuration"), this);
-    connect(_actSaveOpt, SIGNAL(triggered()), SLOT(slotSaveOptions()));
-
-    _actQuit = new QAction(tr("&Quit"), this);
-    connect(_actQuit, SIGNAL(triggered()), SLOT(close()));
-
-    _actAddMountPoints = new QAction(tr("Add &Stream"), this);
-    connect(_actAddMountPoints, SIGNAL(triggered()), SLOT(slotAddMountPoints()));
-
-    _actDeleteMountPoints = new QAction(tr("&Delete Stream"), this);
-    connect(_actDeleteMountPoints, SIGNAL(triggered()), SLOT(slotDeleteMountPoints()));
-    _actDeleteMountPoints->setEnabled(false);
-
-    _actMapMountPoints = new QAction(tr("&Map"), this);
-    connect(_actMapMountPoints, SIGNAL(triggered()), SLOT(slotMapMountPoints()));
-
-    _actStart = new QAction(tr("Sta&rt"), this);
-    connect(_actStart, SIGNAL(triggered()), SLOT(slotStart()));
-
-    _actStop = new QAction(tr("Sto&p"), this);
-    connect(_actStop, SIGNAL(triggered()), SLOT(slotStop()));
-    connect(_actStop, SIGNAL(triggered()), SLOT(slotMapPPPClosed()));
-
-    _actwhatsthis = new QAction(tr("Help?=Shift+F1"), this);
-    connect(_actwhatsthis, SIGNAL(triggered()), SLOT(slotWhatsThis()));
-
-    CreateMenu();
-    AddToolbar();
-
-    bncSettings settings;
-
-    // Network Options
-    // ---------------
-    _proxyHostLineEdit = new QLineEdit(settings.value("proxyHost").toString());
-    _proxyPortLineEdit = new QLineEdit(settings.value("proxyPort").toString());
-
-    connect(_proxyHostLineEdit, SIGNAL(textChanged(const QString&)),
-        this, SLOT(slotBncTextChanged()));
-
-    _sslCaCertPathLineEdit = new QLineEdit(settings.value("sslCaCertPath").toString());
-    _sslClientCertPathLineEdit = new QLineEdit(settings.value("sslClientCertPath").toString());
-    _sslIgnoreErrorsCheckBox = new QCheckBox();
-    _sslIgnoreErrorsCheckBox->setCheckState(Qt::CheckState(
-        settings.value("sslIgnoreErrors").toInt()));
-
-    // General Options
-    // ---------------
-    _logFileLineEdit = new QLineEdit(settings.value("logFile").toString());
-    _rawOutFileLineEdit = new QLineEdit(settings.value("rawOutFile").toString());
-    _rnxAppendCheckBox = new QCheckBox();
-    _rnxAppendCheckBox->setCheckState(Qt::CheckState(
-        settings.value("rnxAppend").toInt()));
-    _onTheFlyComboBox = new QComboBox();
-    _onTheFlyComboBox->setEditable(false);
-    _onTheFlyComboBox->addItems(QString("no,1 day,1 hour,5 min,1 min").split(","));
-    int go = _onTheFlyComboBox->findText(settings.value("onTheFlyInterval").toString());
-    if (go != -1) {
-        _onTheFlyComboBox->setCurrentIndex(go);
-    }
-    _autoStartCheckBox = new QCheckBox();
-    _autoStartCheckBox->setCheckState(Qt::CheckState(
-        settings.value("autoStart").toInt()));
-
-    // RINEX Observations Options
-    // --------------------------
-    _rnxPathLineEdit = new QLineEdit(settings.value("rnxPath").toString());
-    _rnxIntrComboBox = new QComboBox();
-    _rnxIntrComboBox->setEditable(false);
-    _rnxIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
-    int ii = _rnxIntrComboBox->findText(settings.value("rnxIntr").toString());
-    if (ii != -1) {
-        _rnxIntrComboBox->setCurrentIndex(ii);
-    }
-    _rnxSamplComboBox = new QComboBox();
-    _rnxSamplComboBox->setEditable(false);
-    _rnxSamplComboBox->addItems(QString("0.1 sec,1 sec,5 sec,10 sec,15 sec,30 sec,60 sec").split(","));
-    int ij = _rnxSamplComboBox->findText(settings.value("rnxSampl").toString());
-    if (ij != -1) {
-        _rnxSamplComboBox->setCurrentIndex(ij);
-    }
-    _rnxFileCheckBox = new QCheckBox();
-    _rnxFileCheckBox->setCheckState(Qt::CheckState(settings.value("rnxOnlyWithSKL").toInt()));
-    _rnxSkelExtComboBox = new QComboBox();
-    _rnxSkelExtComboBox->setEditable(false);
-    _rnxSkelExtComboBox->addItems(QString("skl,SKL").split(","));
-    int ik = _rnxSkelExtComboBox->findText(settings.value("rnxSkel").toString());
-    if (ik != -1) {
-        _rnxSkelExtComboBox->setCurrentIndex(ik);
-    }
-    _rnxSkelPathLineEdit = new QLineEdit(settings.value("rnxSkelPath").toString());
-    _rnxScrpLineEdit = new QLineEdit(settings.value("rnxScript").toString());
-    _rnxVersComboBox = new QComboBox();
-    _rnxVersComboBox->setEditable(false);
-    _rnxVersComboBox->addItems(QString("4,3,2").split(","));
-    _rnxVersComboBox->setMaximumWidth(7 * ww);
-    int il = _rnxVersComboBox->findText(settings.value("rnxVersion").toString());
-    if (il != -1) {
-        _rnxVersComboBox->setCurrentIndex(il);
-    }
-    QString hlp = settings.value("rnxV2Priority").toString();
-    if (hlp.isEmpty()) {
-        hlp = "G:12&PWCSLX G:5&IQX R:12&PC R:3&IQX R:46&ABX E:16&BCXZ E:578&IQX J:1&SLXCZ J:26&SLX J:5&IQX C:267&IQX C:18&DPX I:ABCX S:1&C S:5&IQX";
-    }
-    _rnxV2Priority = new QLineEdit(hlp);
-
-    connect(_rnxPathLineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotBncTextChanged()));
-    connect(_rnxSkelPathLineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotBncTextChanged()));
-    connect(_rnxVersComboBox, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(slotBncTextChanged()));
-
-    // RINEX Ephemeris Options
-    // -----------------------
-    _ephPathLineEdit = new QLineEdit(settings.value("ephPath").toString());
-    _ephIntrComboBox = new QComboBox();
-    _ephIntrComboBox->setEditable(false);
-    _ephIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
-    int ji = _ephIntrComboBox->findText(settings.value("ephIntr").toString());
-    if (ji != -1) {
-        _ephIntrComboBox->setCurrentIndex(ji);
-    }
-    _ephOutPortLineEdit = new QLineEdit(settings.value("ephOutPort").toString());
-    _ephVersComboBox = new QComboBox();
-    _ephVersComboBox->setEditable(false);
-    _ephVersComboBox->addItems(QString("4,3,2").split(","));
-    _ephVersComboBox->setMaximumWidth(7 * ww);
-    int jk = _ephVersComboBox->findText(settings.value("ephVersion").toString());
-    if (jk != -1) {
-        _ephVersComboBox->setCurrentIndex(jk);
-    }
-    //_ephFilePerStation = new QCheckBox();
-    //_ephFilePerStation->setCheckState(Qt::CheckState(settings.value("ephFilePerStation").toInt()));
-
-    connect(_ephOutPortLineEdit, SIGNAL(textChanged(const QString&)),
-        this, SLOT(slotBncTextChanged()));
-
-    connect(_ephPathLineEdit, SIGNAL(textChanged(const QString&)),
-        this, SLOT(slotBncTextChanged()));
-
-    // Broadcast Corrections Options
-    // -----------------------------
-    _corrPathLineEdit = new QLineEdit(settings.value("corrPath").toString());
-    _corrIntrComboBox = new QComboBox();
-    _corrIntrComboBox->setEditable(false);
-    _corrIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
-    int bi = _corrIntrComboBox->findText(settings.value("corrIntr").toString());
-    if (bi != -1) {
-        _corrIntrComboBox->setCurrentIndex(bi);
-    }
-    _corrPortLineEdit = new QLineEdit(settings.value("corrPort").toString());
-
-    connect(_corrPathLineEdit, SIGNAL(textChanged(const QString&)),
-        this, SLOT(slotBncTextChanged()));
-
-    connect(_corrPortLineEdit, SIGNAL(textChanged(const QString&)),
-        this, SLOT(slotBncTextChanged()));
-
-    // Feed Engine Options
-    // -------------------
-    _outPortLineEdit = new QLineEdit(settings.value("outPort").toString());
-    _outWaitSpinBox = new QSpinBox();
-    _outWaitSpinBox->setMinimum(0);
-    _outWaitSpinBox->setMaximum(30);
-    _outWaitSpinBox->setSingleStep(1);
-    _outWaitSpinBox->setSuffix(" sec");
-    _outWaitSpinBox->setValue(settings.value("outWait").toInt());
-    _outSamplComboBox = new QComboBox();
-    _outSamplComboBox->addItems(QString("0.1 sec,1 sec,5 sec,10 sec,15 sec,30 sec,60 sec").split(","));
-    int nn = _outSamplComboBox->findText(settings.value("outSampl").toString());
-    if (nn != -1) {
-        _outSamplComboBox->setCurrentIndex(nn);
-    }
-    _outFileLineEdit = new QLineEdit(settings.value("outFile").toString());
-    _outUPortLineEdit = new QLineEdit(settings.value("outUPort").toString());
-    _outLockTimeCheckBox = new QCheckBox();
-    _outLockTimeCheckBox->setCheckState(Qt::CheckState(settings.value("outLockTime").toInt()));
-
-    connect(_outPortLineEdit, SIGNAL(textChanged(const QString&)),
-        this, SLOT(slotBncTextChanged()));
-
-    connect(_outFileLineEdit, SIGNAL(textChanged(const QString&)),
-        this, SLOT(slotBncTextChanged()));
-
-    connect(_outLockTimeCheckBox, SIGNAL(stateChanged(int)),
-        this, SLOT(slotBncTextChanged()));
-
-    // Serial Output Options
-    // ---------------------
-    _serialMountPointLineEdit = new QLineEdit(settings.value("serialMountPoint").toString());
-    _serialPortNameLineEdit = new QLineEdit(settings.value("serialPortName").toString());
-    _serialBaudRateComboBox = new QComboBox();
-    _serialBaudRateComboBox->addItems(QString("110,300,600,"
-        "1200,2400,4800,9600,19200,38400,57600,115200").split(","));
-    int kk = _serialBaudRateComboBox->findText(settings.value("serialBaudRate").toString());
-    if (kk != -1) {
-        _serialBaudRateComboBox->setCurrentIndex(kk);
-    }
-    _serialFlowControlComboBox = new QComboBox();
-    _serialFlowControlComboBox->addItems(QString("OFF,XONXOFF,HARDWARE").split(","));
-    kk = _serialFlowControlComboBox->findText(settings.value("serialFlowControl").toString());
-    if (kk != -1) {
-        _serialFlowControlComboBox->setCurrentIndex(kk);
-    }
-    _serialDataBitsComboBox = new QComboBox();
-    _serialDataBitsComboBox->addItems(QString("5,6,7,8").split(","));
-    kk = _serialDataBitsComboBox->findText(settings.value("serialDataBits").toString());
-    if (kk != -1) {
-        _serialDataBitsComboBox->setCurrentIndex(kk);
-    }
-    _serialParityComboBox = new QComboBox();
-    _serialParityComboBox->addItems(QString("NONE,ODD,EVEN,SPACE").split(","));
-    kk = _serialParityComboBox->findText(settings.value("serialParity").toString());
-    if (kk != -1) {
-        _serialParityComboBox->setCurrentIndex(kk);
-    }
-    _serialStopBitsComboBox = new QComboBox();
-    _serialStopBitsComboBox->addItems(QString("1,2").split(","));
-    kk = _serialStopBitsComboBox->findText(settings.value("serialStopBits").toString());
-    if (kk != -1) {
-        _serialStopBitsComboBox->setCurrentIndex(kk);
-    }
-    _serialAutoNMEAComboBox = new QComboBox();
-    _serialAutoNMEAComboBox->addItems(QString("no,Auto,Manual GPGGA,Manual GNGGA").split(","));
-    kk = _serialAutoNMEAComboBox->findText(settings.value("serialAutoNMEA").toString());
-    if (kk != -1) {
-        _serialAutoNMEAComboBox->setCurrentIndex(kk);
-    }
-    _serialFileNMEALineEdit = new QLineEdit(settings.value("serialFileNMEA").toString());
-    _serialHeightNMEALineEdit = new QLineEdit(settings.value("serialHeightNMEA").toString());
-
-    _serialNMEASamplingSpinBox = new QSpinBox();
-    _serialNMEASamplingSpinBox->setMinimum(0);
-    _serialNMEASamplingSpinBox->setMaximum(300);
-    _serialNMEASamplingSpinBox->setSingleStep(10);
-    _serialNMEASamplingSpinBox->setValue(settings.value("serialNMEASampling").toInt());
-    _serialNMEASamplingSpinBox->setSuffix(" sec");
-
-    connect(_serialMountPointLineEdit, SIGNAL(textChanged(const QString&)),
-        this, SLOT(slotBncTextChanged()));
-
-    connect(_serialAutoNMEAComboBox, SIGNAL(currentIndexChanged(const QString&)),
-        this, SLOT(slotBncTextChanged()));
-
-    // Outages Options
-    // ---------------
-    _adviseObsRateComboBox = new QComboBox();
-    _adviseObsRateComboBox->setEditable(false);
-    _adviseObsRateComboBox->addItems(QString(",0.1 Hz,0.2 Hz,0.5 Hz,1 Hz,5 Hz").split(","));
-    kk = _adviseObsRateComboBox->findText(settings.value("adviseObsRate").toString());
-    if (kk != -1) {
-        _adviseObsRateComboBox->setCurrentIndex(kk);
-    }
-    _adviseFailSpinBox = new QSpinBox();
-    _adviseFailSpinBox->setMinimum(0);
-    _adviseFailSpinBox->setMaximum(60);
-    _adviseFailSpinBox->setSingleStep(1);
-    _adviseFailSpinBox->setSuffix(" min");
-    _adviseFailSpinBox->setValue(settings.value("adviseFail").toInt());
-    _adviseRecoSpinBox = new QSpinBox();
-    _adviseRecoSpinBox->setMinimum(0);
-    _adviseRecoSpinBox->setMaximum(60);
-    _adviseRecoSpinBox->setSingleStep(1);
-    _adviseRecoSpinBox->setSuffix(" min");
-    _adviseRecoSpinBox->setValue(settings.value("adviseReco").toInt());
-    _adviseScriptLineEdit = new QLineEdit(settings.value("adviseScript").toString());
-
-    connect(_adviseObsRateComboBox, SIGNAL(currentIndexChanged(const QString&)),
-        this, SLOT(slotBncTextChanged()));
-
-    // Miscellaneous Options
-    // ---------------------
-    _miscMountLineEdit = new QLineEdit(settings.value("miscMount").toString());
-    _miscPortLineEdit = new QLineEdit(settings.value("miscPort").toString());
-    _miscIntrComboBox = new QComboBox();
-    _miscIntrComboBox->setEditable(false);
-    _miscIntrComboBox->addItems(QString(",2 sec,10 sec,1 min,5 min,15 min,1 hour,6 hours,1 day").split(","));
-    int ll = _miscIntrComboBox->findText(settings.value("miscIntr").toString());
-    if (ll != -1) {
-        _miscIntrComboBox->setCurrentIndex(ll);
-    }
-    _miscScanRTCMCheckBox = new QCheckBox();
-    _miscScanRTCMCheckBox->setCheckState(Qt::CheckState(
-        settings.value("miscScanRTCM").toInt()));
-
-    connect(_miscMountLineEdit, SIGNAL(textChanged(const QString&)),
-        this, SLOT(slotBncTextChanged()));
-
-    // Streams
-    // -------
-    _mountPointsTable = new QTableWidget(0, 9);
-
-    _mountPointsTable->horizontalHeader()->resizeSection(1, 34 * ww);
-    _mountPointsTable->horizontalHeader()->resizeSection(2, 9 * ww);
-    _mountPointsTable->horizontalHeader()->resizeSection(3, 9 * ww);
-    _mountPointsTable->horizontalHeader()->resizeSection(4, 7 * ww);
-    _mountPointsTable->horizontalHeader()->resizeSection(5, 7 * ww);
-    _mountPointsTable->horizontalHeader()->resizeSection(6, 5 * ww);
-    _mountPointsTable->horizontalHeader()->resizeSection(7, 5 * ww);
+  const static QPalette paletteWhite(QColor(255, 255, 255));
+  const static QPalette paletteGray(QColor(230, 230, 230));
+
+  _caster = 0;
+  _casterEph = 0;
+
+  _bncFigure = new bncFigure(this);
+  _bncFigureLate = new bncFigureLate(this);
+  _bncFigurePPP = new bncFigurePPP(this);
+
+  connect(BNC_CORE, SIGNAL(newPosition(QByteArray, bncTime, QVector<double>)),
+          _bncFigurePPP, SLOT(slotNewPosition(QByteArray, bncTime, QVector<double>)));
+
+  connect(BNC_CORE, SIGNAL(progressRnxPPP(int)), this, SLOT(slotPostProcessingProgress(int)));
+  connect(BNC_CORE, SIGNAL(finishedRnxPPP()), this, SLOT(slotPostProcessingFinished()));
+
+  _runningRealTime = false;
+  _runningPPP = false;
+  _runningEdit = false;
+  _runningQC = false;
+  _runningSp3Comp = false;
+  _reqcActionComboBox = 0; // necessary for enableStartStop()
+
+  _mapWin = 0;
+
+  int ww = QFontMetrics(this->font()).horizontalAdvance('w');
+
+  static const QStringList labels = QString("account, Streams:   resource loader / mountpoint, decoder, country, lat, long, nmea, ntrip, bytes").split(",");
+
+  setMinimumSize(100 * ww, 70 * ww);
+
+  setWindowTitle(tr("BKG Ntrip Client (BNC) Version " BNCVERSION));
+
+  connect(BNC_CORE, SIGNAL(newMessage(QByteArray, bool)),
+          this, SLOT(slotWindowMessage(QByteArray, bool)));
+
+  // Create Actions
+  // --------------
+  _actHelp = new QAction(tr("&Help Contents"), this);
+  connect(_actHelp, SIGNAL(triggered()), SLOT(slotHelp()));
+
+  _actAbout = new QAction(tr("&About BNC"), this);
+  connect(_actAbout, SIGNAL(triggered()), SLOT(slotAbout()));
+
+  _actFlowchart = new QAction(tr("&Flow Chart"), this);
+  connect(_actFlowchart, SIGNAL(triggered()), SLOT(slotFlowchart()));
+
+  _actFontSel = new QAction(tr("Select &Font"), this);
+  connect(_actFontSel, SIGNAL(triggered()), SLOT(slotFontSel()));
+
+  _actSaveOpt = new QAction(tr("&Reread && Save Configuration"), this);
+  connect(_actSaveOpt, SIGNAL(triggered()), SLOT(slotSaveOptions()));
+
+  _actQuit = new QAction(tr("&Quit"), this);
+  connect(_actQuit, SIGNAL(triggered()), SLOT(close()));
+
+  _actAddMountPoints = new QAction(tr("Add &Stream"), this);
+  connect(_actAddMountPoints, SIGNAL(triggered()), SLOT(slotAddMountPoints()));
+
+  _actDeleteMountPoints = new QAction(tr("&Delete Stream"), this);
+  connect(_actDeleteMountPoints, SIGNAL(triggered()), SLOT(slotDeleteMountPoints()));
+  _actDeleteMountPoints->setEnabled(false);
+
+  _actMapMountPoints = new QAction(tr("&Map"), this);
+  connect(_actMapMountPoints, SIGNAL(triggered()), SLOT(slotMapMountPoints()));
+
+  _actStart = new QAction(tr("Sta&rt"), this);
+  connect(_actStart, SIGNAL(triggered()), SLOT(slotStart()));
+
+  _actStop = new QAction(tr("Sto&p"), this);
+  connect(_actStop, SIGNAL(triggered()), SLOT(slotStop()));
+  connect(_actStop, SIGNAL(triggered()), SLOT(slotMapPPPClosed()));
+
+  _actwhatsthis = new QAction(tr("Help?=Shift+F1"), this);
+  connect(_actwhatsthis, SIGNAL(triggered()), SLOT(slotWhatsThis()));
+
+  CreateMenu();
+  AddToolbar();
+
+  bncSettings settings;
+
+  // Network Options
+  // ---------------
+  _proxyHostLineEdit = new QLineEdit(settings.value("proxyHost").toString());
+  _proxyPortLineEdit = new QLineEdit(settings.value("proxyPort").toString());
+
+  connect(_proxyHostLineEdit, SIGNAL(textChanged(const QString&)),
+          this, SLOT(slotBncTextChanged()));
+
+  _sslCaCertPathLineEdit = new QLineEdit(settings.value("sslCaCertPath").toString());
+  _sslClientCertPathLineEdit = new QLineEdit(settings.value("sslClientCertPath").toString());
+  _sslIgnoreErrorsCheckBox = new QCheckBox();
+  _sslIgnoreErrorsCheckBox->setCheckState(Qt::CheckState(
+                                                         settings.value("sslIgnoreErrors").toInt()));
+
+  // General Options
+  // ---------------
+  _logFileLineEdit = new QLineEdit(settings.value("logFile").toString());
+  _rawOutFileLineEdit = new QLineEdit(settings.value("rawOutFile").toString());
+  _rnxAppendCheckBox = new QCheckBox();
+  _rnxAppendCheckBox->setCheckState(Qt::CheckState(
+                                                   settings.value("rnxAppend").toInt()));
+  _onTheFlyComboBox = new QComboBox();
+  _onTheFlyComboBox->setEditable(false);
+  _onTheFlyComboBox->addItems(QString("no,1 day,1 hour,5 min,1 min").split(","));
+  int go = _onTheFlyComboBox->findText(settings.value("onTheFlyInterval").toString());
+  if (go != -1) {
+    _onTheFlyComboBox->setCurrentIndex(go);
+  }
+  _autoStartCheckBox = new QCheckBox();
+  _autoStartCheckBox->setCheckState(Qt::CheckState(
+                                                   settings.value("autoStart").toInt()));
+
+  // RINEX Observations Options
+  // --------------------------
+  _rnxPathLineEdit = new QLineEdit(settings.value("rnxPath").toString());
+  _rnxIntrComboBox = new QComboBox();
+  _rnxIntrComboBox->setEditable(false);
+  _rnxIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
+  int ii = _rnxIntrComboBox->findText(settings.value("rnxIntr").toString());
+  if (ii != -1) {
+    _rnxIntrComboBox->setCurrentIndex(ii);
+  }
+  _rnxSamplComboBox = new QComboBox();
+  _rnxSamplComboBox->setEditable(false);
+  _rnxSamplComboBox->addItems(QString("0.1 sec,1 sec,5 sec,10 sec,15 sec,30 sec,60 sec").split(","));
+  int ij = _rnxSamplComboBox->findText(settings.value("rnxSampl").toString());
+  if (ij != -1) {
+    _rnxSamplComboBox->setCurrentIndex(ij);
+  }
+  _rnxFileCheckBox = new QCheckBox();
+  _rnxFileCheckBox->setCheckState(Qt::CheckState(settings.value("rnxOnlyWithSKL").toInt()));
+  _rnxSkelExtComboBox = new QComboBox();
+  _rnxSkelExtComboBox->setEditable(false);
+  _rnxSkelExtComboBox->addItems(QString("skl,SKL").split(","));
+  int ik = _rnxSkelExtComboBox->findText(settings.value("rnxSkel").toString());
+  if (ik != -1) {
+    _rnxSkelExtComboBox->setCurrentIndex(ik);
+  }
+  _rnxSkelPathLineEdit = new QLineEdit(settings.value("rnxSkelPath").toString());
+  _rnxScrpLineEdit = new QLineEdit(settings.value("rnxScript").toString());
+  _rnxVersComboBox = new QComboBox();
+  _rnxVersComboBox->setEditable(false);
+  _rnxVersComboBox->addItems(QString("4,3,2").split(","));
+  _rnxVersComboBox->setMaximumWidth(7 * ww);
+  int il = _rnxVersComboBox->findText(settings.value("rnxVersion").toString());
+  if (il != -1) {
+    _rnxVersComboBox->setCurrentIndex(il);
+  }
+  QString hlp = settings.value("rnxV2Priority").toString();
+  if (hlp.isEmpty()) {
+    hlp = "G:12&PWCSLX G:5&IQX R:12&PC R:3&IQX R:46&ABX E:16&BCXZ E:578&IQX J:1&SLXCZ J:26&SLX J:5&IQX C:267&IQX C:18&DPX I:ABCX S:1&C S:5&IQX";
+  }
+  _rnxV2Priority = new QLineEdit(hlp);
+
+  connect(_rnxPathLineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotBncTextChanged()));
+  connect(_rnxSkelPathLineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotBncTextChanged()));
+  connect(_rnxVersComboBox, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(slotBncTextChanged()));
+
+  // RINEX Ephemeris Options
+  // -----------------------
+  _ephPathLineEdit = new QLineEdit(settings.value("ephPath").toString());
+  _ephIntrComboBox = new QComboBox();
+  _ephIntrComboBox->setEditable(false);
+  _ephIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
+  int ji = _ephIntrComboBox->findText(settings.value("ephIntr").toString());
+  if (ji != -1) {
+    _ephIntrComboBox->setCurrentIndex(ji);
+  }
+  _ephOutPortLineEdit = new QLineEdit(settings.value("ephOutPort").toString());
+  _ephVersComboBox = new QComboBox();
+  _ephVersComboBox->setEditable(false);
+  _ephVersComboBox->addItems(QString("4,3,2").split(","));
+  _ephVersComboBox->setMaximumWidth(7 * ww);
+  int jk = _ephVersComboBox->findText(settings.value("ephVersion").toString());
+  if (jk != -1) {
+    _ephVersComboBox->setCurrentIndex(jk);
+  }
+  //_ephFilePerStation = new QCheckBox();
+  //_ephFilePerStation->setCheckState(Qt::CheckState(settings.value("ephFilePerStation").toInt()));
+
+  connect(_ephOutPortLineEdit, SIGNAL(textChanged(const QString&)),
+          this, SLOT(slotBncTextChanged()));
+
+  connect(_ephPathLineEdit, SIGNAL(textChanged(const QString&)),
+          this, SLOT(slotBncTextChanged()));
+
+  // Broadcast Corrections Options
+  // -----------------------------
+  _corrPathLineEdit = new QLineEdit(settings.value("corrPath").toString());
+  _corrIntrComboBox = new QComboBox();
+  _corrIntrComboBox->setEditable(false);
+  _corrIntrComboBox->addItems(QString("1 min,2 min,5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
+  int bi = _corrIntrComboBox->findText(settings.value("corrIntr").toString());
+  if (bi != -1) {
+    _corrIntrComboBox->setCurrentIndex(bi);
+  }
+  _corrPortLineEdit = new QLineEdit(settings.value("corrPort").toString());
+
+  connect(_corrPathLineEdit, SIGNAL(textChanged(const QString&)),
+          this, SLOT(slotBncTextChanged()));
+
+  connect(_corrPortLineEdit, SIGNAL(textChanged(const QString&)),
+          this, SLOT(slotBncTextChanged()));
+
+  // Feed Engine Options
+  // -------------------
+  _outPortLineEdit = new QLineEdit(settings.value("outPort").toString());
+  _outWaitSpinBox = new QSpinBox();
+  _outWaitSpinBox->setMinimum(0);
+  _outWaitSpinBox->setMaximum(30);
+  _outWaitSpinBox->setSingleStep(1);
+  _outWaitSpinBox->setSuffix(" sec");
+  _outWaitSpinBox->setValue(settings.value("outWait").toInt());
+  _outSamplComboBox = new QComboBox();
+  _outSamplComboBox->addItems(QString("0.1 sec,1 sec,5 sec,10 sec,15 sec,30 sec,60 sec").split(","));
+  int nn = _outSamplComboBox->findText(settings.value("outSampl").toString());
+  if (nn != -1) {
+    _outSamplComboBox->setCurrentIndex(nn);
+  }
+  _outFileLineEdit = new QLineEdit(settings.value("outFile").toString());
+  _outUPortLineEdit = new QLineEdit(settings.value("outUPort").toString());
+  _outLockTimeCheckBox = new QCheckBox();
+  _outLockTimeCheckBox->setCheckState(Qt::CheckState(settings.value("outLockTime").toInt()));
+
+  connect(_outPortLineEdit, SIGNAL(textChanged(const QString&)),
+          this, SLOT(slotBncTextChanged()));
+
+  connect(_outFileLineEdit, SIGNAL(textChanged(const QString&)),
+          this, SLOT(slotBncTextChanged()));
+
+  connect(_outLockTimeCheckBox, SIGNAL(stateChanged(int)),
+          this, SLOT(slotBncTextChanged()));
+
+  // Serial Output Options
+  // ---------------------
+  _serialMountPointLineEdit = new QLineEdit(settings.value("serialMountPoint").toString());
+  _serialPortNameLineEdit = new QLineEdit(settings.value("serialPortName").toString());
+  _serialBaudRateComboBox = new QComboBox();
+  _serialBaudRateComboBox->addItems(QString("110,300,600,"
+                                            "1200,2400,4800,9600,19200,38400,57600,115200").split(","));
+  int kk = _serialBaudRateComboBox->findText(settings.value("serialBaudRate").toString());
+  if (kk != -1) {
+    _serialBaudRateComboBox->setCurrentIndex(kk);
+  }
+  _serialFlowControlComboBox = new QComboBox();
+  _serialFlowControlComboBox->addItems(QString("OFF,XONXOFF,HARDWARE").split(","));
+  kk = _serialFlowControlComboBox->findText(settings.value("serialFlowControl").toString());
+  if (kk != -1) {
+    _serialFlowControlComboBox->setCurrentIndex(kk);
+  }
+  _serialDataBitsComboBox = new QComboBox();
+  _serialDataBitsComboBox->addItems(QString("5,6,7,8").split(","));
+  kk = _serialDataBitsComboBox->findText(settings.value("serialDataBits").toString());
+  if (kk != -1) {
+    _serialDataBitsComboBox->setCurrentIndex(kk);
+  }
+  _serialParityComboBox = new QComboBox();
+  _serialParityComboBox->addItems(QString("NONE,ODD,EVEN,SPACE").split(","));
+  kk = _serialParityComboBox->findText(settings.value("serialParity").toString());
+  if (kk != -1) {
+    _serialParityComboBox->setCurrentIndex(kk);
+  }
+  _serialStopBitsComboBox = new QComboBox();
+  _serialStopBitsComboBox->addItems(QString("1,2").split(","));
+  kk = _serialStopBitsComboBox->findText(settings.value("serialStopBits").toString());
+  if (kk != -1) {
+    _serialStopBitsComboBox->setCurrentIndex(kk);
+  }
+  _serialAutoNMEAComboBox = new QComboBox();
+  _serialAutoNMEAComboBox->addItems(QString("no,Auto,Manual GPGGA,Manual GNGGA").split(","));
+  kk = _serialAutoNMEAComboBox->findText(settings.value("serialAutoNMEA").toString());
+  if (kk != -1) {
+    _serialAutoNMEAComboBox->setCurrentIndex(kk);
+  }
+  _serialFileNMEALineEdit = new QLineEdit(settings.value("serialFileNMEA").toString());
+  _serialHeightNMEALineEdit = new QLineEdit(settings.value("serialHeightNMEA").toString());
+
+  _serialNMEASamplingSpinBox = new QSpinBox();
+  _serialNMEASamplingSpinBox->setMinimum(0);
+  _serialNMEASamplingSpinBox->setMaximum(300);
+  _serialNMEASamplingSpinBox->setSingleStep(10);
+  _serialNMEASamplingSpinBox->setValue(settings.value("serialNMEASampling").toInt());
+  _serialNMEASamplingSpinBox->setSuffix(" sec");
+
+  connect(_serialMountPointLineEdit, SIGNAL(textChanged(const QString&)),
+          this, SLOT(slotBncTextChanged()));
+
+  connect(_serialAutoNMEAComboBox, SIGNAL(currentIndexChanged(const QString&)),
+          this, SLOT(slotBncTextChanged()));
+
+  // Outages Options
+  // ---------------
+  _adviseObsRateComboBox = new QComboBox();
+  _adviseObsRateComboBox->setEditable(false);
+  _adviseObsRateComboBox->addItems(QString(",0.1 Hz,0.2 Hz,0.5 Hz,1 Hz,5 Hz").split(","));
+  kk = _adviseObsRateComboBox->findText(settings.value("adviseObsRate").toString());
+  if (kk != -1) {
+    _adviseObsRateComboBox->setCurrentIndex(kk);
+  }
+  _adviseFailSpinBox = new QSpinBox();
+  _adviseFailSpinBox->setMinimum(0);
+  _adviseFailSpinBox->setMaximum(60);
+  _adviseFailSpinBox->setSingleStep(1);
+  _adviseFailSpinBox->setSuffix(" min");
+  _adviseFailSpinBox->setValue(settings.value("adviseFail").toInt());
+  _adviseRecoSpinBox = new QSpinBox();
+  _adviseRecoSpinBox->setMinimum(0);
+  _adviseRecoSpinBox->setMaximum(60);
+  _adviseRecoSpinBox->setSingleStep(1);
+  _adviseRecoSpinBox->setSuffix(" min");
+  _adviseRecoSpinBox->setValue(settings.value("adviseReco").toInt());
+  _adviseScriptLineEdit = new QLineEdit(settings.value("adviseScript").toString());
+
+  connect(_adviseObsRateComboBox, SIGNAL(currentIndexChanged(const QString&)),
+          this, SLOT(slotBncTextChanged()));
+
+  // Miscellaneous Options
+  // ---------------------
+  _miscMountLineEdit = new QLineEdit(settings.value("miscMount").toString());
+  _miscPortLineEdit = new QLineEdit(settings.value("miscPort").toString());
+  _miscIntrComboBox = new QComboBox();
+  _miscIntrComboBox->setEditable(false);
+  _miscIntrComboBox->addItems(QString(",2 sec,10 sec,1 min,5 min,15 min,1 hour,6 hours,1 day").split(","));
+  int ll = _miscIntrComboBox->findText(settings.value("miscIntr").toString());
+  if (ll != -1) {
+    _miscIntrComboBox->setCurrentIndex(ll);
+  }
+  _miscScanRTCMCheckBox = new QCheckBox();
+  _miscScanRTCMCheckBox->setCheckState(Qt::CheckState(
+                                                      settings.value("miscScanRTCM").toInt()));
+
+  connect(_miscMountLineEdit, SIGNAL(textChanged(const QString&)),
+          this, SLOT(slotBncTextChanged()));
+
+  // Streams
+  // -------
+  _mountPointsTable = new QTableWidget(0, 9);
+
+  _mountPointsTable->horizontalHeader()->resizeSection(1, 34 * ww);
+  _mountPointsTable->horizontalHeader()->resizeSection(2, 9 * ww);
+  _mountPointsTable->horizontalHeader()->resizeSection(3, 9 * ww);
+  _mountPointsTable->horizontalHeader()->resizeSection(4, 7 * ww);
+  _mountPointsTable->horizontalHeader()->resizeSection(5, 7 * ww);
+  _mountPointsTable->horizontalHeader()->resizeSection(6, 5 * ww);
+  _mountPointsTable->horizontalHeader()->resizeSection(7, 5 * ww);
 #if QT_VERSION < 0x050000
-    _mountPointsTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
+  _mountPointsTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
 #else
-    _mountPointsTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive);
+  _mountPointsTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive);
 #endif
-    _mountPointsTable->horizontalHeader()->setStretchLastSection(true);
-    _mountPointsTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
-    _mountPointsTable->setHorizontalHeaderLabels(labels);
-    _mountPointsTable->setGridStyle(Qt::NoPen);
-    _mountPointsTable->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
-    _mountPointsTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
-    _mountPointsTable->setSelectionBehavior(QAbstractItemView::SelectRows);
-    _mountPointsTable->hideColumn(0);
-    _mountPointsTable->hideColumn(3);
-    connect(_mountPointsTable, SIGNAL(itemSelectionChanged()),
-        SLOT(slotSelectionChanged()));
-    populateMountPointsTable();
-
-    _log = new QTextEdit();
-    _log->setReadOnly(true);
-    QFont msFont(""); msFont.setStyleHint(QFont::TypeWriter); // default monospace font
-    _log->setFont(msFont);
-    _log->document()->setMaximumBlockCount(1000);
-
-    // Combine Corrections
-    // -------------------
-    _cmbTable = new QTableWidget(0, 4);
-    _cmbTable->setHorizontalHeaderLabels(QString("Mountpoint, AC Name, Weight Factor, Exclude Satellites").split(","));
-    _cmbTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
-    _cmbTable->setSelectionBehavior(QAbstractItemView::SelectRows);
-    _cmbTable->setMaximumWidth(40 * ww);
-    _cmbTable->horizontalHeader()->resizeSection(0, 10 * ww);
-    _cmbTable->horizontalHeader()->resizeSection(1, 6 * ww);
-    _cmbTable->horizontalHeader()->resizeSection(2, 9 * ww);
-    _cmbTable->horizontalHeader()->resizeSection(3, 9 * ww);
+  _mountPointsTable->horizontalHeader()->setStretchLastSection(true);
+  _mountPointsTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
+  _mountPointsTable->setHorizontalHeaderLabels(labels);
+  _mountPointsTable->setGridStyle(Qt::NoPen);
+  _mountPointsTable->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+  _mountPointsTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
+  _mountPointsTable->setSelectionBehavior(QAbstractItemView::SelectRows);
+  _mountPointsTable->hideColumn(0);
+  _mountPointsTable->hideColumn(3);
+  connect(_mountPointsTable, SIGNAL(itemSelectionChanged()),
+          SLOT(slotSelectionChanged()));
+  populateMountPointsTable();
+
+  _log = new QTextEdit();
+  _log->setReadOnly(true);
+  QFont msFont(""); msFont.setStyleHint(QFont::TypeWriter); // default monospace font
+  _log->setFont(msFont);
+  _log->document()->setMaximumBlockCount(1000);
+
+  // Combine Corrections
+  // -------------------
+  _cmbTable = new QTableWidget(0, 4);
+  _cmbTable->setHorizontalHeaderLabels(QString("Mountpoint, AC Name, Weight Factor, Exclude Satellites").split(","));
+  _cmbTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
+  _cmbTable->setSelectionBehavior(QAbstractItemView::SelectRows);
+  _cmbTable->setMaximumWidth(40 * ww);
+  _cmbTable->horizontalHeader()->resizeSection(0, 10 * ww);
+  _cmbTable->horizontalHeader()->resizeSection(1, 6 * ww);
+  _cmbTable->horizontalHeader()->resizeSection(2, 9 * ww);
+  _cmbTable->horizontalHeader()->resizeSection(3, 9 * ww);
 #if QT_VERSION < 0x050000
-    _cmbTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
+  _cmbTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
 #else
-    _cmbTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive);
+  _cmbTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive);
 #endif
-    _cmbTable->horizontalHeader()->setStretchLastSection(true);
-    _cmbTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
-
-    _cmbMaxresLineEdit = new QLineEdit(settings.value("cmbMaxres").toString());
-    _cmbMaxdisplacementLineEdit = new QLineEdit(settings.value("cmbMaxdisplacement").toString());
-
-    _cmbSamplComboBox = new QComboBox();
-    _cmbSamplComboBox->setEditable(false);
-    _cmbSamplComboBox->addItems(QString("1 sec,2 sec,5 sec,10 sec,15 sec,30 sec,60 sec").split(","));
-    int kl = _cmbSamplComboBox->findText(settings.value("cmbSampl").toString());
-    if (kl != -1) {
-        _cmbSamplComboBox->setCurrentIndex(kl);
-    }
-
-    _cmbLogPath = new QLineEdit(settings.value("cmbLogpath").toString());
-
-    QPushButton* addCmbRowButton = new QPushButton("Add Row");
-    QPushButton* delCmbRowButton = new QPushButton("Delete");
-
-    connect(_cmbTable, SIGNAL(itemSelectionChanged()), SLOT(slotBncTextChanged()));
-
-    _cmbMethodComboBox = new QComboBox();
-    _cmbMethodComboBox->setEditable(false);
-    _cmbMethodComboBox->addItems(QString("Kalman Filter,Single-Epoch").split(","));
-    int cm = _cmbMethodComboBox->findText(settings.value("cmbMethod").toString());
-    if (cm != -1) {
-        _cmbMethodComboBox->setCurrentIndex(cm);
-    }
-
-    int iRow = _cmbTable->rowCount();
-    if (iRow > 0) {
-        enableWidget(true, _cmbMethodComboBox);
-        enableWidget(true, _cmbMaxresLineEdit);
-        enableWidget(true, _cmbMaxdisplacementLineEdit);
-        enableWidget(true, _cmbSamplComboBox);
-        enableWidget(true, _cmbLogPath);
+  _cmbTable->horizontalHeader()->setStretchLastSection(true);
+  _cmbTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
+
+  _cmbMaxresLineEdit = new QLineEdit(settings.value("cmbMaxres").toString());
+  _cmbMaxdisplacementLineEdit = new QLineEdit(settings.value("cmbMaxdisplacement").toString());
+
+  _cmbSamplComboBox = new QComboBox();
+  _cmbSamplComboBox->setEditable(false);
+  _cmbSamplComboBox->addItems(QString("1 sec,2 sec,5 sec,10 sec,15 sec,30 sec,60 sec").split(","));
+  int kl = _cmbSamplComboBox->findText(settings.value("cmbSampl").toString());
+  if (kl != -1) {
+    _cmbSamplComboBox->setCurrentIndex(kl);
+  }
+
+  _cmbLogPath = new QLineEdit(settings.value("cmbLogpath").toString());
+
+  QPushButton* addCmbRowButton = new QPushButton("Add Row");
+  QPushButton* delCmbRowButton = new QPushButton("Delete");
+
+  connect(_cmbTable, SIGNAL(itemSelectionChanged()), SLOT(slotBncTextChanged()));
+
+  _cmbMethodComboBox = new QComboBox();
+  _cmbMethodComboBox->setEditable(false);
+  _cmbMethodComboBox->addItems(QString("Kalman Filter,Single-Epoch").split(","));
+  int cm = _cmbMethodComboBox->findText(settings.value("cmbMethod").toString());
+  if (cm != -1) {
+    _cmbMethodComboBox->setCurrentIndex(cm);
+  }
+
+  int iRow = _cmbTable->rowCount();
+  if (iRow > 0) {
+    enableWidget(true, _cmbMethodComboBox);
+    enableWidget(true, _cmbMaxresLineEdit);
+    enableWidget(true, _cmbMaxdisplacementLineEdit);
+    enableWidget(true, _cmbSamplComboBox);
+    enableWidget(true, _cmbLogPath);
+  }
+  else {
+    enableWidget(false, _cmbMethodComboBox);
+    enableWidget(false, _cmbMaxresLineEdit);
+    enableWidget(false, _cmbMaxdisplacementLineEdit);
+    enableWidget(false, _cmbSamplComboBox);
+    enableWidget(false, _cmbLogPath);
+  }
+  _cmbGpsCheckBox = new QCheckBox();
+  _cmbGpsCheckBox->setCheckState(Qt::CheckState(settings.value("cmbGps").toInt()));
+  _cmbGloCheckBox = new QCheckBox();
+  _cmbGloCheckBox->setCheckState(Qt::CheckState(settings.value("cmbGlo").toInt()));
+  _cmbGalCheckBox = new QCheckBox();
+  _cmbGalCheckBox->setCheckState(Qt::CheckState(settings.value("cmbGal").toInt()));
+  _cmbBdsCheckBox = new QCheckBox();
+  _cmbBdsCheckBox->setCheckState(Qt::CheckState(settings.value("cmbBds").toInt()));
+  _cmbQzssCheckBox = new QCheckBox();
+  _cmbQzssCheckBox->setCheckState(Qt::CheckState(settings.value("cmbQzss").toInt()));
+  _cmbSbasCheckBox = new QCheckBox();
+  _cmbSbasCheckBox->setCheckState(Qt::CheckState(settings.value("cmbSbas").toInt()));
+  _cmbNavicCheckBox = new QCheckBox();
+  _cmbNavicCheckBox->setCheckState(Qt::CheckState(settings.value("cmbNavic").toInt()));
+
+  connect(_cmbGpsCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slotBncTextChanged()));
+  connect(_cmbGloCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slotBncTextChanged()));
+  connect(_cmbGalCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slotBncTextChanged()));
+  connect(_cmbBdsCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slotBncTextChanged()));
+  connect(_cmbQzssCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slotBncTextChanged()));
+  connect(_cmbSbasCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slotBncTextChanged()));
+  connect(_cmbNavicCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slotBncTextChanged()));
+
+  _cmbBsxFile = new qtFileChooser(0, qtFileChooser::File);
+  _cmbBsxFile->setFileName(settings.value("cmbBsxFile").toString());
+
+  // Upload Results
+  // -------------
+  _uploadTable = new QTableWidget(0, 16);
+  _uploadTable->setHorizontalHeaderLabels(QString("Host, Port, Mountpoint, Ntrip, User, Password, System, Format, CoM, SP3 File, RNX File, BSX File, PID, SID, IOD, Bytes").split(","));
+  _uploadTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
+  _uploadTable->setSelectionBehavior(QAbstractItemView::SelectRows);
+  _uploadTable->horizontalHeader()->resizeSection(0, 13 * ww);
+  _uploadTable->horizontalHeader()->resizeSection(1, 5 * ww);
+  _uploadTable->horizontalHeader()->resizeSection(2, 10 * ww);
+  _uploadTable->horizontalHeader()->resizeSection(3, 6 * ww);
+  _uploadTable->horizontalHeader()->resizeSection(4, 8 * ww);
+  _uploadTable->horizontalHeader()->resizeSection(5, 8 * ww);
+  _uploadTable->horizontalHeader()->resizeSection(6, 11 * ww);
+  _uploadTable->horizontalHeader()->resizeSection(7, 11 * ww);
+  _uploadTable->horizontalHeader()->resizeSection(8, 4 * ww);
+  _uploadTable->horizontalHeader()->resizeSection(9, 15 * ww);
+  _uploadTable->horizontalHeader()->resizeSection(10, 15 * ww);
+  _uploadTable->horizontalHeader()->resizeSection(11, 15 * ww);
+  _uploadTable->horizontalHeader()->resizeSection(12, 4 * ww);
+  _uploadTable->horizontalHeader()->resizeSection(13, 4 * ww);
+  _uploadTable->horizontalHeader()->resizeSection(14, 4 * ww);
+  _uploadTable->horizontalHeader()->resizeSection(15, 12 * ww);
+#if QT_VERSION < 0x050000
+  _uploadTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
+#else
+  _uploadTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive);
+#endif
+  _uploadTable->horizontalHeader()->setStretchLastSection(true);
+  _uploadTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
+
+  connect(_uploadTable, SIGNAL(itemSelectionChanged()),
+          SLOT(slotBncTextChanged()));
+
+  QPushButton* addUploadRowButton = new QPushButton("Add Row");
+  QPushButton* delUploadRowButton = new QPushButton("Del Row");
+  QPushButton* setUploadTrafoButton = new QPushButton("Custom Trafo");
+  _uploadIntrComboBox = new QComboBox;
+  _uploadIntrComboBox->setEditable(false);
+  _uploadIntrComboBox->addItems(QString("1 day,1 hour, 30 min,15 min,10 min,5 min,2 min,1 min").split(","));
+  ii = _uploadIntrComboBox->findText(settings.value("uploadIntr").toString());
+  if (ii != -1) {
+    _uploadIntrComboBox->setCurrentIndex(ii);
+  }
+
+  _uploadAntexFile = new qtFileChooser(0, qtFileChooser::File);
+  _uploadAntexFile->setFileName(settings.value("uploadAntexFile").toString());
+
+  _uploadSamplRtcmEphCorrComboBox = new QComboBox();
+  _uploadSamplRtcmEphCorrComboBox->setEditable(false);
+  _uploadSamplRtcmEphCorrComboBox->addItems(QString("0 sec,1 sec,2 sec,5 sec,10 sec,15 sec,30 sec,60 sec").split(","));
+  int pp = _uploadSamplRtcmEphCorrComboBox->findText(settings.value("uploadSamplRtcmEphCorr").toString());
+  if (pp != -1) {
+    _uploadSamplRtcmEphCorrComboBox->setCurrentIndex(pp);
+  }
+
+  _uploadSamplSp3ComboBox = new QComboBox();
+  _uploadSamplSp3ComboBox->setEditable(false);
+  _uploadSamplSp3ComboBox->addItems(QString("0 sec,30 sec,60 sec,300 sec,900 sec").split(","));
+  int oo = _uploadSamplSp3ComboBox->findText(settings.value("uploadSamplSp3").toString());
+  if (oo != -1) {
+    _uploadSamplSp3ComboBox->setCurrentIndex(oo);
+  }
+
+  _uploadSamplClkRnxSpinBox = new QSpinBox;
+  _uploadSamplClkRnxSpinBox->setMinimum(0);
+  _uploadSamplClkRnxSpinBox->setMaximum(60);
+  _uploadSamplClkRnxSpinBox->setSingleStep(5);
+  _uploadSamplClkRnxSpinBox->setMaximumWidth(9 * ww);
+  _uploadSamplClkRnxSpinBox->setValue(settings.value("uploadSamplClkRnx").toInt());
+  _uploadSamplClkRnxSpinBox->setSuffix(" sec");
+
+  _uploadSamplBiaSnxSpinBox = new QSpinBox;
+  _uploadSamplBiaSnxSpinBox->setMinimum(0);
+  _uploadSamplBiaSnxSpinBox->setMaximum(60);
+  _uploadSamplBiaSnxSpinBox->setSingleStep(5);
+  _uploadSamplBiaSnxSpinBox->setMaximumWidth(9 * ww);
+  _uploadSamplBiaSnxSpinBox->setValue(settings.value("uploadSamplBiaSnx").toInt());
+  _uploadSamplBiaSnxSpinBox->setSuffix(" sec");
+
+  int iRowT = _uploadTable->rowCount();
+  if (iRowT > 0) {
+    enableWidget(true, _uploadIntrComboBox);
+    enableWidget(true, _uploadSamplRtcmEphCorrComboBox);
+    enableWidget(true, _uploadSamplSp3ComboBox);
+    enableWidget(true, _uploadSamplClkRnxSpinBox);
+    enableWidget(true, _uploadSamplBiaSnxSpinBox);
+    enableWidget(true, _uploadAntexFile);
+  }
+  else {
+    enableWidget(false, _uploadIntrComboBox);
+    enableWidget(false, _uploadSamplRtcmEphCorrComboBox);
+    enableWidget(false, _uploadSamplSp3ComboBox);
+    enableWidget(false, _uploadSamplClkRnxSpinBox);
+    enableWidget(true, _uploadSamplBiaSnxSpinBox);
+    enableWidget(false, _uploadAntexFile);
+  }
+
+  // Upload RTCM3 Ephemeris
+  // ----------------------
+  _uploadEphTable = new QTableWidget(0, 7);
+  _uploadEphTable->setColumnCount(8);
+  _uploadEphTable->setRowCount(0);
+  _uploadEphTable->setHorizontalHeaderLabels(QString("Host, Port, Mountpoint,  Ntrip, User, Password, System, Bytes").split(","));
+  _uploadEphTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
+  _uploadEphTable->setSelectionBehavior(QAbstractItemView::SelectRows);
+  _uploadEphTable->horizontalHeader()->resizeSection(0, 13 * ww);
+  _uploadEphTable->horizontalHeader()->resizeSection(1, 5 * ww);
+  _uploadEphTable->horizontalHeader()->resizeSection(2, 8 * ww);
+  _uploadEphTable->horizontalHeader()->resizeSection(3, 6 * ww);
+  _uploadEphTable->horizontalHeader()->resizeSection(4, 8 * ww);
+  _uploadEphTable->horizontalHeader()->resizeSection(5, 8 * ww);
+  _uploadEphTable->horizontalHeader()->resizeSection(6, 10 * ww);
+  _uploadEphTable->horizontalHeader()->resizeSection(7, 12 * ww);
+#if QT_VERSION < 0x050000
+  _uploadEphTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
+#else
+  _uploadEphTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive);
+#endif
+  _uploadEphTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
+
+  connect(_uploadEphTable, SIGNAL(itemSelectionChanged()),
+          SLOT(slotBncTextChanged()));
+
+  QPushButton* addUploadEphRowButton = new QPushButton("Add Row");
+  addUploadEphRowButton->setMaximumWidth(9 * ww);
+  QPushButton* delUploadEphRowButton = new QPushButton("Del Row");
+  delUploadEphRowButton->setMaximumWidth(9 * ww);
+
+  _uploadSamplRtcmEphSpinBox = new QSpinBox;
+  _uploadSamplRtcmEphSpinBox->setMinimum(0);
+  _uploadSamplRtcmEphSpinBox->setMaximum(60);
+  _uploadSamplRtcmEphSpinBox->setSingleStep(5);
+  _uploadSamplRtcmEphSpinBox->setMaximumWidth(9 * ww);
+  _uploadSamplRtcmEphSpinBox->setValue(settings.value("uploadSamplRtcmEph").toInt());
+  _uploadSamplRtcmEphSpinBox->setSuffix(" sec");
+
+  iRowT = _uploadEphTable->rowCount();
+  if (iRowT > 0) {
+    enableWidget(true, _uploadSamplRtcmEphSpinBox);
+  }
+  else {
+    enableWidget(false, _uploadSamplRtcmEphSpinBox);
+  }
+
+  // Upload Raw data
+  // ----------------------
+  _uploadRawTable = new QTableWidget(0, 7);
+  _uploadRawTable->setColumnCount(8);
+  _uploadRawTable->setRowCount(0);
+  _uploadRawTable->setHorizontalHeaderLabels(QString("Source Mountpoint, Host, Port, Upload Mountpoint,  Ntrip, User, Password, Bytes").split(","));
+  _uploadRawTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
+  _uploadRawTable->setSelectionBehavior(QAbstractItemView::SelectRows);
+  _uploadRawTable->horizontalHeader()->resizeSection(0, 13 * ww);
+  _uploadRawTable->horizontalHeader()->resizeSection(1, 13 * ww);
+  _uploadRawTable->horizontalHeader()->resizeSection(2, 5 * ww);
+  _uploadRawTable->horizontalHeader()->resizeSection(3, 13 * ww);
+  _uploadRawTable->horizontalHeader()->resizeSection(4, 6 * ww);
+  _uploadRawTable->horizontalHeader()->resizeSection(5, 8 * ww);
+  _uploadRawTable->horizontalHeader()->resizeSection(6, 8 * ww);
+  _uploadRawTable->horizontalHeader()->resizeSection(7, 10 * ww);
+  _uploadRawTable->horizontalHeader()->resizeSection(8, 12 * ww);
+#if QT_VERSION < 0x050000
+  _uploadRawTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
+#else
+  _uploadRawTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive);
+#endif
+  _uploadRawTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
+
+  connect(_uploadRawTable, SIGNAL(itemSelectionChanged()), SLOT(slotBncTextChanged()));
+
+  QPushButton* addUploadRawRowButton = new QPushButton("Add Row");
+  addUploadRawRowButton->setMaximumWidth(9 * ww);
+  QPushButton* delUploadRawRowButton = new QPushButton("Del Row");
+  delUploadRawRowButton->setMaximumWidth(9 * ww);
+
+  // Canvas with Editable Fields
+  // ---------------------------
+  _canvas = new QWidget;
+  setCentralWidget(_canvas);
+
+  _aogroup = new QTabWidget();
+  _aogroup->setElideMode(Qt::ElideNone);
+  _aogroup->setUsesScrollButtons(true);
+  QWidget* pgroup = new QWidget();
+  QWidget* ggroup = new QWidget();
+  QWidget* sgroup = new QWidget();
+  QWidget* egroup = new QWidget();
+  QWidget* agroup = new QWidget();
+  QWidget* cgroup = new QWidget();
+  QWidget* ogroup = new QWidget();
+  QWidget* rgroup = new QWidget();
+  QWidget* sergroup = new QWidget();
+  QWidget* pppGroup1 = new QWidget();
+  QWidget* pppGroup2 = new QWidget();
+  QWidget* pppGroup3 = new QWidget();
+  QWidget* pppGroup4 = new QWidget();
+  QWidget* reqcgroup = new QWidget();
+  QWidget* sp3CompGroup = new QWidget();
+  QWidget* cmbgroup = new QWidget();
+  QWidget* uploadgroup = new QWidget();
+  QWidget* uploadEphgroup = new QWidget();
+  QWidget* uploadRawgroup = new QWidget();
+  _aogroup->addTab(pgroup, tr("Network"));
+  _aogroup->addTab(ggroup, tr("General"));
+  _aogroup->addTab(ogroup, tr("RINEX Observations"));
+  _aogroup->addTab(egroup, tr("RINEX Ephemeris"));
+  _aogroup->addTab(reqcgroup, tr("RINEX Editing && QC"));
+  _aogroup->addTab(sp3CompGroup, tr("SP3 Comparison"));
+  _aogroup->addTab(cgroup, tr("Broadcast Corrections"));
+  _aogroup->addTab(sgroup, tr("Feed Engine"));
+  _aogroup->addTab(sergroup, tr("Serial Output"));
+  _aogroup->addTab(agroup, tr("Outages"));
+  _aogroup->addTab(rgroup, tr("Miscellaneous"));
+  _aogroup->addTab(pppGroup1, tr("PPP (1)"));
+  _aogroup->addTab(pppGroup2, tr("PPP (2)"));
+  _aogroup->addTab(pppGroup3, tr("PPP (3)"));
+  _aogroup->addTab(pppGroup4, tr("PPP (4)"));
+  _aogroup->addTab(cmbgroup, tr("Combine Corrections"));
+  _aogroup->addTab(uploadgroup, tr("Upload Corrections"));
+  _aogroup->addTab(uploadEphgroup, tr("Upload Ephemeris"));
+  _aogroup->addTab(uploadRawgroup, tr("Upload Raw Data"));
+
+  // Log Tab
+  // -------
+  _loggroup = new QTabWidget();
+  _loggroup->addTab(_log, tr("Log"));
+  _loggroup->addTab(_bncFigure, tr("Throughput"));
+  _loggroup->addTab(_bncFigureLate, tr("Latency"));
+  _loggroup->addTab(_bncFigurePPP, tr("PPP Plot"));
+
+  // Netowork (Proxy and SSL) Tab
+  // ----------------------------
+  QGridLayout* pLayout = new QGridLayout;
+  pLayout->setColumnMinimumWidth(0, 13 * ww);
+  _proxyPortLineEdit->setMaximumWidth(9 * ww);
+
+  pLayout->addWidget(new QLabel("Settings for proxy in protected networks and for SSL authorization, leave boxes blank if none.<br>"), 0, 0, 1, 50);
+  pLayout->addWidget(new QLabel("Proxy host"), 1, 0);
+  pLayout->addWidget(_proxyHostLineEdit, 1, 1, 1, 10);
+  pLayout->addWidget(new QLabel("Proxy port"), 2, 0);
+  pLayout->addWidget(_proxyPortLineEdit, 2, 1);
+  pLayout->addWidget(new QLabel("Path to SSL certificates"), 3, 0);
+  pLayout->addWidget(_sslCaCertPathLineEdit, 3, 1, 1, 10);
+  pLayout->addWidget(new QLabel("Default:  " + bncSslConfig::defaultPath()), 3, 11, 1, 20);
+  pLayout->addWidget(new QLabel("Path to SSL client certificates"), 4, 0);
+  pLayout->addWidget(_sslClientCertPathLineEdit, 4, 1, 1, 10);
+  pLayout->addWidget(new QLabel("Ignore SSL authorization errors"), 5, 0);
+  pLayout->addWidget(_sslIgnoreErrorsCheckBox, 5, 1, 1, 10);
+  pLayout->addWidget(new QLabel(""), 6, 1);
+  pLayout->setRowStretch(6, 999);
+
+  pgroup->setLayout(pLayout);
+
+  // General Tab
+  // -----------
+  QGridLayout* gLayout = new QGridLayout;
+  gLayout->setColumnMinimumWidth(0, 14 * ww);
+  _onTheFlyComboBox->setMaximumWidth(9 * ww);
+
+  gLayout->addWidget(new QLabel("General settings for logfile, file handling, configuration on-the-fly, auto-start, and raw file output.<br>"), 0, 0, 1, 50);
+  gLayout->addWidget(new QLabel("Logfile (full path)"), 1, 0);
+  gLayout->addWidget(_logFileLineEdit, 1, 1, 1, 20);
+  gLayout->addWidget(new QLabel("Append files"), 2, 0);
+  gLayout->addWidget(_rnxAppendCheckBox, 2, 1);
+  gLayout->addWidget(new QLabel("Reread configuration"), 3, 0);
+  gLayout->addWidget(_onTheFlyComboBox, 3, 1);
+  gLayout->addWidget(new QLabel("Auto start"), 4, 0);
+  gLayout->addWidget(_autoStartCheckBox, 4, 1);
+  gLayout->addWidget(new QLabel("Raw output file (full path)"), 5, 0);
+  gLayout->addWidget(_rawOutFileLineEdit, 5, 1, 1, 20);
+  gLayout->addWidget(new QLabel(""), 6, 1);
+  gLayout->setRowStretch(7, 999);
+
+  ggroup->setLayout(gLayout);
+
+  // RINEX Observations
+  // ------------------
+  QGridLayout* oLayout = new QGridLayout;
+  oLayout->setColumnMinimumWidth(0, 14 * ww);
+  _rnxIntrComboBox->setMaximumWidth(9 * ww);
+  _rnxSamplComboBox->setMaximumWidth(9 * ww);
+  _rnxSkelExtComboBox->setMaximumWidth(9 * ww);
+
+  oLayout->addWidget(new QLabel("Saving RINEX observation files.<br>"), 0, 0, 1, 50);
+  oLayout->addWidget(new QLabel("Directory"), 1, 0);
+  oLayout->addWidget(_rnxPathLineEdit, 1, 1, 1, 15);
+  oLayout->addWidget(new QLabel("Interval"), 2, 0);
+  oLayout->addWidget(_rnxIntrComboBox, 2, 1);
+  oLayout->addWidget(new QLabel("  Sampling"), 2, 2, Qt::AlignRight);
+  oLayout->addWidget(_rnxSamplComboBox, 2, 3, Qt::AlignRight);
+  oLayout->addWidget(new QLabel("Skeleton extension"), 3, 0);
+  oLayout->addWidget(_rnxSkelExtComboBox, 3, 1, Qt::AlignLeft);
+  oLayout->addWidget(new QLabel("Skeleton mandatory"), 3, 2, Qt::AlignRight);
+  oLayout->addWidget(_rnxFileCheckBox, 3, 3);
+  oLayout->addWidget(new QLabel("Skeleton Directory"), 4, 0);
+  oLayout->addWidget(_rnxSkelPathLineEdit, 4, 1, 1, 15);
+  oLayout->addWidget(new QLabel("Script (full path)"), 5, 0);
+  oLayout->addWidget(_rnxScrpLineEdit, 5, 1, 1, 15);
+  oLayout->addWidget(new QLabel("Version"), 6, 0);
+  oLayout->addWidget(_rnxVersComboBox, 6, 1);
+  oLayout->addWidget(new QLabel("Signal priority"), 6, 2, Qt::AlignRight);
+  oLayout->addWidget(_rnxV2Priority, 6, 3, 1, 13);
+  oLayout->addWidget(new QLabel(""), 7, 1);
+  oLayout->setRowStretch(8, 999);
+
+  ogroup->setLayout(oLayout);
+
+  // RINEX Ephemeris
+  // ---------------
+  QGridLayout* eLayout = new QGridLayout;
+  eLayout->setColumnMinimumWidth(0, 14 * ww);
+  _ephIntrComboBox->setMaximumWidth(9 * ww);
+  _ephOutPortLineEdit->setMaximumWidth(9 * ww);
+
+  eLayout->addWidget(new QLabel("Saving RINEX navigation files and ephemeris output through IP port.<br>"), 0, 0, 1, 70);
+  eLayout->addWidget(new QLabel("Directory"), 1, 0);
+  eLayout->addWidget(_ephPathLineEdit, 1, 1, 1, 30);
+  eLayout->addWidget(new QLabel("Interval"), 2, 0);
+  eLayout->addWidget(_ephIntrComboBox, 2, 1);
+  eLayout->addWidget(new QLabel("Port"), 3, 0);
+  eLayout->addWidget(_ephOutPortLineEdit, 3, 1);
+  eLayout->addWidget(new QLabel("Version"), 4, 0);
+  eLayout->addWidget(_ephVersComboBox, 4, 1);
+  eLayout->setRowStretch(5, 999);
+  //eLayout->addWidget(new QLabel("File per Station"),              5, 0);
+  //eLayout->addWidget(_ephFilePerStation,                          5, 1);
+  //eLayout->setRowStretch(6, 999);
+
+  egroup->setLayout(eLayout);
+
+
+  // Broadcast Corrections
+  // ---------------------
+  QGridLayout* cLayout = new QGridLayout;
+  cLayout->setColumnMinimumWidth(0, 14 * ww);
+  _corrIntrComboBox->setMaximumWidth(9 * ww);
+  _corrPortLineEdit->setMaximumWidth(9 * ww);
+
+  cLayout->addWidget(new QLabel("Saving Broadcast Ephemeris correction files and correction output through IP port.<br>"), 0, 0, 1, 70);
+  cLayout->addWidget(new QLabel("Directory, ASCII"), 1, 0);
+  cLayout->addWidget(_corrPathLineEdit, 1, 1, 1, 30);
+  cLayout->addWidget(new QLabel("Interval"), 2, 0);
+  cLayout->addWidget(_corrIntrComboBox, 2, 1);
+  cLayout->addWidget(new QLabel("Port"), 3, 0);
+  cLayout->addWidget(_corrPortLineEdit, 3, 1);
+  cLayout->addWidget(new QLabel(""), 4, 1);
+  cLayout->setRowStretch(7, 999);
+  cgroup->setLayout(cLayout);
+
+  // Feed Engine
+  // -----------
+  QGridLayout* sLayout = new QGridLayout;
+  sLayout->setColumnMinimumWidth(0, 14 * ww);
+  _outPortLineEdit->setMaximumWidth(9 * ww);
+  _outWaitSpinBox->setMaximumWidth(9 * ww);
+  _outSamplComboBox->setMaximumWidth(9 * ww);
+  _outUPortLineEdit->setMaximumWidth(9 * ww);
+
+  sLayout->addWidget(new QLabel("Output decoded observations in ASCII format to feed a real-time GNSS network engine.<br>"), 0, 0, 1, 50);
+  sLayout->addWidget(new QLabel("Port"), 1, 0);
+  sLayout->addWidget(_outPortLineEdit, 1, 1);
+  sLayout->addWidget(new QLabel("       Wait for full obs epoch"), 1, 2, Qt::AlignRight);
+  sLayout->addWidget(_outWaitSpinBox, 1, 3, Qt::AlignLeft);
+  sLayout->addWidget(new QLabel("Sampling"), 2, 0);
+  sLayout->addWidget(_outSamplComboBox, 2, 1, Qt::AlignLeft);
+  sLayout->addWidget(new QLabel("File (full path)"), 3, 0);
+  sLayout->addWidget(_outFileLineEdit, 3, 1, 1, 10);
+  sLayout->addWidget(new QLabel("Port (unsynchronized)"), 4, 0);
+  sLayout->addWidget(_outUPortLineEdit, 4, 1);
+  sLayout->addWidget(new QLabel("Print lock time"), 5, 0);
+  sLayout->addWidget(_outLockTimeCheckBox, 5, 1);
+  sLayout->addWidget(new QLabel(""), 6, 1);
+  sLayout->setRowStretch(7, 999);
+
+  sgroup->setLayout(sLayout);
+
+  // Serial Output
+  // -------------
+  QGridLayout* serLayout = new QGridLayout;
+  serLayout->setColumnMinimumWidth(0, 12 * ww);
+  _serialBaudRateComboBox->setMaximumWidth(9 * ww);
+  _serialFlowControlComboBox->setMaximumWidth(11 * ww);
+  _serialDataBitsComboBox->setMaximumWidth(5 * ww);
+  _serialParityComboBox->setMaximumWidth(9 * ww);
+  _serialStopBitsComboBox->setMaximumWidth(5 * ww);
+  _serialAutoNMEAComboBox->setMaximumWidth(14 * ww);
+  _serialHeightNMEALineEdit->setMaximumWidth(8 * ww);
+  _serialNMEASamplingSpinBox->setMaximumWidth(8 * ww);
+
+  serLayout->addWidget(new QLabel("Port settings to feed a serial connected receiver.<br>"), 0, 0, 1, 30);
+  serLayout->addWidget(new QLabel("Mountpoint"), 1, 0, Qt::AlignLeft);
+  serLayout->addWidget(_serialMountPointLineEdit, 1, 1, 1, 2);
+  serLayout->addWidget(new QLabel("Port name"), 2, 0, Qt::AlignLeft);
+  serLayout->addWidget(_serialPortNameLineEdit, 2, 1, 1, 2);
+  serLayout->addWidget(new QLabel("Baud rate"), 3, 0, Qt::AlignLeft);
+  serLayout->addWidget(_serialBaudRateComboBox, 3, 1);
+  serLayout->addWidget(new QLabel("Flow control"), 3, 2, Qt::AlignRight);
+  serLayout->addWidget(_serialFlowControlComboBox, 3, 3);
+  serLayout->addWidget(new QLabel("Data bits"), 4, 0, Qt::AlignLeft);
+  serLayout->addWidget(_serialDataBitsComboBox, 4, 1);
+  serLayout->addWidget(new QLabel("Parity"), 4, 2, Qt::AlignRight);
+  serLayout->addWidget(_serialParityComboBox, 4, 3);
+  serLayout->addWidget(new QLabel("   Stop bits"), 4, 4, Qt::AlignRight);
+  serLayout->addWidget(_serialStopBitsComboBox, 4, 5);
+  serLayout->addWidget(new QLabel("NMEA"), 5, 0);
+  serLayout->addWidget(_serialAutoNMEAComboBox, 5, 1);
+  serLayout->addWidget(new QLabel("    File (full path)"), 5, 2, Qt::AlignRight);
+  serLayout->addWidget(_serialFileNMEALineEdit, 5, 3, 1, 10);
+  serLayout->addWidget(new QLabel("Height"), 5, 14, Qt::AlignRight);
+  serLayout->addWidget(_serialHeightNMEALineEdit, 5, 15, 1, 11);
+  serLayout->addWidget(new QLabel("Sampling"), 5, 25, Qt::AlignRight);
+  serLayout->addWidget(_serialNMEASamplingSpinBox, 5, 26, 1, 12);
+  serLayout->addWidget(new QLabel(""), 6, 1);
+  serLayout->setRowStretch(7, 999);
+
+  sergroup->setLayout(serLayout);
+
+  // Outages
+  // -------
+  QGridLayout* aLayout = new QGridLayout;
+  aLayout->setColumnMinimumWidth(0, 14 * ww);
+  _adviseObsRateComboBox->setMaximumWidth(9 * ww);
+  _adviseFailSpinBox->setMaximumWidth(9 * ww);
+  _adviseRecoSpinBox->setMaximumWidth(9 * ww);
+
+  aLayout->addWidget(new QLabel("Failure and recovery reports, advisory notes.<br>"), 0, 0, 1, 50, Qt::AlignLeft);
+  aLayout->addWidget(new QLabel("Observation rate"), 1, 0);
+  aLayout->addWidget(_adviseObsRateComboBox, 1, 1);
+  aLayout->addWidget(new QLabel("Failure threshold"), 2, 0);
+  aLayout->addWidget(_adviseFailSpinBox, 2, 1);
+  aLayout->addWidget(new QLabel("Recovery threshold"), 3, 0);
+  aLayout->addWidget(_adviseRecoSpinBox, 3, 1);
+  aLayout->addWidget(new QLabel("Script (full path)"), 4, 0);
+  aLayout->addWidget(_adviseScriptLineEdit, 4, 1, 1, 20);
+  aLayout->addWidget(new QLabel(""), 5, 1);
+  aLayout->setRowStretch(6, 999);
+
+  agroup->setLayout(aLayout);
+
+  // Miscellaneous
+  // -------------
+  QGridLayout* rLayout = new QGridLayout;
+  rLayout->setColumnMinimumWidth(0, 14 * ww);
+  _miscIntrComboBox->setMaximumWidth(9 * ww);
+  _miscPortLineEdit->setMaximumWidth(9 * ww);
+
+  rLayout->addWidget(new QLabel("Log latencies or scan RTCM streams for message types and antenna information or output raw data through TCP/IP port.<br>"), 0, 0, 1, 50);
+  rLayout->addWidget(new QLabel("Mountpoint"), 1, 0);
+  rLayout->addWidget(_miscMountLineEdit, 1, 1, 1, 7);
+  rLayout->addWidget(new QLabel("Log latency"), 2, 0);
+  rLayout->addWidget(_miscIntrComboBox, 2, 1);
+  rLayout->addWidget(new QLabel("Scan RTCM"), 3, 0);
+  rLayout->addWidget(_miscScanRTCMCheckBox, 3, 1);
+  rLayout->addWidget(new QLabel("Port"), 4, 0);
+  rLayout->addWidget(_miscPortLineEdit, 4, 1);
+  rLayout->addWidget(new QLabel(""), 5, 1);
+  rLayout->setRowStretch(6, 999);
+
+  rgroup->setLayout(rLayout);
+
+  // PPP
+  // ---
+  _pppWidgets._dataSource->setMaximumWidth(15 * ww);
+  _pppWidgets._corrMount->setMaximumWidth(15 * ww);
+  _pppWidgets._biasMount->setMaximumWidth(15 * ww);
+  _pppWidgets._nmeaPath->setMaximumWidth(35 * ww);
+  _pppWidgets._logPath->setMaximumWidth(15 * ww);
+  _pppWidgets._snxtroPath->setMaximumWidth(35 * ww);
+  _pppWidgets._snxtroIntr->setMaximumWidth(7 * ww);
+  _pppWidgets._snxtroAc->setMaximumWidth(7 * ww);
+  _pppWidgets._snxtroSolId->setMaximumWidth(7 * ww);
+  _pppWidgets._snxtroSolType->setMaximumWidth(7 * ww);
+  _pppWidgets._snxtroCampId->setMaximumWidth(7 * ww);
+  _pppWidgets._ionoMount->setMaximumWidth(15 * ww);
+
+
+  QGridLayout* pppLayout1 = new QGridLayout();
+  int ir = 0;
+  pppLayout1->addWidget(new QLabel("Precise Point Positioning - Input and Output.<br>"), ir, 0, 1, 7, Qt::AlignLeft);
+  ++ir;
+  pppLayout1->addWidget(new QLabel("Data source"), ir, 0);
+  pppLayout1->addWidget(_pppWidgets._dataSource, ir, 1);
+  pppLayout1->addWidget(new QLabel("   Logfile directory"), ir, 4);
+  pppLayout1->addWidget(_pppWidgets._logPath, ir, 5, 1, 2);
+  pppLayout1->addWidget(_pppWidgets._logMode, ir, 7);
+  ++ir;
+  pppLayout1->addWidget(new QLabel("Corrections stream"), ir, 0);
+  pppLayout1->addWidget(_pppWidgets._corrMount, ir, 1);
+  pppLayout1->addWidget(new QLabel("Corrections file"), ir, 2);
+  pppLayout1->addWidget(_pppWidgets._corrFile, ir, 3);
+  pppLayout1->addWidget(new QLabel("   NMEA directory"), ir, 4);
+  pppLayout1->addWidget(_pppWidgets._nmeaPath, ir, 5, 1, 3);
+  ++ir;
+  pppLayout1->addWidget(new QLabel("Biases stream"), ir, 0);
+  pppLayout1->addWidget(_pppWidgets._biasMount, ir, 1);
+  pppLayout1->addWidget(new QLabel("Biases file"), ir, 2);
+  pppLayout1->addWidget(_pppWidgets._biasFile, ir, 3);
+  pppLayout1->addWidget(new QLabel("   SNX TRO directory"), ir, 4);
+  pppLayout1->addWidget(_pppWidgets._snxtroPath, ir, 5, 1, 3);
+  ++ir;
+  pppLayout1->addWidget(new QLabel("Ionosphere stream"), ir, 0);
+  pppLayout1->addWidget(_pppWidgets._ionoMount, ir, 1);
+  pppLayout1->addWidget(new QLabel("Ionosphere file"), ir, 2);
+  pppLayout1->addWidget(_pppWidgets._ionoFile, ir, 3);
+  pppLayout1->addWidget(new QLabel("   SNX TRO interval"), ir, 4);
+  pppLayout1->addWidget(_pppWidgets._snxtroIntr, ir, 5);
+  pppLayout1->addWidget(new QLabel("   SNX TRO sampling"), ir, 6);
+  pppLayout1->addWidget(_pppWidgets._snxtroSampl, ir, 7, Qt::AlignRight);
+  ++ir;
+  pppLayout1->addWidget(new QLabel("RINEX Obs file"), ir, 0);
+  pppLayout1->addWidget(_pppWidgets._rinexObs, ir, 1);
+  pppLayout1->addWidget(new QLabel("RINEX Nav file"), ir, 2);
+  pppLayout1->addWidget(_pppWidgets._rinexNav, ir, 3);
+  pppLayout1->addWidget(new QLabel("   SNX TRO AC"), ir, 4);
+  pppLayout1->addWidget(_pppWidgets._snxtroAc, ir, 5);
+  pppLayout1->addWidget(new QLabel("   SNX TRO solution ID"), ir, 6);
+  pppLayout1->addWidget(_pppWidgets._snxtroSolId, ir, 7, Qt::AlignRight);
+  ++ir;
+  pppLayout1->addWidget(new QLabel("ANTEX file"), ir, 0);
+  pppLayout1->addWidget(_pppWidgets._antexFile, ir, 1);
+  pppLayout1->addWidget(new QLabel("Coordinates file"), ir, 2);
+  pppLayout1->addWidget(_pppWidgets._crdFile, ir, 3);
+  pppLayout1->addWidget(new QLabel("   SNX TRO campaign ID"), ir, 4);
+  pppLayout1->addWidget(_pppWidgets._snxtroCampId, ir, 5);
+  pppLayout1->addWidget(new QLabel("   SNX TRO solution type"), ir, 6);
+  pppLayout1->addWidget(_pppWidgets._snxtroSolType, ir, 7, Qt::AlignRight);
+  ++ir;
+  pppLayout1->addWidget(new QLabel("BLQ file"), ir, 0);
+  pppLayout1->addWidget(_pppWidgets._blqFile, ir, 1);
+
+  pppLayout1->setRowStretch(ir + 1, 999);
+  pppGroup1->setLayout(pppLayout1);
+
+  QGridLayout* pppLayout2 = new QGridLayout();
+  ir = 0;
+  pppLayout2->addWidget(new QLabel("Precise Point Positioning - Options.<br>"), ir, 0, 1, 2, Qt::AlignLeft);
+  ++ir;
+  pppLayout2->addWidget(new QLabel("GPS LCs"), ir, 0, Qt::AlignLeft);
+  pppLayout2->addWidget(_pppWidgets._lcGPS, ir, 1);
+  pppLayout2->addItem(new QSpacerItem(8 * ww, 0), ir, 2);
+  pppLayout2->addWidget(new QLabel("Sigma C1"), ir, 3, Qt::AlignLeft);
+  pppLayout2->addWidget(_pppWidgets._sigmaC1, ir, 4); _pppWidgets._sigmaC1->setMaximumWidth(8 * ww);
+  pppLayout2->addItem(new QSpacerItem(8 * ww, 0), ir, 5);
+  pppLayout2->addWidget(new QLabel("Sigma L1"), ir, 6, Qt::AlignLeft);
+  pppLayout2->addWidget(_pppWidgets._sigmaL1, ir, 7); _pppWidgets._sigmaL1->setMaximumWidth(8 * ww);
+  ++ir;
+  pppLayout2->addWidget(new QLabel("GLONASS LCs"), ir, 0, Qt::AlignLeft);
+  pppLayout2->addWidget(_pppWidgets._lcGLONASS, ir, 1);
+  pppLayout2->addWidget(new QLabel("Max Res C1"), ir, 3, Qt::AlignLeft);
+  pppLayout2->addWidget(_pppWidgets._maxResC1, ir, 4); _pppWidgets._maxResC1->setMaximumWidth(8 * ww);
+  pppLayout2->addWidget(new QLabel("Max Res L1"), ir, 6, Qt::AlignLeft);
+  pppLayout2->addWidget(_pppWidgets._maxResL1, ir, 7); _pppWidgets._maxResL1->setMaximumWidth(8 * ww);
+  ++ir;
+  pppLayout2->addWidget(new QLabel("Galileo LCs"), ir, 0, Qt::AlignLeft);
+  pppLayout2->addWidget(_pppWidgets._lcGalileo, ir, 1);
+  pppLayout2->addWidget(new QLabel("Ele Wgt Code"), ir, 3, Qt::AlignLeft);
+  pppLayout2->addWidget(_pppWidgets._eleWgtCode, ir, 4);
+  pppLayout2->addWidget(new QLabel("Ele Wgt Phase"), ir, 6, Qt::AlignLeft);
+  pppLayout2->addWidget(_pppWidgets._eleWgtPhase, ir, 7);
+  ++ir;
+  pppLayout2->addWidget(new QLabel("BDS LCs"), ir, 0, Qt::AlignLeft);
+  pppLayout2->addWidget(_pppWidgets._lcBDS, ir, 1);
+  pppLayout2->addWidget(new QLabel("Min # of Obs"), ir, 3, Qt::AlignLeft);
+  pppLayout2->addWidget(_pppWidgets._minObs, ir, 4);
+  pppLayout2->addWidget(new QLabel("Min Elevation"), ir, 6, Qt::AlignLeft);
+  pppLayout2->addWidget(_pppWidgets._minEle, ir, 7); _pppWidgets._minEle->setMaximumWidth(8 * ww);
+  ++ir;
+  pppLayout2->addWidget(new QLabel("Constraints"), ir, 0, Qt::AlignLeft);
+  pppLayout2->addWidget(_pppWidgets._constraints, ir, 1);
+  pppLayout2->addWidget(new QLabel("Sigma GIM"), ir, 3, Qt::AlignLeft);
+  pppLayout2->addWidget(_pppWidgets._sigmaGIM, ir, 4); _pppWidgets._sigmaGIM->setMaximumWidth(8 * ww);
+  pppLayout2->addItem(new QSpacerItem(8 * ww, 0), ir, 5);
+  pppLayout2->addWidget(new QLabel("Wait for clock corr."), ir, 6, Qt::AlignLeft);
+  pppLayout2->addWidget(_pppWidgets._corrWaitTime, ir, 7);
+  ++ir;
+  pppLayout2->addItem(new QSpacerItem(8 * ww, 0), ir, 2);
+  pppLayout2->addWidget(new QLabel("Max Res GIM"), ir, 3, Qt::AlignLeft);
+  pppLayout2->addWidget(_pppWidgets._maxResGIM, ir, 4); _pppWidgets._maxResGIM->setMaximumWidth(8 * ww);
+  pppLayout2->addWidget(new QLabel("Seeding (sec)"), ir, 6, Qt::AlignLeft);
+  pppLayout2->addWidget(_pppWidgets._seedingTime, ir, 7); _pppWidgets._seedingTime->setMaximumWidth(8 * ww);
+  ++ir;
+  QFrame* hLine = new QFrame();
+  hLine->setFrameShape(QFrame::HLine);
+  hLine->setFrameShadow(QFrame::Sunken);
+  pppLayout2->addWidget(hLine, ir, 0, 2, 8);
+  ++ir;
+  ++ir;
+  pppLayout2->addWidget(new QLabel("Amb. Res."), ir, 0);
+  QHBoxLayout* pL1 = new QHBoxLayout();
+  pL1->setSpacing(0);
+  pL1->setContentsMargins(0,0,0,0);
+  pL1->addWidget(new QLabel("GPS"));
+  pL1->addWidget(_pppWidgets._arGPS);
+  QHBoxLayout* pL2 = new QHBoxLayout();
+  pL2->setSpacing(0);
+  pL2->setContentsMargins(0,0,0,0);
+  pL2->addWidget(new QLabel("Gal"));
+  pL2->addWidget(_pppWidgets._arGalileo);
+  QHBoxLayout* pL3 = new QHBoxLayout();
+  pL3->setSpacing(0);
+  pL3->setContentsMargins(0,0,0,0);
+  pL3->addWidget(new QLabel("BDS"));
+  pL3->addWidget(_pppWidgets._arBDS);
+  QHBoxLayout* arLayout = new QHBoxLayout();
+  arLayout->addLayout(pL1);
+  arLayout->addLayout(pL2);
+  arLayout->addLayout(pL3);
+  pppLayout2->addLayout(arLayout, ir, 1);
+  ++ir;
+  _pppWidgets._arMinNumEpo->setMaximumWidth(8 * ww);
+  _pppWidgets._arMinNumSat->setMaximumWidth(8 * ww);
+  _pppWidgets._arMaxFrac->setMaximumWidth(8 * ww);
+  _pppWidgets._arMaxSig->setMaximumWidth(8 * ww);
+  QHBoxLayout* pAR = new QHBoxLayout();
+  pAR->addWidget(new QLabel("Min # Epo"));
+  pAR->addWidget(_pppWidgets._arMinNumEpo);
+  pAR->addStretch();
+  pAR->addWidget(new QLabel("Min # Sat"));
+  pAR->addWidget(_pppWidgets._arMinNumSat);
+  pAR->addStretch();
+  pAR->addWidget(new QLabel("Max Frac"));
+  pAR->addWidget(_pppWidgets._arMaxFrac);
+  pAR->addStretch();
+  pAR->addWidget(new QLabel("Max Sig"));
+  pAR->addWidget(_pppWidgets._arMaxSig);
+  pAR->addStretch();
+  pAR->addWidget(new QLabel("Use Yaw"));
+  pAR->addWidget(_pppWidgets._arUseYaw);
+  pppLayout2->addLayout(pAR, ir, 0, 1, 8);
+  ++ir;
+  pppLayout2->addWidget(new QLabel(""), ir, 8);
+  pppLayout2->setColumnStretch(8, 999);
+  
+  pppGroup2->setLayout(pppLayout2);
+
+  QVBoxLayout* pppLayout3 = new QVBoxLayout();
+  pppLayout3->addWidget(new QLabel("Precise Point Positioning - Processed Stations.<br>"));
+  pppLayout3->addWidget(_pppWidgets._staTable, 99);
+  QHBoxLayout* pppLayout3sub = new QHBoxLayout();
+  pppLayout3sub->addWidget(_pppWidgets._addStaButton);
+  pppLayout3sub->addWidget(_pppWidgets._delStaButton);
+  pppLayout3sub->addStretch(99);
+
+  pppLayout3->addLayout(pppLayout3sub);
+
+  pppGroup3->setLayout(pppLayout3);
+
+  // ------------------------
+  connect(_pppWidgets._mapWinButton, SIGNAL(clicked()), SLOT(slotMapPPP()));
+  _pppWidgets._mapSpeedSlider->setMinimumWidth(33 * ww);
+  _pppWidgets._audioResponse->setMaximumWidth(8 * ww);
+
+  QGridLayout* pppLayout4 = new QGridLayout();
+  ir = 0;
+  pppLayout4->addWidget(new QLabel("Precise Point Positioning - Plots.<br>"), ir, 0, 1, 50, Qt::AlignLeft);
+  ++ir;
+  pppLayout4->addWidget(new QLabel("PPP Plot"), ir, 0, Qt::AlignLeft);
+  pppLayout4->addWidget(_pppWidgets._plotCoordinates, ir, 1, Qt::AlignLeft);
+  pppLayout4->addWidget(new QLabel("Mountpoint"), ir, 2, 1, 10, Qt::AlignLeft);
+  pppLayout4->addWidget(_pppWidgets._audioResponse, ir, 4, Qt::AlignLeft);
+  pppLayout4->addWidget(new QLabel("Audio response"), ir, 5, Qt::AlignRight);
+  ++ir;
+  pppLayout4->addWidget(new QLabel("Track map"), ir, 0, Qt::AlignLeft);
+  pppLayout4->addWidget(_pppWidgets._mapWinButton, ir, 1, Qt::AlignLeft);
+  ++ir;
+  pppLayout4->addWidget(new QLabel("Dot-properties"), ir, 0, Qt::AlignLeft);
+  pppLayout4->addWidget(_pppWidgets._mapWinDotSize, ir, 1, Qt::AlignLeft);
+  pppLayout4->addWidget(new QLabel("Size    "), ir, 2, Qt::AlignLeft);
+  pppLayout4->addWidget(_pppWidgets._mapWinDotColor, ir, 3, Qt::AlignLeft);
+  pppLayout4->addWidget(new QLabel("Color"), ir, 4, Qt::AlignLeft);
+  ++ir;
+  pppLayout4->addWidget(new QLabel("Post-processing speed"), ir, 0, Qt::AlignLeft);
+  pppLayout4->addWidget(_pppWidgets._mapSpeedSlider, ir, 1, 1, 20, Qt::AlignLeft);
+  ++ir;
+  pppLayout4->addWidget(new QLabel(""), ir, 1);
+  pppLayout4->setRowStretch(ir, 999);
+
+  pppGroup4->setLayout(pppLayout4);
+
+  // Reqc Processing
+  // ---------------
+  _reqcActionComboBox = new QComboBox();
+  _reqcActionComboBox->setEditable(false);
+  _reqcActionComboBox->addItems(QString(",Edit/Concatenate,Analyze").split(","));
+  int ip = _reqcActionComboBox->findText(settings.value("reqcAction").toString());
+  if (ip != -1) {
+    _reqcActionComboBox->setCurrentIndex(ip);
+  }
+  connect(_reqcActionComboBox, SIGNAL(currentIndexChanged(const QString&)),
+          this, SLOT(slotBncTextChanged()));
+
+  QGridLayout* reqcLayout = new QGridLayout;
+  _reqcActionComboBox->setMinimumWidth(15 * ww);
+  _reqcActionComboBox->setMaximumWidth(20 * ww);
+
+  _reqcObsFileChooser = new qtFileChooser(0, qtFileChooser::Files);
+  _reqcObsFileChooser->setFileName(settings.value("reqcObsFile").toString());
+
+  _reqcNavFileChooser = new qtFileChooser(0, qtFileChooser::Files);
+  _reqcNavFileChooser->setFileName(settings.value("reqcNavFile").toString());
+  _reqcOutObsLineEdit = new QLineEdit(settings.value("reqcOutObsFile").toString());
+  _reqcOutNavLineEdit = new QLineEdit(settings.value("reqcOutNavFile").toString());
+  _reqcOutLogLineEdit = new QLineEdit(settings.value("reqcOutLogFile").toString());
+  _reqcPlotDirLineEdit = new QLineEdit(settings.value("reqcPlotDir").toString());
+  _reqcSkyPlotSignals = new QLineEdit(settings.value("reqcSkyPlotSignals").toString());
+
+  connect(_reqcSkyPlotSignals, SIGNAL(textChanged(const QString&)),
+          this, SLOT(slotBncTextChanged()));
+
+  _reqcLogSummaryOnly = new QCheckBox();
+  _reqcLogSummaryOnly->setCheckState(Qt::CheckState(settings.value("reqcLogSummaryOnly").toInt()));
+
+  ir = 0;
+  reqcLayout->addWidget(new QLabel("RINEX file editing, concatenation and quality check.<br>"), ir, 0, 1, 8);
+  ++ir;
+  reqcLayout->addWidget(new QLabel("Action"), ir, 0);
+  reqcLayout->addWidget(_reqcActionComboBox, ir, 1);
+  _reqcEditOptionButton = new QPushButton("Set Edit Options");
+  _reqcEditOptionButton->setMinimumWidth(15 * ww);
+  _reqcEditOptionButton->setMaximumWidth(20 * ww);
+
+  reqcLayout->addWidget(_reqcEditOptionButton, ir, 3);
+  ++ir;
+  reqcLayout->addWidget(new QLabel("Input files (full path)"), ir, 0);
+  reqcLayout->addWidget(_reqcObsFileChooser, ir, 1);
+  _reqcObsFileChooser->setMaximumWidth(40 * ww);
+  reqcLayout->addWidget(new QLabel("  Obs"), ir, 2);
+  reqcLayout->addWidget(_reqcNavFileChooser, ir, 3);
+  _reqcNavFileChooser->setMaximumWidth(40 * ww);
+  reqcLayout->addWidget(new QLabel("  Nav"), ir, 4);
+  ++ir;
+  reqcLayout->addWidget(new QLabel("Output file (full path)"), ir, 0);
+  reqcLayout->addWidget(_reqcOutObsLineEdit, ir, 1);
+  _reqcOutObsLineEdit->setMaximumWidth(40 * ww);
+  reqcLayout->addWidget(new QLabel("  Obs"), ir, 2);
+  reqcLayout->addWidget(_reqcOutNavLineEdit, ir, 3);
+  _reqcOutNavLineEdit->setMaximumWidth(40 * ww);
+  reqcLayout->addWidget(new QLabel("  Nav"), ir, 4);
+  ++ir;
+  reqcLayout->addWidget(new QLabel("Logfile"), ir, 0);
+  reqcLayout->addWidget(_reqcOutLogLineEdit, ir, 1);
+  _reqcOutLogLineEdit->setMaximumWidth(40 * ww);
+  reqcLayout->addWidget(new QLabel("  Summary only"), ir, 2);
+  reqcLayout->addWidget(_reqcLogSummaryOnly, ir, 3);
+  ++ir;
+  reqcLayout->addWidget(new QLabel("Plots for signals"), ir, 0);
+  reqcLayout->addWidget(_reqcSkyPlotSignals, ir, 1);
+  _reqcSkyPlotSignals->setMaximumWidth(40 * ww);
+  ++ir;
+  reqcLayout->addWidget(new QLabel("Directory for plots"), ir, 0);
+  reqcLayout->addWidget(_reqcPlotDirLineEdit, ir, 1);
+  _reqcPlotDirLineEdit->setMaximumWidth(40 * ww);
+  ++ir;
+  reqcLayout->setRowStretch(ir, 999);
+
+  reqcLayout->setColumnMinimumWidth(2, 8 * ww);
+  reqcLayout->setColumnMinimumWidth(4, 8 * ww);
+
+  reqcgroup->setLayout(reqcLayout);
+
+  connect(_reqcEditOptionButton, SIGNAL(clicked()),
+          this, SLOT(slotReqcEditOption()));
+
+  QGridLayout* sp3CompLayout = new QGridLayout;
+
+  _sp3CompFileChooser = new qtFileChooser(0, qtFileChooser::Files);
+  _sp3CompFileChooser->setFileName(settings.value("sp3CompFile").toString());
+  _sp3CompFileChooser->setMinimumWidth(15 * ww);
+  _sp3CompFileChooser->setMaximumWidth(40 * ww);
+
+  _sp3CompExclude = new QLineEdit(settings.value("sp3CompExclude").toString());
+  _sp3CompExclude->setMinimumWidth(18 * ww);
+  _sp3CompExclude->setMaximumWidth(18 * ww);
+
+  _sp3CompLogLineEdit = new QLineEdit(settings.value("sp3CompOutLogFile").toString());
+  _sp3CompLogLineEdit->setMinimumWidth(18 * ww);
+  _sp3CompLogLineEdit->setMaximumWidth(18 * ww);
+
+  _sp3CompSummaryOnly = new QCheckBox();
+  _sp3CompSummaryOnly->setCheckState(Qt::CheckState(settings.value("sp3CompSummaryOnly").toInt()));
+
+  ir = 0;
+  sp3CompLayout->addWidget(new QLabel("Orbit and clock comparison.<br>"), ir, 0, 1, 40);
+  ++ir;
+  sp3CompLayout->addWidget(new QLabel("Input SP3 files (full path)"), ir, 0, Qt::AlignLeft);
+  sp3CompLayout->addWidget(_sp3CompFileChooser, ir, 1, 1, 20);
+  ++ir;
+  sp3CompLayout->addWidget(new QLabel("Exclude satellites"), ir, 0, Qt::AlignLeft);
+  sp3CompLayout->addWidget(_sp3CompExclude, ir, 1, Qt::AlignRight);
+  ++ir;
+  sp3CompLayout->addWidget(new QLabel("Logfile"), ir, 0, Qt::AlignLeft);
+  sp3CompLayout->addWidget(_sp3CompLogLineEdit, ir, 1, Qt::AlignRight);
+  ++ir;
+  sp3CompLayout->addWidget(new QLabel("Summary only"), ir, 0);
+  sp3CompLayout->addWidget(_sp3CompSummaryOnly, ir, 1);
+  ++ir;
+  sp3CompLayout->addWidget(new QLabel(""), ir, 1);
+  ++ir;
+  sp3CompLayout->setRowStretch(ir, 999);
+
+  sp3CompLayout->setColumnMinimumWidth(2, 8 * ww);
+  sp3CompLayout->setColumnMinimumWidth(4, 8 * ww);
+
+  sp3CompGroup->setLayout(sp3CompLayout);
+
+  connect(_sp3CompFileChooser, SIGNAL(fileNameChanged(const QString&)),
+          this, SLOT(slotBncTextChanged()));
+
+  // Combine Corrections
+  // -------------------
+  QGridLayout* cmbLayout = new QGridLayout;
+
+  populateCmbTable();
+  cmbLayout->addWidget(_cmbTable, 0, 0, 8, 10);
+  cmbLayout->addWidget(new QLabel(" Combine Broadcast Correction streams"), 0, 10, 1, 10);
+  cmbLayout->addWidget(addCmbRowButton, 1, 10);
+  cmbLayout->addWidget(delCmbRowButton, 1, 11);
+  cmbLayout->addWidget(new QLabel("Method"), 2, 10, Qt::AlignLeft);
+  cmbLayout->addWidget(_cmbMethodComboBox, 2, 11);
+  cmbLayout->addWidget(new QLabel("BSX File"), 3, 10, Qt::AlignLeft);
+  cmbLayout->addWidget(_cmbBsxFile, 3, 11, Qt::AlignRight);
+  cmbLayout->addWidget(new QLabel("Max Clk Residual"), 4, 10, Qt::AlignLeft);
+  cmbLayout->addWidget(_cmbMaxresLineEdit, 4, 11, Qt::AlignRight);
+  cmbLayout->addWidget(new QLabel("Max Orb Displacement"), 5, 10, Qt::AlignLeft);
+  cmbLayout->addWidget(_cmbMaxdisplacementLineEdit, 5, 11, Qt::AlignRight);
+  cmbLayout->addWidget(new QLabel("Logfile directory"), 6, 10, Qt::AlignLeft);
+  cmbLayout->addWidget(_cmbLogPath, 6, 11, Qt::AlignRight);
+  cmbLayout->addWidget(new QLabel("Sampling"), 7, 10, Qt::AlignLeft);
+  cmbLayout->addWidget(_cmbSamplComboBox, 7, 11, Qt::AlignRight);
+
+
+  cmbLayout->addWidget(new QLabel("GNSS"), 0, 14, Qt::AlignLeft);
+  cmbLayout->addWidget(new QLabel("GPS (C1W/C2W)"), 1, 14);
+  cmbLayout->addWidget(_cmbGpsCheckBox, 1, 15);
+
+  cmbLayout->addWidget(new QLabel("GLONASS (C1P/C2P)"), 2, 14);
+  cmbLayout->addWidget(_cmbGloCheckBox, 2, 15);
+
+  cmbLayout->addWidget(new QLabel("Galileo (C1C/C5Q)"), 3, 14);
+  cmbLayout->addWidget(_cmbGalCheckBox, 3, 15);
+
+  cmbLayout->addWidget(new QLabel("Beidou (C2I/C6I)"), 4, 14);
+  cmbLayout->addWidget(_cmbBdsCheckBox, 4, 15);
+
+  cmbLayout->addWidget(new QLabel("QZSS (C1C/C2L)"), 5, 14);
+  cmbLayout->addWidget(_cmbQzssCheckBox, 5, 15);
+
+  cmbLayout->addWidget(new QLabel("SBAS (C1C/C5Q)"), 6, 14);
+  cmbLayout->addWidget(_cmbSbasCheckBox, 6, 15);
+
+  cmbLayout->addWidget(new QLabel("NavIC"), 7, 14);
+  cmbLayout->addWidget(_cmbNavicCheckBox, 7, 15);
+  cmbLayout->setRowStretch(9, 999);
+
+  connect(addCmbRowButton, SIGNAL(clicked()), this, SLOT(slotAddCmbRow()));
+  connect(delCmbRowButton, SIGNAL(clicked()), this, SLOT(slotDelCmbRow()));
+
+  cmbgroup->setLayout(cmbLayout);
+
+  // Upload Layout (Clocks)
+  // ----------------------
+  QGridLayout* uploadHlpLayout = new QGridLayout();
+
+  connect(addUploadRowButton, SIGNAL(clicked()), this, SLOT(slotAddUploadRow()));
+  connect(delUploadRowButton, SIGNAL(clicked()), this, SLOT(slotDelUploadRow()));
+  connect(setUploadTrafoButton, SIGNAL(clicked()), this, SLOT(slotSetUploadTrafo()));
+
+  uploadHlpLayout->addWidget(addUploadRowButton, 0, 0);
+  uploadHlpLayout->addWidget(delUploadRowButton, 0, 1);
+  uploadHlpLayout->addWidget(new QLabel("Interval"), 0, 2, Qt::AlignRight);
+  uploadHlpLayout->addWidget(_uploadIntrComboBox, 0, 3);
+  uploadHlpLayout->addWidget(new QLabel("     Sampling:    Orb"), 0, 4, Qt::AlignRight);
+  uploadHlpLayout->addWidget(_uploadSamplRtcmEphCorrComboBox, 0, 5);
+  uploadHlpLayout->addWidget(new QLabel("SP3"), 0, 6, Qt::AlignRight);
+  uploadHlpLayout->addWidget(_uploadSamplSp3ComboBox, 0, 7);
+  uploadHlpLayout->addWidget(new QLabel("RNX"), 0, 8, Qt::AlignRight);
+  uploadHlpLayout->addWidget(_uploadSamplClkRnxSpinBox, 0, 9);
+  uploadHlpLayout->addWidget(new QLabel("BSX"), 0, 10, Qt::AlignRight);
+  uploadHlpLayout->addWidget(_uploadSamplBiaSnxSpinBox, 0, 11);
+  uploadHlpLayout->addWidget(setUploadTrafoButton, 0, 12);
+  uploadHlpLayout->addWidget(new QLabel("ANTEX file"), 1, 0, Qt::AlignLeft);
+  uploadHlpLayout->addWidget(_uploadAntexFile, 1, 1, 1, 4);
+
+  QBoxLayout* uploadLayout = new QBoxLayout(QBoxLayout::TopToBottom);
+  populateUploadTable();
+
+  uploadLayout->addWidget(new QLabel("Upload RTCM Version 3 Broadcast Corrections to Broadcaster.<br>"));
+  uploadLayout->addWidget(_uploadTable);
+  uploadLayout->addLayout(uploadHlpLayout);
+
+  uploadgroup->setLayout(uploadLayout);
+
+  // Upload Layout (Ephemeris)
+  // -------------------------
+  QGridLayout* uploadHlpLayoutEph = new QGridLayout();
+
+  connect(addUploadEphRowButton, SIGNAL(clicked()), this, SLOT(slotAddUploadEphRow()));
+  connect(delUploadEphRowButton, SIGNAL(clicked()), this, SLOT(slotDelUploadEphRow()));
+
+  uploadHlpLayoutEph->addWidget(addUploadEphRowButton, 0, 0);
+  uploadHlpLayoutEph->addWidget(delUploadEphRowButton, 0, 1);
+  uploadHlpLayoutEph->addWidget(new QLabel("     Sampling"), 0, 2, Qt::AlignRight);
+  uploadHlpLayoutEph->addWidget(_uploadSamplRtcmEphSpinBox, 0, 3);
+
+  QBoxLayout* uploadLayoutEph = new QBoxLayout(QBoxLayout::TopToBottom);
+  populateUploadEphTable();
+
+  uploadLayoutEph->addWidget(new QLabel("Upload RTCM Version 3 Broadcast Ephemeris to Broadcaster.<br>"));
+  uploadLayoutEph->addWidget(_uploadEphTable);
+  uploadLayoutEph->addLayout(uploadHlpLayoutEph);
+
+  uploadEphgroup->setLayout(uploadLayoutEph);
+
+
+  // Upload Layout (Raw Data)
+  // -------------------------
+  QGridLayout* uploadHlpLayoutRaw = new QGridLayout();
+
+  connect(addUploadRawRowButton, SIGNAL(clicked()), this, SLOT(slotAddUploadRawRow()));
+  connect(delUploadRawRowButton, SIGNAL(clicked()), this, SLOT(slotDelUploadRawRow()));
+
+  uploadHlpLayoutRaw->addWidget(addUploadRawRowButton, 0, 0);
+  uploadHlpLayoutRaw->addWidget(delUploadRawRowButton, 0, 1);
+
+  QBoxLayout* uploadLayoutRaw = new QBoxLayout(QBoxLayout::TopToBottom);
+  populateUploadRawTable();
+
+  uploadLayoutRaw->addWidget(new QLabel("Upload Raw Data to Broadcaster (Ntrip Server Functionality).<br>"));
+  uploadLayoutRaw->addWidget(_uploadRawTable);
+  uploadLayoutRaw->addLayout(uploadHlpLayoutRaw);
+
+  uploadRawgroup->setLayout(uploadLayoutRaw);
+
+  // Main Layout
+  // -----------
+  QGridLayout* mLayout = new QGridLayout;
+  _aogroup->setCurrentIndex(settings.value("startTab").toInt());
+  mLayout->addWidget(_aogroup, 0, 0);
+  mLayout->addWidget(_mountPointsTable, 1, 0);
+  _loggroup->setCurrentIndex(settings.value("statusTab").toInt());
+  mLayout->addWidget(_loggroup, 2, 0);
+
+  _canvas->setLayout(mLayout);
+
+  // WhatsThis, Network
+  // ------------------
+  _proxyHostLineEdit->setWhatsThis(tr("<p>If you are running BNC within a protected Local Area Network (LAN), you may need to use a proxy server to access the Internet. Enter your proxy server IP and port number in case one is operated in front of BNC. If you do not know the IP and port of your proxy server, check the proxy server settings in your Internet browser or ask your network administrator. Without any entry, BNC will try to use the system proxies. </p><p>Note that IP streaming is sometimes not allowed in a LAN. In this case you need to ask your network administrator for an appropriate modification of the local security policy or for the installation of a TCP relay to the Ntrip Broadcasters. If this is not possible, you may need to run BNC outside your LAN on a network that has unobstructed connection to the Internet. <i>[key: proxyHost]</i></p>"));
+  _proxyPortLineEdit->setWhatsThis(tr("<p>Enter your proxy server port number in case a proxy is operated in front of BNC. <i>[key: proxyPort]</i></p>"));
+  _sslCaCertPathLineEdit->setWhatsThis(tr("<p>Communication with an Ntrip Broadcaster over SSL requires the exchange of server certificates. Specify the path to a directory where you save CA certificates on your system. </p><p>BNC creates from *.crt and *.pem files a CA certificate database, which is used by the socket during the handshake phase to validate the peer's certificate. </p><p>Note that SSL communication is usually done over port 443. <i>[key: sslCaCertPath]</i></p>"));
+  _sslClientCertPathLineEdit->setWhatsThis(tr("<p>Two-sided communication with an Ntrip Broadcaster over SSL requires in addition the exchange of client certificates. Specify the full path to the client certificates on your system.</p><p></p><p>The file naming convention for client certificates in BNC is as follows: &lt;hostname&gt;.&lt;port&gt;.crt for the certificate and &lt;hostname&gt;.&lt;port&gt;.key for the private key, where &lt;hostname&gt; is without https://. </p><p> If available, the client or personal authentication certificate is presented to the peer during the SSL handshake process. Password protected key files are not supported. </p><p>Don't try communication via two sided SSL if you are not sure whether this is supported by the involved Ntrip Broadcaster. </p><p>Note that SSL communication is usually done over port 443. <i>[key: sslClientCertPath]</i></p>"));
+  _sslIgnoreErrorsCheckBox->setWhatsThis(tr("<p>SSL communication may involve queries coming from the Ntrip Broadcaster. Tick 'Ignore SSL authorization errors' if you don't want to be bothered with this. <i>[key: sslIgnoreErrors]</i></p>"));
+
+  // WhatsThis, General
+  // ------------------
+  _logFileLineEdit->setWhatsThis(tr("<p>Records of BNC's activities are shown in the 'Log' tab on the bottom of this window. They can be saved into a file when a valid path for that is specified in the 'Logfile (full path)' field.</p><p>The logfile name will automatically be extended by a string '_YYMMDD' carrying the current date. <i>[key: logFile]</i></p>"));
+  _rnxAppendCheckBox->setWhatsThis(tr("<p>When BNC is started, new files are created by default and file content already available under the same name will be overwritten. However, users might want to append already existing files following a regular restart or a crash of BNC or its platform.</p><p>Tick 'Append files' to continue with existing files and keep what has been recorded so far. <i>[key: rnxAppend]</i></p>"));
+  _onTheFlyComboBox->setWhatsThis(tr("<p>When operating BNC online in 'no window' mode, some configuration parameters can be changed on-the-fly without interrupting the running process. For that BNC rereads parts of its configuration in pre-defined intervals. The default entry is 'no' that means the reread function is switched of. <p></p>Select '1 min', '5 min', '1 hour', or '1 day' to force BNC to reread its configuration every full minute, five minutes, hour, or day and let in between edited configuration options become effective on-the-fly without terminating uninvolved threads.</p><p>Note that when operating BNC in window mode, on-the-fly changeable configuration options become effective immediately via button 'Save & Reread Configuration'. <i>[key: onTheFlyInterval]</i></p>"));
+  _autoStartCheckBox->setWhatsThis(tr("<p>Tick 'Auto start' for auto-start of BNC at startup time in window mode with preassigned processing options. <i>[key: autoStart]</i></p>"));
+  _rawOutFileLineEdit->setWhatsThis(tr("<p>Save all data coming in through various streams in the received order and format in one file.</p><p>This option is primarily meant for debugging purposes. <i>[key: rawOutFile]</i></p>"));
+
+  // WhatsThis, RINEX Observations
+  // -----------------------------
+  _rnxPathLineEdit->setWhatsThis(tr("<p>Here you specify the path to where the RINEX Observation files will be stored.</p><p>If the specified directory does not exist, BNC will not create RINEX Observation files. <i>[key: rnxPath]</i></p>"));
+  _rnxIntrComboBox->setWhatsThis(tr("<p>Select the length of the RINEX Observation file. <i>[key: rnxIntr]</i></p>"));
+  _rnxSamplComboBox->setWhatsThis(tr("<p>Select the RINEX Observation sampling interval in seconds. <i>[key: rnxSampl]</i></p>"));
+  _rnxSkelExtComboBox->setWhatsThis(tr("<p>BNC allows using personal RINEX skeleton files that contain the RINEX header records you would like to include. You can derive a skeleton file from information given in an up to date sitelog.</p><p>A file in the RINEX Observations 'Directory' with a 'Skeleton extension' skl or SKL is interpreted by BNC as a personal RINEX header skeleton file for the corresponding stream. <i>[key: rnxSkel]</i></p>"));
+  _rnxSkelPathLineEdit->setWhatsThis(tr("<p>Here you specify the path to where local skeleton files are located.</p><p> If no directory is specified, the path is assumed to where the RINEX Observation files will stored. <i>[key: rnxSkelPath]</i></p>"));
+  _rnxFileCheckBox->setWhatsThis(tr("<p>Tick check box 'Skeleton mandatory' in case you want that RINEX files are only produced if skeleton files are available for BNC. If no skeleton file is available for a particular source then no RINEX Observation file will be produced from the affected stream.</p><p>Note that a skeleton file contains RINEX header information such as receiver and antenna types. In case of stream conversion to RINEX Version 3, a skeleton file should also contain information on potentially available observation types. A missing skeleton file will therefore enforce BNC to only save a default set of RINEX 3 observation types. <i>[key: rnxOnlyWithSKL]</i></p>"));
+  _rnxScrpLineEdit->setWhatsThis(tr("<p>Whenever a RINEX Observation file is finally saved, you may want to compress, copy or upload it immediately, for example via FTP. BNC allows you to execute a script/batch file to carry out such operation.</p><p>Specify the full path of a script or batch file. BNC will pass the full RINEX Observation file path to the script as command line parameter (%1 on Windows systems, $1 on Unix/Linux/Mac systems). <i>[key: rnxScript]</i></p>"));
+  _rnxV2Priority->setWhatsThis(tr("<p>Specify a priority list of characters defining signal attributes as defined in RINEX Version 3. Priorities will be used to map observations with RINEX Version 3 attributes from incoming streams to Version 2. The underscore character '_' stands for undefined attributes. A question mark '?' can be used as wildcard which represents any one character.</p><p>Signal priorities can be specified as equal for all systems, as system specific or as system and freq. specific. For example: </li><ul><li>'CWPX_?' (General signal priorities valid for all GNSS) </li><li>'I:ABCX' (System specific signal priorities for NavIC) </li><li>'G:12&PWCSLX G:5&IQX R:12&PC R:3&IQX' (System and frequency specific signal priorities) </li></ul>Default is the following priority list 'G:12&PWCSLX G:5&IQX R:12&PC R:3&IQX R:46&ABX E:16&BCXZ E:578&IQX J:1&SLXCZ J:26&SLX J:5&IQX C:267&IQX C:18&DPX I:ABCX S:1&C S:5&IQX'. <i>[key: rnxV2Priority]</i></p>"));
+  _rnxVersComboBox->setWhatsThis(tr("<p>Select the format for RINEX Observation files. <i>[key: rnxVersion]</i></p>"));
+
+  // WhatsThis, RINEX Ephemeris
+  // --------------------------
+  _ephPathLineEdit->setWhatsThis(tr("<p>Specify the path for saving Broadcast Ephemeris data as RINEX Navigation files.</p><p>If the specified directory does not exist, BNC will not create RINEX Navigation files. <i>[key: ephPath]</i></p>"));
+  _ephIntrComboBox->setWhatsThis(tr("<p>Select the length of the RINEX Navigation file. <i>[key: ephIntr]</i></p>"));
+  _ephOutPortLineEdit->setWhatsThis(tr("<p>BNC can produce ephemeris data in RINEX Navigation ASCII format on your local host through an IP port.</p><p>Specify a port number here to activate this function. <i>[key: ephOutPort]</i></p>"));
+  _ephVersComboBox->setWhatsThis(tr("<p>Select the format for RINEX Navigation files. <i>[key: ephVersion]</i></p>"));
+  //_ephFilePerStation->setWhatsThis(tr("<p>By default, all received Broadcast Ephemeris data will be stored within one File. Thick 'File per Stations' to get separate files per station/mountpoint. <i>[key: ephFilePerStation]</i></p>"));
+
+  // WhatsThis, RINEX Editing & QC
+  // -----------------------------
+  _reqcActionComboBox->setWhatsThis(tr("<p>BNC allows to 'Edit or Concatenate' RINEX Version 2 or 3 files or to perform a Quality Check (QC) and 'Analyze' data following UNAVCO's famous 'teqc' program. <i>[key: reqcAction]</i></p>"));
+  _reqcEditOptionButton->setWhatsThis(tr("<p>Specify options for editing RINEX Version 2 or 3 files.</p>"));
+  _reqcObsFileChooser->setWhatsThis(tr("<p>Specify the full path to input observation files in RINEX Version 2 or 3 format.</p><p>Note that when in 'Analyze' mode, specifying at least one RINEX observation file is mandatory. <i>[key: reqcObsFile]</i></p>"));
+  _reqcNavFileChooser->setWhatsThis(tr("<p>Specify the full path to input navigation files in RINEX Version 2 or 3 format.</p><p>Note that when in 'Analyze' mode, specifying at least one RINEX navigation file is mandatory. <i>[key: reqcNavFile]</i></p>"));
+  _reqcOutObsLineEdit->setWhatsThis(tr("<p>Specify the full path to a RINEX Observation output file.</p><p>Default is an empty option field, meaning that no RINEX Observation output file will be produced. <i>[key: reqcOutObsFile]</i></p>"));
+  _reqcOutNavLineEdit->setWhatsThis(tr("<p>Specify the full path to a RINEX Navigation output file.</p><p>Default is an empty option field, meaning that no RINEX Navigation output file will be produced. <i>[key: reqcOutNavFile]</i></p>"));
+  _reqcOutLogLineEdit->setWhatsThis(tr("<p>Specify the full path to a logfile.</p><p>Default is an empty option field, meaning that no 'RINEX Editing & QC' logfile will be produced. <i>[key: reqcOutLogFile]</i></p>"));
+  _reqcLogSummaryOnly->setWhatsThis(tr("<p>By default BNC produces a detailed 'Logfile' providing all information resulting from editing or analyzing RINEX data. If that is too much information, you can limit the logfile content to a short summary.</p><p>Tick 'Summary only' to suppress full logfile output and instead produce a logfile containing only summary information. <i>[key: reqcLogSummaryOnly]</i></p>"));
+  _reqcPlotDirLineEdit->setWhatsThis(tr("<p>Specify a directory for saving plots in PNG format.</p><p>Default is an empty option field, meaning that plots will not be saved on disk. <i>[key: reqcPlotDir]</i></p>"));
+  _reqcSkyPlotSignals->setWhatsThis(tr("<p>BNC can produce plots for multipath, signal-to-noise ratio, satellite availability, satellite elevation, and PDOP values. The 'Plots for signals' option lets you exactly specify observation signals to be used for that and also enables the plot generation. You can specify the navigation system, the frequency, and the tracking mode or channel as defined in RINEX Version 3. Specifications for frequency and tracking mode or channel must be separated by ampersand character '&'. Specifications for navigation systems must be separated by blank character ' '.</p><p>Examples for 'Plots for signals' option:<ul><li> G:1&2&5 R:1&2&3 E:1&7 C:2&6 J:1&2 I:5&9 S:1&5 <br>(Plots will be based on GPS observations on 1st and 2nd frequency, GLONASS observations on 1st and 2nd frequency, QZSS observations on 1st and 2nd frequency, Galileo observations on 1st and 7th frequency, BeiDou observations on 1st and 6th frequency, SBAS observations on 1st frequency.)</li><li>G:1C&5X<br>(Plots will be based on GPS observations on 1st frequency in C tracking mode and GPS observations on 5th frequency in X tracking mode.)</li><li>C:6I&7I<br>(Plots will be based on BeiDou observations on 6th frequency in I tracking mode and BeiDou observations on 7th frequency in I tracking mode.)<li></ul></p><p>Default is 'G:1&2 R:1&2 E:1&5 C:2&6 J:1&2 I:5&9 S:1&5'. Specifying an empty option string would be overruled by this default. <i>[key: reqcSkyPlotSignals]</i></p>"));
+
+  // WhatsThis, SP3 Comparison
+  // -------------------------
+  _sp3CompFileChooser->setWhatsThis(tr("<p>BNC can compare two SP3 files containing GNSS satellite orbit and clock information.</p></p>Specify the full path to two files with orbits and clocks in SP3 format, separate them by comma. <i>[key: sp3CompFile]</i></p>"));
+  _sp3CompExclude->setWhatsThis(tr("<p>Specify satellites to exclude them from orbit and clock comparison. Example:<p>G04,G31,R</p><p>This excludes GPS satellites PRN 4 and 31 as well as all GLONASS satellites from the comparison.</p><p>Default is an empty option field, meaning that no satellite is excluded from the comparison. <i>[key: sp3CompExclude]</i></p>"));
+  _sp3CompLogLineEdit->setWhatsThis(tr("<p>Specify the full path to a logfile saving comparison results.</p><p>Specifying a logfile is mandatory. Comparing SP3 files and not saving comparison results on disk would be useless. <i>[key: sp3CompOutLogFile]</i></p>"));
+  _sp3CompSummaryOnly->setWhatsThis(tr("<p>By default BNC produces a detailed 'Logfile' providing all information resulting from comparing SP3 files. If that is too much information, you can limit the logfile content to a short summary.</p><p>Tick 'Summary only' to suppress full logfile output and instead produce a logfile containing only summary information. <i>[key: sp3CompSummaryOnly]</i></p>"));
+
+  // WhatsThis, Broadcast Corrections
+  // --------------------------------
+  _corrPathLineEdit->setWhatsThis(tr("<p>Specify a directory for saving Broadcast Ephemeris Correction files.</p><p>If the specified directory does not exist, BNC will not create the files. <i>[key: corrPath]</i></p>"));
+  _corrIntrComboBox->setWhatsThis(tr("<p>Select the length of Broadcast Ephemeris Correction files. <i>[key: corrIntr]</i></p>"));
+  _corrPortLineEdit->setWhatsThis(tr("<p>BNC can produce Broadcast Ephemeris Corrections on your local host through an IP port.</p><p>Specify a port number here to activate this function. <i>[key: corrPort]</i></p>"));
+
+  // WhatsThis, Feed Engine
+  // ----------------------
+  _outPortLineEdit->setWhatsThis(tr("<p>BNC can produce synchronized observations in a plain ASCII format on your local host via IP port.</p><p>Specify a port number to activate this function. <i>[key: outPort]</i></p>"));
+  _outWaitSpinBox->setWhatsThis(tr("<p>When feeding a real-time GNSS network engine waiting for synchronized input epoch by epoch, BNC drops whatever is received later than 'Wait for full obs epoch' seconds.</p><p>A value of 3 to 5 seconds is recommended, depending on the latency of the incoming streams and the delay acceptable to your real-time GNSS network engine or product. <i>[key: outWait]</i></p>"));
+  _outSamplComboBox->setWhatsThis(tr("<p>Select a synchronized observation sampling interval in seconds. <i>[key: outSampl]</i></p>"));
+  _outFileLineEdit->setWhatsThis(tr("<p>Specify the full path to a file where synchronized observations are saved in plain ASCII format.</p><p>Beware that the size of this file can rapidly increase depending on the number of incoming streams. <i>[key: outFile]</i></p>"));
+  _outUPortLineEdit->setWhatsThis(tr("<p>BNC can produce unsynchronized observations in a plain ASCII format on your local host via IP port.</p><p>Specify a port number to activate this function. <i>[key: outUPort]</i></p>"));
+  _outLockTimeCheckBox->setWhatsThis(tr("<p>Print the lock time in seconds in the feed engine output.<i>[key: outLockTime]</i></p>"));
+
+  // WhatsThis, Serial Output
+  // ------------------------
+  _serialMountPointLineEdit->setWhatsThis(tr("<p>Enter a 'Mountpoint' to forward the corresponding stream to a serial connected receiver.</p><p>Depending on the stream content, the receiver may use it for example for Differential GNSS, Precise Point Positioning or any other purpose supported by its firmware. <i>[key: serialMountPoint]</i></p>"));
+  _serialPortNameLineEdit->setWhatsThis(tr("<p>Enter the serial 'Port name' selected for communication with your serial connected receiver. Valid port names are e.g.</p><pre>Windows:       COM1, COM2<br>Linux:         /dev/ttyS0, /dev/ttyS1<br>FreeBSD:       /dev/ttyd0, /dev/ttyd1<br>Digital Unix:  /dev/tty01, /dev/tty02<br>HP-UX:         /dev/tty1p0, /dev/tty2p0<br>SGI/IRIX:      /dev/ttyf1, /dev/ttyf2<br>SunOS/Solaris: /dev/ttya, /dev/ttyb</pre><p>Note that before you start BNC, you must plug a serial cable in the port defined here. <i>[key: serialPortName]</i></p>"));
+  _serialBaudRateComboBox->setWhatsThis(tr("<p>Select a 'Baud rate' for the serial output link.</p><p>Note that your selection must equal the baud rate configured to the serial connected receiver. Using a high baud rate is recommended. <i>[key: serialBaudRate]</i></p>"));
+  _serialFlowControlComboBox->setWhatsThis(tr("<p>Select a 'Flow control' for the serial output link.</p><p>Note that your selection must equal the flow control configured to the serial connected receiver. Select 'OFF' if you don't know better. <i>[key: serialFlowControl]</i></p>"));
+  _serialDataBitsComboBox->setWhatsThis(tr("<p>Select the number of 'Data bits' for the serial output link.</p><p>Note that your selection must equal the number of data bits configured to the serial connected receiver. Note further that often 8 data bits are used. <i>[key: serialDataBits]</i></p>"));
+  _serialParityComboBox->setWhatsThis(tr("<p>Select a 'Parity' for the serial output link.</p><p>Note that your selection must equal the parity selection configured to the serial connected receiver. The parity is often set to 'NONE'. <i>[key: serialParity]</i></p>"));
+  _serialStopBitsComboBox->setWhatsThis(tr("<p>Select the number of 'Stop bits' for the serial output link.</p><p>Note that your selection must equal the number of stop bits configured to the serial connected receiver. Note further that often 1 stop bit is used. <i>[key: serialStopBits]</i></p>"));
+  _serialAutoNMEAComboBox->setWhatsThis(tr("<p>The 'NMEA' option supports the so-called 'Virtual Reference Station' (VRS) concept which requires the receiver to send approximate position information to the Ntrip Broadcaster. Select 'no' if you don't want BNC to forward or upload any NMEA message to the Ntrip Broadcaster in support of VRS.</p><p>Select 'Auto' to automatically forward NMEA messages of type GGA from your serial connected receiver to the Ntrip Broadcaster and/or save them in a file.</p><p>Select 'Manual GPGGA' or 'Manual GNGGA' if you want BNC to produce and upload GPGGA or GNGGA NMEA messages to the Ntrip Broadcaster because your serial connected receiver doesn't generate these messages. A Talker ID 'GP' preceding the GGA string stands for GPS solutions while a Talker ID 'GN' stands for multi constellation solutions.</p><p>Note that selecting 'Auto' or 'Manual' works only for VRS streams which show up under the 'Streams' canvas on BNC's main window with 'nmea' stream attribute set to 'yes'. This attribute is either extracted from the Ntrip Broadcaster's source-table or introduced by the user via editing the BNC configuration file. <i>[key: serialAutoNMEA]</i></p>"));
+  _serialFileNMEALineEdit->setWhatsThis(tr("<p>Specify the full path to a file where NMEA messages coming from your serial connected receiver are saved.</p><p>Default is an empty option field, meaning that NMEA messages will not be saved on disk. <i>[key: serialFileNMEA]</i></p>"));
+  _serialHeightNMEALineEdit->setWhatsThis(tr("<p>Specify an approximate 'Height' above mean sea level in meters for the reference station introduced by option 'Mountpoint'. Together with the latitude and longitude from the source-table, the height information is used to build GGA messages to be sent to the Ntrip Broadcaster.</p><p>For adjusting latitude and longitude values of a VRS stream given in the 'Streams' canvas, you can double click the latitude/longitude data fields, specify appropriate values and then hit Enter.</p><p>This option is only relevant when option 'NMEA' is set to 'Manual GPGGA' or 'Manual GNGGA' respectively. <i>[key: serialHeightNMEA]</i></p>"));
+  _serialNMEASamplingSpinBox->setWhatsThis(tr("<p>Select a sampling interval in seconds for manual or receiver generated NMEA GGA sentences and their upload.</p><p>A sampling rate of '0' means, a GGA sentence will be send only once to initialize the requested VRS stream. Note that some VRS systems need GGA sentences at regular intervals. <i>[key: serialNMEASampling]</i></p>"));
+
+  // WhatsThis, Outages
+  // ------------------
+  _adviseObsRateComboBox->setWhatsThis(tr("<p>BNC can collect all returns (success or failure) coming from a decoder within a certain short time span to then decide whether a stream has an outage or its content is corrupted. The procedure needs a rough estimate of the expected 'Observation rate' of the incoming streams. When a continuous problem is detected, BNC can inform its operator about this event through an advisory note.</p><p>Default is an empty option field, meaning that you don't want BNC to report on stream failures or recoveries when exceeding a threshold time span. <i>[key: adviseObsRate]</i></p>"));
+  _adviseFailSpinBox->setWhatsThis(tr("<p>An advisory note is generated when no (or only corrupted) observations are seen throughout the 'Failure threshold' time span. A value of 15 min (default) is recommended.</p><p>A value of zero '0' means that for any stream failure, however short, BNC immediately generates an advisory note. <i>[key: adviseFail]</i></p>"));
+  _adviseRecoSpinBox->setWhatsThis(tr("<p>Following a stream outage or a longer series of bad observations, an advisory note is generated when valid observations are received again throughout the 'Recovery threshold' time span. A value of about 5min (default) is recommended.</p><p>A value of zero '0' means that for any stream recovery, however short, BNC immediately generates an advisory note. <i>[key: adviseReco]</i></p>"));
+  _adviseScriptLineEdit->setWhatsThis(tr("<p>Specify the full path to a script or batch file to handle advisory notes generated in the event of corrupted streams or stream outages. The affected mountpoint and a comment 'Begin_Outage', 'End_Outage', 'Begin_Corrupted', or 'End_Corrupted' are passed on to the script as command line parameters.</p><p>The script may have the task to send the advisory notes by email to BNC's operator and/or to the affected stream provider.</p><p>An empty option field (default) or invalid path means that you don't want to use this option. <i>[key: adviseScript]</i></p>"));
+
+  // WhatsThis, Miscellaneous
+  // ------------------------
+  _miscMountLineEdit->setWhatsThis(tr("<p>Specify a mountpoint to apply any of the options shown below. Enter 'ALL' if you want to apply these options to all configured streams.</p><p>An empty option field (default) means that you don't want BNC to apply any of these options. <i>[key: miscMount]</i></p>"));
+  _miscIntrComboBox->setWhatsThis(tr("<p>BNC can average latencies per stream over a certain period of GPS time. The resulting mean latencies are recorded in the 'Log' tab at the end of each 'Log latency' interval together with results of a statistical evaluation (approximate number of covered epochs, data gaps).</p><p>Select a 'Log latency' interval or select the empty option field if you do not want BNC to log latencies and statistical information. <i>[key: miscIntr]</i></p>"));
+  _miscScanRTCMCheckBox->setWhatsThis(tr("<p>Tick 'Scan RTCM' to log the numbers of incoming message types as well as contained antenna coordinates, antenna height, and antenna descriptor.</p><p>In case of RTCM Version 3 MSM streams, BNC will also log contained RINEX Version 3 observation types. <i>[key: miscScanRTCM]</i></p>"));
+  _miscPortLineEdit->setWhatsThis(tr("<p>BNC can output an incoming stream through an IP port of your local host.</p><p>Specify a port number to activate this function. In this case, the stream content remains untouched; BNC does not decode or reformat the data for this output.</p><p> If the decoder string is not an accepted one ('RTCM_2.x', 'RTCM_3.x' and 'RTNET'), please change the decoder string to <ul>"
+                                     "<li> 'ZERO' (forward the raw data) or </li>"
+                                     "<li> 'ZERO2FILE' (forward and store the raw data)</li> </ul> in addition. <i>[key: miscPort]</i></p>"));
+
+  // WhatsThis, PPP (1)
+  // ------------------
+  _pppWidgets._dataSource->setWhatsThis(tr("<p>Select 'Real-time Streams' for real-time PPP from RTCM streams or 'RINEX Files' for post processing PPP from RINEX files.</p><p><ul><li>Real-time PPP requires that you pull a RTCM stream carrying GNSS observations plus a stream providing corrections to Broadcast Ephemeris. If the observations stream does not contain Broadcast Ephemeris then you must in addition pull a Broadcast Ephemeris stream like 'RTCM3EPH' from Ntrip Broadcaster <u>products.igs-ip.net</u>.<br></li><li>Post processing PPP requires RINEX Observation files, RINEX Navigation files and a file with corrections to Broadcast Ephemeris in plain ASCII format as saved beforehand using BNC.</li></ul></p><p>Note that BNC allows to carry out PPP solutions simultaneously for several stations. <i>[key: PPP/dataSource]</i></p>"));
+  _pppWidgets._rinexObs->setWhatsThis(tr("<p>Specify the RINEX Observation file. <i>[key: PPP/rinexObs]</i></p>"));
+  _pppWidgets._rinexNav->setWhatsThis(tr("<p>Specify the RINEX Navigation file. <i>[key: PPP/rinexNav]</i></p>"));
+  _pppWidgets._corrMount->setWhatsThis(tr("<p>Specify a 'mountpoint' from the 'Streams' canvas below which provides corrections to Broadcast Ephemeris.</p><p>If you don't specify a corrections stream via this option, BNC will fall back to Single Point Positioning (SPP, positioning from observations and Broadcast Ephemeris only) instead of doing PPP. <i>[key: PPP/corrMount]</i></p>"));
+  _pppWidgets._ionoMount->setWhatsThis(tr("<p>Specify a 'mountpoint' from the 'Streams' canvas below which provides VTEC informations in SSR format.</p><p>If you don't specify a corrections stream via this option, BNC will use VTEC informations from the Corrections stream 'mountpoint', if available. <i>[key: PPP/ionoMount]</i></p>"));
+  _pppWidgets._corrFile->setWhatsThis(tr("<p>Specify the Broadcast Ephemeris Corrections file as saved beforehand using BNC.</p><p>If you don't specify corrections by this option, BNC will fall back to Single Point Positioning (SPP, positioning from RINEX Obs and RINEX Nav files only) instead of doing PPP. <i>[key: PPP/corrFile]</i></p>"));
+  _pppWidgets._ionoFile->setWhatsThis(tr("<p>Specify the VTEC file as saved beforehand using BNC.</p><p>If you don't specify corrections by this option, BNC will use VTEC informations from the Corrections file, if available. <i>[key: PPP/ionoFile]</i></p>"));
+  _pppWidgets._antexFile->setWhatsThis(tr("<p>Observations in RTCM streams or RINEX files should be referred to the receiver's and to the satellite's Antenna Phase Center (APC) and therefore be corrected for<ul><li>Receiver APC offsets and variations</li><li>Satellite APC offsets and variations.</li></ul> Specify the full path to an IGS 'ANTEX file' which contains APC offsets and variations for satellites and receiver.</p> <i>[key: PPP/antexFile]</i></p>"));
+  _pppWidgets._crdFile->setWhatsThis(tr("<p>Enter the full path to an ASCII file which specifies the streams or files of those stations you want to process. Specifying a 'Coordinates file' is optional. If it exists, it should contain one record per station with the following parameters separated by blank character:</p><ul><li>Specify the station either by:<ul><li>the 'Mountpoint' of the station's RTCM stream (in real-time PPP mode), or</li><li>the 9-char station ID of the RINEX Version 3 or 4 Observations file (in post processing PPP mode), or </li><li>the 4-char station ID of the RINEX Version 2 Observations file (in post processing PPP mode).</li></ul><li>Approximate X,Y,Z coordinate of station's Antenna Reference Point [m] (ARP, specify '0.0 0.0 0.0' if unknown).</li><li>North, East and Up component of antenna eccentricity [m] (specify '0.0 0.0 0.0' if unknown). </li><li>20 Characters describing the antenna type and radome following the IGS 'ANTEX file' standard (leave blank if unknown).</li><li>Receiver type following the naming conventions for IGS equipment.</li></ul>Records with exclamation mark '!' in the first column or blank records will be interpreted as comment lines and ignored.. <i>[key: PPP/crdFile]</i></p>"));
+  _pppWidgets._blqFile->setWhatsThis(tr("<p>Specify the full path to a 'BLQ file' containing the ocean loading coefficients for different stations. These coefficients can be obtained from the ocean loading service under request trough the web site http://holt.oso.chalmers.se/loading/. <i>[key: PPP/blqFile]</i></p>"));
+  _pppWidgets._logPath->setWhatsThis(tr("<p>Specify a directory for saving daily PPP logfiles. If the specified directory does not exist, BNC will not create such files.</p><p>Default is an empty option field, meaning that no PPP logfiles shall be produced. <i>[key: PPP/logPath]</i></p>"));
+  _pppWidgets._nmeaPath->setWhatsThis(tr("<p>Specify a directory for saving coordinates in daily NMEA files. If the specified directory does not exist, BNC will not create such files.</p><p>Default is an empty option field, meaning that no NMEA file shall be produced. <i>[key: PPP/nmeaPath]</i></p>"));
+  _pppWidgets._snxtroPath->setWhatsThis(tr("<p>Specify a directory for saving SINEX Troposphere files. If the specified directory does not exist, BNC will not create such files.</p><p>Default is an empty option field, meaning that no SINEX Troposphere files shall be produced. <i>[key: PPP/snxtroPath]</i></p>"));
+  _pppWidgets._snxtroIntr->setWhatsThis(tr("<p>Select a length for SINEX Troposphere files.</p><p>Default 'SNX TRO interval' for saving SINEX Troposphere files on disk is '1 hour'. <i>[key: PPP/snxtroIntr]</i></p>"));
+  _pppWidgets._snxtroSampl->setWhatsThis(tr("<p>Select a 'Sampling' rate for saving troposphere parameters. <i>[key: PPP/snxtroSampl]</i></p>"));
+  _pppWidgets._snxtroAc->setWhatsThis(tr("<p>Specify a 3-character abbreviation describing you as the generating Analysis Center (AC) in your SINEX troposphere files. <i>[key: PPP/snxtroAc]</i></p>"));
+  _pppWidgets._snxtroSolId->setWhatsThis(tr("<p>Specify a 1-character solution ID to allow a distinction between different solutions per AC. <i>[key: PPP/snxtroSolId]</i></p>"));
+  _pppWidgets._snxtroSolType->setWhatsThis(tr("<p>Specify a 3-character solution type, e.g. real-time (RTS), unknown (UNK), .. <i>[key: PPP/snxtroSolType]</i></p>"));
+  _pppWidgets._snxtroCampId->setWhatsThis(tr("<p>Specify a 3-character campaign ID, e.g. operational (OPS), demonstration (DEM), testing (TST), .. <i>[key: PPP/snxtroCampId]</i></p>"));
+
+  // WhatsThis, PPP (2)
+  // ------------------
+  _pppWidgets._lcGPS->setWhatsThis(tr("<p>Specify which kind of GPS observations you want to use and on which kind of linear combination the GPS ambiguity resolutions shall be based:</p><p><ul>"
+                                      "<li>'Pi&Li' means that uncombined code and phase data of two frequencies shall be used.</li>"
+                                      "<li>'Pi'    means that uncombined code data of two frequencies shall be used.</li>"
+                                      "<li>'P1&L1' means that uncombined code and phase data of one frequency shall be used.</li>"
+                                      "<li>'P1'    means that uncombined code data of one frequency shall be used.</li>"
+                                      "<li>'P3&L3' means that the inonosphere-free linear combination of code and phase data shall be used.</li>"
+                                      "<li>'P3'    means that the inonosphere-free linear combination of code data shall be used.</li>"
+                                      "<li>'L3'    means that the inonosphere-free linear combination of phase data shall be used.</li> "
+                                      "<li>'no'    means that you don't want BNC to use GPS data.</li></ul></p><p><i>[key: PPP/lcGPS]</i></p>"));
+  _pppWidgets._lcGLONASS->setWhatsThis(tr("<p>Specify which kind of GLONASS observations you want to use and on which kind of linear combination the GLONASS ambiguity resolutions shall be based:</p><p><ul>"
+                                          "<li>'Pi&Li' means that uncombined code and phase data of two frequencies shall be used.</li>"
+                                          "<li>'Pi'    means that uncombined code data of two frequencies shall be used.</li>"
+                                          "<li>'P1&L1' means that uncombined code and phase data of one frequency shall be used.</li>"
+                                          "<li>'P1'    means that uncombined code data of one frequency shall be used.</li>"
+                                          "<li>'P3&L3' means that the inonosphere-free linear combination of code and phase data shall be used.</li>"
+                                          "<li>'P3'    means that the inonosphere-free linear combination of code data shall be used.</li>"
+                                          "<li>'L3'    means that the inonosphere-free linear combination of phase data shall be used.</li> "
+                                          "<li>'no'    means that you don't want BNC to use GLONASS data.</li></ul></p><p><i>[key: PPP/lcGLONASS]</i></p>"));
+  _pppWidgets._lcGalileo->setWhatsThis(tr("<p>Specify which kind of Galileo observations you want to use and on which kind of linear combination the Galileo ambiguity resolutions shall be based:</p><p><ul>"
+                                          "<li>'Pi&Li' means that uncombined code and phase data of two frequencies shall be used.</li>"
+                                          "<li>'Pi'    means that uncombined code data of two frequencies shall be used.</li>"
+                                          "<li>'P1&L1' means that uncombined code and phase data of one frequency shall be used.</li>"
+                                          "<li>'P1'    means that uncombined code data of one frequency shall be used.</li>"
+                                          "<li>'P3&L3' means that the inonosphere-free linear combination of code and phase data shall be used.</li>"
+                                          "<li>'P3'    means that the inonosphere-free linear combination of code data shall be used.</li>"
+                                          "<li>'L3'    means that the inonosphere-free linear combination of phase data shall be used.</li> "
+                                          "<li>'no'    means that you don't want BNC to use Galileo data.</li></ul></p><p><i>[key: PPP/lcGalileo]</i></p>"));
+  _pppWidgets._lcBDS->setWhatsThis(tr("<p>Specify which kind of BDS observations you want to use and on which kind of linear combination the BDS ambiguity resolutions shall be based:</p><p><ul>"
+                                      "<li>'Pi&Li' means that uncombined code and phase data of two frequencies shall be used.</li>"
+                                      "<li>'Pi'    means that uncombined code data of two frequencies shall be used.</li>"
+                                      "<li>'P1&L1' means that uncombined code and phase data of one frequency shall be used.</li>"
+                                      "<li>'P1'    means that uncombined code data of one frequency shall be used.</li>"
+                                      "<li>'P3&L3' means that the inonosphere-free linear combination of code and phase data shall be used.</li>"
+                                      "<li>'P3'    means that the inonosphere-free linear combination of code data shall be used.</li>"
+                                      "<li>'L3'    means that the inonosphere-free linear combination of phase data shall be used.</li> "
+                                      "<li>'no'    means that you don't want BNC to use BDS data.</li></ul></p><p><i>[key: PPP/lcBDS]</i></p>"));
+  _pppWidgets._constraints->setWhatsThis(tr("<p>Specify, whether ionospheric constraints in form of pseudo-observations shall be added. Please note, this is only valid, if no ionosphere-free linear-combination is used and only helpful as soon as the ionosphere information is more accurate than the code data accuracy. <i>[key: PPP/constraints]</i></p>"));
+  _pppWidgets._sigmaC1->setWhatsThis(tr("<p>Enter a Sigma for GPS C1 code observations in meters.</p><p>The higher the sigma you enter, the less the contribution of GPS C1 code observations to a PPP solution from combined code and phase data. 1.0 is likely to be an appropriate choice.</p><p>Default is an empty option field, meaning<br>'Sigma C1 = 1.0' <i>[key: PPP/sigmaC1]</i></p>"));
+  _pppWidgets._sigmaL1->setWhatsThis(tr("<p>Enter a Sigma for GPS L1 phase observations in meters.</p><p>The higher the sigma you enter, the less the contribution of GPS L1 phase observations to a PPP solutions from combined code and phase data. 0.01 is likely to be an appropriate choice.</p><p>Default is an empty option field, meaning<br>'Sigma L1 = 0.01' <i>[key: PPP/sigmaL1]</i></p>"));
+  _pppWidgets._sigmaGIM->setWhatsThis(tr("<p>Enter a Sigma for GIM pseudo observations in meters.</p><p>The higher the sigma you enter, the less the contribution of GIM pseudo observations to a PPP solution. 5.0 is likely to be an appropriate choice.</p><p>Default is an empty option field, meaning<br>'Sigma GIM = 1.0' <i>[key: PPP/sigmaGIM]</i></p>"));
+  _pppWidgets._maxResC1->setWhatsThis(tr("<p>Specify a maximum for residuals from GPS C1 code observations in a PPP solution. '2.0' meters may be an appropriate choice for that.</p><p>If the maximum is exceeded, contributions from the corresponding observation will be ignored in the PPP solution.</p><p>Default is an empty option field, meaning<br>'Max Res C1 = 3.0' <i>[key: PPP/maxResC1]</i></p>"));
+  _pppWidgets._maxResL1->setWhatsThis(tr("<p>Specify a maximum for residuals from GPS L1 phase observations in a PPP solution. '0.02' meters may be an appropriate choice for that.</p><p>If the maximum is exceeded, contributions from the corresponding observation will be ignored in the PPP solution.</p><p>Default is an empty option field, meaning<br>'Max Res L1 = 0.03' <i>[key: PPP/maxResL1]</i></p>"));
+  _pppWidgets._maxResGIM->setWhatsThis(tr("<p>Specify a maximum for residuals from GIM pseudo observations in a PPP solution. '5.0' meters may be an appropriate choice for that.</p><p>If the maximum is exceeded, contributions from the corresponding observation will be ignored in the PPP solution.</p><p>Default is an empty option field, meaning<br>'Max Res GIM = 3.0' <i>[key: PPP/maxResGIM]</i></p>"));
+  _pppWidgets._eleWgtCode->setWhatsThis(tr("<p>Tic 'Ele Wgt Code' to use satellite Elevation depending Weights for Code observations in the PPP solution. <i>[key: PPP/eleWgtCode]</i></p>"));
+  _pppWidgets._eleWgtPhase->setWhatsThis(tr("<p>Tic 'Ele Wgt Phase' to use satellite Elevation depending Weights for Phase observations in the PPP solution. <i>[key: PPP/eleWgtPhase]</i></p>"));
+  _pppWidgets._minObs->setWhatsThis(tr("<p>Select a Minimum Number of Observations per epoch for a PPP solution.</p><p>BNC will only process epochs with observation numbers reaching or exceeding this minimum. <i>[key: PPP/minObs]</i></p>"));
+  _pppWidgets._minEle->setWhatsThis(tr("<p>Select a Minimum satellite Elevation for observations.</p><p>BNC will ignore an observation if the associated satellite Elevation does not reach or exceed this minimum.</p><p>Selecting '10 deg' may be an appropriate choice in order to avoid too noisy observations. <i>[key: PPP/minEle]</i></p>"));
+
+  // WhatsThis, Combine Corrections
+  // ------------------------------
+  _cmbTable->setWhatsThis(tr("<p>BNC allows to process several orbit and clock correction streams in real-time to produce, encode, upload and save a combination of correctors coming from different providers. </p><p>To add a line to the 'Combine Corrections' table hit the 'Add Row' button, double click on the 'Mountpoint' field to specify a Broadcast Ephemeris Correction mountpoint from the 'Streams' section below and hit Enter. Then double click on the 'AC Name' field to enter your choice of an abbreviation for the Analysis Center (AC) providing the stream. Double click on the 'Weight Factor' field to enter a weight factor to be applied for this stream in the combination. A Factor greater than 1 will enlarge the sigma of the clock pseudo-observations and with it down-weight its contribution. Finally, double click on the 'Exclude Satellites' field and specify satellites, to exclude them for an individual AC. An entry 'G04,G31,R' means to excludes GPS satellites PRN 4 and 31 as well as all GLONASS satellites from one individual AC. Default is an empty option field, meaning that no satellite is excluded from this individual AC.</p><p>Note that the orbit information in the resulting combination stream is just copied from one of the incoming streams. The stream used for providing the orbits may vary over time: if the orbit providing stream has an outage then BNC switches to the next remaining stream for getting hold of the orbit information.</p><p>The combination process requires Broadcast Ephemeris. Besides orbit and clock correction streams BNC should therefore pull a stream carrying Broadcast Ephemeris in the form of RTCM Version 3 messages.</p><p>It is possible to specify only one Broadcast Ephemeris Correction stream in the 'Combine Corrections' table. Instead of combining corrections BNC will then add the corrections to the Broadcast Ephemeris with the possibility to save final orbit and clock results in SP3 and/or Clock RINEX format. <i>[key: cmbStreams]</i></p>"));
+  addCmbRowButton->setWhatsThis(tr("<p>Hit 'Add Row' button to add another line to the 'Combine Corrections' table.</p>"));
+  delCmbRowButton->setWhatsThis(tr("<p>Hit 'Delete' button to delete the highlighted line(s) from the 'Combine Corrections' table.</p>"));
+  _cmbMethodComboBox->setWhatsThis(tr("<p>Select a clock combination approach. Options are 'Single-Epoch' and Kalman 'Filter'.</p><p>It is suggested to use the Kalman filter approach for the purpose of Precise Point Positioning. <i>[key: cmbMethod]</i></p>"));
+  _cmbMaxresLineEdit->setWhatsThis(tr("<p>BNC combines all incoming clocks according to specified weights. Individual clock estimates that differ by more than 'Maximal Clk Residuum' meters from the average of all clocks will be ignored.<p></p>It is suggested to specify a value of about 0.2 m for the Kalman filter combination approach and a value of about 3.0 meters for the Single-Epoch combination approach.</p><p>Default is a value of '999.0'. <i>[key: cmbMaxres]</i></p>"));
+  _cmbMaxdisplacementLineEdit->setWhatsThis(tr("<p>BNC builds mean values for all incoming orbit corrections per satellite. Individual orbit corrections that differ by more than 'Maximal Orb Displacement' meters from the average of all orbit corrections per satellite will be ignored.<p></p>It is suggested to specify a value of about 0.5 m.</p><p>Default is a value of '2.0'. <i>[key: cmbMaxdisplacement]</i></p>"));
+  _cmbSamplComboBox->setWhatsThis(tr("<p>Select a combination Sampling interval for the clocks. Clock corrections will be produced following that interval.</p><p>A value of 10 sec may be an appropriate choice. <i>[key: cmbSampl]</i></p>"));
+  _cmbLogPath->setWhatsThis(tr("<p>Specify a directory for saving daily Combination logfiles. If the specified directory does not exist, BNC will not create such files.</p><p>Default is an empty option field, meaning that no Combination logfiles shall be produced. <i>[key: cmbLogpath]</i></p>"));
+  _cmbGpsCheckBox->setWhatsThis(tr("<p>GPS clock corrections shall be combined. GPS Broadcast ephemeris and corrections are required. <i>[key: cmbGps]</i></p>"));
+  _cmbGloCheckBox->setWhatsThis(tr("<p>GLONASS clock corrections shall be combined; GLONASS Broadcast ephemeris and corrections are required. <i>[key: cmbGlo]</i></p>"));
+  _cmbGalCheckBox->setWhatsThis(tr("<p>Galileo clock corrections shall be combined; Galileo Broadcast ephemeris and corrections are required. <i>[key: cmbGal]</i></p>"));
+  _cmbBdsCheckBox->setWhatsThis(tr("<p>Beidou clock corrections shall be combined; BDS Broadcast ephemeris and corrections are required. <i>[key: cmbBds]</i></p>"));
+  _cmbQzssCheckBox->setWhatsThis(tr("<p>QZSS clock corrections shall be combined; QZSS Broadcast ephemeris and corrections are required. <i>[key: cmbQzss]</i></p>"));
+  _cmbSbasCheckBox->setWhatsThis(tr("<p>SBAS clock corrections shall be combined; SBAS Broadcast ephemeris and corrections are required. <i>[key: cmbSbas]</i></p>"));
+  _cmbNavicCheckBox->setWhatsThis(tr("<p>NavIC clock corrections shall be combined; NavIC Broadcast ephemeris and corrections are required. <i>[key: cmbNavic]</i></p>"));
+  _cmbBsxFile->setWhatsThis(tr("<p> Specify a Bias SINEX File that will be used to add satellite code biases to the combined clocks. <i>[key: cmbBsxFile]</i></p>"));
+
+  // WhatsThis, Upload Corrections
+  // -----------------------------
+  _uploadTable->setWhatsThis(tr("<p>BNC can upload clock and orbit corrections to Broadcast Ephemeris (Broadcast Corrections) as well as Code Biases in different SSR formats. You may have a situation where clocks, orbits and code biases come from an external Real-time Network Engine (1) or a situation where clock and orbit corrections are combined within BNC (2).</p><p>(1) BNC identifies a stream as coming from a Real-time Network Engine if its format is specified as 'RTNET' and hence its decoder string in the 'Streams' canvas is 'RTNET'. It encodes and uploads that stream to the specified Ntrip Broadcaster Host and Port</p><p>(2) BNC understands that it is expected to encode and upload combined Broadcast Ephemeris Corrections if you specify correction streams in the 'Combine Corrections' table.</p><p>To fill the 'Upload Corrections' table, hit the 'Add Row' button, double click on the 'Host' field to enter the IP or URL of an Ntrip Broadcaster and hit Enter. Select the Ntrip Version that shall be used for data upload. Then double click on the 'Port', 'Mountpoint' and 'Password' fields to enter the Ntrip Broadcaster IP port, the mountpoint and the stream upload password. If Ntrip Version 2 is chosen, click to the 'User' field to enter a stream upload user name. An empty 'Host' option field means that you don't want to upload corrections.</p><p>Select a target coordinate reference System (e.g. IGS20) for outgoing clock and orbit corrections.</p><p>Select a target SSR format (e.g. IGS-SSR) for outgoing clock and orbit corrections.</p><p>By default orbit and clock corrections refer to Antenna Phase Center (APC). Tick 'CoM' to refer uploaded corrections to Center of Mass instead of APC.</p><p>Specify a path for saving generated Broadcast Corrections plus Broadcast Ephemeris as SP3 orbit files. If the specified directory does not exist, BNC will not create such files. The following is a path example for a Linux system: /home/user/BKG0MGXRTS${V3PROD}.SP3.</p><p>Specify a path for saving generated Broadcast Correction clocks plus Broadcast Ephemeris clocks as Clock RINEX files. If the specified directory does not exist, BNC will not create Clock RINEX files. The following is a path example for a Linux system: /home/user/BKG0MGXRTS${V3PROD}.CLK.</p><p>Specify a path for saving generated Code Biases as SINEX Bias files. If the specified directory does not exist, BNC will not create SINEX Bias files. The following is a path example for a Linux system: /home/user/BKG0MGXRTS${V3PROD}.BIA.</p><p>Note that '${V3PROD}' produces the time stamp in the filename, which is related to the RINEX version 3 filename concept.</p><p>Finally, specify a SSR Provider ID (issued by RTCM), SSR Solution ID, and SSR Issue of Data number.</p><p>In case the 'Combine Corrections' table contains only one Broadcast Correction stream, BNC will add that stream content to the Broadcast Ephemeris to save results in files specified via SP3 and/or Clock RINEX file path. You should then define only the SP3 and Clock RINEX file path and no further option in the 'Upload Corrections' table. <i>[key: uploadMountpointsOut]</i></p>"));
+  addUploadRowButton->setWhatsThis(tr("<p>Hit 'Add Row' button to add another line to the 'Upload Corrections' table.</p>"));
+  delUploadRowButton->setWhatsThis(tr("<p>Hit 'Del Row' button to delete the highlighted line(s) from the 'Upload Corrections' table.</p>"));
+  _uploadIntrComboBox->setWhatsThis(tr("<p>Select the length of the SP3, Clock RINEX and Bias SINEX files. <i>[key: uploadIntr]</i></p>"));
+  _uploadSamplRtcmEphCorrComboBox->setWhatsThis(tr("<p>Select a stream's orbit correction sampling interval in seconds.</p><p>A value of zero '0' tells BNC to upload all available orbit and clock correction samples together in combined messages. <i>[key: uploadSamplRtcmEphCorr]</i></p>"));
+  _uploadSamplSp3ComboBox->setWhatsThis(tr("<p>Select a SP3 orbit file sampling interval in seconds.</p><p>A value of zero '0' tells BNC to store all available samples into SP3 orbit files. <i>[key: uploadSamplSp3]</i></p>"));
+  _uploadSamplClkRnxSpinBox->setWhatsThis(tr("<p>Select a Clock RINEX file sampling interval in seconds.</p><p>A value of zero '0' tells BNC to store all available samples into Clock RINEX files. <i>[key: uploadSamplClkRnx]</i></p>"));
+  _uploadSamplBiaSnxSpinBox->setWhatsThis(tr("<p>Select a Bias SINEX file sampling interval in seconds.</p><p>A value of zero '0' tells BNC to store all available samples into Bias SINEX files. <i>[key: uploadSamplBiaSnx]</i></p>"));
+  setUploadTrafoButton->setWhatsThis(tr("<p>Hit 'Custom Trafo' to specify your own 14 parameter Helmert Transformation instead of selecting a predefined transformation via option 'System'.</p>"));
+  _uploadAntexFile->setWhatsThis(tr("<p>When producing SP3 files or referring orbit and clock corrections to the satellite's Center of Mass (CoM) instead Antenna Phase Center (APC), an offset has to be applied which is available from the IGS 'ANTEX file'. You must therefore specify an 'ANTEX file' path if you want to save the stream content in SP3 format and/or refer correctors to CoM.</p><p>If you don't specify an 'ANTEX file' path, the SP3 file content as well as the orbit and clock correctors will be referred to satellite APCs. <i>[key: uploadAntexFile]</i></p>"));
+
+  // WhatsThis, Upload Ephemeris
+  // ---------------------------
+  _uploadEphTable->setWhatsThis(tr("<p>BNC can upload Broadcast Ephemeris streams in RTCM Version 3 format. </p><p>To fill the 'Upload Ephemeris' table, hit the 'Add Row' button, double click on the 'Host' field to enter the IP or URL of an Ntrip Broadcaster and hit Enter. Select the Ntrip Version that shall be used for data upload. Then double click on the 'Port', 'Mountpoint' and 'Password' fields to enter the Ntrip Broadcaster IP port, the mountpoint and the stream upload password. If Ntrip Version 2 is chosen, click to the 'User' field to enter a stream upload user name. Specify the satellite system(s) that shall be part of the uploaded stream (e.g. G for GPS or GRE for GPS+GLONASS+Galileo, or ALL). <i>[key: uploadEphMountpointsOut]</i></p>"));
+  addUploadEphRowButton->setWhatsThis(tr("<p>Hit 'Add Row' button to add another line to the 'Upload Ephemeris' table.</p>"));
+  delUploadEphRowButton->setWhatsThis(tr("<p>Hit 'Del Row' button to delete the highlighted line(s) from the 'Upload Ephemeris' table.</p>"));
+  _uploadSamplRtcmEphSpinBox->setWhatsThis(tr("<p>Select the Broadcast Ephemeris sampling interval in seconds.</p><p>Default is '5', meaning that a complete set of Broadcast Ephemeris is uploaded every 5 seconds. <i>[key: uploadSamplRtcmEph]</i></p>"));
+
+  // WhatsThis, Upload Raw Data
+  // ---------------------------
+  _uploadRawTable->setWhatsThis(tr("<p>BNC can upload Raw Data streams in any format like a NtripServer. </p><p>To fill the 'Upload Raw Data' table, hit the 'Add Row' button and double click on the 'Source Mountpoint' field to enter the Source of data from the 'Streams' section below, which shall be forwarded without decoding and hit Enter. Double click on the 'Host' field to enter the IP or URL of an Ntrip Broadcaster and hit Enter. Select the Ntrip Version that shall be used for data upload. Then double click on the 'Port', 'Upload Mountpoint' and 'Password' fields to enter the Ntrip Broadcaster IP port, the stream upload mountpoint and password. If Ntrip Version 2 is chosen, click to the 'User' field to enter a stream upload user name. </p><p> If the decoder string is not an accepted one ('RTCM_2.x', 'RTCM_3.x' and 'RTNET'), please change the decoder string to <ul>"
+                                   "<li> 'ZERO' (forward the raw data) or </li>"
+                                   "<li> 'ZERO2FILE' (forward and store the raw data)</li> </ul> in addition <i>[key: uploadRawMountpointsOut]</i></p>"));
+  addUploadEphRowButton->setWhatsThis(tr("<p>Hit 'Add Row' button to add another line to the 'Upload Raw Data' table.</p>"));
+  delUploadEphRowButton->setWhatsThis(tr("<p>Hit 'Del Row' button to delete the highlighted line(s) from the 'Upload Raw Data' table.</p>"));
+
+
+  // WhatsThis, Streams Canvas
+  // -------------------------
+  _mountPointsTable->setWhatsThis(tr("<p>Streams selected for retrieval are listed in the 'Streams' section. "
+                                     "Clicking on 'Add Stream' button opens a window that allows the user to select data streams from an Ntrip Broadcaster "
+                                     "according to their mountpoints. To remove a stream from the 'Streams' list, highlight it by clicking on it "
+                                     "and hit the 'Delete Stream' button. You can also remove multiple streams by highlighting them using +Shift and +Ctrl.</p><p>"
+                                     "BNC automatically allocates one of its internal decoders to a stream based on the stream's 'format' as given in the source-table. "
+                                     "BNC allows users to change this selection by editing the decoder string. "
+                                     "Double click on the 'decoder' field, enter your preferred decoder and then hit Enter. "
+                                     "Accepted decoder strings are 'RTCM_2.x', 'RTCM_3.x' and 'RTNET'.</p><p>"
+                                     "In case you need to log raw data as is, BNC allows to by-pass its decoders and directly save the input in daily log files. "
+                                     "To do this, specify the decoder string as 'ZERO2FILE'.</p><p>"
+                                     "BNC allows as well to forward streams related to the specified 'Mountpoint' on top of the 'Miscellaneous Panel' "
+                                     "through a TCP/IP port of your local host. "
+                                     "In this case, the stream content remains untouched; BNC does not decode or reformat the data for this output. "
+                                     "If the decoder string is not an accepted one, please change the decoder string to 'ZERO' (forward the raw data only) or 'ZERO2FILE' (forward and store the raw data) in addition.</p><p>"
+                                     "BNC can also retrieve streams from virtual reference stations (VRS). VRS streams are indicated by a 'yes' in the 'nmea' column. "
+                                     "To initiate such stream, the approximate latitude/longitude rover position is sent to the Ntrip Broadcaster "
+                                     "together with an approximation for the height. Default values for latitude and longitude can be change according to your requirement. "
+                                     "Double click on 'lat' and 'long' fields, enter the values you wish to send and then hit Enter. <i>[key: mountPoints]</i></p>"));
+  _actAddMountPoints->setWhatsThis(tr("<p>Add stream(s) to selection presented in the 'Streams' canvas.</p>"));
+  _actDeleteMountPoints->setWhatsThis(tr("<p>Delete stream(s) from selection presented in the 'Streams' canvas.</p>"));
+  _actMapMountPoints->setWhatsThis(tr("<p> Draw distribution map of stream selection presented in the 'Streams' canvas. Use mouse to zoom in or out.</p><p>Left button: Draw rectangle to zoom in.<br>Right button: Zoom out.<br>Middle button: Zoom back.</p>"));
+  _actStart->setWhatsThis(tr("<p> Start running BNC.</p>"));
+  _actStop->setWhatsThis(tr("<p> Stop running BNC.</p>"));
+
+  // WhatsThis, Log Canvas
+  // ---------------------
+  _log->setWhatsThis(tr("<p>Records of BNC's activities are shown in the 'Log' tab. The message log covers the communication status between BNC and the Ntrip Broadcaster as well as problems that occur in the communication link, stream availability, stream delay, stream conversion etc.</p>"));
+  _bncFigure->setWhatsThis(tr("<p>The bandwith consumption per stream is shown in the 'Throughput' tab in bits per second (bps) or kilobits per second (kbps).</p>"));
+  _bncFigureLate->setWhatsThis(tr("<p>The individual latency of observations of incoming streams is shown in the 'Latency' tab. Streams not carrying observations (e.g. those providing only Broadcast Ephemeris) remain unconsidered.</p><p>Note that the calculation of correct latencies requires the clock of the host computer to be properly synchronized.</p>"));
+  _bncFigurePPP->setWhatsThis(tr("<p>PPP time series of North (red), East (green) and Up (blue) displacements are shown in the 'PPP Plot' tab when the corresponding option is selected.</p><p>Values are referred to an XYZ a priori coordinate. The sliding PPP time series window covers the period of the latest 5 minutes.</p>"));
+
+
+  // Enable/Disable all Widgets
+  // --------------------------
+  slotBncTextChanged();
+  enableStartStop();
+
+  // Auto start
+  // ----------
+  if (Qt::CheckState(settings.value("autoStart").toInt()) == Qt::Checked) {
+    slotStart();
+  }
+}
+
+// Destructor
+////////////////////////////////////////////////////////////////////////////
+bncWindow::~bncWindow() {
+  if (_caster) {
+    delete _caster; BNC_CORE->setCaster(0);
+  }
+  if (_casterEph) {
+    delete _casterEph;
+  }
+  delete _bncFigureLate;
+  delete _bncFigurePPP;
+  delete _actHelp;
+  delete _actAbout;
+  delete _actFlowchart;
+  delete _actFontSel;
+  delete _actSaveOpt;
+  delete _actQuit;
+  delete _actAddMountPoints;
+  delete _actDeleteMountPoints;
+  delete _actMapMountPoints;
+  delete _actStart;
+  delete _actStop;
+  delete _actwhatsthis;
+  delete _proxyHostLineEdit;
+  delete _proxyPortLineEdit;
+  delete _sslCaCertPathLineEdit;
+  delete _sslClientCertPathLineEdit;
+  delete _sslIgnoreErrorsCheckBox;
+  delete _logFileLineEdit;
+  delete _rawOutFileLineEdit;
+  delete _rnxAppendCheckBox;
+  delete _onTheFlyComboBox;
+  delete _autoStartCheckBox;
+  delete _rnxPathLineEdit;
+  delete _rnxIntrComboBox;
+  delete _rnxSamplComboBox;
+  delete _rnxSkelExtComboBox;
+  delete _rnxSkelPathLineEdit;
+  delete _rnxFileCheckBox;
+  delete _rnxScrpLineEdit;
+  delete _rnxVersComboBox;
+  delete _rnxV2Priority;
+  delete _ephPathLineEdit;
+  //delete _ephFilePerStation;
+  delete _ephIntrComboBox;
+  delete _ephOutPortLineEdit;
+  delete _ephVersComboBox;
+  delete _corrPathLineEdit;
+  delete _corrIntrComboBox;
+  delete _corrPortLineEdit;
+  delete _outPortLineEdit;
+  delete _outWaitSpinBox;
+  delete _outSamplComboBox;
+  delete _outFileLineEdit;
+  delete _outUPortLineEdit;
+  delete _outLockTimeCheckBox;
+  delete _serialMountPointLineEdit;
+  delete _serialPortNameLineEdit;
+  delete _serialBaudRateComboBox;
+  delete _serialFlowControlComboBox;
+  delete _serialDataBitsComboBox;
+  delete _serialParityComboBox;
+  delete _serialStopBitsComboBox;
+  delete _serialAutoNMEAComboBox;
+  delete _serialFileNMEALineEdit;
+  delete _serialHeightNMEALineEdit;
+  delete _serialNMEASamplingSpinBox;
+  delete _adviseObsRateComboBox;
+  delete _adviseFailSpinBox;
+  delete _adviseRecoSpinBox;
+  delete _adviseScriptLineEdit;
+  delete _miscMountLineEdit;
+  delete _miscPortLineEdit;
+  delete _miscIntrComboBox;
+  delete _miscScanRTCMCheckBox;
+  _mountPointsTable->deleteLater();
+  delete _log;
+  delete _loggroup;
+  _cmbTable->deleteLater();
+  delete _cmbMaxresLineEdit;
+  delete _cmbMaxdisplacementLineEdit;
+  delete _cmbSamplComboBox;
+  delete _cmbLogPath;
+  delete _cmbMethodComboBox;
+  delete _cmbGpsCheckBox;
+  delete _cmbGloCheckBox;
+  delete _cmbGalCheckBox;
+  delete _cmbBdsCheckBox;
+  delete _cmbQzssCheckBox;
+  delete _cmbSbasCheckBox;
+  delete _cmbNavicCheckBox;
+  delete _cmbBsxFile;
+  delete _uploadSamplRtcmEphCorrComboBox;
+  _uploadEphTable->deleteLater();
+  _uploadRawTable->deleteLater();
+  _uploadTable->deleteLater();
+  delete _uploadIntrComboBox;
+  delete _uploadAntexFile;
+  delete _uploadSamplRtcmEphSpinBox;
+  delete _uploadSamplSp3ComboBox;
+  delete _uploadSamplClkRnxSpinBox;
+  delete _uploadSamplBiaSnxSpinBox;
+  delete _reqcActionComboBox;
+  delete _reqcObsFileChooser;
+  delete _reqcNavFileChooser;
+  delete _reqcOutObsLineEdit;
+  delete _reqcOutNavLineEdit;
+  delete _reqcOutLogLineEdit;
+  delete _reqcPlotDirLineEdit;
+  delete _reqcSkyPlotSignals;
+  delete _reqcLogSummaryOnly;
+  delete _reqcEditOptionButton;
+  delete _sp3CompFileChooser;
+  delete _sp3CompExclude;
+  delete _sp3CompLogLineEdit;
+  delete _sp3CompSummaryOnly;
+  //delete _canvas;
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::populateMountPointsTable() {
+
+  for (int iRow = _mountPointsTable->rowCount() - 1; iRow >= 0; iRow--) {
+    _mountPointsTable->removeRow(iRow);
+  }
+
+  bncSettings settings;
+
+  QListIterator<QString> it(settings.value("mountPoints").toStringList());
+  int iRow = 0;
+  while (it.hasNext()) {
+    QStringList hlp = it.next().split(" ");
+    if (hlp.size() < 7) continue;
+    _mountPointsTable->insertRow(iRow);
+
+    QUrl    url(hlp[0]);
+
+    QString format(hlp[1]);
+    QString country(hlp[2]);
+    QString latitude(hlp[3]);
+    QString longitude(hlp[4]);
+    QString nmea(hlp[5]);
+    QString ntripVersion(hlp[6]);
+
+    QString fullPath;
+    if (ntripVersion == 'S') {
+      // url.userInfo() contains the case sensitive portName
+      // the portName shall be part of the mountpointString
+      // to inform the user about the source of the stream
+      if (url.host().contains(url.userInfo().toLower())) {
+        fullPath = url.host() + url.path();
+      }
+      else {
+        fullPath =  url.userInfo() + "-" + url.host() + url.path();
+      }
+    } else {
+      fullPath = url.host() + QString(":%1").arg(url.port()) + url.path();
+    }
+
+    QTableWidgetItem* it;
+    it = new QTableWidgetItem(url.userInfo());
+    it->setFlags(it->flags() & ~Qt::ItemIsEditable);
+    _mountPointsTable->setItem(iRow, 0, it);
+
+    it = new QTableWidgetItem(fullPath);
+    it->setFlags(it->flags() & ~Qt::ItemIsEditable);
+    _mountPointsTable->setItem(iRow, 1, it);
+
+    it = new QTableWidgetItem(format);
+    _mountPointsTable->setItem(iRow, 2, it);
+
+    it = new QTableWidgetItem(country);
+    _mountPointsTable->setItem(iRow, 3, it);
+
+    if (nmea == "yes") {
+      it = new QTableWidgetItem(latitude);
+      _mountPointsTable->setItem(iRow, 4, it);
+      it = new QTableWidgetItem(longitude);
+      _mountPointsTable->setItem(iRow, 5, it);
     }
     else {
-        enableWidget(false, _cmbMethodComboBox);
-        enableWidget(false, _cmbMaxresLineEdit);
-        enableWidget(false, _cmbMaxdisplacementLineEdit);
-        enableWidget(false, _cmbSamplComboBox);
-        enableWidget(false, _cmbLogPath);
-    }
-    _cmbGpsCheckBox = new QCheckBox();
-    _cmbGpsCheckBox->setCheckState(Qt::CheckState(settings.value("cmbGps").toInt()));
-    _cmbGloCheckBox = new QCheckBox();
-    _cmbGloCheckBox->setCheckState(Qt::CheckState(settings.value("cmbGlo").toInt()));
-    _cmbGalCheckBox = new QCheckBox();
-    _cmbGalCheckBox->setCheckState(Qt::CheckState(settings.value("cmbGal").toInt()));
-    _cmbBdsCheckBox = new QCheckBox();
-    _cmbBdsCheckBox->setCheckState(Qt::CheckState(settings.value("cmbBds").toInt()));
-    _cmbQzssCheckBox = new QCheckBox();
-    _cmbQzssCheckBox->setCheckState(Qt::CheckState(settings.value("cmbQzss").toInt()));
-    _cmbSbasCheckBox = new QCheckBox();
-    _cmbSbasCheckBox->setCheckState(Qt::CheckState(settings.value("cmbSbas").toInt()));
-    _cmbNavicCheckBox = new QCheckBox();
-    _cmbNavicCheckBox->setCheckState(Qt::CheckState(settings.value("cmbNavic").toInt()));
-
-    connect(_cmbGpsCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slotBncTextChanged()));
-    connect(_cmbGloCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slotBncTextChanged()));
-    connect(_cmbGalCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slotBncTextChanged()));
-    connect(_cmbBdsCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slotBncTextChanged()));
-    connect(_cmbQzssCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slotBncTextChanged()));
-    connect(_cmbSbasCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slotBncTextChanged()));
-    connect(_cmbNavicCheckBox, SIGNAL(stateChanged(int)), this, SLOT(slotBncTextChanged()));
-
-    _cmbBsxFile = new qtFileChooser(0, qtFileChooser::File);
-    _cmbBsxFile->setFileName(settings.value("cmbBsxFile").toString());
-
-    // Upload Results
-    // -------------
-    _uploadTable = new QTableWidget(0, 16);
-    _uploadTable->setHorizontalHeaderLabels(QString("Host, Port, Mountpoint, Ntrip, User, Password, System, Format, CoM, SP3 File, RNX File, BSX File, PID, SID, IOD, Bytes").split(","));
-    _uploadTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
-    _uploadTable->setSelectionBehavior(QAbstractItemView::SelectRows);
-    _uploadTable->horizontalHeader()->resizeSection(0, 13 * ww);
-    _uploadTable->horizontalHeader()->resizeSection(1, 5 * ww);
-    _uploadTable->horizontalHeader()->resizeSection(2, 10 * ww);
-    _uploadTable->horizontalHeader()->resizeSection(3, 6 * ww);
-    _uploadTable->horizontalHeader()->resizeSection(4, 8 * ww);
-    _uploadTable->horizontalHeader()->resizeSection(5, 8 * ww);
-    _uploadTable->horizontalHeader()->resizeSection(6, 11 * ww);
-    _uploadTable->horizontalHeader()->resizeSection(7, 11 * ww);
-    _uploadTable->horizontalHeader()->resizeSection(8, 4 * ww);
-    _uploadTable->horizontalHeader()->resizeSection(9, 15 * ww);
-    _uploadTable->horizontalHeader()->resizeSection(10, 15 * ww);
-    _uploadTable->horizontalHeader()->resizeSection(11, 15 * ww);
-    _uploadTable->horizontalHeader()->resizeSection(12, 4 * ww);
-    _uploadTable->horizontalHeader()->resizeSection(13, 4 * ww);
-    _uploadTable->horizontalHeader()->resizeSection(14, 4 * ww);
-    _uploadTable->horizontalHeader()->resizeSection(15, 12 * ww);
-#if QT_VERSION < 0x050000
-    _uploadTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
-#else
-    _uploadTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive);
-#endif
-    _uploadTable->horizontalHeader()->setStretchLastSection(true);
-    _uploadTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
-
-    connect(_uploadTable, SIGNAL(itemSelectionChanged()),
-        SLOT(slotBncTextChanged()));
-
-    QPushButton* addUploadRowButton = new QPushButton("Add Row");
-    QPushButton* delUploadRowButton = new QPushButton("Del Row");
-    QPushButton* setUploadTrafoButton = new QPushButton("Custom Trafo");
-    _uploadIntrComboBox = new QComboBox;
-    _uploadIntrComboBox->setEditable(false);
-    _uploadIntrComboBox->addItems(QString("1 day,1 hour, 30 min,15 min,10 min,5 min,2 min,1 min").split(","));
-    ii = _uploadIntrComboBox->findText(settings.value("uploadIntr").toString());
-    if (ii != -1) {
-        _uploadIntrComboBox->setCurrentIndex(ii);
-    }
-
-    _uploadAntexFile = new qtFileChooser(0, qtFileChooser::File);
-    _uploadAntexFile->setFileName(settings.value("uploadAntexFile").toString());
-
-    _uploadSamplRtcmEphCorrComboBox = new QComboBox();
-    _uploadSamplRtcmEphCorrComboBox->setEditable(false);
-    _uploadSamplRtcmEphCorrComboBox->addItems(QString("0 sec,1 sec,2 sec,5 sec,10 sec,15 sec,30 sec,60 sec").split(","));
-    int pp = _uploadSamplRtcmEphCorrComboBox->findText(settings.value("uploadSamplRtcmEphCorr").toString());
-    if (pp != -1) {
-        _uploadSamplRtcmEphCorrComboBox->setCurrentIndex(pp);
-    }
-
-    _uploadSamplSp3ComboBox = new QComboBox();
-    _uploadSamplSp3ComboBox->setEditable(false);
-    _uploadSamplSp3ComboBox->addItems(QString("0 sec,30 sec,60 sec,300 sec,900 sec").split(","));
-    int oo = _uploadSamplSp3ComboBox->findText(settings.value("uploadSamplSp3").toString());
-    if (oo != -1) {
-        _uploadSamplSp3ComboBox->setCurrentIndex(oo);
-    }
-
-    _uploadSamplClkRnxSpinBox = new QSpinBox;
-    _uploadSamplClkRnxSpinBox->setMinimum(0);
-    _uploadSamplClkRnxSpinBox->setMaximum(60);
-    _uploadSamplClkRnxSpinBox->setSingleStep(5);
-    _uploadSamplClkRnxSpinBox->setMaximumWidth(9 * ww);
-    _uploadSamplClkRnxSpinBox->setValue(settings.value("uploadSamplClkRnx").toInt());
-    _uploadSamplClkRnxSpinBox->setSuffix(" sec");
-
-    _uploadSamplBiaSnxSpinBox = new QSpinBox;
-    _uploadSamplBiaSnxSpinBox->setMinimum(0);
-    _uploadSamplBiaSnxSpinBox->setMaximum(60);
-    _uploadSamplBiaSnxSpinBox->setSingleStep(5);
-    _uploadSamplBiaSnxSpinBox->setMaximumWidth(9 * ww);
-    _uploadSamplBiaSnxSpinBox->setValue(settings.value("uploadSamplBiaSnx").toInt());
-    _uploadSamplBiaSnxSpinBox->setSuffix(" sec");
-
-    int iRowT = _uploadTable->rowCount();
-    if (iRowT > 0) {
-        enableWidget(true, _uploadIntrComboBox);
-        enableWidget(true, _uploadSamplRtcmEphCorrComboBox);
-        enableWidget(true, _uploadSamplSp3ComboBox);
-        enableWidget(true, _uploadSamplClkRnxSpinBox);
-        enableWidget(true, _uploadSamplBiaSnxSpinBox);
-        enableWidget(true, _uploadAntexFile);
+      it = new QTableWidgetItem(latitude);
+      it->setFlags(it->flags() & ~Qt::ItemIsEditable);
+      _mountPointsTable->setItem(iRow, 4, it);
+
+      it = new QTableWidgetItem(longitude);
+      it->setFlags(it->flags() & ~Qt::ItemIsEditable);
+      _mountPointsTable->setItem(iRow, 5, it);
+    }
+
+    it = new QTableWidgetItem(nmea);
+    it->setFlags(it->flags() & ~Qt::ItemIsEditable);
+    _mountPointsTable->setItem(iRow, 6, it);
+
+    it = new QTableWidgetItem(ntripVersion);
+    ////    it->setFlags(it->flags() & ~Qt::ItemIsEditable);
+    _mountPointsTable->setItem(iRow, 7, it);
+
+    bncTableItem* bncIt = new bncTableItem();
+    bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
+    _mountPointsTable->setItem(iRow, 8, bncIt);
+
+    iRow++;
+  }
+
+  _mountPointsTable->sortItems(1);
+
+  enableStartStop();
+}
+
+// Retrieve Table
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::slotAddMountPoints() {
+
+  bncSettings settings;
+  QString proxyHost = settings.value("proxyHost").toString();
+  int     proxyPort = settings.value("proxyPort").toInt();
+  if (proxyHost != _proxyHostLineEdit->text() ||
+      proxyPort != _proxyPortLineEdit->text().toInt()) {
+    int iRet = QMessageBox::question(this, "Question", "Proxy options "
+                                     "changed. Use the new ones?",
+                                     QMessageBox::Yes, QMessageBox::No,
+                                     QMessageBox::NoButton);
+    if (iRet == QMessageBox::Yes) {
+      settings.setValue("proxyHost", _proxyHostLineEdit->text());
+      settings.setValue("proxyPort", _proxyPortLineEdit->text());
+    }
+  }
+
+  settings.setValue("sslCaCertPath", _sslCaCertPathLineEdit->text());
+  settings.setValue("sslClientCertPath", _sslClientCertPathLineEdit->text());
+  settings.setValue("sslIgnoreErrors", _sslIgnoreErrorsCheckBox->checkState());
+
+  QMessageBox msgBox;
+  msgBox.setIcon(QMessageBox::Question);
+  msgBox.setWindowTitle("Add Stream");
+  msgBox.setText("Add stream(s) coming from:");
+
+  QPushButton* buttonNtrip = msgBox.addButton(tr("Caster"), QMessageBox::ActionRole);
+  QPushButton* buttonIP = msgBox.addButton(tr("TCP/IP port"), QMessageBox::ActionRole);
+  QPushButton* buttonUDP = msgBox.addButton(tr("UDP port"), QMessageBox::ActionRole);
+  QPushButton* buttonSerial = msgBox.addButton(tr("Serial port"), QMessageBox::ActionRole);
+  QPushButton* buttonCancel = msgBox.addButton(tr("Cancel"), QMessageBox::ActionRole);
+
+  msgBox.exec();
+
+  if (msgBox.clickedButton() == buttonNtrip) {
+    bncTableDlg* dlg = new bncTableDlg(this);
+    dlg->move(this->pos().x() + 50, this->pos().y() + 50);
+    connect(dlg, SIGNAL(newMountPoints(QStringList*)),
+            this, SLOT(slotNewMountPoints(QStringList*)));
+    dlg->exec();
+    delete dlg;
+  }
+  else if (msgBox.clickedButton() == buttonIP) {
+    bncIpPort* ipp = new bncIpPort(this);
+    connect(ipp, SIGNAL(newMountPoints(QStringList*)),
+            this, SLOT(slotNewMountPoints(QStringList*)));
+    ipp->exec();
+    delete ipp;
+  }
+  else if (msgBox.clickedButton() == buttonUDP) {
+    bncUdpPort* udp = new bncUdpPort(this);
+    connect(udp, SIGNAL(newMountPoints(QStringList*)),
+            this, SLOT(slotNewMountPoints(QStringList*)));
+    udp->exec();
+    delete udp;
+  }
+  else if (msgBox.clickedButton() == buttonSerial) {
+    bncSerialPort* sep = new bncSerialPort(this);
+    connect(sep, SIGNAL(newMountPoints(QStringList*)),
+            this, SLOT(slotNewMountPoints(QStringList*)));
+    sep->exec();
+    delete sep;
+  }
+  else if (msgBox.clickedButton() == buttonCancel) {
+    // Cancel
+  }
+
+  enableStartStop();
+}
+
+// Delete Selected Mount Points
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::slotDeleteMountPoints() {
+
+  int nRows = _mountPointsTable->rowCount();
+  std::vector <bool> flg(nRows);
+  for (int iRow = 0; iRow < nRows; iRow++) {
+    if (_mountPointsTable->item(iRow, 1)->isSelected()) {
+      flg[iRow] = true;
     }
     else {
-        enableWidget(false, _uploadIntrComboBox);
-        enableWidget(false, _uploadSamplRtcmEphCorrComboBox);
-        enableWidget(false, _uploadSamplSp3ComboBox);
-        enableWidget(false, _uploadSamplClkRnxSpinBox);
-        enableWidget(true, _uploadSamplBiaSnxSpinBox);
-        enableWidget(false, _uploadAntexFile);
-    }
-
-    // Upload RTCM3 Ephemeris
-    // ----------------------
-    _uploadEphTable = new QTableWidget(0, 7);
-    _uploadEphTable->setColumnCount(8);
-    _uploadEphTable->setRowCount(0);
-    _uploadEphTable->setHorizontalHeaderLabels(QString("Host, Port, Mountpoint,  Ntrip, User, Password, System, Bytes").split(","));
-    _uploadEphTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
-    _uploadEphTable->setSelectionBehavior(QAbstractItemView::SelectRows);
-    _uploadEphTable->horizontalHeader()->resizeSection(0, 13 * ww);
-    _uploadEphTable->horizontalHeader()->resizeSection(1, 5 * ww);
-    _uploadEphTable->horizontalHeader()->resizeSection(2, 8 * ww);
-    _uploadEphTable->horizontalHeader()->resizeSection(3, 6 * ww);
-    _uploadEphTable->horizontalHeader()->resizeSection(4, 8 * ww);
-    _uploadEphTable->horizontalHeader()->resizeSection(5, 8 * ww);
-    _uploadEphTable->horizontalHeader()->resizeSection(6, 10 * ww);
-    _uploadEphTable->horizontalHeader()->resizeSection(7, 12 * ww);
-#if QT_VERSION < 0x050000
-    _uploadEphTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
-#else
-    _uploadEphTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive);
-#endif
-    _uploadEphTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
-
-    connect(_uploadEphTable, SIGNAL(itemSelectionChanged()),
-        SLOT(slotBncTextChanged()));
-
-    QPushButton* addUploadEphRowButton = new QPushButton("Add Row");
-    addUploadEphRowButton->setMaximumWidth(9 * ww);
-    QPushButton* delUploadEphRowButton = new QPushButton("Del Row");
-    delUploadEphRowButton->setMaximumWidth(9 * ww);
-
-    _uploadSamplRtcmEphSpinBox = new QSpinBox;
-    _uploadSamplRtcmEphSpinBox->setMinimum(0);
-    _uploadSamplRtcmEphSpinBox->setMaximum(60);
-    _uploadSamplRtcmEphSpinBox->setSingleStep(5);
-    _uploadSamplRtcmEphSpinBox->setMaximumWidth(9 * ww);
-    _uploadSamplRtcmEphSpinBox->setValue(settings.value("uploadSamplRtcmEph").toInt());
-    _uploadSamplRtcmEphSpinBox->setSuffix(" sec");
-
-    iRowT = _uploadEphTable->rowCount();
-    if (iRowT > 0) {
-        enableWidget(true, _uploadSamplRtcmEphSpinBox);
+      flg[iRow] = false;
+    }
+  }
+  for (int iRow = nRows - 1; iRow >= 0; iRow--) {
+    if (flg[iRow]) {
+      _mountPointsTable->removeRow(iRow);
+    }
+  }
+  _actDeleteMountPoints->setEnabled(false);
+
+  enableStartStop();
+}
+
+// New Mount Points Selected
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::slotNewMountPoints(QStringList* mountPoints) {
+  int iRow = 0;
+  QListIterator<QString> it(*mountPoints);
+  while (it.hasNext()) {
+    QStringList hlp = it.next().split(" ");
+
+    QUrl url(hlp[0]);
+
+    QString format(hlp[1]);
+    QString country(hlp[2]);
+    QString latitude(hlp[3]);
+    QString longitude(hlp[4]);
+    QString nmea(hlp[5]);
+    QString ntripVersion(hlp[6]);
+
+    QString fullPath;
+    if (ntripVersion == 'S') {
+      // url.userInfo() contains the case sensitive portName
+      // the portName shall be part of the mountpointString
+      // to inform the user about the source of the stream
+      if (url.host().contains(url.userInfo().toLower())) {
+        fullPath = url.host() + url.path();
+      }
+      else {
+        fullPath =  url.userInfo() + "-" + url.host() + url.path();
+      }
+    } else {
+      fullPath = url.host() + QString(":%1").arg(url.port()) + url.path();
+    }
+
+    _mountPointsTable->insertRow(iRow);
+
+    QTableWidgetItem* it;
+    it = new QTableWidgetItem(url.userInfo());
+    it->setFlags(it->flags() & ~Qt::ItemIsEditable);
+    _mountPointsTable->setItem(iRow, 0, it);
+
+    it = new QTableWidgetItem(fullPath);
+    it->setFlags(it->flags() & ~Qt::ItemIsEditable);
+    _mountPointsTable->setItem(iRow, 1, it);
+
+    it = new QTableWidgetItem(format);
+    _mountPointsTable->setItem(iRow, 2, it);
+
+    it = new QTableWidgetItem(country);
+    _mountPointsTable->setItem(iRow, 3, it);
+
+    if (nmea == "yes") {
+      it = new QTableWidgetItem(latitude);
+      _mountPointsTable->setItem(iRow, 4, it);
+      it = new QTableWidgetItem(longitude);
+      _mountPointsTable->setItem(iRow, 5, it);
     }
     else {
-        enableWidget(false, _uploadSamplRtcmEphSpinBox);
-    }
-
-    // Upload Raw data
-    // ----------------------
-    _uploadRawTable = new QTableWidget(0, 7);
-    _uploadRawTable->setColumnCount(8);
-    _uploadRawTable->setRowCount(0);
-    _uploadRawTable->setHorizontalHeaderLabels(QString("Source Mountpoint, Host, Port, Upload Mountpoint,  Ntrip, User, Password, Bytes").split(","));
-    _uploadRawTable->setSelectionMode(QAbstractItemView::ExtendedSelection);
-    _uploadRawTable->setSelectionBehavior(QAbstractItemView::SelectRows);
-    _uploadRawTable->horizontalHeader()->resizeSection(0, 13 * ww);
-    _uploadRawTable->horizontalHeader()->resizeSection(1, 13 * ww);
-    _uploadRawTable->horizontalHeader()->resizeSection(2, 5 * ww);
-    _uploadRawTable->horizontalHeader()->resizeSection(3, 13 * ww);
-    _uploadRawTable->horizontalHeader()->resizeSection(4, 6 * ww);
-    _uploadRawTable->horizontalHeader()->resizeSection(5, 8 * ww);
-    _uploadRawTable->horizontalHeader()->resizeSection(6, 8 * ww);
-    _uploadRawTable->horizontalHeader()->resizeSection(7, 10 * ww);
-    _uploadRawTable->horizontalHeader()->resizeSection(8, 12 * ww);
-#if QT_VERSION < 0x050000
-    _uploadRawTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
-#else
-    _uploadRawTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive);
-#endif
-    _uploadRawTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
-
-    connect(_uploadRawTable, SIGNAL(itemSelectionChanged()), SLOT(slotBncTextChanged()));
-
-    QPushButton* addUploadRawRowButton = new QPushButton("Add Row");
-    addUploadRawRowButton->setMaximumWidth(9 * ww);
-    QPushButton* delUploadRawRowButton = new QPushButton("Del Row");
-    delUploadRawRowButton->setMaximumWidth(9 * ww);
-
-    // Canvas with Editable Fields
-    // ---------------------------
-    _canvas = new QWidget;
-    setCentralWidget(_canvas);
-
-    _aogroup = new QTabWidget();
-    _aogroup->setElideMode(Qt::ElideNone);
-    _aogroup->setUsesScrollButtons(true);
-    QWidget* pgroup = new QWidget();
-    QWidget* ggroup = new QWidget();
-    QWidget* sgroup = new QWidget();
-    QWidget* egroup = new QWidget();
-    QWidget* agroup = new QWidget();
-    QWidget* cgroup = new QWidget();
-    QWidget* ogroup = new QWidget();
-    QWidget* rgroup = new QWidget();
-    QWidget* sergroup = new QWidget();
-    QWidget* pppGroup1 = new QWidget();
-    QWidget* pppGroup2 = new QWidget();
-    QWidget* pppGroup3 = new QWidget();
-    QWidget* pppGroup4 = new QWidget();
-    QWidget* reqcgroup = new QWidget();
-    QWidget* sp3CompGroup = new QWidget();
-    QWidget* cmbgroup = new QWidget();
-    QWidget* uploadgroup = new QWidget();
-    QWidget* uploadEphgroup = new QWidget();
-    QWidget* uploadRawgroup = new QWidget();
-    _aogroup->addTab(pgroup, tr("Network"));
-    _aogroup->addTab(ggroup, tr("General"));
-    _aogroup->addTab(ogroup, tr("RINEX Observations"));
-    _aogroup->addTab(egroup, tr("RINEX Ephemeris"));
-    _aogroup->addTab(reqcgroup, tr("RINEX Editing && QC"));
-    _aogroup->addTab(sp3CompGroup, tr("SP3 Comparison"));
-    _aogroup->addTab(cgroup, tr("Broadcast Corrections"));
-    _aogroup->addTab(sgroup, tr("Feed Engine"));
-    _aogroup->addTab(sergroup, tr("Serial Output"));
-    _aogroup->addTab(agroup, tr("Outages"));
-    _aogroup->addTab(rgroup, tr("Miscellaneous"));
-    _aogroup->addTab(pppGroup1, tr("PPP (1)"));
-    _aogroup->addTab(pppGroup2, tr("PPP (2)"));
-    _aogroup->addTab(pppGroup3, tr("PPP (3)"));
-    _aogroup->addTab(pppGroup4, tr("PPP (4)"));
-    _aogroup->addTab(cmbgroup, tr("Combine Corrections"));
-    _aogroup->addTab(uploadgroup, tr("Upload Corrections"));
-    _aogroup->addTab(uploadEphgroup, tr("Upload Ephemeris"));
-    _aogroup->addTab(uploadRawgroup, tr("Upload Raw Data"));
-
-    // Log Tab
-    // -------
-    _loggroup = new QTabWidget();
-    _loggroup->addTab(_log, tr("Log"));
-    _loggroup->addTab(_bncFigure, tr("Throughput"));
-    _loggroup->addTab(_bncFigureLate, tr("Latency"));
-    _loggroup->addTab(_bncFigurePPP, tr("PPP Plot"));
-
-    // Netowork (Proxy and SSL) Tab
-    // ----------------------------
-    QGridLayout* pLayout = new QGridLayout;
-    pLayout->setColumnMinimumWidth(0, 13 * ww);
-    _proxyPortLineEdit->setMaximumWidth(9 * ww);
-
-    pLayout->addWidget(new QLabel("Settings for proxy in protected networks and for SSL authorization, leave boxes blank if none.<br>"), 0, 0, 1, 50);
-    pLayout->addWidget(new QLabel("Proxy host"), 1, 0);
-    pLayout->addWidget(_proxyHostLineEdit, 1, 1, 1, 10);
-    pLayout->addWidget(new QLabel("Proxy port"), 2, 0);
-    pLayout->addWidget(_proxyPortLineEdit, 2, 1);
-    pLayout->addWidget(new QLabel("Path to SSL certificates"), 3, 0);
-    pLayout->addWidget(_sslCaCertPathLineEdit, 3, 1, 1, 10);
-    pLayout->addWidget(new QLabel("Default:  " + bncSslConfig::defaultPath()), 3, 11, 1, 20);
-    pLayout->addWidget(new QLabel("Path to SSL client certificates"), 4, 0);
-    pLayout->addWidget(_sslClientCertPathLineEdit, 4, 1, 1, 10);
-    pLayout->addWidget(new QLabel("Ignore SSL authorization errors"), 5, 0);
-    pLayout->addWidget(_sslIgnoreErrorsCheckBox, 5, 1, 1, 10);
-    pLayout->addWidget(new QLabel(""), 6, 1);
-    pLayout->setRowStretch(6, 999);
-
-    pgroup->setLayout(pLayout);
-
-    // General Tab
-    // -----------
-    QGridLayout* gLayout = new QGridLayout;
-    gLayout->setColumnMinimumWidth(0, 14 * ww);
-    _onTheFlyComboBox->setMaximumWidth(9 * ww);
-
-    gLayout->addWidget(new QLabel("General settings for logfile, file handling, configuration on-the-fly, auto-start, and raw file output.<br>"), 0, 0, 1, 50);
-    gLayout->addWidget(new QLabel("Logfile (full path)"), 1, 0);
-    gLayout->addWidget(_logFileLineEdit, 1, 1, 1, 20);
-    gLayout->addWidget(new QLabel("Append files"), 2, 0);
-    gLayout->addWidget(_rnxAppendCheckBox, 2, 1);
-    gLayout->addWidget(new QLabel("Reread configuration"), 3, 0);
-    gLayout->addWidget(_onTheFlyComboBox, 3, 1);
-    gLayout->addWidget(new QLabel("Auto start"), 4, 0);
-    gLayout->addWidget(_autoStartCheckBox, 4, 1);
-    gLayout->addWidget(new QLabel("Raw output file (full path)"), 5, 0);
-    gLayout->addWidget(_rawOutFileLineEdit, 5, 1, 1, 20);
-    gLayout->addWidget(new QLabel(""), 6, 1);
-    gLayout->setRowStretch(7, 999);
-
-    ggroup->setLayout(gLayout);
-
-    // RINEX Observations
-    // ------------------
-    QGridLayout* oLayout = new QGridLayout;
-    oLayout->setColumnMinimumWidth(0, 14 * ww);
-    _rnxIntrComboBox->setMaximumWidth(9 * ww);
-    _rnxSamplComboBox->setMaximumWidth(9 * ww);
-    _rnxSkelExtComboBox->setMaximumWidth(9 * ww);
-
-    oLayout->addWidget(new QLabel("Saving RINEX observation files.<br>"), 0, 0, 1, 50);
-    oLayout->addWidget(new QLabel("Directory"), 1, 0);
-    oLayout->addWidget(_rnxPathLineEdit, 1, 1, 1, 15);
-    oLayout->addWidget(new QLabel("Interval"), 2, 0);
-    oLayout->addWidget(_rnxIntrComboBox, 2, 1);
-    oLayout->addWidget(new QLabel("  Sampling"), 2, 2, Qt::AlignRight);
-    oLayout->addWidget(_rnxSamplComboBox, 2, 3, Qt::AlignRight);
-    oLayout->addWidget(new QLabel("Skeleton extension"), 3, 0);
-    oLayout->addWidget(_rnxSkelExtComboBox, 3, 1, Qt::AlignLeft);
-    oLayout->addWidget(new QLabel("Skeleton mandatory"), 3, 2, Qt::AlignRight);
-    oLayout->addWidget(_rnxFileCheckBox, 3, 3);
-    oLayout->addWidget(new QLabel("Skeleton Directory"), 4, 0);
-    oLayout->addWidget(_rnxSkelPathLineEdit, 4, 1, 1, 15);
-    oLayout->addWidget(new QLabel("Script (full path)"), 5, 0);
-    oLayout->addWidget(_rnxScrpLineEdit, 5, 1, 1, 15);
-    oLayout->addWidget(new QLabel("Version"), 6, 0);
-    oLayout->addWidget(_rnxVersComboBox, 6, 1);
-    oLayout->addWidget(new QLabel("Signal priority"), 6, 2, Qt::AlignRight);
-    oLayout->addWidget(_rnxV2Priority, 6, 3, 1, 13);
-    oLayout->addWidget(new QLabel(""), 7, 1);
-    oLayout->setRowStretch(8, 999);
-
-    ogroup->setLayout(oLayout);
-
-    // RINEX Ephemeris
-    // ---------------
-    QGridLayout* eLayout = new QGridLayout;
-    eLayout->setColumnMinimumWidth(0, 14 * ww);
-    _ephIntrComboBox->setMaximumWidth(9 * ww);
-    _ephOutPortLineEdit->setMaximumWidth(9 * ww);
-
-    eLayout->addWidget(new QLabel("Saving RINEX navigation files and ephemeris output through IP port.<br>"), 0, 0, 1, 70);
-    eLayout->addWidget(new QLabel("Directory"), 1, 0);
-    eLayout->addWidget(_ephPathLineEdit, 1, 1, 1, 30);
-    eLayout->addWidget(new QLabel("Interval"), 2, 0);
-    eLayout->addWidget(_ephIntrComboBox, 2, 1);
-    eLayout->addWidget(new QLabel("Port"), 3, 0);
-    eLayout->addWidget(_ephOutPortLineEdit, 3, 1);
-    eLayout->addWidget(new QLabel("Version"), 4, 0);
-    eLayout->addWidget(_ephVersComboBox, 4, 1);
-    eLayout->setRowStretch(5, 999);
-    //eLayout->addWidget(new QLabel("File per Station"),              5, 0);
-    //eLayout->addWidget(_ephFilePerStation,                          5, 1);
-    //eLayout->setRowStretch(6, 999);
-
-    egroup->setLayout(eLayout);
-
-
-    // Broadcast Corrections
-    // ---------------------
-    QGridLayout* cLayout = new QGridLayout;
-    cLayout->setColumnMinimumWidth(0, 14 * ww);
-    _corrIntrComboBox->setMaximumWidth(9 * ww);
-    _corrPortLineEdit->setMaximumWidth(9 * ww);
-
-    cLayout->addWidget(new QLabel("Saving Broadcast Ephemeris correction files and correction output through IP port.<br>"), 0, 0, 1, 70);
-    cLayout->addWidget(new QLabel("Directory, ASCII"), 1, 0);
-    cLayout->addWidget(_corrPathLineEdit, 1, 1, 1, 30);
-    cLayout->addWidget(new QLabel("Interval"), 2, 0);
-    cLayout->addWidget(_corrIntrComboBox, 2, 1);
-    cLayout->addWidget(new QLabel("Port"), 3, 0);
-    cLayout->addWidget(_corrPortLineEdit, 3, 1);
-    cLayout->addWidget(new QLabel(""), 4, 1);
-    cLayout->setRowStretch(7, 999);
-    cgroup->setLayout(cLayout);
-
-    // Feed Engine
-    // -----------
-    QGridLayout* sLayout = new QGridLayout;
-    sLayout->setColumnMinimumWidth(0, 14 * ww);
-    _outPortLineEdit->setMaximumWidth(9 * ww);
-    _outWaitSpinBox->setMaximumWidth(9 * ww);
-    _outSamplComboBox->setMaximumWidth(9 * ww);
-    _outUPortLineEdit->setMaximumWidth(9 * ww);
-
-    sLayout->addWidget(new QLabel("Output decoded observations in ASCII format to feed a real-time GNSS network engine.<br>"), 0, 0, 1, 50);
-    sLayout->addWidget(new QLabel("Port"), 1, 0);
-    sLayout->addWidget(_outPortLineEdit, 1, 1);
-    sLayout->addWidget(new QLabel("       Wait for full obs epoch"), 1, 2, Qt::AlignRight);
-    sLayout->addWidget(_outWaitSpinBox, 1, 3, Qt::AlignLeft);
-    sLayout->addWidget(new QLabel("Sampling"), 2, 0);
-    sLayout->addWidget(_outSamplComboBox, 2, 1, Qt::AlignLeft);
-    sLayout->addWidget(new QLabel("File (full path)"), 3, 0);
-    sLayout->addWidget(_outFileLineEdit, 3, 1, 1, 10);
-    sLayout->addWidget(new QLabel("Port (unsynchronized)"), 4, 0);
-    sLayout->addWidget(_outUPortLineEdit, 4, 1);
-    sLayout->addWidget(new QLabel("Print lock time"), 5, 0);
-    sLayout->addWidget(_outLockTimeCheckBox, 5, 1);
-    sLayout->addWidget(new QLabel(""), 6, 1);
-    sLayout->setRowStretch(7, 999);
-
-    sgroup->setLayout(sLayout);
-
-    // Serial Output
-    // -------------
-    QGridLayout* serLayout = new QGridLayout;
-    serLayout->setColumnMinimumWidth(0, 12 * ww);
-    _serialBaudRateComboBox->setMaximumWidth(9 * ww);
-    _serialFlowControlComboBox->setMaximumWidth(11 * ww);
-    _serialDataBitsComboBox->setMaximumWidth(5 * ww);
-    _serialParityComboBox->setMaximumWidth(9 * ww);
-    _serialStopBitsComboBox->setMaximumWidth(5 * ww);
-    _serialAutoNMEAComboBox->setMaximumWidth(14 * ww);
-    _serialHeightNMEALineEdit->setMaximumWidth(8 * ww);
-    _serialNMEASamplingSpinBox->setMaximumWidth(8 * ww);
-
-    serLayout->addWidget(new QLabel("Port settings to feed a serial connected receiver.<br>"), 0, 0, 1, 30);
-    serLayout->addWidget(new QLabel("Mountpoint"), 1, 0, Qt::AlignLeft);
-    serLayout->addWidget(_serialMountPointLineEdit, 1, 1, 1, 2);
-    serLayout->addWidget(new QLabel("Port name"), 2, 0, Qt::AlignLeft);
-    serLayout->addWidget(_serialPortNameLineEdit, 2, 1, 1, 2);
-    serLayout->addWidget(new QLabel("Baud rate"), 3, 0, Qt::AlignLeft);
-    serLayout->addWidget(_serialBaudRateComboBox, 3, 1);
-    serLayout->addWidget(new QLabel("Flow control"), 3, 2, Qt::AlignRight);
-    serLayout->addWidget(_serialFlowControlComboBox, 3, 3);
-    serLayout->addWidget(new QLabel("Data bits"), 4, 0, Qt::AlignLeft);
-    serLayout->addWidget(_serialDataBitsComboBox, 4, 1);
-    serLayout->addWidget(new QLabel("Parity"), 4, 2, Qt::AlignRight);
-    serLayout->addWidget(_serialParityComboBox, 4, 3);
-    serLayout->addWidget(new QLabel("   Stop bits"), 4, 4, Qt::AlignRight);
-    serLayout->addWidget(_serialStopBitsComboBox, 4, 5);
-    serLayout->addWidget(new QLabel("NMEA"), 5, 0);
-    serLayout->addWidget(_serialAutoNMEAComboBox, 5, 1);
-    serLayout->addWidget(new QLabel("    File (full path)"), 5, 2, Qt::AlignRight);
-    serLayout->addWidget(_serialFileNMEALineEdit, 5, 3, 1, 10);
-    serLayout->addWidget(new QLabel("Height"), 5, 14, Qt::AlignRight);
-    serLayout->addWidget(_serialHeightNMEALineEdit, 5, 15, 1, 11);
-    serLayout->addWidget(new QLabel("Sampling"), 5, 25, Qt::AlignRight);
-    serLayout->addWidget(_serialNMEASamplingSpinBox, 5, 26, 1, 12);
-    serLayout->addWidget(new QLabel(""), 6, 1);
-    serLayout->setRowStretch(7, 999);
-
-    sergroup->setLayout(serLayout);
-
-    // Outages
-    // -------
-    QGridLayout* aLayout = new QGridLayout;
-    aLayout->setColumnMinimumWidth(0, 14 * ww);
-    _adviseObsRateComboBox->setMaximumWidth(9 * ww);
-    _adviseFailSpinBox->setMaximumWidth(9 * ww);
-    _adviseRecoSpinBox->setMaximumWidth(9 * ww);
-
-    aLayout->addWidget(new QLabel("Failure and recovery reports, advisory notes.<br>"), 0, 0, 1, 50, Qt::AlignLeft);
-    aLayout->addWidget(new QLabel("Observation rate"), 1, 0);
-    aLayout->addWidget(_adviseObsRateComboBox, 1, 1);
-    aLayout->addWidget(new QLabel("Failure threshold"), 2, 0);
-    aLayout->addWidget(_adviseFailSpinBox, 2, 1);
-    aLayout->addWidget(new QLabel("Recovery threshold"), 3, 0);
-    aLayout->addWidget(_adviseRecoSpinBox, 3, 1);
-    aLayout->addWidget(new QLabel("Script (full path)"), 4, 0);
-    aLayout->addWidget(_adviseScriptLineEdit, 4, 1, 1, 20);
-    aLayout->addWidget(new QLabel(""), 5, 1);
-    aLayout->setRowStretch(6, 999);
-
-    agroup->setLayout(aLayout);
-
-    // Miscellaneous
-    // -------------
-    QGridLayout* rLayout = new QGridLayout;
-    rLayout->setColumnMinimumWidth(0, 14 * ww);
-    _miscIntrComboBox->setMaximumWidth(9 * ww);
-    _miscPortLineEdit->setMaximumWidth(9 * ww);
-
-    rLayout->addWidget(new QLabel("Log latencies or scan RTCM streams for message types and antenna information or output raw data through TCP/IP port.<br>"), 0, 0, 1, 50);
-    rLayout->addWidget(new QLabel("Mountpoint"), 1, 0);
-    rLayout->addWidget(_miscMountLineEdit, 1, 1, 1, 7);
-    rLayout->addWidget(new QLabel("Log latency"), 2, 0);
-    rLayout->addWidget(_miscIntrComboBox, 2, 1);
-    rLayout->addWidget(new QLabel("Scan RTCM"), 3, 0);
-    rLayout->addWidget(_miscScanRTCMCheckBox, 3, 1);
-    rLayout->addWidget(new QLabel("Port"), 4, 0);
-    rLayout->addWidget(_miscPortLineEdit, 4, 1);
-    rLayout->addWidget(new QLabel(""), 5, 1);
-    rLayout->setRowStretch(6, 999);
-
-    rgroup->setLayout(rLayout);
-
-    // PPP
-    // ---
-    _pppWidgets._dataSource->setMaximumWidth(15 * ww);
-    _pppWidgets._corrMount->setMaximumWidth(15 * ww);
-    _pppWidgets._nmeaPath->setMaximumWidth(35 * ww);
-    _pppWidgets._logPath->setMaximumWidth(35 * ww);
-    _pppWidgets._snxtroPath->setMaximumWidth(35 * ww);
-    _pppWidgets._snxtroIntr->setMaximumWidth(7 * ww);
-    _pppWidgets._snxtroAc->setMaximumWidth(7 * ww);
-    _pppWidgets._snxtroSolId->setMaximumWidth(7 * ww);
-    _pppWidgets._snxtroSolType->setMaximumWidth(7 * ww);
-    _pppWidgets._snxtroCampId->setMaximumWidth(7 * ww);
-    _pppWidgets._ionoMount->setMaximumWidth(15 * ww);
-
-
-    QGridLayout* pppLayout1 = new QGridLayout();
-    int ir = 0;
-    pppLayout1->addWidget(new QLabel("Precise Point Positioning - Input and Output.<br>"), ir, 0, 1, 7, Qt::AlignLeft);
-    ++ir;
-    pppLayout1->addWidget(new QLabel("Data source"), ir, 0);
-    pppLayout1->addWidget(_pppWidgets._dataSource, ir, 1);
-    pppLayout1->addWidget(new QLabel("   Logfile directory"), ir, 4);
-    pppLayout1->addWidget(_pppWidgets._logPath, ir, 5, 1, 3);
-    ++ir;
-    pppLayout1->addWidget(new QLabel("Corrections stream"), ir, 0);
-    pppLayout1->addWidget(_pppWidgets._corrMount, ir, 1);
-    pppLayout1->addWidget(new QLabel("Corrections file"), ir, 2);
-    pppLayout1->addWidget(_pppWidgets._corrFile, ir, 3);
-    pppLayout1->addWidget(new QLabel("   NMEA directory"), ir, 4);
-    pppLayout1->addWidget(_pppWidgets._nmeaPath, ir, 5, 1, 3);
-    ++ir;
-#ifdef USE_PPP
-    pppLayout1->addWidget(new QLabel("Ionosphere stream"), ir, 0);
-    pppLayout1->addWidget(_pppWidgets._ionoMount, ir, 1);
-    pppLayout1->addWidget(new QLabel("Ionosphere file"), ir, 2);
-    pppLayout1->addWidget(_pppWidgets._ionoFile, ir, 3);
-#endif
-    pppLayout1->addWidget(new QLabel("   SNX TRO directory"), ir, 4);
-    pppLayout1->addWidget(_pppWidgets._snxtroPath, ir, 5, 1, 3);
-    ++ir;
-    pppLayout1->addWidget(new QLabel("RINEX Obs file"), ir, 0);
-    pppLayout1->addWidget(_pppWidgets._rinexObs, ir, 1);
-    pppLayout1->addWidget(new QLabel("RINEX Nav file"), ir, 2);
-    pppLayout1->addWidget(_pppWidgets._rinexNav, ir, 3);
-    pppLayout1->addWidget(new QLabel("   SNX TRO interval"), ir, 4);
-    pppLayout1->addWidget(_pppWidgets._snxtroIntr, ir, 5);
-    pppLayout1->addWidget(new QLabel("   SNX TRO sampling"), ir, 6);
-    pppLayout1->addWidget(_pppWidgets._snxtroSampl, ir, 7, Qt::AlignRight);
-    ++ir;
-    pppLayout1->addWidget(new QLabel("ANTEX file"), ir, 0);
-    pppLayout1->addWidget(_pppWidgets._antexFile, ir, 1);
-    pppLayout1->addWidget(new QLabel("Coordinates file"), ir, 2);
-    pppLayout1->addWidget(_pppWidgets._crdFile, ir, 3);
-    pppLayout1->addWidget(new QLabel("   SNX TRO AC"), ir, 4);
-    pppLayout1->addWidget(_pppWidgets._snxtroAc, ir, 5);
-    pppLayout1->addWidget(new QLabel("   SNX TRO solution ID"), ir, 6);
-    pppLayout1->addWidget(_pppWidgets._snxtroSolId, ir, 7, Qt::AlignRight);
-    ++ir;
-#ifdef USE_PPP
-    pppLayout1->addWidget(new QLabel("BLQ file"), ir, 0);
-    pppLayout1->addWidget(_pppWidgets._blqFile, ir, 1);
-    pppLayout1->addWidget(new QLabel("   SNX TRO campaign ID"), ir, 4);
-    pppLayout1->addWidget(_pppWidgets._snxtroCampId, ir, 5);
-    pppLayout1->addWidget(new QLabel("   SNX TRO solution type"), ir, 6);
-    pppLayout1->addWidget(_pppWidgets._snxtroSolType, ir, 7, Qt::AlignRight);
-#endif
-    pppLayout1->setRowStretch(ir + 1, 999);
-    pppGroup1->setLayout(pppLayout1);
-
-    QGridLayout* pppLayout2 = new QGridLayout();
-    ir = 0;
-    pppLayout2->addWidget(new QLabel("Precise Point Positioning - Options.<br>"), ir, 0, 1, 2, Qt::AlignLeft);
-    ++ir;
-    pppLayout2->addWidget(new QLabel("GPS LCs"), ir, 0, Qt::AlignLeft);
-    pppLayout2->addWidget(_pppWidgets._lcGPS, ir, 1);
-    pppLayout2->addItem(new QSpacerItem(8 * ww, 0), ir, 2);
-    pppLayout2->addWidget(new QLabel("Sigma C1"), ir, 3, Qt::AlignLeft);
-    pppLayout2->addWidget(_pppWidgets._sigmaC1, ir, 4); _pppWidgets._sigmaC1->setMaximumWidth(8 * ww);
-    pppLayout2->addItem(new QSpacerItem(8 * ww, 0), ir, 5);
-    pppLayout2->addWidget(new QLabel("Sigma L1"), ir, 6, Qt::AlignLeft);
-    pppLayout2->addWidget(_pppWidgets._sigmaL1, ir, 7); _pppWidgets._sigmaL1->setMaximumWidth(8 * ww);
-    ++ir;
-    pppLayout2->addWidget(new QLabel("GLONASS LCs"), ir, 0, Qt::AlignLeft);
-    pppLayout2->addWidget(_pppWidgets._lcGLONASS, ir, 1);
-    pppLayout2->addWidget(new QLabel("Max Res C1"), ir, 3, Qt::AlignLeft);
-    pppLayout2->addWidget(_pppWidgets._maxResC1, ir, 4); _pppWidgets._maxResC1->setMaximumWidth(8 * ww);
-    pppLayout2->addWidget(new QLabel("Max Res L1"), ir, 6, Qt::AlignLeft);
-    pppLayout2->addWidget(_pppWidgets._maxResL1, ir, 7); _pppWidgets._maxResL1->setMaximumWidth(8 * ww);
-    ++ir;
-    pppLayout2->addWidget(new QLabel("Galileo LCs"), ir, 0, Qt::AlignLeft);
-    pppLayout2->addWidget(_pppWidgets._lcGalileo, ir, 1);
-    pppLayout2->addWidget(new QLabel("Ele Wgt Code"), ir, 3, Qt::AlignLeft);
-    pppLayout2->addWidget(_pppWidgets._eleWgtCode, ir, 4);
-    pppLayout2->addWidget(new QLabel("Ele Wgt Phase"), ir, 6, Qt::AlignLeft);
-    pppLayout2->addWidget(_pppWidgets._eleWgtPhase, ir, 7);
-    ++ir;
-    pppLayout2->addWidget(new QLabel("BDS LCs"), ir, 0, Qt::AlignLeft);
-    pppLayout2->addWidget(_pppWidgets._lcBDS, ir, 1);
-    pppLayout2->addWidget(new QLabel("Min # of Obs"), ir, 3, Qt::AlignLeft);
-    pppLayout2->addWidget(_pppWidgets._minObs, ir, 4);
-    pppLayout2->addWidget(new QLabel("Min Elevation"), ir, 6, Qt::AlignLeft);
-    pppLayout2->addWidget(_pppWidgets._minEle, ir, 7); _pppWidgets._minEle->setMaximumWidth(8 * ww);
-    ++ir;
-#ifdef USE_PPP
-    pppLayout2->addWidget(new QLabel("Constraints"), ir, 0, Qt::AlignLeft);
-    pppLayout2->addWidget(_pppWidgets._constraints, ir, 1);
-    pppLayout2->addWidget(new QLabel("Sigma GIM"), ir, 3, Qt::AlignLeft);
-    pppLayout2->addWidget(_pppWidgets._sigmaGIM, ir, 4); _pppWidgets._sigmaGIM->setMaximumWidth(8 * ww);
-#endif
-    pppLayout2->addItem(new QSpacerItem(8 * ww, 0), ir, 5);
-    pppLayout2->addWidget(new QLabel("Wait for clock corr."), ir, 6, Qt::AlignLeft);
-    pppLayout2->addWidget(_pppWidgets._corrWaitTime, ir, 7);
-    ++ir;
-    pppLayout2->addItem(new QSpacerItem(8 * ww, 0), ir, 2);
-#ifdef USE_PPP
-    pppLayout2->addWidget(new QLabel("Max Res GIM"), ir, 3, Qt::AlignLeft);
-    pppLayout2->addWidget(_pppWidgets._maxResGIM, ir, 4); _pppWidgets._maxResGIM->setMaximumWidth(8 * ww);
-#endif
-    pppLayout2->addWidget(new QLabel("Seeding (sec)"), ir, 6, Qt::AlignLeft);
-    pppLayout2->addWidget(_pppWidgets._seedingTime, ir, 7); _pppWidgets._seedingTime->setMaximumWidth(8 * ww);
-    ++ir;
-    pppLayout2->addWidget(new QLabel(""), ir, 8);
-    pppLayout2->setColumnStretch(8, 999);
-    ++ir;
-    pppLayout2->addWidget(new QLabel(""), ir, 1);
-    pppLayout2->setRowStretch(ir, 999);
-
-    pppGroup2->setLayout(pppLayout2);
-
-    QVBoxLayout* pppLayout3 = new QVBoxLayout();
-    pppLayout3->addWidget(new QLabel("Precise Point Positioning - Processed Stations.<br>"));
-    pppLayout3->addWidget(_pppWidgets._staTable, 99);
-    QHBoxLayout* pppLayout3sub = new QHBoxLayout();
-    pppLayout3sub->addWidget(_pppWidgets._addStaButton);
-    pppLayout3sub->addWidget(_pppWidgets._delStaButton);
-    pppLayout3sub->addStretch(99);
-
-    pppLayout3->addLayout(pppLayout3sub);
-
-    pppGroup3->setLayout(pppLayout3);
-
-    // ------------------------
-    connect(_pppWidgets._mapWinButton, SIGNAL(clicked()), SLOT(slotMapPPP()));
-    _pppWidgets._mapSpeedSlider->setMinimumWidth(33 * ww);
-    _pppWidgets._audioResponse->setMaximumWidth(8 * ww);
-
-    QGridLayout* pppLayout4 = new QGridLayout();
-    ir = 0;
-    pppLayout4->addWidget(new QLabel("Precise Point Positioning - Plots.<br>"), ir, 0, 1, 50, Qt::AlignLeft);
-    ++ir;
-    pppLayout4->addWidget(new QLabel("PPP Plot"), ir, 0, Qt::AlignLeft);
-    pppLayout4->addWidget(_pppWidgets._plotCoordinates, ir, 1, Qt::AlignLeft);
-    pppLayout4->addWidget(new QLabel("Mountpoint"), ir, 2, 1, 10, Qt::AlignLeft);
-    pppLayout4->addWidget(_pppWidgets._audioResponse, ir, 4, Qt::AlignLeft);
-    pppLayout4->addWidget(new QLabel("Audio response"), ir, 5, Qt::AlignRight);
-    ++ir;
-    pppLayout4->addWidget(new QLabel("Track map"), ir, 0, Qt::AlignLeft);
-    pppLayout4->addWidget(_pppWidgets._mapWinButton, ir, 1, Qt::AlignLeft);
-    ++ir;
-    pppLayout4->addWidget(new QLabel("Dot-properties"), ir, 0, Qt::AlignLeft);
-    pppLayout4->addWidget(_pppWidgets._mapWinDotSize, ir, 1, Qt::AlignLeft);
-    pppLayout4->addWidget(new QLabel("Size    "), ir, 2, Qt::AlignLeft);
-    pppLayout4->addWidget(_pppWidgets._mapWinDotColor, ir, 3, Qt::AlignLeft);
-    pppLayout4->addWidget(new QLabel("Color"), ir, 4, Qt::AlignLeft);
-    ++ir;
-    pppLayout4->addWidget(new QLabel("Post-processing speed"), ir, 0, Qt::AlignLeft);
-    pppLayout4->addWidget(_pppWidgets._mapSpeedSlider, ir, 1, 1, 20, Qt::AlignLeft);
-    ++ir;
-    pppLayout4->addWidget(new QLabel(""), ir, 1);
-    pppLayout4->setRowStretch(ir, 999);
-
-    pppGroup4->setLayout(pppLayout4);
-
-    // Reqc Processing
-    // ---------------
-    _reqcActionComboBox = new QComboBox();
-    _reqcActionComboBox->setEditable(false);
-    _reqcActionComboBox->addItems(QString(",Edit/Concatenate,Analyze").split(","));
-    int ip = _reqcActionComboBox->findText(settings.value("reqcAction").toString());
-    if (ip != -1) {
-        _reqcActionComboBox->setCurrentIndex(ip);
-    }
-    connect(_reqcActionComboBox, SIGNAL(currentIndexChanged(const QString&)),
-        this, SLOT(slotBncTextChanged()));
-
-    QGridLayout* reqcLayout = new QGridLayout;
-    _reqcActionComboBox->setMinimumWidth(15 * ww);
-    _reqcActionComboBox->setMaximumWidth(20 * ww);
-
-    _reqcObsFileChooser = new qtFileChooser(0, qtFileChooser::Files);
-    _reqcObsFileChooser->setFileName(settings.value("reqcObsFile").toString());
-
-    _reqcNavFileChooser = new qtFileChooser(0, qtFileChooser::Files);
-    _reqcNavFileChooser->setFileName(settings.value("reqcNavFile").toString());
-    _reqcOutObsLineEdit = new QLineEdit(settings.value("reqcOutObsFile").toString());
-    _reqcOutNavLineEdit = new QLineEdit(settings.value("reqcOutNavFile").toString());
-    _reqcOutLogLineEdit = new QLineEdit(settings.value("reqcOutLogFile").toString());
-    _reqcPlotDirLineEdit = new QLineEdit(settings.value("reqcPlotDir").toString());
-    _reqcSkyPlotSignals = new QLineEdit(settings.value("reqcSkyPlotSignals").toString());
-
-    connect(_reqcSkyPlotSignals, SIGNAL(textChanged(const QString&)),
-        this, SLOT(slotBncTextChanged()));
-
-    _reqcLogSummaryOnly = new QCheckBox();
-    _reqcLogSummaryOnly->setCheckState(Qt::CheckState(settings.value("reqcLogSummaryOnly").toInt()));
-
-    ir = 0;
-    reqcLayout->addWidget(new QLabel("RINEX file editing, concatenation and quality check.<br>"), ir, 0, 1, 8);
-    ++ir;
-    reqcLayout->addWidget(new QLabel("Action"), ir, 0);
-    reqcLayout->addWidget(_reqcActionComboBox, ir, 1);
-    _reqcEditOptionButton = new QPushButton("Set Edit Options");
-    _reqcEditOptionButton->setMinimumWidth(15 * ww);
-    _reqcEditOptionButton->setMaximumWidth(20 * ww);
-
-    reqcLayout->addWidget(_reqcEditOptionButton, ir, 3);
-    ++ir;
-    reqcLayout->addWidget(new QLabel("Input files (full path)"), ir, 0);
-    reqcLayout->addWidget(_reqcObsFileChooser, ir, 1);
-    _reqcObsFileChooser->setMaximumWidth(40 * ww);
-    reqcLayout->addWidget(new QLabel("  Obs"), ir, 2);
-    reqcLayout->addWidget(_reqcNavFileChooser, ir, 3);
-    _reqcNavFileChooser->setMaximumWidth(40 * ww);
-    reqcLayout->addWidget(new QLabel("  Nav"), ir, 4);
-    ++ir;
-    reqcLayout->addWidget(new QLabel("Output file (full path)"), ir, 0);
-    reqcLayout->addWidget(_reqcOutObsLineEdit, ir, 1);
-    _reqcOutObsLineEdit->setMaximumWidth(40 * ww);
-    reqcLayout->addWidget(new QLabel("  Obs"), ir, 2);
-    reqcLayout->addWidget(_reqcOutNavLineEdit, ir, 3);
-    _reqcOutNavLineEdit->setMaximumWidth(40 * ww);
-    reqcLayout->addWidget(new QLabel("  Nav"), ir, 4);
-    ++ir;
-    reqcLayout->addWidget(new QLabel("Logfile"), ir, 0);
-    reqcLayout->addWidget(_reqcOutLogLineEdit, ir, 1);
-    _reqcOutLogLineEdit->setMaximumWidth(40 * ww);
-    reqcLayout->addWidget(new QLabel("  Summary only"), ir, 2);
-    reqcLayout->addWidget(_reqcLogSummaryOnly, ir, 3);
-    ++ir;
-    reqcLayout->addWidget(new QLabel("Plots for signals"), ir, 0);
-    reqcLayout->addWidget(_reqcSkyPlotSignals, ir, 1);
-    _reqcSkyPlotSignals->setMaximumWidth(40 * ww);
-    ++ir;
-    reqcLayout->addWidget(new QLabel("Directory for plots"), ir, 0);
-    reqcLayout->addWidget(_reqcPlotDirLineEdit, ir, 1);
-    _reqcPlotDirLineEdit->setMaximumWidth(40 * ww);
-    ++ir;
-    reqcLayout->setRowStretch(ir, 999);
-
-    reqcLayout->setColumnMinimumWidth(2, 8 * ww);
-    reqcLayout->setColumnMinimumWidth(4, 8 * ww);
-
-    reqcgroup->setLayout(reqcLayout);
-
-    connect(_reqcEditOptionButton, SIGNAL(clicked()),
-        this, SLOT(slotReqcEditOption()));
-
-    QGridLayout* sp3CompLayout = new QGridLayout;
-
-    _sp3CompFileChooser = new qtFileChooser(0, qtFileChooser::Files);
-    _sp3CompFileChooser->setFileName(settings.value("sp3CompFile").toString());
-    _sp3CompFileChooser->setMinimumWidth(15 * ww);
-    _sp3CompFileChooser->setMaximumWidth(40 * ww);
-
-    _sp3CompExclude = new QLineEdit(settings.value("sp3CompExclude").toString());
-    _sp3CompExclude->setMinimumWidth(18 * ww);
-    _sp3CompExclude->setMaximumWidth(18 * ww);
-
-    _sp3CompLogLineEdit = new QLineEdit(settings.value("sp3CompOutLogFile").toString());
-    _sp3CompLogLineEdit->setMinimumWidth(18 * ww);
-    _sp3CompLogLineEdit->setMaximumWidth(18 * ww);
-
-    _sp3CompSummaryOnly = new QCheckBox();
-    _sp3CompSummaryOnly->setCheckState(Qt::CheckState(settings.value("sp3CompSummaryOnly").toInt()));
-
-    ir = 0;
-    sp3CompLayout->addWidget(new QLabel("Orbit and clock comparison.<br>"), ir, 0, 1, 40);
-    ++ir;
-    sp3CompLayout->addWidget(new QLabel("Input SP3 files (full path)"), ir, 0, Qt::AlignLeft);
-    sp3CompLayout->addWidget(_sp3CompFileChooser, ir, 1, 1, 20);
-    ++ir;
-    sp3CompLayout->addWidget(new QLabel("Exclude satellites"), ir, 0, Qt::AlignLeft);
-    sp3CompLayout->addWidget(_sp3CompExclude, ir, 1, Qt::AlignRight);
-    ++ir;
-    sp3CompLayout->addWidget(new QLabel("Logfile"), ir, 0, Qt::AlignLeft);
-    sp3CompLayout->addWidget(_sp3CompLogLineEdit, ir, 1, Qt::AlignRight);
-    ++ir;
-    sp3CompLayout->addWidget(new QLabel("Summary only"), ir, 0);
-    sp3CompLayout->addWidget(_sp3CompSummaryOnly, ir, 1);
-    ++ir;
-    sp3CompLayout->addWidget(new QLabel(""), ir, 1);
-    ++ir;
-    sp3CompLayout->setRowStretch(ir, 999);
-
-    sp3CompLayout->setColumnMinimumWidth(2, 8 * ww);
-    sp3CompLayout->setColumnMinimumWidth(4, 8 * ww);
-
-    sp3CompGroup->setLayout(sp3CompLayout);
-
-    connect(_sp3CompFileChooser, SIGNAL(fileNameChanged(const QString&)),
-        this, SLOT(slotBncTextChanged()));
-
-    // Combine Corrections
-    // -------------------
-    QGridLayout* cmbLayout = new QGridLayout;
-
-    populateCmbTable();
-    cmbLayout->addWidget(_cmbTable, 0, 0, 8, 10);
-    cmbLayout->addWidget(new QLabel(" Combine Broadcast Correction streams"), 0, 10, 1, 10);
-    cmbLayout->addWidget(addCmbRowButton, 1, 10);
-    cmbLayout->addWidget(delCmbRowButton, 1, 11);
-    cmbLayout->addWidget(new QLabel("Method"), 2, 10, Qt::AlignLeft);
-    cmbLayout->addWidget(_cmbMethodComboBox, 2, 11);
-    cmbLayout->addWidget(new QLabel("BSX File"), 3, 10, Qt::AlignLeft);
-    cmbLayout->addWidget(_cmbBsxFile, 3, 11, Qt::AlignRight);
-    cmbLayout->addWidget(new QLabel("Max Clk Residual"), 4, 10, Qt::AlignLeft);
-    cmbLayout->addWidget(_cmbMaxresLineEdit, 4, 11, Qt::AlignRight);
-    cmbLayout->addWidget(new QLabel("Max Orb Displacement"), 5, 10, Qt::AlignLeft);
-    cmbLayout->addWidget(_cmbMaxdisplacementLineEdit, 5, 11, Qt::AlignRight);
-    cmbLayout->addWidget(new QLabel("Logfile directory"), 6, 10, Qt::AlignLeft);
-    cmbLayout->addWidget(_cmbLogPath, 6, 11, Qt::AlignRight);
-    cmbLayout->addWidget(new QLabel("Sampling"), 7, 10, Qt::AlignLeft);
-    cmbLayout->addWidget(_cmbSamplComboBox, 7, 11, Qt::AlignRight);
-
-
-    cmbLayout->addWidget(new QLabel("GNSS"), 0, 14, Qt::AlignLeft);
-    cmbLayout->addWidget(new QLabel("GPS (C1W/C2W)"), 1, 14);
-    cmbLayout->addWidget(_cmbGpsCheckBox, 1, 15);
-
-    cmbLayout->addWidget(new QLabel("GLONASS (C1P/C2P)"), 2, 14);
-    cmbLayout->addWidget(_cmbGloCheckBox, 2, 15);
-
-    cmbLayout->addWidget(new QLabel("Galileo (C1C/C5Q)"), 3, 14);
-    cmbLayout->addWidget(_cmbGalCheckBox, 3, 15);
-
-    cmbLayout->addWidget(new QLabel("Beidou (C2I/C6I)"), 4, 14);
-    cmbLayout->addWidget(_cmbBdsCheckBox, 4, 15);
-
-    cmbLayout->addWidget(new QLabel("QZSS (C1C/C2L)"), 5, 14);
-    cmbLayout->addWidget(_cmbQzssCheckBox, 5, 15);
-
-    cmbLayout->addWidget(new QLabel("SBAS (C1C/C5Q)"), 6, 14);
-    cmbLayout->addWidget(_cmbSbasCheckBox, 6, 15);
-
-    cmbLayout->addWidget(new QLabel("NavIC"), 7, 14);
-    cmbLayout->addWidget(_cmbNavicCheckBox, 7, 15);
-    cmbLayout->setRowStretch(9, 999);
-
-    connect(addCmbRowButton, SIGNAL(clicked()), this, SLOT(slotAddCmbRow()));
-    connect(delCmbRowButton, SIGNAL(clicked()), this, SLOT(slotDelCmbRow()));
-
-    cmbgroup->setLayout(cmbLayout);
-
-    // Upload Layout (Clocks)
-    // ----------------------
-    QGridLayout* uploadHlpLayout = new QGridLayout();
-
-    connect(addUploadRowButton, SIGNAL(clicked()), this, SLOT(slotAddUploadRow()));
-    connect(delUploadRowButton, SIGNAL(clicked()), this, SLOT(slotDelUploadRow()));
-    connect(setUploadTrafoButton, SIGNAL(clicked()), this, SLOT(slotSetUploadTrafo()));
-
-    uploadHlpLayout->addWidget(addUploadRowButton, 0, 0);
-    uploadHlpLayout->addWidget(delUploadRowButton, 0, 1);
-    uploadHlpLayout->addWidget(new QLabel("Interval"), 0, 2, Qt::AlignRight);
-    uploadHlpLayout->addWidget(_uploadIntrComboBox, 0, 3);
-    uploadHlpLayout->addWidget(new QLabel("     Sampling:    Orb"), 0, 4, Qt::AlignRight);
-    uploadHlpLayout->addWidget(_uploadSamplRtcmEphCorrComboBox, 0, 5);
-    uploadHlpLayout->addWidget(new QLabel("SP3"), 0, 6, Qt::AlignRight);
-    uploadHlpLayout->addWidget(_uploadSamplSp3ComboBox, 0, 7);
-    uploadHlpLayout->addWidget(new QLabel("RNX"), 0, 8, Qt::AlignRight);
-    uploadHlpLayout->addWidget(_uploadSamplClkRnxSpinBox, 0, 9);
-    uploadHlpLayout->addWidget(new QLabel("BSX"), 0, 10, Qt::AlignRight);
-    uploadHlpLayout->addWidget(_uploadSamplBiaSnxSpinBox, 0, 11);
-    uploadHlpLayout->addWidget(setUploadTrafoButton, 0, 12);
-    uploadHlpLayout->addWidget(new QLabel("ANTEX file"), 1, 0, Qt::AlignLeft);
-    uploadHlpLayout->addWidget(_uploadAntexFile, 1, 1, 1, 4);
-
-    QBoxLayout* uploadLayout = new QBoxLayout(QBoxLayout::TopToBottom);
-    populateUploadTable();
-
-    uploadLayout->addWidget(new QLabel("Upload RTCM Version 3 Broadcast Corrections to Broadcaster.<br>"));
-    uploadLayout->addWidget(_uploadTable);
-    uploadLayout->addLayout(uploadHlpLayout);
-
-    uploadgroup->setLayout(uploadLayout);
-
-    // Upload Layout (Ephemeris)
-    // -------------------------
-    QGridLayout* uploadHlpLayoutEph = new QGridLayout();
-
-    connect(addUploadEphRowButton, SIGNAL(clicked()), this, SLOT(slotAddUploadEphRow()));
-    connect(delUploadEphRowButton, SIGNAL(clicked()), this, SLOT(slotDelUploadEphRow()));
-
-    uploadHlpLayoutEph->addWidget(addUploadEphRowButton, 0, 0);
-    uploadHlpLayoutEph->addWidget(delUploadEphRowButton, 0, 1);
-    uploadHlpLayoutEph->addWidget(new QLabel("     Sampling"), 0, 2, Qt::AlignRight);
-    uploadHlpLayoutEph->addWidget(_uploadSamplRtcmEphSpinBox, 0, 3);
-
-    QBoxLayout* uploadLayoutEph = new QBoxLayout(QBoxLayout::TopToBottom);
-    populateUploadEphTable();
-
-    uploadLayoutEph->addWidget(new QLabel("Upload RTCM Version 3 Broadcast Ephemeris to Broadcaster.<br>"));
-    uploadLayoutEph->addWidget(_uploadEphTable);
-    uploadLayoutEph->addLayout(uploadHlpLayoutEph);
-
-    uploadEphgroup->setLayout(uploadLayoutEph);
-
-
-    // Upload Layout (Raw Data)
-    // -------------------------
-    QGridLayout* uploadHlpLayoutRaw = new QGridLayout();
-
-    connect(addUploadRawRowButton, SIGNAL(clicked()), this, SLOT(slotAddUploadRawRow()));
-    connect(delUploadRawRowButton, SIGNAL(clicked()), this, SLOT(slotDelUploadRawRow()));
-
-    uploadHlpLayoutRaw->addWidget(addUploadRawRowButton, 0, 0);
-    uploadHlpLayoutRaw->addWidget(delUploadRawRowButton, 0, 1);
-
-    QBoxLayout* uploadLayoutRaw = new QBoxLayout(QBoxLayout::TopToBottom);
-    populateUploadRawTable();
-
-    uploadLayoutRaw->addWidget(new QLabel("Upload Raw Data to Broadcaster (Ntrip Server Functionality).<br>"));
-    uploadLayoutRaw->addWidget(_uploadRawTable);
-    uploadLayoutRaw->addLayout(uploadHlpLayoutRaw);
-
-    uploadRawgroup->setLayout(uploadLayoutRaw);
-
-    // Main Layout
-    // -----------
-    QGridLayout* mLayout = new QGridLayout;
-    _aogroup->setCurrentIndex(settings.value("startTab").toInt());
-    mLayout->addWidget(_aogroup, 0, 0);
-    mLayout->addWidget(_mountPointsTable, 1, 0);
-    _loggroup->setCurrentIndex(settings.value("statusTab").toInt());
-    mLayout->addWidget(_loggroup, 2, 0);
-
-    _canvas->setLayout(mLayout);
-
-    // WhatsThis, Network
-    // ------------------
-    _proxyHostLineEdit->setWhatsThis(tr("<p>If you are running BNC within a protected Local Area Network (LAN), you may need to use a proxy server to access the Internet. Enter your proxy server IP and port number in case one is operated in front of BNC. If you do not know the IP and port of your proxy server, check the proxy server settings in your Internet browser or ask your network administrator. Without any entry, BNC will try to use the system proxies. </p><p>Note that IP streaming is sometimes not allowed in a LAN. In this case you need to ask your network administrator for an appropriate modification of the local security policy or for the installation of a TCP relay to the Ntrip Broadcasters. If this is not possible, you may need to run BNC outside your LAN on a network that has unobstructed connection to the Internet. <i>[key: proxyHost]</i></p>"));
-    _proxyPortLineEdit->setWhatsThis(tr("<p>Enter your proxy server port number in case a proxy is operated in front of BNC. <i>[key: proxyPort]</i></p>"));
-    _sslCaCertPathLineEdit->setWhatsThis(tr("<p>Communication with an Ntrip Broadcaster over SSL requires the exchange of server certificates. Specify the path to a directory where you save CA certificates on your system. </p><p>BNC creates from *.crt and *.pem files a CA certificate database, which is used by the socket during the handshake phase to validate the peer's certificate. </p><p>Note that SSL communication is usually done over port 443. <i>[key: sslCaCertPath]</i></p>"));
-    _sslClientCertPathLineEdit->setWhatsThis(tr("<p>Two-sided communication with an Ntrip Broadcaster over SSL requires in addition the exchange of client certificates. Specify the full path to the client certificates on your system.</p><p></p><p>The file naming convention for client certificates in BNC is as follows: &lt;hostname&gt;.&lt;port&gt;.crt for the certificate and &lt;hostname&gt;.&lt;port&gt;.key for the private key, where &lt;hostname&gt; is without https://. </p><p> If available, the client or personal authentication certificate is presented to the peer during the SSL handshake process. Password protected key files are not supported. </p><p>Don't try communication via two sided SSL if you are not sure whether this is supported by the involved Ntrip Broadcaster. </p><p>Note that SSL communication is usually done over port 443. <i>[key: sslClientCertPath]</i></p>"));
-    _sslIgnoreErrorsCheckBox->setWhatsThis(tr("<p>SSL communication may involve queries coming from the Ntrip Broadcaster. Tick 'Ignore SSL authorization errors' if you don't want to be bothered with this. <i>[key: sslIgnoreErrors]</i></p>"));
-
-    // WhatsThis, General
-    // ------------------
-    _logFileLineEdit->setWhatsThis(tr("<p>Records of BNC's activities are shown in the 'Log' tab on the bottom of this window. They can be saved into a file when a valid path for that is specified in the 'Logfile (full path)' field.</p><p>The logfile name will automatically be extended by a string '_YYMMDD' carrying the current date. <i>[key: logFile]</i></p>"));
-    _rnxAppendCheckBox->setWhatsThis(tr("<p>When BNC is started, new files are created by default and file content already available under the same name will be overwritten. However, users might want to append already existing files following a regular restart or a crash of BNC or its platform.</p><p>Tick 'Append files' to continue with existing files and keep what has been recorded so far. <i>[key: rnxAppend]</i></p>"));
-    _onTheFlyComboBox->setWhatsThis(tr("<p>When operating BNC online in 'no window' mode, some configuration parameters can be changed on-the-fly without interrupting the running process. For that BNC rereads parts of its configuration in pre-defined intervals. The default entry is 'no' that means the reread function is switched of. <p></p>Select '1 min', '5 min', '1 hour', or '1 day' to force BNC to reread its configuration every full minute, five minutes, hour, or day and let in between edited configuration options become effective on-the-fly without terminating uninvolved threads.</p><p>Note that when operating BNC in window mode, on-the-fly changeable configuration options become effective immediately via button 'Save & Reread Configuration'. <i>[key: onTheFlyInterval]</i></p>"));
-    _autoStartCheckBox->setWhatsThis(tr("<p>Tick 'Auto start' for auto-start of BNC at startup time in window mode with preassigned processing options. <i>[key: autoStart]</i></p>"));
-    _rawOutFileLineEdit->setWhatsThis(tr("<p>Save all data coming in through various streams in the received order and format in one file.</p><p>This option is primarily meant for debugging purposes. <i>[key: rawOutFile]</i></p>"));
-
-    // WhatsThis, RINEX Observations
-    // -----------------------------
-    _rnxPathLineEdit->setWhatsThis(tr("<p>Here you specify the path to where the RINEX Observation files will be stored.</p><p>If the specified directory does not exist, BNC will not create RINEX Observation files. <i>[key: rnxPath]</i></p>"));
-    _rnxIntrComboBox->setWhatsThis(tr("<p>Select the length of the RINEX Observation file. <i>[key: rnxIntr]</i></p>"));
-    _rnxSamplComboBox->setWhatsThis(tr("<p>Select the RINEX Observation sampling interval in seconds. <i>[key: rnxSampl]</i></p>"));
-    _rnxSkelExtComboBox->setWhatsThis(tr("<p>BNC allows using personal RINEX skeleton files that contain the RINEX header records you would like to include. You can derive a skeleton file from information given in an up to date sitelog.</p><p>A file in the RINEX Observations 'Directory' with a 'Skeleton extension' skl or SKL is interpreted by BNC as a personal RINEX header skeleton file for the corresponding stream. <i>[key: rnxSkel]</i></p>"));
-    _rnxSkelPathLineEdit->setWhatsThis(tr("<p>Here you specify the path to where local skeleton files are located.</p><p> If no directory is specified, the path is assumed to where the RINEX Observation files will stored. <i>[key: rnxSkelPath]</i></p>"));
-    _rnxFileCheckBox->setWhatsThis(tr("<p>Tick check box 'Skeleton mandatory' in case you want that RINEX files are only produced if skeleton files are available for BNC. If no skeleton file is available for a particular source then no RINEX Observation file will be produced from the affected stream.</p><p>Note that a skeleton file contains RINEX header information such as receiver and antenna types. In case of stream conversion to RINEX Version 3, a skeleton file should also contain information on potentially available observation types. A missing skeleton file will therefore enforce BNC to only save a default set of RINEX 3 observation types. <i>[key: rnxOnlyWithSKL]</i></p>"));
-    _rnxScrpLineEdit->setWhatsThis(tr("<p>Whenever a RINEX Observation file is finally saved, you may want to compress, copy or upload it immediately, for example via FTP. BNC allows you to execute a script/batch file to carry out such operation.</p><p>Specify the full path of a script or batch file. BNC will pass the full RINEX Observation file path to the script as command line parameter (%1 on Windows systems, $1 on Unix/Linux/Mac systems). <i>[key: rnxScript]</i></p>"));
-    _rnxV2Priority->setWhatsThis(tr("<p>Specify a priority list of characters defining signal attributes as defined in RINEX Version 3. Priorities will be used to map observations with RINEX Version 3 attributes from incoming streams to Version 2. The underscore character '_' stands for undefined attributes. A question mark '?' can be used as wildcard which represents any one character.</p><p>Signal priorities can be specified as equal for all systems, as system specific or as system and freq. specific. For example: </li><ul><li>'CWPX_?' (General signal priorities valid for all GNSS) </li><li>'I:ABCX' (System specific signal priorities for NavIC) </li><li>'G:12&PWCSLX G:5&IQX R:12&PC R:3&IQX' (System and frequency specific signal priorities) </li></ul>Default is the following priority list 'G:12&PWCSLX G:5&IQX R:12&PC R:3&IQX R:46&ABX E:16&BCXZ E:578&IQX J:1&SLXCZ J:26&SLX J:5&IQX C:267&IQX C:18&DPX I:ABCX S:1&C S:5&IQX'. <i>[key: rnxV2Priority]</i></p>"));
-    _rnxVersComboBox->setWhatsThis(tr("<p>Select the format for RINEX Observation files. <i>[key: rnxVersion]</i></p>"));
-
-    // WhatsThis, RINEX Ephemeris
-    // --------------------------
-    _ephPathLineEdit->setWhatsThis(tr("<p>Specify the path for saving Broadcast Ephemeris data as RINEX Navigation files.</p><p>If the specified directory does not exist, BNC will not create RINEX Navigation files. <i>[key: ephPath]</i></p>"));
-    _ephIntrComboBox->setWhatsThis(tr("<p>Select the length of the RINEX Navigation file. <i>[key: ephIntr]</i></p>"));
-    _ephOutPortLineEdit->setWhatsThis(tr("<p>BNC can produce ephemeris data in RINEX Navigation ASCII format on your local host through an IP port.</p><p>Specify a port number here to activate this function. <i>[key: ephOutPort]</i></p>"));
-    _ephVersComboBox->setWhatsThis(tr("<p>Select the format for RINEX Navigation files. <i>[key: ephVersion]</i></p>"));
-    //_ephFilePerStation->setWhatsThis(tr("<p>By default, all received Broadcast Ephemeris data will be stored within one File. Thick 'File per Stations' to get separate files per station/mountpoint. <i>[key: ephFilePerStation]</i></p>"));
-
-    // WhatsThis, RINEX Editing & QC
-    // -----------------------------
-    _reqcActionComboBox->setWhatsThis(tr("<p>BNC allows to 'Edit or Concatenate' RINEX Version 2 or 3 files or to perform a Quality Check (QC) and 'Analyze' data following UNAVCO's famous 'teqc' program. <i>[key: reqcAction]</i></p>"));
-    _reqcEditOptionButton->setWhatsThis(tr("<p>Specify options for editing RINEX Version 2 or 3 files.</p>"));
-    _reqcObsFileChooser->setWhatsThis(tr("<p>Specify the full path to input observation files in RINEX Version 2 or 3 format.</p><p>Note that when in 'Analyze' mode, specifying at least one RINEX observation file is mandatory. <i>[key: reqcObsFile]</i></p>"));
-    _reqcNavFileChooser->setWhatsThis(tr("<p>Specify the full path to input navigation files in RINEX Version 2 or 3 format.</p><p>Note that when in 'Analyze' mode, specifying at least one RINEX navigation file is mandatory. <i>[key: reqcNavFile]</i></p>"));
-    _reqcOutObsLineEdit->setWhatsThis(tr("<p>Specify the full path to a RINEX Observation output file.</p><p>Default is an empty option field, meaning that no RINEX Observation output file will be produced. <i>[key: reqcOutObsFile]</i></p>"));
-    _reqcOutNavLineEdit->setWhatsThis(tr("<p>Specify the full path to a RINEX Navigation output file.</p><p>Default is an empty option field, meaning that no RINEX Navigation output file will be produced. <i>[key: reqcOutNavFile]</i></p>"));
-    _reqcOutLogLineEdit->setWhatsThis(tr("<p>Specify the full path to a logfile.</p><p>Default is an empty option field, meaning that no 'RINEX Editing & QC' logfile will be produced. <i>[key: reqcOutLogFile]</i></p>"));
-    _reqcLogSummaryOnly->setWhatsThis(tr("<p>By default BNC produces a detailed 'Logfile' providing all information resulting from editing or analyzing RINEX data. If that is too much information, you can limit the logfile content to a short summary.</p><p>Tick 'Summary only' to suppress full logfile output and instead produce a logfile containing only summary information. <i>[key: reqcLogSummaryOnly]</i></p>"));
-    _reqcPlotDirLineEdit->setWhatsThis(tr("<p>Specify a directory for saving plots in PNG format.</p><p>Default is an empty option field, meaning that plots will not be saved on disk. <i>[key: reqcPlotDir]</i></p>"));
-    _reqcSkyPlotSignals->setWhatsThis(tr("<p>BNC can produce plots for multipath, signal-to-noise ratio, satellite availability, satellite elevation, and PDOP values. The 'Plots for signals' option lets you exactly specify observation signals to be used for that and also enables the plot generation. You can specify the navigation system, the frequency, and the tracking mode or channel as defined in RINEX Version 3. Specifications for frequency and tracking mode or channel must be separated by ampersand character '&'. Specifications for navigation systems must be separated by blank character ' '.</p><p>Examples for 'Plots for signals' option:<ul><li> G:1&2&5 R:1&2&3 E:1&7 C:2&6 J:1&2 I:5&9 S:1&5 <br>(Plots will be based on GPS observations on 1st and 2nd frequency, GLONASS observations on 1st and 2nd frequency, QZSS observations on 1st and 2nd frequency, Galileo observations on 1st and 7th frequency, BeiDou observations on 1st and 6th frequency, SBAS observations on 1st frequency.)</li><li>G:1C&5X<br>(Plots will be based on GPS observations on 1st frequency in C tracking mode and GPS observations on 5th frequency in X tracking mode.)</li><li>C:6I&7I<br>(Plots will be based on BeiDou observations on 6th frequency in I tracking mode and BeiDou observations on 7th frequency in I tracking mode.)<li></ul></p><p>Default is 'G:1&2 R:1&2 E:1&5 C:2&6 J:1&2 I:5&9 S:1&5'. Specifying an empty option string would be overruled by this default. <i>[key: reqcSkyPlotSignals]</i></p>"));
-
-    // WhatsThis, SP3 Comparison
-    // -------------------------
-    _sp3CompFileChooser->setWhatsThis(tr("<p>BNC can compare two SP3 files containing GNSS satellite orbit and clock information.</p></p>Specify the full path to two files with orbits and clocks in SP3 format, separate them by comma. <i>[key: sp3CompFile]</i></p>"));
-    _sp3CompExclude->setWhatsThis(tr("<p>Specify satellites to exclude them from orbit and clock comparison. Example:<p>G04,G31,R</p><p>This excludes GPS satellites PRN 4 and 31 as well as all GLONASS satellites from the comparison.</p><p>Default is an empty option field, meaning that no satellite is excluded from the comparison. <i>[key: sp3CompExclude]</i></p>"));
-    _sp3CompLogLineEdit->setWhatsThis(tr("<p>Specify the full path to a logfile saving comparison results.</p><p>Specifying a logfile is mandatory. Comparing SP3 files and not saving comparison results on disk would be useless. <i>[key: sp3CompOutLogFile]</i></p>"));
-    _sp3CompSummaryOnly->setWhatsThis(tr("<p>By default BNC produces a detailed 'Logfile' providing all information resulting from comparing SP3 files. If that is too much information, you can limit the logfile content to a short summary.</p><p>Tick 'Summary only' to suppress full logfile output and instead produce a logfile containing only summary information. <i>[key: sp3CompSummaryOnly]</i></p>"));
-
-    // WhatsThis, Broadcast Corrections
-    // --------------------------------
-    _corrPathLineEdit->setWhatsThis(tr("<p>Specify a directory for saving Broadcast Ephemeris Correction files.</p><p>If the specified directory does not exist, BNC will not create the files. <i>[key: corrPath]</i></p>"));
-    _corrIntrComboBox->setWhatsThis(tr("<p>Select the length of Broadcast Ephemeris Correction files. <i>[key: corrIntr]</i></p>"));
-    _corrPortLineEdit->setWhatsThis(tr("<p>BNC can produce Broadcast Ephemeris Corrections on your local host through an IP port.</p><p>Specify a port number here to activate this function. <i>[key: corrPort]</i></p>"));
-
-    // WhatsThis, Feed Engine
-    // ----------------------
-    _outPortLineEdit->setWhatsThis(tr("<p>BNC can produce synchronized observations in a plain ASCII format on your local host via IP port.</p><p>Specify a port number to activate this function. <i>[key: outPort]</i></p>"));
-    _outWaitSpinBox->setWhatsThis(tr("<p>When feeding a real-time GNSS network engine waiting for synchronized input epoch by epoch, BNC drops whatever is received later than 'Wait for full obs epoch' seconds.</p><p>A value of 3 to 5 seconds is recommended, depending on the latency of the incoming streams and the delay acceptable to your real-time GNSS network engine or product. <i>[key: outWait]</i></p>"));
-    _outSamplComboBox->setWhatsThis(tr("<p>Select a synchronized observation sampling interval in seconds. <i>[key: outSampl]</i></p>"));
-    _outFileLineEdit->setWhatsThis(tr("<p>Specify the full path to a file where synchronized observations are saved in plain ASCII format.</p><p>Beware that the size of this file can rapidly increase depending on the number of incoming streams. <i>[key: outFile]</i></p>"));
-    _outUPortLineEdit->setWhatsThis(tr("<p>BNC can produce unsynchronized observations in a plain ASCII format on your local host via IP port.</p><p>Specify a port number to activate this function. <i>[key: outUPort]</i></p>"));
-    _outLockTimeCheckBox->setWhatsThis(tr("<p>Print the lock time in seconds in the feed engine output.<i>[key: outLockTime]</i></p>"));
-
-    // WhatsThis, Serial Output
-    // ------------------------
-    _serialMountPointLineEdit->setWhatsThis(tr("<p>Enter a 'Mountpoint' to forward the corresponding stream to a serial connected receiver.</p><p>Depending on the stream content, the receiver may use it for example for Differential GNSS, Precise Point Positioning or any other purpose supported by its firmware. <i>[key: serialMountPoint]</i></p>"));
-    _serialPortNameLineEdit->setWhatsThis(tr("<p>Enter the serial 'Port name' selected for communication with your serial connected receiver. Valid port names are e.g.</p><pre>Windows:       COM1, COM2<br>Linux:         /dev/ttyS0, /dev/ttyS1<br>FreeBSD:       /dev/ttyd0, /dev/ttyd1<br>Digital Unix:  /dev/tty01, /dev/tty02<br>HP-UX:         /dev/tty1p0, /dev/tty2p0<br>SGI/IRIX:      /dev/ttyf1, /dev/ttyf2<br>SunOS/Solaris: /dev/ttya, /dev/ttyb</pre><p>Note that before you start BNC, you must plug a serial cable in the port defined here. <i>[key: serialPortName]</i></p>"));
-    _serialBaudRateComboBox->setWhatsThis(tr("<p>Select a 'Baud rate' for the serial output link.</p><p>Note that your selection must equal the baud rate configured to the serial connected receiver. Using a high baud rate is recommended. <i>[key: serialBaudRate]</i></p>"));
-    _serialFlowControlComboBox->setWhatsThis(tr("<p>Select a 'Flow control' for the serial output link.</p><p>Note that your selection must equal the flow control configured to the serial connected receiver. Select 'OFF' if you don't know better. <i>[key: serialFlowControl]</i></p>"));
-    _serialDataBitsComboBox->setWhatsThis(tr("<p>Select the number of 'Data bits' for the serial output link.</p><p>Note that your selection must equal the number of data bits configured to the serial connected receiver. Note further that often 8 data bits are used. <i>[key: serialDataBits]</i></p>"));
-    _serialParityComboBox->setWhatsThis(tr("<p>Select a 'Parity' for the serial output link.</p><p>Note that your selection must equal the parity selection configured to the serial connected receiver. The parity is often set to 'NONE'. <i>[key: serialParity]</i></p>"));
-    _serialStopBitsComboBox->setWhatsThis(tr("<p>Select the number of 'Stop bits' for the serial output link.</p><p>Note that your selection must equal the number of stop bits configured to the serial connected receiver. Note further that often 1 stop bit is used. <i>[key: serialStopBits]</i></p>"));
-    _serialAutoNMEAComboBox->setWhatsThis(tr("<p>The 'NMEA' option supports the so-called 'Virtual Reference Station' (VRS) concept which requires the receiver to send approximate position information to the Ntrip Broadcaster. Select 'no' if you don't want BNC to forward or upload any NMEA message to the Ntrip Broadcaster in support of VRS.</p><p>Select 'Auto' to automatically forward NMEA messages of type GGA from your serial connected receiver to the Ntrip Broadcaster and/or save them in a file.</p><p>Select 'Manual GPGGA' or 'Manual GNGGA' if you want BNC to produce and upload GPGGA or GNGGA NMEA messages to the Ntrip Broadcaster because your serial connected receiver doesn't generate these messages. A Talker ID 'GP' preceding the GGA string stands for GPS solutions while a Talker ID 'GN' stands for multi constellation solutions.</p><p>Note that selecting 'Auto' or 'Manual' works only for VRS streams which show up under the 'Streams' canvas on BNC's main window with 'nmea' stream attribute set to 'yes'. This attribute is either extracted from the Ntrip Broadcaster's source-table or introduced by the user via editing the BNC configuration file. <i>[key: serialAutoNMEA]</i></p>"));
-    _serialFileNMEALineEdit->setWhatsThis(tr("<p>Specify the full path to a file where NMEA messages coming from your serial connected receiver are saved.</p><p>Default is an empty option field, meaning that NMEA messages will not be saved on disk. <i>[key: serialFileNMEA]</i></p>"));
-    _serialHeightNMEALineEdit->setWhatsThis(tr("<p>Specify an approximate 'Height' above mean sea level in meters for the reference station introduced by option 'Mountpoint'. Together with the latitude and longitude from the source-table, the height information is used to build GGA messages to be sent to the Ntrip Broadcaster.</p><p>For adjusting latitude and longitude values of a VRS stream given in the 'Streams' canvas, you can double click the latitude/longitude data fields, specify appropriate values and then hit Enter.</p><p>This option is only relevant when option 'NMEA' is set to 'Manual GPGGA' or 'Manual GNGGA' respectively. <i>[key: serialHeightNMEA]</i></p>"));
-    _serialNMEASamplingSpinBox->setWhatsThis(tr("<p>Select a sampling interval in seconds for manual or receiver generated NMEA GGA sentences and their upload.</p><p>A sampling rate of '0' means, a GGA sentence will be send only once to initialize the requested VRS stream. Note that some VRS systems need GGA sentences at regular intervals. <i>[key: serialNMEASampling]</i></p>"));
-
-    // WhatsThis, Outages
-    // ------------------
-    _adviseObsRateComboBox->setWhatsThis(tr("<p>BNC can collect all returns (success or failure) coming from a decoder within a certain short time span to then decide whether a stream has an outage or its content is corrupted. The procedure needs a rough estimate of the expected 'Observation rate' of the incoming streams. When a continuous problem is detected, BNC can inform its operator about this event through an advisory note.</p><p>Default is an empty option field, meaning that you don't want BNC to report on stream failures or recoveries when exceeding a threshold time span. <i>[key: adviseObsRate]</i></p>"));
-    _adviseFailSpinBox->setWhatsThis(tr("<p>An advisory note is generated when no (or only corrupted) observations are seen throughout the 'Failure threshold' time span. A value of 15 min (default) is recommended.</p><p>A value of zero '0' means that for any stream failure, however short, BNC immediately generates an advisory note. <i>[key: adviseFail]</i></p>"));
-    _adviseRecoSpinBox->setWhatsThis(tr("<p>Following a stream outage or a longer series of bad observations, an advisory note is generated when valid observations are received again throughout the 'Recovery threshold' time span. A value of about 5min (default) is recommended.</p><p>A value of zero '0' means that for any stream recovery, however short, BNC immediately generates an advisory note. <i>[key: adviseReco]</i></p>"));
-    _adviseScriptLineEdit->setWhatsThis(tr("<p>Specify the full path to a script or batch file to handle advisory notes generated in the event of corrupted streams or stream outages. The affected mountpoint and a comment 'Begin_Outage', 'End_Outage', 'Begin_Corrupted', or 'End_Corrupted' are passed on to the script as command line parameters.</p><p>The script may have the task to send the advisory notes by email to BNC's operator and/or to the affected stream provider.</p><p>An empty option field (default) or invalid path means that you don't want to use this option. <i>[key: adviseScript]</i></p>"));
-
-    // WhatsThis, Miscellaneous
-    // ------------------------
-    _miscMountLineEdit->setWhatsThis(tr("<p>Specify a mountpoint to apply any of the options shown below. Enter 'ALL' if you want to apply these options to all configured streams.</p><p>An empty option field (default) means that you don't want BNC to apply any of these options. <i>[key: miscMount]</i></p>"));
-    _miscIntrComboBox->setWhatsThis(tr("<p>BNC can average latencies per stream over a certain period of GPS time. The resulting mean latencies are recorded in the 'Log' tab at the end of each 'Log latency' interval together with results of a statistical evaluation (approximate number of covered epochs, data gaps).</p><p>Select a 'Log latency' interval or select the empty option field if you do not want BNC to log latencies and statistical information. <i>[key: miscIntr]</i></p>"));
-    _miscScanRTCMCheckBox->setWhatsThis(tr("<p>Tick 'Scan RTCM' to log the numbers of incoming message types as well as contained antenna coordinates, antenna height, and antenna descriptor.</p><p>In case of RTCM Version 3 MSM streams, BNC will also log contained RINEX Version 3 observation types. <i>[key: miscScanRTCM]</i></p>"));
-    _miscPortLineEdit->setWhatsThis(tr("<p>BNC can output an incoming stream through an IP port of your local host.</p><p>Specify a port number to activate this function. In this case, the stream content remains untouched; BNC does not decode or reformat the data for this output.</p><p> If the decoder string is not an accepted one ('RTCM_2.x', 'RTCM_3.x' and 'RTNET'), please change the decoder string to <ul>"
-        "<li> 'ZERO' (forward the raw data) or </li>"
-        "<li> 'ZERO2FILE' (forward and store the raw data)</li> </ul> in addition. <i>[key: miscPort]</i></p>"));
-
-    // WhatsThis, PPP (1)
-    // ------------------
-    _pppWidgets._dataSource->setWhatsThis(tr("<p>Select 'Real-time Streams' for real-time PPP from RTCM streams or 'RINEX Files' for post processing PPP from RINEX files.</p><p><ul><li>Real-time PPP requires that you pull a RTCM stream carrying GNSS observations plus a stream providing corrections to Broadcast Ephemeris. If the observations stream does not contain Broadcast Ephemeris then you must in addition pull a Broadcast Ephemeris stream like 'RTCM3EPH' from Ntrip Broadcaster <u>products.igs-ip.net</u>.<br></li><li>Post processing PPP requires RINEX Observation files, RINEX Navigation files and a file with corrections to Broadcast Ephemeris in plain ASCII format as saved beforehand using BNC.</li></ul></p><p>Note that BNC allows to carry out PPP solutions simultaneously for several stations. <i>[key: PPP/dataSource]</i></p>"));
-    _pppWidgets._rinexObs->setWhatsThis(tr("<p>Specify the RINEX Observation file. <i>[key: PPP/rinexObs]</i></p>"));
-    _pppWidgets._rinexNav->setWhatsThis(tr("<p>Specify the RINEX Navigation file. <i>[key: PPP/rinexNav]</i></p>"));
-    _pppWidgets._corrMount->setWhatsThis(tr("<p>Specify a 'mountpoint' from the 'Streams' canvas below which provides corrections to Broadcast Ephemeris.</p><p>If you don't specify a corrections stream via this option, BNC will fall back to Single Point Positioning (SPP, positioning from observations and Broadcast Ephemeris only) instead of doing PPP. <i>[key: PPP/corrMount]</i></p>"));
-    _pppWidgets._ionoMount->setWhatsThis(tr("<p>Specify a 'mountpoint' from the 'Streams' canvas below which provides VTEC informations in SSR format.</p><p>If you don't specify a corrections stream via this option, BNC will use VTEC informations from the Corrections stream 'mountpoint', if available. <i>[key: PPP/ionoMount]</i></p>"));
-    _pppWidgets._corrFile->setWhatsThis(tr("<p>Specify the Broadcast Ephemeris Corrections file as saved beforehand using BNC.</p><p>If you don't specify corrections by this option, BNC will fall back to Single Point Positioning (SPP, positioning from RINEX Obs and RINEX Nav files only) instead of doing PPP. <i>[key: PPP/corrFile]</i></p>"));
-    _pppWidgets._ionoFile->setWhatsThis(tr("<p>Specify the VTEC file as saved beforehand using BNC.</p><p>If you don't specify corrections by this option, BNC will use VTEC informations from the Corrections file, if available. <i>[key: PPP/ionoFile]</i></p>"));
-    _pppWidgets._antexFile->setWhatsThis(tr("<p>Observations in RTCM streams or RINEX files should be referred to the receiver's and to the satellite's Antenna Phase Center (APC) and therefore be corrected for<ul><li>Receiver APC offsets and variations</li><li>Satellite APC offsets and variations.</li></ul> Specify the full path to an IGS 'ANTEX file' which contains APC offsets and variations for satellites and receiver.</p> <i>[key: PPP/antexFile]</i></p>"));
-    _pppWidgets._crdFile->setWhatsThis(tr("<p>Enter the full path to an ASCII file which specifies the streams or files of those stations you want to process. Specifying a 'Coordinates file' is optional. If it exists, it should contain one record per station with the following parameters separated by blank character:</p><ul><li>Specify the station either by:<ul><li>the 'Mountpoint' of the station's RTCM stream (in real-time PPP mode), or</li><li>the 9-char station ID of the RINEX Version 3 or 4 Observations file (in post processing PPP mode), or </li><li>the 4-char station ID of the RINEX Version 2 Observations file (in post processing PPP mode).</li></ul><li>Approximate X,Y,Z coordinate of station's Antenna Reference Point [m] (ARP, specify '0.0 0.0 0.0' if unknown).</li><li>North, East and Up component of antenna eccentricity [m] (specify '0.0 0.0 0.0' if unknown). </li><li>20 Characters describing the antenna type and radome following the IGS 'ANTEX file' standard (leave blank if unknown).</li><li>Receiver type following the naming conventions for IGS equipment.</li></ul>Records with exclamation mark '!' in the first column or blank records will be interpreted as comment lines and ignored.. <i>[key: PPP/crdFile]</i></p>"));
-    _pppWidgets._blqFile->setWhatsThis(tr("<p>Specify the full path to a 'BLQ file' containing the ocean loading coefficients for different stations. These coefficients can be obtained from the ocean loading service under request trough the web site http://holt.oso.chalmers.se/loading/. <i>[key: PPP/blqFile]</i></p>"));
-    _pppWidgets._logPath->setWhatsThis(tr("<p>Specify a directory for saving daily PPP logfiles. If the specified directory does not exist, BNC will not create such files.</p><p>Default is an empty option field, meaning that no PPP logfiles shall be produced. <i>[key: PPP/logPath]</i></p>"));
-    _pppWidgets._nmeaPath->setWhatsThis(tr("<p>Specify a directory for saving coordinates in daily NMEA files. If the specified directory does not exist, BNC will not create such files.</p><p>Default is an empty option field, meaning that no NMEA file shall be produced. <i>[key: PPP/nmeaPath]</i></p>"));
-    _pppWidgets._snxtroPath->setWhatsThis(tr("<p>Specify a directory for saving SINEX Troposphere files. If the specified directory does not exist, BNC will not create such files.</p><p>Default is an empty option field, meaning that no SINEX Troposphere files shall be produced. <i>[key: PPP/snxtroPath]</i></p>"));
-    _pppWidgets._snxtroIntr->setWhatsThis(tr("<p>Select a length for SINEX Troposphere files.</p><p>Default 'SNX TRO interval' for saving SINEX Troposphere files on disk is '1 hour'. <i>[key: PPP/snxtroIntr]</i></p>"));
-    _pppWidgets._snxtroSampl->setWhatsThis(tr("<p>Select a 'Sampling' rate for saving troposphere parameters. <i>[key: PPP/snxtroSampl]</i></p>"));
-    _pppWidgets._snxtroAc->setWhatsThis(tr("<p>Specify a 3-character abbreviation describing you as the generating Analysis Center (AC) in your SINEX troposphere files. <i>[key: PPP/snxtroAc]</i></p>"));
-    _pppWidgets._snxtroSolId->setWhatsThis(tr("<p>Specify a 1-character solution ID to allow a distinction between different solutions per AC. <i>[key: PPP/snxtroSolId]</i></p>"));
-    _pppWidgets._snxtroSolType->setWhatsThis(tr("<p>Specify a 3-character solution type, e.g. real-time (RTS), unknown (UNK), .. <i>[key: PPP/snxtroSolType]</i></p>"));
-    _pppWidgets._snxtroCampId->setWhatsThis(tr("<p>Specify a 3-character campaign ID, e.g. operational (OPS), demonstration (DEM), testing (TST), .. <i>[key: PPP/snxtroCampId]</i></p>"));
-
-    // WhatsThis, PPP (2)
-    // ------------------
-    _pppWidgets._lcGPS->setWhatsThis(tr("<p>Specify which kind of GPS observations you want to use and on which kind of linear combination the GPS ambiguity resolutions shall be based:</p><p><ul>"
-#ifdef USE_PPP_SSR_I
-        "<li>'P3&L3' means that the inonosphere-free linear combination of code and phase data shall be used.</li>"
-        "<li>'P3'    means that the inonosphere-free linear combination of code data shall be used.</li>"
-#else
-        "<li>'Pi&Li' means that uncombined code and phase data of two frequencies shall be used.</li>"
-        "<li>'Pi'    means that uncombined code data of two frequencies shall be used.</li>"
-        "<li>'P1&L1' means that uncombined code and phase data of one frequency shall be used.</li>"
-        "<li>'P1'    means that uncombined code data of one frequency shall be used.</li>"
-        "<li>'P3&L3' means that the inonosphere-free linear combination of code and phase data shall be used.</li>"
-        "<li>'P3'    means that the inonosphere-free linear combination of code data shall be used.</li>"
-        "<li>'L3'    means that the inonosphere-free linear combination of phase data shall be used.</li> "
-#endif
-        "<li>'no'    means that you don't want BNC to use GPS data.</li></ul></p><p><i>[key: PPP/lcGPS]</i></p>"));
-    _pppWidgets._lcGLONASS->setWhatsThis(tr("<p>Specify which kind of GLONASS observations you want to use and on which kind of linear combination the GLONASS ambiguity resolutions shall be based:</p><p><ul>"
-#ifdef USE_PPP_SSR_I
-        "<li>'P3&L3' means that the inonosphere-free linear combination of code and phase data shall be used.</li>"
-        "<li>'P3'    means that the inonosphere-free linear combination of code data shall be used.</li>"
-        "<li>'L3'    means that the inonosphere-free linear combination of phase data shall be used.</li> "
-#else
-        "<li>'Pi&Li' means that uncombined code and phase data of two frequencies shall be used.</li>"
-        "<li>'Pi'    means that uncombined code data of two frequencies shall be used.</li>"
-        "<li>'P1&L1' means that uncombined code and phase data of one frequency shall be used.</li>"
-        "<li>'P1'    means that uncombined code data of one frequency shall be used.</li>"
-        "<li>'P3&L3' means that the inonosphere-free linear combination of code and phase data shall be used.</li>"
-        "<li>'P3'    means that the inonosphere-free linear combination of code data shall be used.</li>"
-        "<li>'L3'    means that the inonosphere-free linear combination of phase data shall be used.</li> "
-#endif
-        "<li>'no'    means that you don't want BNC to use GLONASS data.</li></ul></p><p><i>[key: PPP/lcGLONASS]</i></p>"));
-    _pppWidgets._lcGalileo->setWhatsThis(tr("<p>Specify which kind of Galileo observations you want to use and on which kind of linear combination the Galileo ambiguity resolutions shall be based:</p><p><ul>"
-#ifdef USE_PPP_SSR_I
-        "<li>'P3&L3' means that the inonosphere-free linear combination of code and phase data shall be used.</li>"
-        "<li>'P3'    means that the inonosphere-free linear combination of code data shall be used.</li>"
-        "<li>'L3'    means that the inonosphere-free linear combination of phase data shall be used.</li> "
-#else
-        "<li>'Pi&Li' means that uncombined code and phase data of two frequencies shall be used.</li>"
-        "<li>'Pi'    means that uncombined code data of two frequencies shall be used.</li>"
-        "<li>'P1&L1' means that uncombined code and phase data of one frequency shall be used.</li>"
-        "<li>'P1'    means that uncombined code data of one frequency shall be used.</li>"
-        "<li>'P3&L3' means that the inonosphere-free linear combination of code and phase data shall be used.</li>"
-        "<li>'P3'    means that the inonosphere-free linear combination of code data shall be used.</li>"
-        "<li>'L3'    means that the inonosphere-free linear combination of phase data shall be used.</li> "
-#endif
-        "<li>'no'    means that you don't want BNC to use Galileo data.</li></ul></p><p><i>[key: PPP/lcGalileo]</i></p>"));
-    _pppWidgets._lcBDS->setWhatsThis(tr("<p>Specify which kind of BDS observations you want to use and on which kind of linear combination the BDS ambiguity resolutions shall be based:</p><p><ul>"
-#ifdef USE_PPP_SSR_I
-        "<li>'P3&L3' means that the inonosphere-free linear combination of code and phase data shall be used.</li>"
-        "<li>'P3'    means that the inonosphere-free linear combination of code data shall be used.</li>"
-        "<li>'L3'    means that the inonosphere-free linear combination of phase data shall be used.</li> "
-#else
-        "<li>'Pi&Li' means that uncombined code and phase data of two frequencies shall be used.</li>"
-        "<li>'Pi'    means that uncombined code data of two frequencies shall be used.</li>"
-        "<li>'P1&L1' means that uncombined code and phase data of one frequency shall be used.</li>"
-        "<li>'P1'    means that uncombined code data of one frequency shall be used.</li>"
-        "<li>'P3&L3' means that the inonosphere-free linear combination of code and phase data shall be used.</li>"
-        "<li>'P3'    means that the inonosphere-free linear combination of code data shall be used.</li>"
-        "<li>'L3'    means that the inonosphere-free linear combination of phase data shall be used.</li> "
-#endif
-        "<li>'no'    means that you don't want BNC to use BDS data.</li></ul></p><p><i>[key: PPP/lcBDS]</i></p>"));
-    _pppWidgets._constraints->setWhatsThis(tr("<p>Specify, whether ionospheric constraints in form of pseudo-observations shall be added. Please note, this is only valid, if no ionosphere-free linear-combination is used and only helpful as soon as the ionosphere information is more accurate than the code data accuracy. <i>[key: PPP/constraints]</i></p>"));
-    _pppWidgets._sigmaC1->setWhatsThis(tr("<p>Enter a Sigma for GPS C1 code observations in meters.</p><p>The higher the sigma you enter, the less the contribution of GPS C1 code observations to a PPP solution from combined code and phase data. 1.0 is likely to be an appropriate choice.</p><p>Default is an empty option field, meaning<br>'Sigma C1 = 1.0' <i>[key: PPP/sigmaC1]</i></p>"));
-    _pppWidgets._sigmaL1->setWhatsThis(tr("<p>Enter a Sigma for GPS L1 phase observations in meters.</p><p>The higher the sigma you enter, the less the contribution of GPS L1 phase observations to a PPP solutions from combined code and phase data. 0.01 is likely to be an appropriate choice.</p><p>Default is an empty option field, meaning<br>'Sigma L1 = 0.01' <i>[key: PPP/sigmaL1]</i></p>"));
-#ifdef USE_PPP
-    _pppWidgets._sigmaGIM->setWhatsThis(tr("<p>Enter a Sigma for GIM pseudo observations in meters.</p><p>The higher the sigma you enter, the less the contribution of GIM pseudo observations to a PPP solution. 5.0 is likely to be an appropriate choice.</p><p>Default is an empty option field, meaning<br>'Sigma GIM = 1.0' <i>[key: PPP/sigmaGIM]</i></p>"));
-#endif
-    _pppWidgets._maxResC1->setWhatsThis(tr("<p>Specify a maximum for residuals from GPS C1 code observations in a PPP solution. '2.0' meters may be an appropriate choice for that.</p><p>If the maximum is exceeded, contributions from the corresponding observation will be ignored in the PPP solution.</p><p>Default is an empty option field, meaning<br>'Max Res C1 = 3.0' <i>[key: PPP/maxResC1]</i></p>"));
-    _pppWidgets._maxResL1->setWhatsThis(tr("<p>Specify a maximum for residuals from GPS L1 phase observations in a PPP solution. '0.02' meters may be an appropriate choice for that.</p><p>If the maximum is exceeded, contributions from the corresponding observation will be ignored in the PPP solution.</p><p>Default is an empty option field, meaning<br>'Max Res L1 = 0.03' <i>[key: PPP/maxResL1]</i></p>"));
-#ifdef USE_PPP
-    _pppWidgets._maxResGIM->setWhatsThis(tr("<p>Specify a maximum for residuals from GIM pseudo observations in a PPP solution. '5.0' meters may be an appropriate choice for that.</p><p>If the maximum is exceeded, contributions from the corresponding observation will be ignored in the PPP solution.</p><p>Default is an empty option field, meaning<br>'Max Res GIM = 3.0' <i>[key: PPP/maxResGIM]</i></p>"));
-#endif
-    _pppWidgets._eleWgtCode->setWhatsThis(tr("<p>Tic 'Ele Wgt Code' to use satellite Elevation depending Weights for Code observations in the PPP solution. <i>[key: PPP/eleWgtCode]</i></p>"));
-    _pppWidgets._eleWgtPhase->setWhatsThis(tr("<p>Tic 'Ele Wgt Phase' to use satellite Elevation depending Weights for Phase observations in the PPP solution. <i>[key: PPP/eleWgtPhase]</i></p>"));
-    _pppWidgets._minObs->setWhatsThis(tr("<p>Select a Minimum Number of Observations per epoch for a PPP solution.</p><p>BNC will only process epochs with observation numbers reaching or exceeding this minimum. <i>[key: PPP/minObs]</i></p>"));
-    _pppWidgets._minEle->setWhatsThis(tr("<p>Select a Minimum satellite Elevation for observations.</p><p>BNC will ignore an observation if the associated satellite Elevation does not reach or exceed this minimum.</p><p>Selecting '10 deg' may be an appropriate choice in order to avoid too noisy observations. <i>[key: PPP/minEle]</i></p>"));
-
-    // WhatsThis, Combine Corrections
-    // ------------------------------
-    _cmbTable->setWhatsThis(tr("<p>BNC allows to process several orbit and clock correction streams in real-time to produce, encode, upload and save a combination of correctors coming from different providers. </p><p>To add a line to the 'Combine Corrections' table hit the 'Add Row' button, double click on the 'Mountpoint' field to specify a Broadcast Ephemeris Correction mountpoint from the 'Streams' section below and hit Enter. Then double click on the 'AC Name' field to enter your choice of an abbreviation for the Analysis Center (AC) providing the stream. Double click on the 'Weight Factor' field to enter a weight factor to be applied for this stream in the combination. A Factor greater than 1 will enlarge the sigma of the clock pseudo-observations and with it down-weight its contribution. Finally, double click on the 'Exclude Satellites' field and specify satellites, to exclude them for an individual AC. An entry 'G04,G31,R' means to excludes GPS satellites PRN 4 and 31 as well as all GLONASS satellites from one individual AC. Default is an empty option field, meaning that no satellite is excluded from this individual AC.</p><p>Note that the orbit information in the resulting combination stream is just copied from one of the incoming streams. The stream used for providing the orbits may vary over time: if the orbit providing stream has an outage then BNC switches to the next remaining stream for getting hold of the orbit information.</p><p>The combination process requires Broadcast Ephemeris. Besides orbit and clock correction streams BNC should therefore pull a stream carrying Broadcast Ephemeris in the form of RTCM Version 3 messages.</p><p>It is possible to specify only one Broadcast Ephemeris Correction stream in the 'Combine Corrections' table. Instead of combining corrections BNC will then add the corrections to the Broadcast Ephemeris with the possibility to save final orbit and clock results in SP3 and/or Clock RINEX format. <i>[key: cmbStreams]</i></p>"));
-    addCmbRowButton->setWhatsThis(tr("<p>Hit 'Add Row' button to add another line to the 'Combine Corrections' table.</p>"));
-    delCmbRowButton->setWhatsThis(tr("<p>Hit 'Delete' button to delete the highlighted line(s) from the 'Combine Corrections' table.</p>"));
-    _cmbMethodComboBox->setWhatsThis(tr("<p>Select a clock combination approach. Options are 'Single-Epoch' and Kalman 'Filter'.</p><p>It is suggested to use the Kalman filter approach for the purpose of Precise Point Positioning. <i>[key: cmbMethod]</i></p>"));
-    _cmbMaxresLineEdit->setWhatsThis(tr("<p>BNC combines all incoming clocks according to specified weights. Individual clock estimates that differ by more than 'Maximal Clk Residuum' meters from the average of all clocks will be ignored.<p></p>It is suggested to specify a value of about 0.2 m for the Kalman filter combination approach and a value of about 3.0 meters for the Single-Epoch combination approach.</p><p>Default is a value of '999.0'. <i>[key: cmbMaxres]</i></p>"));
-    _cmbMaxdisplacementLineEdit->setWhatsThis(tr("<p>BNC builds mean values for all incoming orbit corrections per satellite. Individual orbit corrections that differ by more than 'Maximal Orb Displacement' meters from the average of all orbit corrections per satellite will be ignored.<p></p>It is suggested to specify a value of about 0.5 m.</p><p>Default is a value of '2.0'. <i>[key: cmbMaxdisplacement]</i></p>"));
-    _cmbSamplComboBox->setWhatsThis(tr("<p>Select a combination Sampling interval for the clocks. Clock corrections will be produced following that interval.</p><p>A value of 10 sec may be an appropriate choice. <i>[key: cmbSampl]</i></p>"));
-    _cmbLogPath->setWhatsThis(tr("<p>Specify a directory for saving daily Combination logfiles. If the specified directory does not exist, BNC will not create such files.</p><p>Default is an empty option field, meaning that no Combination logfiles shall be produced. <i>[key: cmbLogpath]</i></p>"));
-    _cmbGpsCheckBox->setWhatsThis(tr("<p>GPS clock corrections shall be combined. GPS Broadcast ephemeris and corrections are required. <i>[key: cmbGps]</i></p>"));
-    _cmbGloCheckBox->setWhatsThis(tr("<p>GLONASS clock corrections shall be combined; GLONASS Broadcast ephemeris and corrections are required. <i>[key: cmbGlo]</i></p>"));
-    _cmbGalCheckBox->setWhatsThis(tr("<p>Galileo clock corrections shall be combined; Galileo Broadcast ephemeris and corrections are required. <i>[key: cmbGal]</i></p>"));
-    _cmbBdsCheckBox->setWhatsThis(tr("<p>Beidou clock corrections shall be combined; BDS Broadcast ephemeris and corrections are required. <i>[key: cmbBds]</i></p>"));
-    _cmbQzssCheckBox->setWhatsThis(tr("<p>QZSS clock corrections shall be combined; QZSS Broadcast ephemeris and corrections are required. <i>[key: cmbQzss]</i></p>"));
-    _cmbSbasCheckBox->setWhatsThis(tr("<p>SBAS clock corrections shall be combined; SBAS Broadcast ephemeris and corrections are required. <i>[key: cmbSbas]</i></p>"));
-    _cmbNavicCheckBox->setWhatsThis(tr("<p>NavIC clock corrections shall be combined; NavIC Broadcast ephemeris and corrections are required. <i>[key: cmbNavic]</i></p>"));
-    _cmbBsxFile->setWhatsThis(tr("<p> Specify a Bias SINEX File that will be used to add satellite code biases to the combined clocks. <i>[key: cmbBsxFile]</i></p>"));
-
-    // WhatsThis, Upload Corrections
-    // -----------------------------
-    _uploadTable->setWhatsThis(tr("<p>BNC can upload clock and orbit corrections to Broadcast Ephemeris (Broadcast Corrections) as well as Code Biases in different SSR formats. You may have a situation where clocks, orbits and code biases come from an external Real-time Network Engine (1) or a situation where clock and orbit corrections are combined within BNC (2).</p><p>(1) BNC identifies a stream as coming from a Real-time Network Engine if its format is specified as 'RTNET' and hence its decoder string in the 'Streams' canvas is 'RTNET'. It encodes and uploads that stream to the specified Ntrip Broadcaster Host and Port</p><p>(2) BNC understands that it is expected to encode and upload combined Broadcast Ephemeris Corrections if you specify correction streams in the 'Combine Corrections' table.</p><p>To fill the 'Upload Corrections' table, hit the 'Add Row' button, double click on the 'Host' field to enter the IP or URL of an Ntrip Broadcaster and hit Enter. Select the Ntrip Version that shall be used for data upload. Then double click on the 'Port', 'Mountpoint' and 'Password' fields to enter the Ntrip Broadcaster IP port, the mountpoint and the stream upload password. If Ntrip Version 2 is chosen, click to the 'User' field to enter a stream upload user name. An empty 'Host' option field means that you don't want to upload corrections.</p><p>Select a target coordinate reference System (e.g. IGS20) for outgoing clock and orbit corrections.</p><p>Select a target SSR format (e.g. IGS-SSR) for outgoing clock and orbit corrections.</p><p>By default orbit and clock corrections refer to Antenna Phase Center (APC). Tick 'CoM' to refer uploaded corrections to Center of Mass instead of APC.</p><p>Specify a path for saving generated Broadcast Corrections plus Broadcast Ephemeris as SP3 orbit files. If the specified directory does not exist, BNC will not create such files. The following is a path example for a Linux system: /home/user/BKG0MGXRTS${V3PROD}.SP3.</p><p>Specify a path for saving generated Broadcast Correction clocks plus Broadcast Ephemeris clocks as Clock RINEX files. If the specified directory does not exist, BNC will not create Clock RINEX files. The following is a path example for a Linux system: /home/user/BKG0MGXRTS${V3PROD}.CLK.</p><p>Specify a path for saving generated Code Biases as SINEX Bias files. If the specified directory does not exist, BNC will not create SINEX Bias files. The following is a path example for a Linux system: /home/user/BKG0MGXRTS${V3PROD}.BIA.</p><p>Note that '${V3PROD}' produces the time stamp in the filename, which is related to the RINEX version 3 filename concept.</p><p>Finally, specify a SSR Provider ID (issued by RTCM), SSR Solution ID, and SSR Issue of Data number.</p><p>In case the 'Combine Corrections' table contains only one Broadcast Correction stream, BNC will add that stream content to the Broadcast Ephemeris to save results in files specified via SP3 and/or Clock RINEX file path. You should then define only the SP3 and Clock RINEX file path and no further option in the 'Upload Corrections' table. <i>[key: uploadMountpointsOut]</i></p>"));
-    addUploadRowButton->setWhatsThis(tr("<p>Hit 'Add Row' button to add another line to the 'Upload Corrections' table.</p>"));
-    delUploadRowButton->setWhatsThis(tr("<p>Hit 'Del Row' button to delete the highlighted line(s) from the 'Upload Corrections' table.</p>"));
-    _uploadIntrComboBox->setWhatsThis(tr("<p>Select the length of the SP3, Clock RINEX and Bias SINEX files. <i>[key: uploadIntr]</i></p>"));
-    _uploadSamplRtcmEphCorrComboBox->setWhatsThis(tr("<p>Select a stream's orbit correction sampling interval in seconds.</p><p>A value of zero '0' tells BNC to upload all available orbit and clock correction samples together in combined messages. <i>[key: uploadSamplRtcmEphCorr]</i></p>"));
-    _uploadSamplSp3ComboBox->setWhatsThis(tr("<p>Select a SP3 orbit file sampling interval in seconds.</p><p>A value of zero '0' tells BNC to store all available samples into SP3 orbit files. <i>[key: uploadSamplSp3]</i></p>"));
-    _uploadSamplClkRnxSpinBox->setWhatsThis(tr("<p>Select a Clock RINEX file sampling interval in seconds.</p><p>A value of zero '0' tells BNC to store all available samples into Clock RINEX files. <i>[key: uploadSamplClkRnx]</i></p>"));
-    _uploadSamplBiaSnxSpinBox->setWhatsThis(tr("<p>Select a Bias SINEX file sampling interval in seconds.</p><p>A value of zero '0' tells BNC to store all available samples into Bias SINEX files. <i>[key: uploadSamplBiaSnx]</i></p>"));
-    setUploadTrafoButton->setWhatsThis(tr("<p>Hit 'Custom Trafo' to specify your own 14 parameter Helmert Transformation instead of selecting a predefined transformation via option 'System'.</p>"));
-    _uploadAntexFile->setWhatsThis(tr("<p>When producing SP3 files or referring orbit and clock corrections to the satellite's Center of Mass (CoM) instead Antenna Phase Center (APC), an offset has to be applied which is available from the IGS 'ANTEX file'. You must therefore specify an 'ANTEX file' path if you want to save the stream content in SP3 format and/or refer correctors to CoM.</p><p>If you don't specify an 'ANTEX file' path, the SP3 file content as well as the orbit and clock correctors will be referred to satellite APCs. <i>[key: uploadAntexFile]</i></p>"));
-
-    // WhatsThis, Upload Ephemeris
-    // ---------------------------
-    _uploadEphTable->setWhatsThis(tr("<p>BNC can upload Broadcast Ephemeris streams in RTCM Version 3 format. </p><p>To fill the 'Upload Ephemeris' table, hit the 'Add Row' button, double click on the 'Host' field to enter the IP or URL of an Ntrip Broadcaster and hit Enter. Select the Ntrip Version that shall be used for data upload. Then double click on the 'Port', 'Mountpoint' and 'Password' fields to enter the Ntrip Broadcaster IP port, the mountpoint and the stream upload password. If Ntrip Version 2 is chosen, click to the 'User' field to enter a stream upload user name. Specify the satellite system(s) that shall be part of the uploaded stream (e.g. G for GPS or GRE for GPS+GLONASS+Galileo, or ALL). <i>[key: uploadEphMountpointsOut]</i></p>"));
-    addUploadEphRowButton->setWhatsThis(tr("<p>Hit 'Add Row' button to add another line to the 'Upload Ephemeris' table.</p>"));
-    delUploadEphRowButton->setWhatsThis(tr("<p>Hit 'Del Row' button to delete the highlighted line(s) from the 'Upload Ephemeris' table.</p>"));
-    _uploadSamplRtcmEphSpinBox->setWhatsThis(tr("<p>Select the Broadcast Ephemeris sampling interval in seconds.</p><p>Default is '5', meaning that a complete set of Broadcast Ephemeris is uploaded every 5 seconds. <i>[key: uploadSamplRtcmEph]</i></p>"));
-
-    // WhatsThis, Upload Raw Data
-    // ---------------------------
-    _uploadRawTable->setWhatsThis(tr("<p>BNC can upload Raw Data streams in any format like a NtripServer. </p><p>To fill the 'Upload Raw Data' table, hit the 'Add Row' button and double click on the 'Source Mountpoint' field to enter the Source of data from the 'Streams' section below, which shall be forwarded without decoding and hit Enter. Double click on the 'Host' field to enter the IP or URL of an Ntrip Broadcaster and hit Enter. Select the Ntrip Version that shall be used for data upload. Then double click on the 'Port', 'Upload Mountpoint' and 'Password' fields to enter the Ntrip Broadcaster IP port, the stream upload mountpoint and password. If Ntrip Version 2 is chosen, click to the 'User' field to enter a stream upload user name. </p><p> If the decoder string is not an accepted one ('RTCM_2.x', 'RTCM_3.x' and 'RTNET'), please change the decoder string to <ul>"
-        "<li> 'ZERO' (forward the raw data) or </li>"
-        "<li> 'ZERO2FILE' (forward and store the raw data)</li> </ul> in addition <i>[key: uploadRawMountpointsOut]</i></p>"));
-    addUploadEphRowButton->setWhatsThis(tr("<p>Hit 'Add Row' button to add another line to the 'Upload Raw Data' table.</p>"));
-    delUploadEphRowButton->setWhatsThis(tr("<p>Hit 'Del Row' button to delete the highlighted line(s) from the 'Upload Raw Data' table.</p>"));
-
-
-    // WhatsThis, Streams Canvas
-    // -------------------------
-    _mountPointsTable->setWhatsThis(tr("<p>Streams selected for retrieval are listed in the 'Streams' section. "
-        "Clicking on 'Add Stream' button opens a window that allows the user to select data streams from an Ntrip Broadcaster "
-        "according to their mountpoints. To remove a stream from the 'Streams' list, highlight it by clicking on it "
-        "and hit the 'Delete Stream' button. You can also remove multiple streams by highlighting them using +Shift and +Ctrl.</p><p>"
-        "BNC automatically allocates one of its internal decoders to a stream based on the stream's 'format' as given in the source-table. "
-        "BNC allows users to change this selection by editing the decoder string. "
-        "Double click on the 'decoder' field, enter your preferred decoder and then hit Enter. "
-        "Accepted decoder strings are 'RTCM_2.x', 'RTCM_3.x' and 'RTNET'.</p><p>"
-        "In case you need to log raw data as is, BNC allows to by-pass its decoders and directly save the input in daily log files. "
-        "To do this, specify the decoder string as 'ZERO2FILE'.</p><p>"
-        "BNC allows as well to forward streams related to the specified 'Mountpoint' on top of the 'Miscellaneous Panel' "
-        "through a TCP/IP port of your local host. "
-        "In this case, the stream content remains untouched; BNC does not decode or reformat the data for this output. "
-        "If the decoder string is not an accepted one, please change the decoder string to 'ZERO' (forward the raw data only) or 'ZERO2FILE' (forward and store the raw data) in addition.</p><p>"
-        "BNC can also retrieve streams from virtual reference stations (VRS). VRS streams are indicated by a 'yes' in the 'nmea' column. "
-        "To initiate such stream, the approximate latitude/longitude rover position is sent to the Ntrip Broadcaster "
-        "together with an approximation for the height. Default values for latitude and longitude can be change according to your requirement. "
-        "Double click on 'lat' and 'long' fields, enter the values you wish to send and then hit Enter. <i>[key: mountPoints]</i></p>"));
-    _actAddMountPoints->setWhatsThis(tr("<p>Add stream(s) to selection presented in the 'Streams' canvas.</p>"));
-    _actDeleteMountPoints->setWhatsThis(tr("<p>Delete stream(s) from selection presented in the 'Streams' canvas.</p>"));
-    _actMapMountPoints->setWhatsThis(tr("<p> Draw distribution map of stream selection presented in the 'Streams' canvas. Use mouse to zoom in or out.</p><p>Left button: Draw rectangle to zoom in.<br>Right button: Zoom out.<br>Middle button: Zoom back.</p>"));
-    _actStart->setWhatsThis(tr("<p> Start running BNC.</p>"));
-    _actStop->setWhatsThis(tr("<p> Stop running BNC.</p>"));
-
-    // WhatsThis, Log Canvas
-    // ---------------------
-    _log->setWhatsThis(tr("<p>Records of BNC's activities are shown in the 'Log' tab. The message log covers the communication status between BNC and the Ntrip Broadcaster as well as problems that occur in the communication link, stream availability, stream delay, stream conversion etc.</p>"));
-    _bncFigure->setWhatsThis(tr("<p>The bandwith consumption per stream is shown in the 'Throughput' tab in bits per second (bps) or kilobits per second (kbps).</p>"));
-    _bncFigureLate->setWhatsThis(tr("<p>The individual latency of observations of incoming streams is shown in the 'Latency' tab. Streams not carrying observations (e.g. those providing only Broadcast Ephemeris) remain unconsidered.</p><p>Note that the calculation of correct latencies requires the clock of the host computer to be properly synchronized.</p>"));
-    _bncFigurePPP->setWhatsThis(tr("<p>PPP time series of North (red), East (green) and Up (blue) displacements are shown in the 'PPP Plot' tab when the corresponding option is selected.</p><p>Values are referred to an XYZ a priori coordinate. The sliding PPP time series window covers the period of the latest 5 minutes.</p>"));
-
-
-    // Enable/Disable all Widgets
-    // --------------------------
-    slotBncTextChanged();
-    enableStartStop();
-
-    // Auto start
-    // ----------
-    if (Qt::CheckState(settings.value("autoStart").toInt()) == Qt::Checked) {
-        slotStart();
-    }
-}
-
-// Destructor
-////////////////////////////////////////////////////////////////////////////
-bncWindow::~bncWindow() {
-    if (_caster) {
-        delete _caster; BNC_CORE->setCaster(0);
-    }
-    if (_casterEph) {
-        delete _casterEph;
-    }
-    delete _bncFigureLate;
-    delete _bncFigurePPP;
-    delete _actHelp;
-    delete _actAbout;
-    delete _actFlowchart;
-    delete _actFontSel;
-    delete _actSaveOpt;
-    delete _actQuit;
-    delete _actAddMountPoints;
-    delete _actDeleteMountPoints;
-    delete _actMapMountPoints;
-    delete _actStart;
-    delete _actStop;
-    delete _actwhatsthis;
-    delete _proxyHostLineEdit;
-    delete _proxyPortLineEdit;
-    delete _sslCaCertPathLineEdit;
-    delete _sslClientCertPathLineEdit;
-    delete _sslIgnoreErrorsCheckBox;
-    delete _logFileLineEdit;
-    delete _rawOutFileLineEdit;
-    delete _rnxAppendCheckBox;
-    delete _onTheFlyComboBox;
-    delete _autoStartCheckBox;
-    delete _rnxPathLineEdit;
-    delete _rnxIntrComboBox;
-    delete _rnxSamplComboBox;
-    delete _rnxSkelExtComboBox;
-    delete _rnxSkelPathLineEdit;
-    delete _rnxFileCheckBox;
-    delete _rnxScrpLineEdit;
-    delete _rnxVersComboBox;
-    delete _rnxV2Priority;
-    delete _ephPathLineEdit;
-    //delete _ephFilePerStation;
-    delete _ephIntrComboBox;
-    delete _ephOutPortLineEdit;
-    delete _ephVersComboBox;
-    delete _corrPathLineEdit;
-    delete _corrIntrComboBox;
-    delete _corrPortLineEdit;
-    delete _outPortLineEdit;
-    delete _outWaitSpinBox;
-    delete _outSamplComboBox;
-    delete _outFileLineEdit;
-    delete _outUPortLineEdit;
-    delete _outLockTimeCheckBox;
-    delete _serialMountPointLineEdit;
-    delete _serialPortNameLineEdit;
-    delete _serialBaudRateComboBox;
-    delete _serialFlowControlComboBox;
-    delete _serialDataBitsComboBox;
-    delete _serialParityComboBox;
-    delete _serialStopBitsComboBox;
-    delete _serialAutoNMEAComboBox;
-    delete _serialFileNMEALineEdit;
-    delete _serialHeightNMEALineEdit;
-    delete _serialNMEASamplingSpinBox;
-    delete _adviseObsRateComboBox;
-    delete _adviseFailSpinBox;
-    delete _adviseRecoSpinBox;
-    delete _adviseScriptLineEdit;
-    delete _miscMountLineEdit;
-    delete _miscPortLineEdit;
-    delete _miscIntrComboBox;
-    delete _miscScanRTCMCheckBox;
-    _mountPointsTable->deleteLater();
-    delete _log;
-    delete _loggroup;
-    _cmbTable->deleteLater();
-    delete _cmbMaxresLineEdit;
-    delete _cmbMaxdisplacementLineEdit;
-    delete _cmbSamplComboBox;
-    delete _cmbLogPath;
-    delete _cmbMethodComboBox;
-    delete _cmbGpsCheckBox;
-    delete _cmbGloCheckBox;
-    delete _cmbGalCheckBox;
-    delete _cmbBdsCheckBox;
-    delete _cmbQzssCheckBox;
-    delete _cmbSbasCheckBox;
-    delete _cmbNavicCheckBox;
-    delete _cmbBsxFile;
-    delete _uploadSamplRtcmEphCorrComboBox;
-    _uploadEphTable->deleteLater();
-    _uploadRawTable->deleteLater();
-    _uploadTable->deleteLater();
-    delete _uploadIntrComboBox;
-    delete _uploadAntexFile;
-    delete _uploadSamplRtcmEphSpinBox;
-    delete _uploadSamplSp3ComboBox;
-    delete _uploadSamplClkRnxSpinBox;
-    delete _uploadSamplBiaSnxSpinBox;
-    delete _reqcActionComboBox;
-    delete _reqcObsFileChooser;
-    delete _reqcNavFileChooser;
-    delete _reqcOutObsLineEdit;
-    delete _reqcOutNavLineEdit;
-    delete _reqcOutLogLineEdit;
-    delete _reqcPlotDirLineEdit;
-    delete _reqcSkyPlotSignals;
-    delete _reqcLogSummaryOnly;
-    delete _reqcEditOptionButton;
-    delete _sp3CompFileChooser;
-    delete _sp3CompExclude;
-    delete _sp3CompLogLineEdit;
-    delete _sp3CompSummaryOnly;
-    //delete _canvas;
-}
-
-//
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::populateMountPointsTable() {
-
-    for (int iRow = _mountPointsTable->rowCount() - 1; iRow >= 0; iRow--) {
-        _mountPointsTable->removeRow(iRow);
-    }
-
-    bncSettings settings;
-
-    QListIterator<QString> it(settings.value("mountPoints").toStringList());
-    int iRow = 0;
-    while (it.hasNext()) {
-        QStringList hlp = it.next().split(" ");
-        if (hlp.size() < 7) continue;
-        _mountPointsTable->insertRow(iRow);
-
-        QUrl    url(hlp[0]);
-
-        QString format(hlp[1]);
-        QString country(hlp[2]);
-        QString latitude(hlp[3]);
-        QString longitude(hlp[4]);
-        QString nmea(hlp[5]);
-        QString ntripVersion(hlp[6]);
-
-        QString fullPath;
-        if (ntripVersion == 'S') {
-          // url.userInfo() contains the case sensitive portName
-          // the portName shall be part of the mountpointString
-          // to inform the user about the source of the stream
-          if (url.host().contains(url.userInfo().toLower())) {
-            fullPath = url.host() + url.path();
-          }
-          else {
-            fullPath =  url.userInfo() + "-" + url.host() + url.path();
-          }
-        } else {
-          fullPath = url.host() + QString(":%1").arg(url.port()) + url.path();
+      it = new QTableWidgetItem(latitude);
+      it->setFlags(it->flags() & ~Qt::ItemIsEditable);
+      _mountPointsTable->setItem(iRow, 4, it);
+      it = new QTableWidgetItem(longitude);
+      it->setFlags(it->flags() & ~Qt::ItemIsEditable);
+      _mountPointsTable->setItem(iRow, 5, it);
+    }
+
+    it = new QTableWidgetItem(nmea);
+    it->setFlags(it->flags() & ~Qt::ItemIsEditable);
+    _mountPointsTable->setItem(iRow, 6, it);
+
+    it = new QTableWidgetItem(ntripVersion);
+    //// it->setFlags(it->flags() & ~Qt::ItemIsEditable);
+    _mountPointsTable->setItem(iRow, 7, it);
+
+    bncTableItem* bncIt = new bncTableItem();
+    _mountPointsTable->setItem(iRow, 8, bncIt);
+
+    iRow++;
+  }
+  _mountPointsTable->hideColumn(0);
+  _mountPointsTable->hideColumn(3);
+  _mountPointsTable->sortItems(1);
+  delete mountPoints;
+
+  enableStartStop();
+}
+
+// Save Options (serialize)
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::slotSaveOptions() {
+  saveOptions();
+  bncSettings settings;
+  settings.sync();
+}
+
+// Save Options (memory only)
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::saveOptions() {
+
+  QStringList mountPoints;
+  for (int iRow = 0; iRow < _mountPointsTable->rowCount(); iRow++) {
+
+    QUrl url("//"
+             + _mountPointsTable->item(iRow, 0)->text() + "@"
+             + _mountPointsTable->item(iRow, 1)->text());
+
+    mountPoints.append(url.toString()
+                       + " " + _mountPointsTable->item(iRow, 2)->text()
+                       + " " + _mountPointsTable->item(iRow, 3)->text()
+                       + " " + _mountPointsTable->item(iRow, 4)->text()
+                       + " " + _mountPointsTable->item(iRow, 5)->text()
+                       + " " + _mountPointsTable->item(iRow, 6)->text()
+                       + " " + _mountPointsTable->item(iRow, 7)->text());
+  }
+
+  QStringList cmbStreams;
+  for (int iRow = 0; iRow < _cmbTable->rowCount(); iRow++) {
+    QString hlp;
+    for (int iCol = 0; iCol < _cmbTable->columnCount(); iCol++) {
+      if (_cmbTable->item(iRow, iCol)) {
+        hlp += _cmbTable->item(iRow, iCol)->text() + " ";
+      }
+    }
+    if (!hlp.isEmpty()) {
+      cmbStreams << hlp;
+    }
+  }
+
+  QStringList uploadMountpointsOut;
+  for (int iRow = 0; iRow < _uploadTable->rowCount(); iRow++) {
+    QString hlp;
+    for (int iCol = 0; iCol < _uploadTable->columnCount(); iCol++) {
+      if (_uploadTable->cellWidget(iRow, iCol) &&
+          (iCol == 3 || iCol == 4 || iCol == 5 || iCol == 6 || iCol == 7 || iCol == 8)) {
+        if (iCol == 3) {
+          QComboBox* ntripversion = (QComboBox*)(_uploadTable->cellWidget(iRow, iCol));
+          hlp += ntripversion->currentText() + ",";
         }
-
-        QTableWidgetItem* it;
-        it = new QTableWidgetItem(url.userInfo());
-        it->setFlags(it->flags() & ~Qt::ItemIsEditable);
-        _mountPointsTable->setItem(iRow, 0, it);
-
-        it = new QTableWidgetItem(fullPath);
-        it->setFlags(it->flags() & ~Qt::ItemIsEditable);
-        _mountPointsTable->setItem(iRow, 1, it);
-
-        it = new QTableWidgetItem(format);
-        _mountPointsTable->setItem(iRow, 2, it);
-
-        it = new QTableWidgetItem(country);
-        _mountPointsTable->setItem(iRow, 3, it);
-
-        if (nmea == "yes") {
-            it = new QTableWidgetItem(latitude);
-            _mountPointsTable->setItem(iRow, 4, it);
-            it = new QTableWidgetItem(longitude);
-            _mountPointsTable->setItem(iRow, 5, it);
+        else if (iCol == 4) {
+          QLineEdit* user = (QLineEdit*)(_uploadTable->cellWidget(iRow, iCol));
+          hlp += user->text() + ",";
         }
-        else {
-            it = new QTableWidgetItem(latitude);
-            it->setFlags(it->flags() & ~Qt::ItemIsEditable);
-            _mountPointsTable->setItem(iRow, 4, it);
-
-            it = new QTableWidgetItem(longitude);
-            it->setFlags(it->flags() & ~Qt::ItemIsEditable);
-            _mountPointsTable->setItem(iRow, 5, it);
+        else if (iCol == 5) {
+          QLineEdit* passwd = (QLineEdit*)(_uploadTable->cellWidget(iRow, iCol));
+          hlp += passwd->text() + ",";
         }
-
-        it = new QTableWidgetItem(nmea);
-        it->setFlags(it->flags() & ~Qt::ItemIsEditable);
-        _mountPointsTable->setItem(iRow, 6, it);
-
-        it = new QTableWidgetItem(ntripVersion);
-        ////    it->setFlags(it->flags() & ~Qt::ItemIsEditable);
-        _mountPointsTable->setItem(iRow, 7, it);
-
-        bncTableItem* bncIt = new bncTableItem();
-        bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
-        _mountPointsTable->setItem(iRow, 8, bncIt);
-
-        iRow++;
-    }
-
-    _mountPointsTable->sortItems(1);
-
-    enableStartStop();
-}
-
-// Retrieve Table
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotAddMountPoints() {
-
-    bncSettings settings;
-    QString proxyHost = settings.value("proxyHost").toString();
-    int     proxyPort = settings.value("proxyPort").toInt();
-    if (proxyHost != _proxyHostLineEdit->text() ||
-        proxyPort != _proxyPortLineEdit->text().toInt()) {
-        int iRet = QMessageBox::question(this, "Question", "Proxy options "
-            "changed. Use the new ones?",
-            QMessageBox::Yes, QMessageBox::No,
-            QMessageBox::NoButton);
-        if (iRet == QMessageBox::Yes) {
-            settings.setValue("proxyHost", _proxyHostLineEdit->text());
-            settings.setValue("proxyPort", _proxyPortLineEdit->text());
+        else if (iCol == 6) {
+          QComboBox* system = (QComboBox*)(_uploadTable->cellWidget(iRow, iCol));
+          hlp += system->currentText() + ",";
         }
-    }
-
-    settings.setValue("sslCaCertPath", _sslCaCertPathLineEdit->text());
-    settings.setValue("sslClientCertPath", _sslClientCertPathLineEdit->text());
-    settings.setValue("sslIgnoreErrors", _sslIgnoreErrorsCheckBox->checkState());
-
-    QMessageBox msgBox;
-    msgBox.setIcon(QMessageBox::Question);
-    msgBox.setWindowTitle("Add Stream");
-    msgBox.setText("Add stream(s) coming from:");
-
-    QPushButton* buttonNtrip = msgBox.addButton(tr("Caster"), QMessageBox::ActionRole);
-    QPushButton* buttonIP = msgBox.addButton(tr("TCP/IP port"), QMessageBox::ActionRole);
-    QPushButton* buttonUDP = msgBox.addButton(tr("UDP port"), QMessageBox::ActionRole);
-    QPushButton* buttonSerial = msgBox.addButton(tr("Serial port"), QMessageBox::ActionRole);
-    QPushButton* buttonCancel = msgBox.addButton(tr("Cancel"), QMessageBox::ActionRole);
-
-    msgBox.exec();
-
-    if (msgBox.clickedButton() == buttonNtrip) {
-        bncTableDlg* dlg = new bncTableDlg(this);
-        dlg->move(this->pos().x() + 50, this->pos().y() + 50);
-        connect(dlg, SIGNAL(newMountPoints(QStringList*)),
-            this, SLOT(slotNewMountPoints(QStringList*)));
-        dlg->exec();
-        delete dlg;
-    }
-    else if (msgBox.clickedButton() == buttonIP) {
-        bncIpPort* ipp = new bncIpPort(this);
-        connect(ipp, SIGNAL(newMountPoints(QStringList*)),
-            this, SLOT(slotNewMountPoints(QStringList*)));
-        ipp->exec();
-        delete ipp;
-    }
-    else if (msgBox.clickedButton() == buttonUDP) {
-        bncUdpPort* udp = new bncUdpPort(this);
-        connect(udp, SIGNAL(newMountPoints(QStringList*)),
-            this, SLOT(slotNewMountPoints(QStringList*)));
-        udp->exec();
-        delete udp;
-    }
-    else if (msgBox.clickedButton() == buttonSerial) {
-        bncSerialPort* sep = new bncSerialPort(this);
-        connect(sep, SIGNAL(newMountPoints(QStringList*)),
-            this, SLOT(slotNewMountPoints(QStringList*)));
-        sep->exec();
-        delete sep;
-    }
-    else if (msgBox.clickedButton() == buttonCancel) {
-        // Cancel
-    }
-
-    enableStartStop();
-}
-
-// Delete Selected Mount Points
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotDeleteMountPoints() {
-
-    int nRows = _mountPointsTable->rowCount();
-    std::vector <bool> flg(nRows);
-    for (int iRow = 0; iRow < nRows; iRow++) {
-        if (_mountPointsTable->item(iRow, 1)->isSelected()) {
-            flg[iRow] = true;
+        else if (iCol == 7) {
+          QComboBox* format = (QComboBox*)(_uploadTable->cellWidget(iRow, iCol));
+          hlp += format->currentText() + ",";
         }
-        else {
-            flg[iRow] = false;
-        }
-    }
-    for (int iRow = nRows - 1; iRow >= 0; iRow--) {
-        if (flg[iRow]) {
-            _mountPointsTable->removeRow(iRow);
-        }
-    }
-    _actDeleteMountPoints->setEnabled(false);
-
-    enableStartStop();
-}
-
-// New Mount Points Selected
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotNewMountPoints(QStringList* mountPoints) {
-    int iRow = 0;
-    QListIterator<QString> it(*mountPoints);
-    while (it.hasNext()) {
-        QStringList hlp = it.next().split(" ");
-
-        QUrl url(hlp[0]);
-
-        QString format(hlp[1]);
-        QString country(hlp[2]);
-        QString latitude(hlp[3]);
-        QString longitude(hlp[4]);
-        QString nmea(hlp[5]);
-        QString ntripVersion(hlp[6]);
-
-        QString fullPath;
-        if (ntripVersion == 'S') {
-          // url.userInfo() contains the case sensitive portName
-          // the portName shall be part of the mountpointString
-          // to inform the user about the source of the stream
-          if (url.host().contains(url.userInfo().toLower())) {
-            fullPath = url.host() + url.path();
-          }
-          else {
-            fullPath =  url.userInfo() + "-" + url.host() + url.path();
-          }
-        } else {
-          fullPath = url.host() + QString(":%1").arg(url.port()) + url.path();
-        }
-
-        _mountPointsTable->insertRow(iRow);
-
-        QTableWidgetItem* it;
-        it = new QTableWidgetItem(url.userInfo());
-        it->setFlags(it->flags() & ~Qt::ItemIsEditable);
-        _mountPointsTable->setItem(iRow, 0, it);
-
-        it = new QTableWidgetItem(fullPath);
-        it->setFlags(it->flags() & ~Qt::ItemIsEditable);
-        _mountPointsTable->setItem(iRow, 1, it);
-
-        it = new QTableWidgetItem(format);
-        _mountPointsTable->setItem(iRow, 2, it);
-
-        it = new QTableWidgetItem(country);
-        _mountPointsTable->setItem(iRow, 3, it);
-
-        if (nmea == "yes") {
-            it = new QTableWidgetItem(latitude);
-            _mountPointsTable->setItem(iRow, 4, it);
-            it = new QTableWidgetItem(longitude);
-            _mountPointsTable->setItem(iRow, 5, it);
-        }
-        else {
-            it = new QTableWidgetItem(latitude);
-            it->setFlags(it->flags() & ~Qt::ItemIsEditable);
-            _mountPointsTable->setItem(iRow, 4, it);
-            it = new QTableWidgetItem(longitude);
-            it->setFlags(it->flags() & ~Qt::ItemIsEditable);
-            _mountPointsTable->setItem(iRow, 5, it);
-        }
-
-        it = new QTableWidgetItem(nmea);
-        it->setFlags(it->flags() & ~Qt::ItemIsEditable);
-        _mountPointsTable->setItem(iRow, 6, it);
-
-        it = new QTableWidgetItem(ntripVersion);
-        //// it->setFlags(it->flags() & ~Qt::ItemIsEditable);
-        _mountPointsTable->setItem(iRow, 7, it);
-
-        bncTableItem* bncIt = new bncTableItem();
-        _mountPointsTable->setItem(iRow, 8, bncIt);
-
-        iRow++;
-    }
-    _mountPointsTable->hideColumn(0);
-    _mountPointsTable->hideColumn(3);
-    _mountPointsTable->sortItems(1);
-    delete mountPoints;
-
-    enableStartStop();
-}
-
-// Save Options (serialize)
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotSaveOptions() {
-    saveOptions();
-    bncSettings settings;
-    settings.sync();
-}
-
-// Save Options (memory only)
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::saveOptions() {
-
-    QStringList mountPoints;
-    for (int iRow = 0; iRow < _mountPointsTable->rowCount(); iRow++) {
-
-          QUrl url("//"
-              + _mountPointsTable->item(iRow, 0)->text() + "@"
-              + _mountPointsTable->item(iRow, 1)->text());
-
-          mountPoints.append(url.toString()
-              + " " + _mountPointsTable->item(iRow, 2)->text()
-              + " " + _mountPointsTable->item(iRow, 3)->text()
-              + " " + _mountPointsTable->item(iRow, 4)->text()
-              + " " + _mountPointsTable->item(iRow, 5)->text()
-              + " " + _mountPointsTable->item(iRow, 6)->text()
-              + " " + _mountPointsTable->item(iRow, 7)->text());
-    }
-
-    QStringList cmbStreams;
-    for (int iRow = 0; iRow < _cmbTable->rowCount(); iRow++) {
-        QString hlp;
-        for (int iCol = 0; iCol < _cmbTable->columnCount(); iCol++) {
-            if (_cmbTable->item(iRow, iCol)) {
-                hlp += _cmbTable->item(iRow, iCol)->text() + " ";
-            }
-        }
-        if (!hlp.isEmpty()) {
-            cmbStreams << hlp;
-        }
-    }
-
-    QStringList uploadMountpointsOut;
-    for (int iRow = 0; iRow < _uploadTable->rowCount(); iRow++) {
-        QString hlp;
-        for (int iCol = 0; iCol < _uploadTable->columnCount(); iCol++) {
-            if (_uploadTable->cellWidget(iRow, iCol) &&
-                (iCol == 3 || iCol == 4 || iCol == 5 || iCol == 6 || iCol == 7 || iCol == 8)) {
-                if (iCol == 3) {
-                    QComboBox* ntripversion = (QComboBox*)(_uploadTable->cellWidget(iRow, iCol));
-                    hlp += ntripversion->currentText() + ",";
-                }
-                else if (iCol == 4) {
-                    QLineEdit* user = (QLineEdit*)(_uploadTable->cellWidget(iRow, iCol));
-                    hlp += user->text() + ",";
-                }
-                else if (iCol == 5) {
-                    QLineEdit* passwd = (QLineEdit*)(_uploadTable->cellWidget(iRow, iCol));
-                    hlp += passwd->text() + ",";
-                }
-                else if (iCol == 6) {
-                    QComboBox* system = (QComboBox*)(_uploadTable->cellWidget(iRow, iCol));
-                    hlp += system->currentText() + ",";
-                }
-                else if (iCol == 7) {
-                    QComboBox* format = (QComboBox*)(_uploadTable->cellWidget(iRow, iCol));
-                    hlp += format->currentText() + ",";
-                }
-                else if (iCol == 8) {
-                    QCheckBox* com = (QCheckBox*)(_uploadTable->cellWidget(iRow, iCol));
-                    QString state; state.setNum(com->checkState());
-                    hlp += state + ",";
-                }
-            }
-            else if (_uploadTable->item(iRow, iCol)) {
-                hlp += _uploadTable->item(iRow, iCol)->text() + ",";
-            }
-        }
-        if (!hlp.isEmpty()) {
-            uploadMountpointsOut << hlp;
-        }
-    }
-
-    QStringList uploadEphMountpointsOut;
-    for (int iRow = 0; iRow < _uploadEphTable->rowCount(); iRow++) {
-      QString hlp;
-      for (int iCol = 0; iCol < _uploadEphTable->columnCount(); iCol++) {
-          if (_uploadEphTable->cellWidget(iRow, iCol) &&
-              (iCol == 3 || iCol == 4 || iCol == 5 || iCol == 6)) {
-              if      (iCol == 3) {
-                  QComboBox* ntripversion = (QComboBox*)(_uploadEphTable->cellWidget(iRow, iCol));
-                  hlp += ntripversion->currentText() + ",";
-              }
-              else if (iCol == 4) {
-                  QLineEdit* user = (QLineEdit*)(_uploadEphTable->cellWidget(iRow, iCol));
-                  hlp += user->text() + ",";
-              }
-              else if (iCol == 5) {
-                  QLineEdit* passwd = (QLineEdit*)(_uploadEphTable->cellWidget(iRow, iCol));
-                  hlp += passwd->text() + ",";
-              }
-              else if (iCol == 6) {
-                  QLineEdit* system = (QLineEdit*)(_uploadEphTable->cellWidget(iRow, iCol));
-                  hlp += system->text() + ",";
-              }
-          }
-          else if (_uploadEphTable->item(iRow, iCol)) {
-              hlp += _uploadEphTable->item(iRow, iCol)->text() + ",";
-          }
-      }
-      if (!hlp.isEmpty()) {
-          uploadEphMountpointsOut << hlp;
-      }
-    }
-
-    QStringList uploadRawMountpointsOut;
-    for (int iRow = 0; iRow < _uploadRawTable->rowCount(); iRow++) {
-      QString hlp;
-      for (int iCol = 0; iCol < _uploadRawTable->columnCount(); iCol++) {
-        if (_uploadRawTable->cellWidget(iRow, iCol) &&
-            (iCol == 4 || iCol == 5 || iCol == 6)) {
-            if      (iCol == 4) {
-                QComboBox* ntripversion = (QComboBox*)(_uploadRawTable->cellWidget(iRow, iCol));
-                hlp += ntripversion->currentText() + ",";
-            }
-            else if (iCol == 5) {
-                QLineEdit* user = (QLineEdit*)(_uploadRawTable->cellWidget(iRow, iCol));
-                hlp += user->text() + ",";
-            }
-            else if (iCol == 6) {
-                QLineEdit* passwd = (QLineEdit*)(_uploadRawTable->cellWidget(iRow, iCol));
-                hlp += passwd->text() + ",";
-            }
-        }
-        else if (_uploadRawTable->item(iRow, iCol)) {
-            hlp += _uploadRawTable->item(iRow, iCol)->text() + ",";
+        else if (iCol == 8) {
+          QCheckBox* com = (QCheckBox*)(_uploadTable->cellWidget(iRow, iCol));
+          QString state; state.setNum(com->checkState());
+          hlp += state + ",";
         }
       }
-      if (!hlp.isEmpty()) {
-          uploadRawMountpointsOut << hlp;
+      else if (_uploadTable->item(iRow, iCol)) {
+        hlp += _uploadTable->item(iRow, iCol)->text() + ",";
       }
     }
-
-    bncSettings settings;
-
-    settings.setValue("startTab", _aogroup->currentIndex());
-    settings.setValue("statusTab", _loggroup->currentIndex());
-    settings.setValue("mountPoints", mountPoints);
-    // Network
-    settings.setValue("proxyHost", _proxyHostLineEdit->text());
-    settings.setValue("proxyPort", _proxyPortLineEdit->text());
-    settings.setValue("sslCaCertPath", _sslCaCertPathLineEdit->text());
-    settings.setValue("sslClientCertPath", _sslClientCertPathLineEdit->text());
-    settings.setValue("sslIgnoreErrors", _sslIgnoreErrorsCheckBox->checkState());
-    // General
-    settings.setValue("logFile", _logFileLineEdit->text());
-    settings.setValue("rnxAppend", _rnxAppendCheckBox->checkState());
-    settings.setValue("onTheFlyInterval", _onTheFlyComboBox->currentText());
-    settings.setValue("autoStart", _autoStartCheckBox->checkState());
-    settings.setValue("rawOutFile", _rawOutFileLineEdit->text());
-    // RINEX Observations
-    settings.setValue("rnxPath", _rnxPathLineEdit->text());
-    settings.setValue("rnxIntr", _rnxIntrComboBox->currentText());
-    settings.setValue("rnxSampl", _rnxSamplComboBox->currentText());
-    settings.setValue("rnxSkel", _rnxSkelExtComboBox->currentText());
-    settings.setValue("rnxSkelPath", _rnxSkelPathLineEdit->text());
-    settings.setValue("rnxOnlyWithSKL", _rnxFileCheckBox->checkState());
-    settings.setValue("rnxScript", _rnxScrpLineEdit->text());
-    settings.setValue("rnxV2Priority", _rnxV2Priority->text());
-    settings.setValue("rnxVersion", _rnxVersComboBox->currentText());
-    // RINEX Ephemeris
-    settings.setValue("ephPath", _ephPathLineEdit->text());
-    settings.setValue("ephIntr", _ephIntrComboBox->currentText());
-    settings.setValue("ephOutPort", _ephOutPortLineEdit->text());
-    settings.setValue("ephVersion", _ephVersComboBox->currentText());
-    //settings.setValue("ephFilePerStation", _ephFilePerStation->checkState());
+    if (!hlp.isEmpty()) {
+      uploadMountpointsOut << hlp;
+    }
+  }
+
+  QStringList uploadEphMountpointsOut;
+  for (int iRow = 0; iRow < _uploadEphTable->rowCount(); iRow++) {
+    QString hlp;
+    for (int iCol = 0; iCol < _uploadEphTable->columnCount(); iCol++) {
+      if (_uploadEphTable->cellWidget(iRow, iCol) &&
+          (iCol == 3 || iCol == 4 || iCol == 5 || iCol == 6)) {
+        if      (iCol == 3) {
+          QComboBox* ntripversion = (QComboBox*)(_uploadEphTable->cellWidget(iRow, iCol));
+          hlp += ntripversion->currentText() + ",";
+        }
+        else if (iCol == 4) {
+          QLineEdit* user = (QLineEdit*)(_uploadEphTable->cellWidget(iRow, iCol));
+          hlp += user->text() + ",";
+        }
+        else if (iCol == 5) {
+          QLineEdit* passwd = (QLineEdit*)(_uploadEphTable->cellWidget(iRow, iCol));
+          hlp += passwd->text() + ",";
+        }
+        else if (iCol == 6) {
+          QLineEdit* system = (QLineEdit*)(_uploadEphTable->cellWidget(iRow, iCol));
+          hlp += system->text() + ",";
+        }
+      }
+      else if (_uploadEphTable->item(iRow, iCol)) {
+        hlp += _uploadEphTable->item(iRow, iCol)->text() + ",";
+      }
+    }
+    if (!hlp.isEmpty()) {
+      uploadEphMountpointsOut << hlp;
+    }
+  }
+
+  QStringList uploadRawMountpointsOut;
+  for (int iRow = 0; iRow < _uploadRawTable->rowCount(); iRow++) {
+    QString hlp;
+    for (int iCol = 0; iCol < _uploadRawTable->columnCount(); iCol++) {
+      if (_uploadRawTable->cellWidget(iRow, iCol) &&
+          (iCol == 4 || iCol == 5 || iCol == 6)) {
+        if      (iCol == 4) {
+          QComboBox* ntripversion = (QComboBox*)(_uploadRawTable->cellWidget(iRow, iCol));
+          hlp += ntripversion->currentText() + ",";
+        }
+        else if (iCol == 5) {
+          QLineEdit* user = (QLineEdit*)(_uploadRawTable->cellWidget(iRow, iCol));
+          hlp += user->text() + ",";
+        }
+        else if (iCol == 6) {
+          QLineEdit* passwd = (QLineEdit*)(_uploadRawTable->cellWidget(iRow, iCol));
+          hlp += passwd->text() + ",";
+        }
+      }
+      else if (_uploadRawTable->item(iRow, iCol)) {
+        hlp += _uploadRawTable->item(iRow, iCol)->text() + ",";
+      }
+    }
+    if (!hlp.isEmpty()) {
+      uploadRawMountpointsOut << hlp;
+    }
+  }
+
+  bncSettings settings;
+
+  settings.setValue("startTab", _aogroup->currentIndex());
+  settings.setValue("statusTab", _loggroup->currentIndex());
+  settings.setValue("mountPoints", mountPoints);
+  // Network
+  settings.setValue("proxyHost", _proxyHostLineEdit->text());
+  settings.setValue("proxyPort", _proxyPortLineEdit->text());
+  settings.setValue("sslCaCertPath", _sslCaCertPathLineEdit->text());
+  settings.setValue("sslClientCertPath", _sslClientCertPathLineEdit->text());
+  settings.setValue("sslIgnoreErrors", _sslIgnoreErrorsCheckBox->checkState());
+  // General
+  settings.setValue("logFile", _logFileLineEdit->text());
+  settings.setValue("rnxAppend", _rnxAppendCheckBox->checkState());
+  settings.setValue("onTheFlyInterval", _onTheFlyComboBox->currentText());
+  settings.setValue("autoStart", _autoStartCheckBox->checkState());
+  settings.setValue("rawOutFile", _rawOutFileLineEdit->text());
+  // RINEX Observations
+  settings.setValue("rnxPath", _rnxPathLineEdit->text());
+  settings.setValue("rnxIntr", _rnxIntrComboBox->currentText());
+  settings.setValue("rnxSampl", _rnxSamplComboBox->currentText());
+  settings.setValue("rnxSkel", _rnxSkelExtComboBox->currentText());
+  settings.setValue("rnxSkelPath", _rnxSkelPathLineEdit->text());
+  settings.setValue("rnxOnlyWithSKL", _rnxFileCheckBox->checkState());
+  settings.setValue("rnxScript", _rnxScrpLineEdit->text());
+  settings.setValue("rnxV2Priority", _rnxV2Priority->text());
+  settings.setValue("rnxVersion", _rnxVersComboBox->currentText());
+  // RINEX Ephemeris
+  settings.setValue("ephPath", _ephPathLineEdit->text());
+  settings.setValue("ephIntr", _ephIntrComboBox->currentText());
+  settings.setValue("ephOutPort", _ephOutPortLineEdit->text());
+  settings.setValue("ephVersion", _ephVersComboBox->currentText());
+  //settings.setValue("ephFilePerStation", _ephFilePerStation->checkState());
   // Broadcast Corrections
-    settings.setValue("corrPath", _corrPathLineEdit->text());
-    settings.setValue("corrIntr", _corrIntrComboBox->currentText());
-    settings.setValue("corrPort", _corrPortLineEdit->text());
-    // Feed Engine
-    settings.setValue("outPort", _outPortLineEdit->text());
-    settings.setValue("outWait", _outWaitSpinBox->value());
-    settings.setValue("outSampl", _outSamplComboBox->currentText());
-    settings.setValue("outFile", _outFileLineEdit->text());
-    settings.setValue("outLockTime", _outLockTimeCheckBox->checkState());
-    settings.setValue("outUPort", _outUPortLineEdit->text());
-    // Serial Output
-    settings.setValue("serialMountPoint", _serialMountPointLineEdit->text());
-    settings.setValue("serialPortName", _serialPortNameLineEdit->text());
-    settings.setValue("serialBaudRate", _serialBaudRateComboBox->currentText());
-    settings.setValue("serialFlowControl", _serialFlowControlComboBox->currentText());
-    settings.setValue("serialDataBits", _serialDataBitsComboBox->currentText());
-    settings.setValue("serialParity", _serialParityComboBox->currentText());
-    settings.setValue("serialStopBits", _serialStopBitsComboBox->currentText());
-    settings.setValue("serialAutoNMEA", _serialAutoNMEAComboBox->currentText());
-    settings.setValue("serialFileNMEA", _serialFileNMEALineEdit->text());
-    settings.setValue("serialHeightNMEA", _serialHeightNMEALineEdit->text());
-    settings.setValue("serialNMEASampling", _serialNMEASamplingSpinBox->value());
-    // Outages
-    settings.setValue("adviseObsRate", _adviseObsRateComboBox->currentText());
-    settings.setValue("adviseFail", _adviseFailSpinBox->value());
-    settings.setValue("adviseReco", _adviseRecoSpinBox->value());
-    settings.setValue("adviseScript", _adviseScriptLineEdit->text());
-    // Miscellaneous
-    settings.setValue("miscMount", _miscMountLineEdit->text());
-    settings.setValue("miscPort", _miscPortLineEdit->text());
-    settings.setValue("miscIntr", _miscIntrComboBox->currentText());
-    settings.setValue("miscScanRTCM", _miscScanRTCMCheckBox->checkState());
-    // Reqc
-    settings.setValue("reqcAction", _reqcActionComboBox->currentText());
-    settings.setValue("reqcObsFile", _reqcObsFileChooser->fileName());
-    settings.setValue("reqcNavFile", _reqcNavFileChooser->fileName());
-    settings.setValue("reqcOutObsFile", _reqcOutObsLineEdit->text());
-    settings.setValue("reqcOutNavFile", _reqcOutNavLineEdit->text());
-    settings.setValue("reqcOutLogFile", _reqcOutLogLineEdit->text());
-    settings.setValue("reqcPlotDir", _reqcPlotDirLineEdit->text());
-    settings.setValue("reqcSkyPlotSignals", _reqcSkyPlotSignals->text());
-    settings.setValue("reqcLogSummaryOnly", _reqcLogSummaryOnly->checkState());
-    // SP3 Comparison
-    settings.setValue("sp3CompFile", _sp3CompFileChooser->fileName());
-    settings.setValue("sp3CompExclude", _sp3CompExclude->text());
-    settings.setValue("sp3CompOutLogFile", _sp3CompLogLineEdit->text());
-    settings.setValue("sp3CompSummaryOnly", _sp3CompSummaryOnly->checkState());
-    // Combine Corrections
-    if (!cmbStreams.isEmpty()) {
-        settings.setValue("cmbStreams", cmbStreams);
+  settings.setValue("corrPath", _corrPathLineEdit->text());
+  settings.setValue("corrIntr", _corrIntrComboBox->currentText());
+  settings.setValue("corrPort", _corrPortLineEdit->text());
+  // Feed Engine
+  settings.setValue("outPort", _outPortLineEdit->text());
+  settings.setValue("outWait", _outWaitSpinBox->value());
+  settings.setValue("outSampl", _outSamplComboBox->currentText());
+  settings.setValue("outFile", _outFileLineEdit->text());
+  settings.setValue("outLockTime", _outLockTimeCheckBox->checkState());
+  settings.setValue("outUPort", _outUPortLineEdit->text());
+  // Serial Output
+  settings.setValue("serialMountPoint", _serialMountPointLineEdit->text());
+  settings.setValue("serialPortName", _serialPortNameLineEdit->text());
+  settings.setValue("serialBaudRate", _serialBaudRateComboBox->currentText());
+  settings.setValue("serialFlowControl", _serialFlowControlComboBox->currentText());
+  settings.setValue("serialDataBits", _serialDataBitsComboBox->currentText());
+  settings.setValue("serialParity", _serialParityComboBox->currentText());
+  settings.setValue("serialStopBits", _serialStopBitsComboBox->currentText());
+  settings.setValue("serialAutoNMEA", _serialAutoNMEAComboBox->currentText());
+  settings.setValue("serialFileNMEA", _serialFileNMEALineEdit->text());
+  settings.setValue("serialHeightNMEA", _serialHeightNMEALineEdit->text());
+  settings.setValue("serialNMEASampling", _serialNMEASamplingSpinBox->value());
+  // Outages
+  settings.setValue("adviseObsRate", _adviseObsRateComboBox->currentText());
+  settings.setValue("adviseFail", _adviseFailSpinBox->value());
+  settings.setValue("adviseReco", _adviseRecoSpinBox->value());
+  settings.setValue("adviseScript", _adviseScriptLineEdit->text());
+  // Miscellaneous
+  settings.setValue("miscMount", _miscMountLineEdit->text());
+  settings.setValue("miscPort", _miscPortLineEdit->text());
+  settings.setValue("miscIntr", _miscIntrComboBox->currentText());
+  settings.setValue("miscScanRTCM", _miscScanRTCMCheckBox->checkState());
+  // Reqc
+  settings.setValue("reqcAction", _reqcActionComboBox->currentText());
+  settings.setValue("reqcObsFile", _reqcObsFileChooser->fileName());
+  settings.setValue("reqcNavFile", _reqcNavFileChooser->fileName());
+  settings.setValue("reqcOutObsFile", _reqcOutObsLineEdit->text());
+  settings.setValue("reqcOutNavFile", _reqcOutNavLineEdit->text());
+  settings.setValue("reqcOutLogFile", _reqcOutLogLineEdit->text());
+  settings.setValue("reqcPlotDir", _reqcPlotDirLineEdit->text());
+  settings.setValue("reqcSkyPlotSignals", _reqcSkyPlotSignals->text());
+  settings.setValue("reqcLogSummaryOnly", _reqcLogSummaryOnly->checkState());
+  // SP3 Comparison
+  settings.setValue("sp3CompFile", _sp3CompFileChooser->fileName());
+  settings.setValue("sp3CompExclude", _sp3CompExclude->text());
+  settings.setValue("sp3CompOutLogFile", _sp3CompLogLineEdit->text());
+  settings.setValue("sp3CompSummaryOnly", _sp3CompSummaryOnly->checkState());
+  // Combine Corrections
+  if (!cmbStreams.isEmpty()) {
+    settings.setValue("cmbStreams", cmbStreams);
+  }
+  else {
+    settings.setValue("cmbStreams", "");
+  }
+  settings.setValue("cmbMethod", _cmbMethodComboBox->currentText());
+  settings.setValue("cmbMaxres", _cmbMaxresLineEdit->text());
+  settings.setValue("cmbMaxdisplacement", _cmbMaxdisplacementLineEdit->text());
+  settings.setValue("cmbSampl", _cmbSamplComboBox->currentText());
+  settings.setValue("cmbLogpath", _cmbLogPath->text());
+  settings.setValue("cmbGps", _cmbGpsCheckBox->checkState());
+  settings.setValue("cmbGlo", _cmbGloCheckBox->checkState());
+  settings.setValue("cmbGal", _cmbGalCheckBox->checkState());
+  settings.setValue("cmbBds", _cmbBdsCheckBox->checkState());
+  settings.setValue("cmbQzss", _cmbQzssCheckBox->checkState());
+  settings.setValue("cmbSbas", _cmbSbasCheckBox->checkState());
+  settings.setValue("cmbNavic", _cmbNavicCheckBox->checkState());
+  settings.setValue("cmbBsxFile", _cmbBsxFile->fileName());
+
+  // Upload Corrections
+  if (!uploadMountpointsOut.isEmpty()) {
+    settings.setValue("uploadMountpointsOut", uploadMountpointsOut);
+  }
+  else {
+    settings.setValue("uploadMountpointsOut", "");
+  }
+  settings.setValue("uploadIntr", _uploadIntrComboBox->currentText());
+  settings.setValue("uploadSamplRtcmEphCorr", _uploadSamplRtcmEphCorrComboBox->currentText());
+  settings.setValue("uploadSamplSp3", _uploadSamplSp3ComboBox->currentText());
+  settings.setValue("uploadSamplClkRnx", _uploadSamplClkRnxSpinBox->value());
+  settings.setValue("uploadSamplBiaSnx", _uploadSamplBiaSnxSpinBox->value());
+  settings.setValue("uploadAntexFile", _uploadAntexFile->fileName());
+  // Upload Ephemeris
+  if (!uploadEphMountpointsOut.isEmpty()) {
+    settings.setValue("uploadEphMountpointsOut", uploadEphMountpointsOut);
+  }
+  else {
+    settings.setValue("uploadEphMountpointsOut", "");
+  }
+  settings.setValue("uploadSamplRtcmEph", _uploadSamplRtcmEphSpinBox->value());
+  // Upload Raw Data
+  if (!uploadRawMountpointsOut.isEmpty()) {
+    settings.setValue("uploadRawMountpointsOut", uploadRawMountpointsOut);
+  }
+  else {
+    settings.setValue("uploadRawMountpointsOut", "");
+  }
+  if (_caster) {
+    _caster->readMountPoints();
+  }
+
+  _pppWidgets.saveOptions();
+}
+
+// All get slots terminated
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::slotGetThreadsFinished() {
+  BNC_CORE->slotMessage("All Get Threads Terminated", true);
+  delete _caster;    _caster = 0; BNC_CORE->setCaster(0);
+  delete _casterEph; _casterEph = 0;
+  _runningRealTime = false;
+  enableStartStop();
+}
+
+// Start It!
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::slotStart() {
+  saveOptions();
+  if (_pppWidgets._dataSource->currentText() == "RINEX Files") {
+    _runningPPP = true;
+    enableStartStop();
+    _caster = new bncCaster(); BNC_CORE->setCaster(_caster);
+    BNC_CORE->startPPP();
+    _bncFigurePPP->reset();
+  }
+  else if (!_reqcActionComboBox->currentText().isEmpty()) {
+    if (_reqcActionComboBox->currentText() == "Analyze") {
+      _runningQC = true;
+      t_reqcAnalyze* reqcAnalyze = new t_reqcAnalyze(this);
+      connect(reqcAnalyze, SIGNAL(finished()), this, SLOT(slotPostProcessingFinished()));
+      reqcAnalyze->start();
     }
     else {
-        settings.setValue("cmbStreams", "");
-    }
-    settings.setValue("cmbMethod", _cmbMethodComboBox->currentText());
-    settings.setValue("cmbMaxres", _cmbMaxresLineEdit->text());
-    settings.setValue("cmbMaxdisplacement", _cmbMaxdisplacementLineEdit->text());
-    settings.setValue("cmbSampl", _cmbSamplComboBox->currentText());
-    settings.setValue("cmbLogpath", _cmbLogPath->text());
-    settings.setValue("cmbGps", _cmbGpsCheckBox->checkState());
-    settings.setValue("cmbGlo", _cmbGloCheckBox->checkState());
-    settings.setValue("cmbGal", _cmbGalCheckBox->checkState());
-    settings.setValue("cmbBds", _cmbBdsCheckBox->checkState());
-    settings.setValue("cmbQzss", _cmbQzssCheckBox->checkState());
-    settings.setValue("cmbSbas", _cmbSbasCheckBox->checkState());
-    settings.setValue("cmbNavic", _cmbNavicCheckBox->checkState());
-    settings.setValue("cmbBsxFile", _cmbBsxFile->fileName());
-
-    // Upload Corrections
-    if (!uploadMountpointsOut.isEmpty()) {
-        settings.setValue("uploadMountpointsOut", uploadMountpointsOut);
-    }
-    else {
-        settings.setValue("uploadMountpointsOut", "");
-    }
-    settings.setValue("uploadIntr", _uploadIntrComboBox->currentText());
-    settings.setValue("uploadSamplRtcmEphCorr", _uploadSamplRtcmEphCorrComboBox->currentText());
-    settings.setValue("uploadSamplSp3", _uploadSamplSp3ComboBox->currentText());
-    settings.setValue("uploadSamplClkRnx", _uploadSamplClkRnxSpinBox->value());
-    settings.setValue("uploadSamplBiaSnx", _uploadSamplBiaSnxSpinBox->value());
-    settings.setValue("uploadAntexFile", _uploadAntexFile->fileName());
-    // Upload Ephemeris
-    if (!uploadEphMountpointsOut.isEmpty()) {
-        settings.setValue("uploadEphMountpointsOut", uploadEphMountpointsOut);
-    }
-    else {
-        settings.setValue("uploadEphMountpointsOut", "");
-    }
-    settings.setValue("uploadSamplRtcmEph", _uploadSamplRtcmEphSpinBox->value());
-    // Upload Raw Data
-    if (!uploadRawMountpointsOut.isEmpty()) {
-        settings.setValue("uploadRawMountpointsOut", uploadRawMountpointsOut);
-    }
-    else {
-        settings.setValue("uploadRawMountpointsOut", "");
-    }
-    if (_caster) {
-        _caster->readMountPoints();
-    }
-
-    _pppWidgets.saveOptions();
-}
-
-// All get slots terminated
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotGetThreadsFinished() {
-    BNC_CORE->slotMessage("All Get Threads Terminated", true);
+      _runningEdit = true;
+      t_reqcEdit* reqcEdit = new t_reqcEdit(this);
+      connect(reqcEdit, SIGNAL(finished()), this, SLOT(slotPostProcessingFinished()));
+      reqcEdit->start();
+    }
+    enableStartStop();
+  }
+  else if (!_sp3CompFileChooser->fileName().isEmpty()) {
+    _runningSp3Comp = true;
+    t_sp3Comp* sp3Comp = new t_sp3Comp(this);
+    connect(sp3Comp, SIGNAL(finished()), this, SLOT(slotPostProcessingFinished()));
+    sp3Comp->start();
+    enableStartStop();
+  }
+  else {
+    startRealTime();
+    BNC_CORE->startPPP();
+  }
+}
+
+// Start Real-Time (Retrieve Data etc.)
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::startRealTime() {
+
+  _runningRealTime = true;
+
+  _bncFigurePPP->reset();
+
+  _actDeleteMountPoints->setEnabled(false);
+
+  enableStartStop();
+
+  _caster = new bncCaster();
+
+  BNC_CORE->setCaster(_caster);
+  BNC_CORE->setPortEph(_ephOutPortLineEdit->text().toInt());
+  BNC_CORE->setPortCorr(_corrPortLineEdit->text().toInt());
+  BNC_CORE->initCombination();
+
+  connect(_caster, SIGNAL(getThreadsFinished()), this, SLOT(slotGetThreadsFinished()));
+
+  connect(_caster, SIGNAL(mountPointsRead(QList<bncGetThread*>)), this, SLOT(slotMountPointsRead(QList<bncGetThread*>)));
+
+  BNC_CORE->slotMessage("========== Start BNC v" BNCVERSION " (" BNC_OS ") ==========", true);
+
+  bncSettings settings;
+
+  // Active panels
+  // -------------
+  if (!_rnxPathLineEdit->text().isEmpty())
+    BNC_CORE->slotMessage("Panel 'RINEX Observations' active", true);
+  if (!_ephPathLineEdit->text().isEmpty())
+    BNC_CORE->slotMessage("Panel 'RINEX Ephemeris' active", true);
+  if (!_corrPathLineEdit->text().isEmpty())
+    BNC_CORE->slotMessage("Panel 'Broadcast Corrections' active", true);
+  if (!_outPortLineEdit->text().isEmpty())
+    BNC_CORE->slotMessage("Panel 'Feed Engine' active", true);
+  if (!_serialMountPointLineEdit->text().isEmpty())
+    BNC_CORE->slotMessage("Panel 'Serial Output' active", true);
+  if (!_adviseObsRateComboBox->currentText().isEmpty())
+    BNC_CORE->slotMessage("Panel 'Outages' active", true);
+  if (!_miscMountLineEdit->text().isEmpty())
+    BNC_CORE->slotMessage("Panel 'Miscellaneous' active", true);
+  if (_pppWidgets._dataSource->currentText() == "Real-Time Streams")
+    BNC_CORE->slotMessage("Panel 'PPP' active", true);
+  if (_cmbTable->rowCount() > 0)
+    BNC_CORE->slotMessage("Panel 'Combine Corrections' active", true);
+  if (_uploadTable->rowCount() > 0)
+    BNC_CORE->slotMessage("Panel 'Upload Corrections' active", true);
+  if (_uploadEphTable->rowCount() > 0)
+    BNC_CORE->slotMessage("Panel 'UploadEphemeris' active", true);
+
+  QDir rnxdir(settings.value("rnxPath").toString());
+  if (!rnxdir.exists()) BNC_CORE->slotMessage("Cannot find RINEX Observations directory", true);
+
+  QString rnx_file = settings.value("rnxScript").toString();
+  if (!rnx_file.isEmpty()) {
+    QFile rnxfile(settings.value("rnxScript").toString());
+    if (!rnxfile.exists()) BNC_CORE->slotMessage("Cannot find RINEX Observations script", true);
+  }
+
+  QDir ephdir(settings.value("ephPath").toString());
+  if (!ephdir.exists()) BNC_CORE->slotMessage("Cannot find RINEX Ephemeris directory", true);
+
+  QDir corrdir(settings.value("corrPath").toString());
+  if (!corrdir.exists()) BNC_CORE->slotMessage("Cannot find Broadcast Corrections directory", true);
+
+  QString advise_file = settings.value("adviseScript").toString();
+  if (!advise_file.isEmpty()) {
+    QFile advisefile(settings.value("adviseScript").toString());
+    if (!advisefile.exists()) BNC_CORE->slotMessage("Cannot find Outages script", true);
+  }
+
+  _caster->readMountPoints();
+
+  _casterEph = new bncEphUploadCaster();
+}
+
+// Retrieve Data
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::slotStop() {
+  int iRet = QMessageBox::question(this, "Stop", "Stop retrieving/processing data?",
+                                   QMessageBox::Yes, QMessageBox::No,
+                                   QMessageBox::NoButton);
+  if (iRet == QMessageBox::Yes) {
+    BNC_CORE->stopPPP();
+    BNC_CORE->stopCombination();
     delete _caster;    _caster = 0; BNC_CORE->setCaster(0);
     delete _casterEph; _casterEph = 0;
     _runningRealTime = false;
+    _runningPPP = false;
     enableStartStop();
-}
-
-// Start It!
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotStart() {
-    saveOptions();
-    if (_pppWidgets._dataSource->currentText() == "RINEX Files") {
-        _runningPPP = true;
-        enableStartStop();
-        _caster = new bncCaster(); BNC_CORE->setCaster(_caster);
-        BNC_CORE->startPPP();
-        _bncFigurePPP->reset();
-    }
-    else if (!_reqcActionComboBox->currentText().isEmpty()) {
-        if (_reqcActionComboBox->currentText() == "Analyze") {
-            _runningQC = true;
-            t_reqcAnalyze* reqcAnalyze = new t_reqcAnalyze(this);
-            connect(reqcAnalyze, SIGNAL(finished()), this, SLOT(slotPostProcessingFinished()));
-            reqcAnalyze->start();
-        }
-        else {
-            _runningEdit = true;
-            t_reqcEdit* reqcEdit = new t_reqcEdit(this);
-            connect(reqcEdit, SIGNAL(finished()), this, SLOT(slotPostProcessingFinished()));
-            reqcEdit->start();
-        }
-        enableStartStop();
-    }
-    else if (!_sp3CompFileChooser->fileName().isEmpty()) {
-        _runningSp3Comp = true;
-        t_sp3Comp* sp3Comp = new t_sp3Comp(this);
-        connect(sp3Comp, SIGNAL(finished()), this, SLOT(slotPostProcessingFinished()));
-        sp3Comp->start();
-        enableStartStop();
-    }
-    else {
-        startRealTime();
-        BNC_CORE->startPPP();
-    }
-}
-
-// Start Real-Time (Retrieve Data etc.)
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::startRealTime() {
-
-    _runningRealTime = true;
-
-    _bncFigurePPP->reset();
-
+  }
+}
+
+// Close Application gracefully
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::closeEvent(QCloseEvent* event) {
+
+  int iRet = QMessageBox::question(this, "Close", "Save Options?",
+                                   QMessageBox::Yes, QMessageBox::No,
+                                   QMessageBox::Cancel);
+
+  if (iRet == QMessageBox::Cancel) {
+    event->ignore();
+    return;
+  }
+  else if (iRet == QMessageBox::Yes) {
+    slotSaveOptions();
+  }
+
+  BNC_CORE->stopPPP();
+
+  QMainWindow::closeEvent(event);
+}
+
+// User changed the selection of mountPoints
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::slotSelectionChanged() {
+  if (_mountPointsTable->selectedItems().isEmpty()) {
     _actDeleteMountPoints->setEnabled(false);
-
-    enableStartStop();
-
-    _caster = new bncCaster();
-
-    BNC_CORE->setCaster(_caster);
-    BNC_CORE->setPortEph(_ephOutPortLineEdit->text().toInt());
-    BNC_CORE->setPortCorr(_corrPortLineEdit->text().toInt());
-    BNC_CORE->initCombination();
-
-    connect(_caster, SIGNAL(getThreadsFinished()), this, SLOT(slotGetThreadsFinished()));
-
-    connect(_caster, SIGNAL(mountPointsRead(QList<bncGetThread*>)), this, SLOT(slotMountPointsRead(QList<bncGetThread*>)));
-
-    BNC_CORE->slotMessage("========== Start BNC v" BNCVERSION " (" BNC_OS ") ==========", true);
-
+  }
+  else {
+    _actDeleteMountPoints->setEnabled(true);
+  }
+}
+
+// Display Program Messages
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::slotWindowMessage(const QByteArray msg, bool showOnScreen) {
+  if (showOnScreen) {
+    _log->append(QDateTime::currentDateTime().toUTC().toString("yy-MM-dd hh:mm:ss ") + msg);
+  }
+}
+
+// About Message
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::slotAbout() {
+  new bncAboutDlg(0);
+}
+
+//Flowchart
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::slotFlowchart() {
+  new bncFlowchartDlg(0);
+}
+
+// Help Window
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::slotHelp() {
+  QUrl url = QUrl::fromLocalFile(":/bnchelp.html");
+  new bncHlpDlg(0, url);
+}
+
+// Select Fonts
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::slotFontSel() {
+  bool ok;
+  QFont newFont = QFontDialog::getFont(&ok, this->font(), this);
+  if (ok) {
     bncSettings settings;
-
-    // Active panels
-    // -------------
-    if (!_rnxPathLineEdit->text().isEmpty())
-        BNC_CORE->slotMessage("Panel 'RINEX Observations' active", true);
-    if (!_ephPathLineEdit->text().isEmpty())
-        BNC_CORE->slotMessage("Panel 'RINEX Ephemeris' active", true);
-    if (!_corrPathLineEdit->text().isEmpty())
-        BNC_CORE->slotMessage("Panel 'Broadcast Corrections' active", true);
-    if (!_outPortLineEdit->text().isEmpty())
-        BNC_CORE->slotMessage("Panel 'Feed Engine' active", true);
-    if (!_serialMountPointLineEdit->text().isEmpty())
-        BNC_CORE->slotMessage("Panel 'Serial Output' active", true);
-    if (!_adviseObsRateComboBox->currentText().isEmpty())
-        BNC_CORE->slotMessage("Panel 'Outages' active", true);
-    if (!_miscMountLineEdit->text().isEmpty())
-        BNC_CORE->slotMessage("Panel 'Miscellaneous' active", true);
-    if (_pppWidgets._dataSource->currentText() == "Real-Time Streams")
-        BNC_CORE->slotMessage("Panel 'PPP' active", true);
-    if (_cmbTable->rowCount() > 0)
-        BNC_CORE->slotMessage("Panel 'Combine Corrections' active", true);
-    if (_uploadTable->rowCount() > 0)
-        BNC_CORE->slotMessage("Panel 'Upload Corrections' active", true);
-    if (_uploadEphTable->rowCount() > 0)
-        BNC_CORE->slotMessage("Panel 'UploadEphemeris' active", true);
-
-    QDir rnxdir(settings.value("rnxPath").toString());
-    if (!rnxdir.exists()) BNC_CORE->slotMessage("Cannot find RINEX Observations directory", true);
-
-    QString rnx_file = settings.value("rnxScript").toString();
-    if (!rnx_file.isEmpty()) {
-        QFile rnxfile(settings.value("rnxScript").toString());
-        if (!rnxfile.exists()) BNC_CORE->slotMessage("Cannot find RINEX Observations script", true);
-    }
-
-    QDir ephdir(settings.value("ephPath").toString());
-    if (!ephdir.exists()) BNC_CORE->slotMessage("Cannot find RINEX Ephemeris directory", true);
-
-    QDir corrdir(settings.value("corrPath").toString());
-    if (!corrdir.exists()) BNC_CORE->slotMessage("Cannot find Broadcast Corrections directory", true);
-
-    QString advise_file = settings.value("adviseScript").toString();
-    if (!advise_file.isEmpty()) {
-        QFile advisefile(settings.value("adviseScript").toString());
-        if (!advisefile.exists()) BNC_CORE->slotMessage("Cannot find Outages script", true);
-    }
-
-    _caster->readMountPoints();
-
-    _casterEph = new bncEphUploadCaster();
-}
-
-// Retrieve Data
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotStop() {
-    int iRet = QMessageBox::question(this, "Stop", "Stop retrieving/processing data?",
-        QMessageBox::Yes, QMessageBox::No,
-        QMessageBox::NoButton);
-    if (iRet == QMessageBox::Yes) {
-        BNC_CORE->stopPPP();
-        BNC_CORE->stopCombination();
-        delete _caster;    _caster = 0; BNC_CORE->setCaster(0);
-        delete _casterEph; _casterEph = 0;
-        _runningRealTime = false;
-        _runningPPP = false;
-        enableStartStop();
-    }
-}
-
-// Close Application gracefully
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::closeEvent(QCloseEvent* event) {
-
-    int iRet = QMessageBox::question(this, "Close", "Save Options?",
-        QMessageBox::Yes, QMessageBox::No,
-        QMessageBox::Cancel);
-
-    if (iRet == QMessageBox::Cancel) {
-        event->ignore();
-        return;
-    }
-    else if (iRet == QMessageBox::Yes) {
-        slotSaveOptions();
-    }
-
-    BNC_CORE->stopPPP();
-
-    QMainWindow::closeEvent(event);
-}
-
-// User changed the selection of mountPoints
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotSelectionChanged() {
-    if (_mountPointsTable->selectedItems().isEmpty()) {
-        _actDeleteMountPoints->setEnabled(false);
-    }
-    else {
-        _actDeleteMountPoints->setEnabled(true);
-    }
-}
-
-// Display Program Messages
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotWindowMessage(const QByteArray msg, bool showOnScreen) {
-    if (showOnScreen) {
-        _log->append(QDateTime::currentDateTime().toUTC().toString("yy-MM-dd hh:mm:ss ") + msg);
-    }
-}
-
-// About Message
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotAbout() {
-    new bncAboutDlg(0);
-}
-
-//Flowchart
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotFlowchart() {
-    new bncFlowchartDlg(0);
-}
-
-// Help Window
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotHelp() {
-    QUrl url = QUrl::fromLocalFile(":/bnchelp.html");
-    new bncHlpDlg(0, url);
-}
-
-// Select Fonts
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotFontSel() {
-    bool ok;
-    QFont newFont = QFontDialog::getFont(&ok, this->font(), this);
-    if (ok) {
-        bncSettings settings;
-        settings.setValue("font", newFont.toString());
-        QApplication::setFont(newFont);
-        int ww = QFontMetrics(newFont).horizontalAdvance('w');
-        setMinimumSize(60 * ww, 80 * ww);
-        resize(60 * ww, 80 * ww);
-    }
+    settings.setValue("font", newFont.toString());
+    QApplication::setFont(newFont);
+    int ww = QFontMetrics(newFont).horizontalAdvance('w');
+    setMinimumSize(60 * ww, 80 * ww);
+    resize(60 * ww, 80 * ww);
+  }
 }
 
 // Whats This Help
 void bncWindow::slotWhatsThis() {
-    QWhatsThis::enterWhatsThisMode();
+  QWhatsThis::enterWhatsThisMode();
 }
 
@@ -2647,31 +2666,31 @@
 ////////////////////////////////////////////////////////////////////////////
 void bncWindow::slotMountPointsRead(QList<bncGetThread*> threads) {
-    _threads = threads;
-
-    _bncFigure->updateMountPoints();
-    _bncFigureLate->updateMountPoints();
-
-    populateMountPointsTable();
-    bncSettings settings;
-    _outSamplComboBox->findText(settings.value("outSampl").toString());
-    _outWaitSpinBox->setValue(settings.value("outWait").toInt());
-    QListIterator<bncGetThread*> iTh(threads);
-    while (iTh.hasNext()) {
-        bncGetThread* thread = iTh.next();
-        for (int iRow = 0; iRow < _mountPointsTable->rowCount(); iRow++) {
-            QUrl url("//" + _mountPointsTable->item(iRow, 0)->text() +
-                "@" + _mountPointsTable->item(iRow, 1)->text());
-            if (url == thread->mountPoint() &&
-                _mountPointsTable->item(iRow, 4)->text() == thread->latitude() &&
-                _mountPointsTable->item(iRow, 5)->text() == thread->longitude()) {
-                ((bncTableItem*)_mountPointsTable->item(iRow, 8))->setGetThread(thread);
-                disconnect(thread, SIGNAL(newBytes(QByteArray, double)), _bncFigure, SLOT(slotNewData(QByteArray, double)));
-                connect(thread, SIGNAL(newBytes(QByteArray, double)), _bncFigure, SLOT(slotNewData(QByteArray, double)));
-                disconnect(thread, SIGNAL(newLatency(QByteArray, double)), _bncFigureLate, SLOT(slotNewLatency(QByteArray, double)));
-                connect(thread, SIGNAL(newLatency(QByteArray, double)), _bncFigureLate, SLOT(slotNewLatency(QByteArray, double)));
-                break;
-            }
-        }
-    }
+  _threads = threads;
+
+  _bncFigure->updateMountPoints();
+  _bncFigureLate->updateMountPoints();
+
+  populateMountPointsTable();
+  bncSettings settings;
+  _outSamplComboBox->findText(settings.value("outSampl").toString());
+  _outWaitSpinBox->setValue(settings.value("outWait").toInt());
+  QListIterator<bncGetThread*> iTh(threads);
+  while (iTh.hasNext()) {
+    bncGetThread* thread = iTh.next();
+    for (int iRow = 0; iRow < _mountPointsTable->rowCount(); iRow++) {
+      QUrl url("//" + _mountPointsTable->item(iRow, 0)->text() +
+               "@" + _mountPointsTable->item(iRow, 1)->text());
+      if (url == thread->mountPoint() &&
+          _mountPointsTable->item(iRow, 4)->text() == thread->latitude() &&
+          _mountPointsTable->item(iRow, 5)->text() == thread->longitude()) {
+        ((bncTableItem*)_mountPointsTable->item(iRow, 8))->setGetThread(thread);
+        disconnect(thread, SIGNAL(newBytes(QByteArray, double)), _bncFigure, SLOT(slotNewData(QByteArray, double)));
+        connect(thread, SIGNAL(newBytes(QByteArray, double)), _bncFigure, SLOT(slotNewData(QByteArray, double)));
+        disconnect(thread, SIGNAL(newLatency(QByteArray, double)), _bncFigureLate, SLOT(slotNewLatency(QByteArray, double)));
+        connect(thread, SIGNAL(newLatency(QByteArray, double)), _bncFigureLate, SLOT(slotNewLatency(QByteArray, double)));
+        break;
+      }
+    }
+  }
 }
 
@@ -2679,17 +2698,17 @@
 ////////////////////////////////////////////////////////////////////////////
 void bncWindow::CreateMenu() {
-    // Create Menus
-    // ------------
-    _menuFile = menuBar()->addMenu(tr("&File"));
-    _menuFile->addAction(_actFontSel);
-    _menuFile->addSeparator();
-    _menuFile->addAction(_actSaveOpt);
-    _menuFile->addSeparator();
-    _menuFile->addAction(_actQuit);
-
-    _menuHlp = menuBar()->addMenu(tr("&Help"));
-    _menuHlp->addAction(_actHelp);
-    _menuHlp->addAction(_actFlowchart);
-    _menuHlp->addAction(_actAbout);
+  // Create Menus
+  // ------------
+  _menuFile = menuBar()->addMenu(tr("&File"));
+  _menuFile->addAction(_actFontSel);
+  _menuFile->addSeparator();
+  _menuFile->addAction(_actSaveOpt);
+  _menuFile->addSeparator();
+  _menuFile->addAction(_actQuit);
+
+  _menuHlp = menuBar()->addMenu(tr("&Help"));
+  _menuHlp->addAction(_actHelp);
+  _menuHlp->addAction(_actFlowchart);
+  _menuHlp->addAction(_actAbout);
 }
 
@@ -2697,14 +2716,14 @@
 ////////////////////////////////////////////////////////////////////////////
 void bncWindow::AddToolbar() {
-    QToolBar* toolBar = new QToolBar;
-    addToolBar(Qt::BottomToolBarArea, toolBar);
-    toolBar->setMovable(false);
-    toolBar->addAction(_actAddMountPoints);
-    toolBar->addAction(_actDeleteMountPoints);
-    toolBar->addAction(_actMapMountPoints);
-    toolBar->addAction(_actStart);
-    toolBar->addAction(_actStop);
-    toolBar->addWidget(new QLabel("                                           "));
-    toolBar->addAction(_actwhatsthis);
+  QToolBar* toolBar = new QToolBar;
+  addToolBar(Qt::BottomToolBarArea, toolBar);
+  toolBar->setMovable(false);
+  toolBar->addAction(_actAddMountPoints);
+  toolBar->addAction(_actDeleteMountPoints);
+  toolBar->addAction(_actMapMountPoints);
+  toolBar->addAction(_actStart);
+  toolBar->addAction(_actStop);
+  toolBar->addWidget(new QLabel("                                           "));
+  toolBar->addAction(_actwhatsthis);
 }
 
@@ -2712,28 +2731,28 @@
 ////////////////////////////////////////////////////////////////////////////
 bncAboutDlg::bncAboutDlg(QWidget* parent) :
-    QDialog(parent) {
-
-    QTextBrowser* tb = new QTextBrowser;
-    QUrl url = QUrl::fromLocalFile(":/bncabout.html");
-    tb->setSource(url);
-    tb->setReadOnly(true);
-
-    int ww = QFontMetrics(font()).horizontalAdvance('w');
-    QPushButton* _closeButton = new QPushButton("Close");
-    _closeButton->setMaximumWidth(10 * ww);
-    connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
-
-    QGridLayout* dlgLayout = new QGridLayout();
-    QLabel* img = new QLabel();
-    img->setPixmap(QPixmap(":ntrip-logo.png"));
-    dlgLayout->addWidget(img, 0, 0);
-    dlgLayout->addWidget(new QLabel("BKG Ntrip Client (BNC) Version " BNCVERSION), 0, 1);
-    dlgLayout->addWidget(tb, 1, 0, 1, 2);
-    dlgLayout->addWidget(_closeButton, 2, 1, Qt::AlignRight);
-
-    setLayout(dlgLayout);
-    resize(60 * ww, 60 * ww);
-    setWindowTitle("About BNC");
-    show();
+  QDialog(parent) {
+
+  QTextBrowser* tb = new QTextBrowser;
+  QUrl url = QUrl::fromLocalFile(":/bncabout.html");
+  tb->setSource(url);
+  tb->setReadOnly(true);
+
+  int ww = QFontMetrics(font()).horizontalAdvance('w');
+  QPushButton* _closeButton = new QPushButton("Close");
+  _closeButton->setMaximumWidth(10 * ww);
+  connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
+
+  QGridLayout* dlgLayout = new QGridLayout();
+  QLabel* img = new QLabel();
+  img->setPixmap(QPixmap(":ntrip-logo.png"));
+  dlgLayout->addWidget(img, 0, 0);
+  dlgLayout->addWidget(new QLabel("BKG Ntrip Client (BNC) Version " BNCVERSION), 0, 1);
+  dlgLayout->addWidget(tb, 1, 0, 1, 2);
+  dlgLayout->addWidget(_closeButton, 2, 1, Qt::AlignRight);
+
+  setLayout(dlgLayout);
+  resize(60 * ww, 60 * ww);
+  setWindowTitle("About BNC");
+  show();
 }
 
@@ -2747,20 +2766,20 @@
 ////////////////////////////////////////////////////////////////////////////
 bncFlowchartDlg::bncFlowchartDlg(QWidget* parent) :
-    QDialog(parent) {
-
-    int ww = QFontMetrics(font()).horizontalAdvance('w');
-    QPushButton* _closeButton = new QPushButton("Close");
-    _closeButton->setMaximumWidth(10 * ww);
-    connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
-
-    QGridLayout* dlgLayout = new QGridLayout();
-    QLabel* img = new QLabel();
-    img->setPixmap(QPixmap(":bncflowchart.png"));
-    dlgLayout->addWidget(img, 0, 0);
-    dlgLayout->addWidget(_closeButton, 1, 0, Qt::AlignLeft);
-
-    setLayout(dlgLayout);
-    setWindowTitle("Flow Chart");
-    show();
+  QDialog(parent) {
+
+  int ww = QFontMetrics(font()).horizontalAdvance('w');
+  QPushButton* _closeButton = new QPushButton("Close");
+  _closeButton->setMaximumWidth(10 * ww);
+  connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
+
+  QGridLayout* dlgLayout = new QGridLayout();
+  QLabel* img = new QLabel();
+  img->setPixmap(QPixmap(":bncflowchart.png"));
+  dlgLayout->addWidget(img, 0, 0);
+  dlgLayout->addWidget(_closeButton, 1, 0, Qt::AlignLeft);
+
+  setLayout(dlgLayout);
+  setWindowTitle("Flow Chart");
+  show();
 }
 
@@ -2774,715 +2793,715 @@
 void bncWindow::enableWidget(bool enable, QWidget* widget) {
 
-    const static QPalette paletteWhite(QColor(255, 255, 255));
-    const static QPalette paletteGray(QColor(230, 230, 230));
-
-    widget->setEnabled(enable);
-    if (enable) {
-        widget->setPalette(paletteWhite);
+  const static QPalette paletteWhite(QColor(255, 255, 255));
+  const static QPalette paletteGray(QColor(230, 230, 230));
+
+  widget->setEnabled(enable);
+  if (enable) {
+    widget->setPalette(paletteWhite);
+  }
+  else {
+    widget->setPalette(paletteGray);
+  }
+}
+
+//  Bnc Text
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::slotBncTextChanged() {
+
+  const static QPalette paletteWhite(QColor(255, 255, 255));
+  const static QPalette paletteGray(QColor(230, 230, 230));
+
+  bool enable = true;
+
+  // Proxy
+  //------
+  if (sender() == 0 || sender() == _proxyHostLineEdit) {
+    enable = !_proxyHostLineEdit->text().isEmpty();
+    enableWidget(enable, _proxyPortLineEdit);
+  }
+
+  // RINEX Observations
+  // ------------------
+  if (sender() == 0 || sender() == _rnxPathLineEdit) {
+    enable = !_rnxPathLineEdit->text().isEmpty();
+    enableWidget(enable, _rnxIntrComboBox);
+    enableWidget(enable, _rnxSamplComboBox);
+    enableWidget(enable, _rnxSkelExtComboBox);
+    enableWidget(enable, _rnxSkelPathLineEdit);
+    enableWidget(enable, _rnxFileCheckBox);
+    enableWidget(enable, _rnxScrpLineEdit);
+    enableWidget(enable, _rnxV2Priority);
+    enableWidget(enable, _rnxVersComboBox);
+
+    bool enable1 = true;
+    enable1 = _rnxVersComboBox->currentText() == "2";
+    if (enable && enable1) {
+      enableWidget(true, _rnxV2Priority);
+    }
+    if (enable && !enable1) {
+      enableWidget(false, _rnxV2Priority);
+    }
+  }
+
+  // RINEX Observations, Signal Priority
+  // -----------------------------------
+  if (sender() == 0 || sender() == _rnxVersComboBox) {
+    if (!_rnxPathLineEdit->text().isEmpty()) {
+      enableWidget(enable, _rnxIntrComboBox);
+      enable = _rnxVersComboBox->currentText() == "2";
+      enableWidget(enable, _rnxV2Priority);
+    }
+  }
+
+  // RINEX Ephemeris
+  // ---------------
+  if (sender() == 0 || sender() == _ephPathLineEdit || sender() == _ephOutPortLineEdit) {
+    enable = !_ephPathLineEdit->text().isEmpty() || !_ephOutPortLineEdit->text().isEmpty();
+    enableWidget(enable, _ephIntrComboBox);
+    enableWidget(enable, _ephVersComboBox);
+    //enableWidget(enable, _ephVersComboBox);
+    //enableWidget(enable, _ephFilePerStation);
+  }
+
+  // Broadcast Corrections
+  // ---------------------
+  if (sender() == 0 || sender() == _corrPathLineEdit || sender() == _corrPortLineEdit) {
+    enable = !_corrPathLineEdit->text().isEmpty() || !_corrPortLineEdit->text().isEmpty();
+    enableWidget(enable, _corrIntrComboBox);
+  }
+
+  // Feed Engine
+  // -----------
+  if (sender() == 0 || sender() == _outPortLineEdit || sender() == _outFileLineEdit) {
+    enable = !_outPortLineEdit->text().isEmpty() || !_outFileLineEdit->text().isEmpty();
+    enableWidget(enable, _outWaitSpinBox);
+    enableWidget(enable, _outSamplComboBox);
+  }
+
+  // Serial Output
+  // -------------
+  if (sender() == 0 ||
+      sender() == _serialMountPointLineEdit ||
+      sender() == _serialAutoNMEAComboBox) {
+    enable = !_serialMountPointLineEdit->text().isEmpty();
+    enableWidget(enable, _serialPortNameLineEdit);
+    enableWidget(enable, _serialBaudRateComboBox);
+    enableWidget(enable, _serialParityComboBox);
+    enableWidget(enable, _serialDataBitsComboBox);
+    enableWidget(enable, _serialStopBitsComboBox);
+    enableWidget(enable, _serialFlowControlComboBox);
+    enableWidget(enable, _serialAutoNMEAComboBox);
+    if (enable && _serialAutoNMEAComboBox->currentText() == "Auto") {
+      enableWidget(true, _serialFileNMEALineEdit);
+      enableWidget(false, _serialHeightNMEALineEdit);
+      enableWidget(true, _serialNMEASamplingSpinBox);
+    }
+    else if (enable && _serialAutoNMEAComboBox->currentText().contains("Manual")) {
+      enableWidget(false, _serialFileNMEALineEdit);
+      enableWidget(true, _serialHeightNMEALineEdit);
+      enableWidget(true, _serialNMEASamplingSpinBox);
     }
     else {
-        widget->setPalette(paletteGray);
-    }
-}
-
-//  Bnc Text
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotBncTextChanged() {
-
-    const static QPalette paletteWhite(QColor(255, 255, 255));
-    const static QPalette paletteGray(QColor(230, 230, 230));
-
-    bool enable = true;
-
-    // Proxy
-    //------
-    if (sender() == 0 || sender() == _proxyHostLineEdit) {
-        enable = !_proxyHostLineEdit->text().isEmpty();
-        enableWidget(enable, _proxyPortLineEdit);
-    }
-
-    // RINEX Observations
-    // ------------------
-    if (sender() == 0 || sender() == _rnxPathLineEdit) {
-        enable = !_rnxPathLineEdit->text().isEmpty();
-        enableWidget(enable, _rnxIntrComboBox);
-        enableWidget(enable, _rnxSamplComboBox);
-        enableWidget(enable, _rnxSkelExtComboBox);
-        enableWidget(enable, _rnxSkelPathLineEdit);
-        enableWidget(enable, _rnxFileCheckBox);
-        enableWidget(enable, _rnxScrpLineEdit);
-        enableWidget(enable, _rnxV2Priority);
-        enableWidget(enable, _rnxVersComboBox);
-
-        bool enable1 = true;
-        enable1 = _rnxVersComboBox->currentText() == "2";
-        if (enable && enable1) {
-            enableWidget(true, _rnxV2Priority);
+      enableWidget(false, _serialFileNMEALineEdit);
+      enableWidget(false, _serialHeightNMEALineEdit);
+      enableWidget(false, _serialNMEASamplingSpinBox);
+    }
+  }
+
+  // Outages
+  // -------
+  if (sender() == 0 || sender() == _adviseObsRateComboBox) {
+    enable = !_adviseObsRateComboBox->currentText().isEmpty();
+    enableWidget(enable, _adviseFailSpinBox);
+    enableWidget(enable, _adviseRecoSpinBox);
+    enableWidget(enable, _adviseScriptLineEdit);
+  }
+
+  // Miscellaneous
+  // -------------
+  if (sender() == 0 || sender() == _miscMountLineEdit) {
+    enable = !_miscMountLineEdit->text().isEmpty();
+    enableWidget(enable, _miscIntrComboBox);
+    enableWidget(enable, _miscScanRTCMCheckBox);
+    enableWidget(enable, _miscPortLineEdit);
+  }
+
+  // Combine Corrections
+  // -------------------
+  if (sender() == 0 || sender() == _cmbTable) {
+    int iRow = _cmbTable->rowCount();
+    if (iRow > 0) {
+      enableWidget(true, _cmbMethodComboBox);
+      enableWidget(true, _cmbMaxresLineEdit);
+      enableWidget(true, _cmbMaxdisplacementLineEdit);
+      enableWidget(true, _cmbSamplComboBox);
+      enableWidget(true, _cmbLogPath);
+      enableWidget(true, _cmbGpsCheckBox);
+      enableWidget(true, _cmbGloCheckBox);
+      enableWidget(true, _cmbGalCheckBox);
+      enableWidget(true, _cmbBdsCheckBox);
+      enableWidget(true, _cmbQzssCheckBox);
+      enableWidget(true, _cmbSbasCheckBox);
+      enableWidget(true, _cmbNavicCheckBox);
+      enableWidget(true, _cmbBsxFile);
+    }
+    else {
+      enableWidget(false, _cmbMethodComboBox);
+      enableWidget(false, _cmbMaxresLineEdit);
+      enableWidget(false, _cmbMaxdisplacementLineEdit);
+      enableWidget(false, _cmbSamplComboBox);
+      enableWidget(false, _cmbLogPath);
+      enableWidget(false, _cmbGpsCheckBox);
+      enableWidget(false, _cmbGloCheckBox);
+      enableWidget(false, _cmbGalCheckBox);
+      enableWidget(false, _cmbBdsCheckBox);
+      enableWidget(false, _cmbQzssCheckBox);
+      enableWidget(false, _cmbSbasCheckBox);
+      enableWidget(false, _cmbNavicCheckBox);
+      enableWidget(false, _cmbBsxFile);
+    }
+  }
+
+  // Upload(clk)
+  // -----------
+  int iRow = _uploadTable->rowCount();
+  if (iRow > 0) {
+    enableWidget(true, _uploadIntrComboBox);
+    enableWidget(true, _uploadSamplRtcmEphCorrComboBox);
+    enableWidget(true, _uploadSamplClkRnxSpinBox);
+    enableWidget(true, _uploadSamplBiaSnxSpinBox);
+    enableWidget(true, _uploadSamplSp3ComboBox);
+    enableWidget(true, _uploadAntexFile);
+  }
+  else {
+    enableWidget(false, _uploadIntrComboBox);
+    enableWidget(false, _uploadSamplRtcmEphCorrComboBox);
+    enableWidget(false, _uploadSamplClkRnxSpinBox);
+    enableWidget(false, _uploadSamplBiaSnxSpinBox);
+    enableWidget(false, _uploadSamplSp3ComboBox);
+    enableWidget(false, _uploadAntexFile);
+  }
+
+  // Upload(eph)
+  // -----------
+  iRow = _uploadEphTable->rowCount();
+  if (iRow > 0) {
+    enableWidget(true, _uploadSamplRtcmEphSpinBox);
+  }
+  else {
+    enableWidget(false, _uploadSamplRtcmEphSpinBox);
+  }
+
+  // QC
+  // --
+  if (sender() == 0 || sender() == _reqcActionComboBox || sender() == _reqcSkyPlotSignals) {
+    enable = !_reqcActionComboBox->currentText().isEmpty();
+    bool enable10 = _reqcActionComboBox->currentText() == "Edit/Concatenate";
+    //  bool enablePlot = !_reqcSkyPlotSignals->text().isEmpty();
+    enableWidget(enable, _reqcObsFileChooser);
+    enableWidget(enable, _reqcNavFileChooser);
+    enableWidget(enable, _reqcOutLogLineEdit);
+    enableWidget(enable && enable10, _reqcEditOptionButton);
+    enableWidget(enable && enable10, _reqcOutObsLineEdit);
+    enableWidget(enable && enable10, _reqcOutNavLineEdit);
+    enableWidget(enable && !enable10, _reqcLogSummaryOnly);
+    enableWidget(enable && !enable10, _reqcSkyPlotSignals);
+    //  enableWidget(enable && !enable10 && enablePlot, _reqcPlotDirLineEdit);
+    enableWidget(enable && !enable10, _reqcPlotDirLineEdit);
+  }
+
+  // SP3 File Comparison
+  // -------------------
+  if (sender() == 0 || sender() == _sp3CompFileChooser) {
+    enable = !_sp3CompFileChooser->fileName().isEmpty();
+    enableWidget(enable, _sp3CompLogLineEdit);
+    enableWidget(enable, _sp3CompExclude);
+    enableWidget(enable, _sp3CompSummaryOnly);
+  }
+
+  enableStartStop();
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::slotAddCmbRow() {
+  int iRow = _cmbTable->rowCount();
+  _cmbTable->insertRow(iRow);
+  for (int iCol = 0; iCol < _cmbTable->columnCount(); iCol++) {
+    _cmbTable->setItem(iRow, iCol, new QTableWidgetItem(""));
+  }
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::slotDelCmbRow() {
+
+  const static QPalette paletteWhite(QColor(255, 255, 255));
+  const static QPalette paletteGray(QColor(230, 230, 230));
+
+  int nRows = _cmbTable->rowCount();
+  std::vector <bool> flg(nRows);
+  for (int iRow = 0; iRow < nRows; iRow++) {
+    if (_cmbTable->item(iRow, 1)->isSelected()) {
+      flg[iRow] = true;
+    }
+    else {
+      flg[iRow] = false;
+    }
+  }
+  for (int iRow = nRows - 1; iRow >= 0; iRow--) {
+    if (flg[iRow]) {
+      _cmbTable->removeRow(iRow);
+    }
+  }
+  nRows = _cmbTable->rowCount();
+  if (nRows < 1) {
+    enableWidget(false, _cmbMethodComboBox);
+    enableWidget(false, _cmbMaxresLineEdit);
+    enableWidget(false, _cmbMaxdisplacementLineEdit);
+    enableWidget(false, _cmbSamplComboBox);
+    enableWidget(false, _cmbLogPath);
+  }
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::populateCmbTable() {
+
+  for (int iRow = _cmbTable->rowCount() - 1; iRow >= 0; iRow--) {
+    _cmbTable->removeRow(iRow);
+  }
+
+  bncSettings settings;
+
+  int iRow = -1;
+  QListIterator<QString> it(settings.value("cmbStreams").toStringList());
+  while (it.hasNext()) {
+    QStringList hlp = it.next().split(" ");
+    if (hlp.size() > 2) {
+      ++iRow;
+      _cmbTable->insertRow(iRow);
+    }
+    for (int iCol = 0; iCol < hlp.size(); iCol++) {
+      _cmbTable->setItem(iRow, iCol, new QTableWidgetItem(hlp[iCol]));
+    }
+  }
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::slotAddUploadRow() {
+  int iRow = _uploadTable->rowCount();
+  _uploadTable->insertRow(iRow);
+  for (int iCol = 0; iCol < _uploadTable->columnCount(); iCol++) {
+    if (iCol == 3) {
+      QComboBox* ntripversion = new QComboBox();
+      ntripversion->setEditable(false);
+      ntripversion->addItems(QString("2s,2,1").split(","));
+      ntripversion->setFrame(false);
+      _uploadTable->setCellWidget(iRow, iCol, ntripversion);
+
+    }
+    else if (iCol == 4) {
+      QLineEdit* user = new QLineEdit();
+      user->setFrame(false);
+      _uploadTable->setCellWidget(iRow, iCol, user);
+    }
+    else if (iCol == 5) {
+      QLineEdit* passwd = new QLineEdit();
+      passwd->setFrame(false);
+      passwd->setEchoMode(QLineEdit::PasswordEchoOnEdit);
+      _uploadTable->setCellWidget(iRow, iCol, passwd);
+    }
+    else if (iCol == 6) {
+      QComboBox* system = new QComboBox();
+      system->setEditable(false);
+      system->addItems(QString("IGS20,ETRF2000,GDA2020,SIRGAS2000,DREF91,Custom").split(","));
+      system->setFrame(false);
+      _uploadTable->setCellWidget(iRow, iCol, system);
+    }
+    else if (iCol == 7) {
+      QComboBox* format = new QComboBox();
+      format->setEditable(false);
+      //format->addItems(QString("IGS-SSR,RTCM-SSR,RTCM-NEW-SSR").split(","));
+      format->addItems(QString("IGS-SSR,RTCM-SSR").split(","));
+      format->setFrame(false);
+      _uploadTable->setCellWidget(iRow, iCol, format);
+    }
+    else if (iCol == 8) {
+      QCheckBox* com = new QCheckBox();
+      _uploadTable->setCellWidget(iRow, iCol, com);
+    }
+    else if (iCol == 15) {
+      bncTableItem* bncIt = new bncTableItem();
+      bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
+      _uploadTable->setItem(iRow, iCol, bncIt);
+      BNC_CORE->_uploadTableItems[iRow] = bncIt;
+    }
+    else {
+      _uploadTable->setItem(iRow, iCol, new QTableWidgetItem(""));
+    }
+  }
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::slotDelUploadRow() {
+  BNC_CORE->_uploadTableItems.clear();
+  int nRows = _uploadTable->rowCount();
+  std::vector <bool> flg(nRows);
+  for (int iRow = 0; iRow < nRows; iRow++) {
+    if (_uploadTable->item(iRow, 1)->isSelected()) {
+      flg[iRow] = true;
+    }
+    else {
+      flg[iRow] = false;
+    }
+  }
+  for (int iRow = nRows - 1; iRow >= 0; iRow--) {
+    if (flg[iRow]) {
+      _uploadTable->removeRow(iRow);
+    }
+  }
+  for (int iRow = 0; iRow < _uploadTable->rowCount(); iRow++) {
+    BNC_CORE->_uploadTableItems[iRow] =
+      (bncTableItem*)_uploadTable->item(iRow, 14);
+  }
+  nRows = _uploadTable->rowCount();
+  if (nRows < 1) {
+    enableWidget(false, _uploadIntrComboBox);
+    enableWidget(false, _uploadSamplRtcmEphCorrComboBox);
+    enableWidget(false, _uploadSamplSp3ComboBox);
+    enableWidget(false, _uploadSamplClkRnxSpinBox);
+    enableWidget(false, _uploadAntexFile);
+  }
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::populateUploadTable() {
+  for (int iRow = _uploadTable->rowCount() - 1; iRow >= 0; iRow--) {
+    _uploadTable->removeRow(iRow);
+  }
+
+  bncSettings settings;
+
+  int iRow = -1;
+  QListIterator<QString> it(settings.value("uploadMountpointsOut").toStringList());
+
+  while (it.hasNext()) {
+    QStringList hlp = it.next().split(",");
+    if (hlp.size() > 6) {
+      ++iRow;
+      _uploadTable->insertRow(iRow);
+    }
+    for (int iCol = 0; iCol < hlp.size(); iCol++) {
+      if (iCol == 3) {
+        QComboBox* ntripversion = new QComboBox();
+        ntripversion->setEditable(false);
+        ntripversion->addItems(QString("1,2,2s").split(","));
+        ntripversion->setFrame(false);
+        ntripversion->setCurrentIndex(ntripversion->findText(hlp[iCol]));
+        _uploadTable->setCellWidget(iRow, iCol, ntripversion);
+      }
+      else if (iCol == 4) {
+        QLineEdit* user = new QLineEdit();
+        user->setFrame(false);
+        user->setText(hlp[iCol]);
+        _uploadTable->setCellWidget(iRow, iCol, user);
+      }
+      else if (iCol == 5) {
+        QLineEdit* passwd = new QLineEdit();
+        passwd->setFrame(false);
+        passwd->setEchoMode(QLineEdit::PasswordEchoOnEdit);
+        passwd->setText(hlp[iCol]);
+        _uploadTable->setCellWidget(iRow, iCol, passwd);
+      }
+      else if (iCol == 6) {
+        QComboBox* system = new QComboBox();
+        system->setEditable(false);
+        system->addItems(QString("IGS20,ETRF2000,GDA2020,SIRGAS2000,DREF91,Custom").split(","));
+        system->setFrame(false);
+        system->setCurrentIndex(system->findText(hlp[iCol]));
+        _uploadTable->setCellWidget(iRow, iCol, system);
+      }
+      else if (iCol == 7) {
+        QComboBox* format = new QComboBox();
+        format->setEditable(false);
+        //format->addItems(QString("IGS-SSR,RTCM-SSR,RTCM-NEW-SSR").split(","));
+        format->addItems(QString("IGS-SSR,RTCM-SSR").split(","));
+        format->setFrame(false);
+        format->setCurrentIndex(format->findText(hlp[iCol]));
+        _uploadTable->setCellWidget(iRow, iCol, format);
+      }
+      else if (iCol == 8) {
+        QCheckBox* com = new QCheckBox();
+        if (hlp[iCol].toInt() == Qt::Checked) {
+          com->setCheckState(Qt::Checked);
         }
-        if (enable && !enable1) {
-            enableWidget(false, _rnxV2Priority);
-        }
-    }
-
-    // RINEX Observations, Signal Priority
-    // -----------------------------------
-    if (sender() == 0 || sender() == _rnxVersComboBox) {
-        if (!_rnxPathLineEdit->text().isEmpty()) {
-            enableWidget(enable, _rnxIntrComboBox);
-            enable = _rnxVersComboBox->currentText() == "2";
-            enableWidget(enable, _rnxV2Priority);
-        }
-    }
-
-    // RINEX Ephemeris
-    // ---------------
-    if (sender() == 0 || sender() == _ephPathLineEdit || sender() == _ephOutPortLineEdit) {
-        enable = !_ephPathLineEdit->text().isEmpty() || !_ephOutPortLineEdit->text().isEmpty();
-        enableWidget(enable, _ephIntrComboBox);
-        enableWidget(enable, _ephVersComboBox);
-        //enableWidget(enable, _ephVersComboBox);
-        //enableWidget(enable, _ephFilePerStation);
-    }
-
-    // Broadcast Corrections
-    // ---------------------
-    if (sender() == 0 || sender() == _corrPathLineEdit || sender() == _corrPortLineEdit) {
-        enable = !_corrPathLineEdit->text().isEmpty() || !_corrPortLineEdit->text().isEmpty();
-        enableWidget(enable, _corrIntrComboBox);
-    }
-
-    // Feed Engine
-    // -----------
-    if (sender() == 0 || sender() == _outPortLineEdit || sender() == _outFileLineEdit) {
-        enable = !_outPortLineEdit->text().isEmpty() || !_outFileLineEdit->text().isEmpty();
-        enableWidget(enable, _outWaitSpinBox);
-        enableWidget(enable, _outSamplComboBox);
-    }
-
-    // Serial Output
-    // -------------
-    if (sender() == 0 ||
-        sender() == _serialMountPointLineEdit ||
-        sender() == _serialAutoNMEAComboBox) {
-        enable = !_serialMountPointLineEdit->text().isEmpty();
-        enableWidget(enable, _serialPortNameLineEdit);
-        enableWidget(enable, _serialBaudRateComboBox);
-        enableWidget(enable, _serialParityComboBox);
-        enableWidget(enable, _serialDataBitsComboBox);
-        enableWidget(enable, _serialStopBitsComboBox);
-        enableWidget(enable, _serialFlowControlComboBox);
-        enableWidget(enable, _serialAutoNMEAComboBox);
-        if (enable && _serialAutoNMEAComboBox->currentText() == "Auto") {
-            enableWidget(true, _serialFileNMEALineEdit);
-            enableWidget(false, _serialHeightNMEALineEdit);
-            enableWidget(true, _serialNMEASamplingSpinBox);
-        }
-        else if (enable && _serialAutoNMEAComboBox->currentText().contains("Manual")) {
-            enableWidget(false, _serialFileNMEALineEdit);
-            enableWidget(true, _serialHeightNMEALineEdit);
-            enableWidget(true, _serialNMEASamplingSpinBox);
-        }
-        else {
-            enableWidget(false, _serialFileNMEALineEdit);
-            enableWidget(false, _serialHeightNMEALineEdit);
-            enableWidget(false, _serialNMEASamplingSpinBox);
-        }
-    }
-
-    // Outages
-    // -------
-    if (sender() == 0 || sender() == _adviseObsRateComboBox) {
-        enable = !_adviseObsRateComboBox->currentText().isEmpty();
-        enableWidget(enable, _adviseFailSpinBox);
-        enableWidget(enable, _adviseRecoSpinBox);
-        enableWidget(enable, _adviseScriptLineEdit);
-    }
-
-    // Miscellaneous
-    // -------------
-    if (sender() == 0 || sender() == _miscMountLineEdit) {
-        enable = !_miscMountLineEdit->text().isEmpty();
-        enableWidget(enable, _miscIntrComboBox);
-        enableWidget(enable, _miscScanRTCMCheckBox);
-        enableWidget(enable, _miscPortLineEdit);
-    }
-
-    // Combine Corrections
-    // -------------------
-    if (sender() == 0 || sender() == _cmbTable) {
-        int iRow = _cmbTable->rowCount();
-        if (iRow > 0) {
-            enableWidget(true, _cmbMethodComboBox);
-            enableWidget(true, _cmbMaxresLineEdit);
-            enableWidget(true, _cmbMaxdisplacementLineEdit);
-            enableWidget(true, _cmbSamplComboBox);
-            enableWidget(true, _cmbLogPath);
-            enableWidget(true, _cmbGpsCheckBox);
-            enableWidget(true, _cmbGloCheckBox);
-            enableWidget(true, _cmbGalCheckBox);
-            enableWidget(true, _cmbBdsCheckBox);
-            enableWidget(true, _cmbQzssCheckBox);
-            enableWidget(true, _cmbSbasCheckBox);
-            enableWidget(true, _cmbNavicCheckBox);
-            enableWidget(true, _cmbBsxFile);
-        }
-        else {
-            enableWidget(false, _cmbMethodComboBox);
-            enableWidget(false, _cmbMaxresLineEdit);
-            enableWidget(false, _cmbMaxdisplacementLineEdit);
-            enableWidget(false, _cmbSamplComboBox);
-            enableWidget(false, _cmbLogPath);
-            enableWidget(false, _cmbGpsCheckBox);
-            enableWidget(false, _cmbGloCheckBox);
-            enableWidget(false, _cmbGalCheckBox);
-            enableWidget(false, _cmbBdsCheckBox);
-            enableWidget(false, _cmbQzssCheckBox);
-            enableWidget(false, _cmbSbasCheckBox);
-            enableWidget(false, _cmbNavicCheckBox);
-            enableWidget(false, _cmbBsxFile);
-        }
-    }
-
-    // Upload(clk)
-    // -----------
-    int iRow = _uploadTable->rowCount();
-    if (iRow > 0) {
-        enableWidget(true, _uploadIntrComboBox);
-        enableWidget(true, _uploadSamplRtcmEphCorrComboBox);
-        enableWidget(true, _uploadSamplClkRnxSpinBox);
-        enableWidget(true, _uploadSamplBiaSnxSpinBox);
-        enableWidget(true, _uploadSamplSp3ComboBox);
-        enableWidget(true, _uploadAntexFile);
+        _uploadTable->setCellWidget(iRow, iCol, com);
+      }
+      else if (iCol == 15) {
+        bncTableItem* bncIt = new bncTableItem();
+        bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
+        _uploadTable->setItem(iRow, iCol, bncIt);
+        BNC_CORE->_uploadTableItems[iRow] = bncIt;
+      }
+      else {
+        _uploadTable->setItem(iRow, iCol, new QTableWidgetItem(hlp[iCol]));
+      }
+    }
+  }
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::slotSetUploadTrafo() {
+  bncCustomTrafo* dlg = new bncCustomTrafo(this);
+  dlg->exec();
+  delete dlg;
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::slotAddUploadEphRow() {
+  int iRow = _uploadEphTable->rowCount();
+  _uploadEphTable->insertRow(iRow);
+  for (int iCol = 0; iCol < _uploadEphTable->columnCount(); iCol++) {
+    if (iCol == 3) {
+      QComboBox* ntripversion = new QComboBox();
+      ntripversion->setEditable(false);
+      ntripversion->addItems(QString("2s,2,1").split(","));
+      ntripversion->setFrame(false);
+      _uploadEphTable->setCellWidget(iRow, iCol, ntripversion);
+
+    }
+    else if (iCol == 4) {
+      QLineEdit* user = new QLineEdit();
+      user->setFrame(false);
+      _uploadEphTable->setCellWidget(iRow, iCol, user);
+    }
+    else if (iCol == 5) {
+      QLineEdit* passwd = new QLineEdit();
+      passwd->setFrame(false);
+      passwd->setEchoMode(QLineEdit::PasswordEchoOnEdit);
+      _uploadEphTable->setCellWidget(iRow, iCol, passwd);
+    }
+    else if (iCol == 6) {
+      QLineEdit* system = new QLineEdit("GREC");
+      system->setFrame(false);
+      _uploadEphTable->setCellWidget(iRow, iCol, system);
+    }
+    else if (iCol == 7) {
+      bncTableItem* bncIt = new bncTableItem();
+      bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
+      _uploadEphTable->setItem(iRow, iCol, bncIt);
+      BNC_CORE->_uploadEphTableItems[iRow] = bncIt;
     }
     else {
-        enableWidget(false, _uploadIntrComboBox);
-        enableWidget(false, _uploadSamplRtcmEphCorrComboBox);
-        enableWidget(false, _uploadSamplClkRnxSpinBox);
-        enableWidget(false, _uploadSamplBiaSnxSpinBox);
-        enableWidget(false, _uploadSamplSp3ComboBox);
-        enableWidget(false, _uploadAntexFile);
-    }
-
-    // Upload(eph)
-    // -----------
-    iRow = _uploadEphTable->rowCount();
-    if (iRow > 0) {
-        enableWidget(true, _uploadSamplRtcmEphSpinBox);
+      _uploadEphTable->setItem(iRow, iCol, new QTableWidgetItem(""));
+    }
+  }
+}
+
+//
+////////////////////////////////////////////////////////////////////////////
+void bncWindow::slotDelUploadEphRow() {
+  BNC_CORE->_uploadEphTableItems.clear();
+  int nRows = _uploadEphTable->rowCount();
+  std::vector <bool> flg(nRows);
+  for (int iRow = 0; iRow < nRows; iRow++) {
+    if (_uploadEphTable->item(iRow, 1)->isSelected()) {
+      flg[iRow] = true;
     }
     else {
-        enableWidget(false, _uploadSamplRtcmEphSpinBox);
-    }
-
-    // QC
-    // --
-    if (sender() == 0 || sender() == _reqcActionComboBox || sender() == _reqcSkyPlotSignals) {
-        enable = !_reqcActionComboBox->currentText().isEmpty();
-        bool enable10 = _reqcActionComboBox->currentText() == "Edit/Concatenate";
-        //  bool enablePlot = !_reqcSkyPlotSignals->text().isEmpty();
-        enableWidget(enable, _reqcObsFileChooser);
-        enableWidget(enable, _reqcNavFileChooser);
-        enableWidget(enable, _reqcOutLogLineEdit);
-        enableWidget(enable && enable10, _reqcEditOptionButton);
-        enableWidget(enable && enable10, _reqcOutObsLineEdit);
-        enableWidget(enable && enable10, _reqcOutNavLineEdit);
-        enableWidget(enable && !enable10, _reqcLogSummaryOnly);
-        enableWidget(enable && !enable10, _reqcSkyPlotSignals);
-        //  enableWidget(enable && !enable10 && enablePlot, _reqcPlotDirLineEdit);
-        enableWidget(enable && !enable10, _reqcPlotDirLineEdit);
-    }
-
-    // SP3 File Comparison
-    // -------------------
-    if (sender() == 0 || sender() == _sp3CompFileChooser) {
-        enable = !_sp3CompFileChooser->fileName().isEmpty();
-        enableWidget(enable, _sp3CompLogLineEdit);
-        enableWidget(enable, _sp3CompExclude);
-        enableWidget(enable, _sp3CompSummaryOnly);
-    }
-
-    enableStartStop();
+      flg[iRow] = false;
+    }
+  }
+  for (int iRow = nRows - 1; iRow >= 0; iRow--) {
+    if (flg[iRow]) {
+      _uploadEphTable->removeRow(iRow);
+    }
+  }
+  for (int iRow = 0; iRow < _uploadTable->rowCount(); iRow++) {
+    BNC_CORE->_uploadEphTableItems[iRow] =
+      (bncTableItem*)_uploadEphTable->item(iRow, 7);
+  }
+  nRows = _uploadEphTable->rowCount();
+  if (nRows < 1) {
+    enableWidget(false, _uploadSamplRtcmEphSpinBox);
+  }
 }
 
 //
 ////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotAddCmbRow() {
-    int iRow = _cmbTable->rowCount();
-    _cmbTable->insertRow(iRow);
-    for (int iCol = 0; iCol < _cmbTable->columnCount(); iCol++) {
-        _cmbTable->setItem(iRow, iCol, new QTableWidgetItem(""));
-    }
+void bncWindow::populateUploadEphTable() {
+  for (int iRow = _uploadEphTable->rowCount() - 1; iRow >= 0; iRow--) {
+    _uploadEphTable->removeRow(iRow);
+  }
+
+  bncSettings settings;
+
+  int iRow = -1;
+  QListIterator<QString> it(settings.value("uploadEphMountpointsOut").toStringList());
+  while (it.hasNext()) {
+    QStringList hlp = it.next().split(",");
+    if (hlp.size() > 6) {
+      ++iRow;
+      _uploadEphTable->insertRow(iRow);
+    }
+    for (int iCol = 0; iCol < hlp.size(); iCol++) {
+      if (iCol == 3) {
+        QComboBox* ntripversion = new QComboBox();
+        ntripversion->setEditable(false);
+        ntripversion->addItems(QString("1,2,2s").split(","));
+        ntripversion->setFrame(false);
+        ntripversion->setCurrentIndex(ntripversion->findText(hlp[iCol]));
+        _uploadEphTable->setCellWidget(iRow, iCol, ntripversion);
+      }
+      else if (iCol == 4) {
+        QLineEdit* user = new QLineEdit();
+        user->setFrame(false);
+        user->setText(hlp[iCol]);
+        _uploadEphTable->setCellWidget(iRow, iCol, user);
+      }
+      else if (iCol == 5) {
+        QLineEdit* passwd = new QLineEdit();
+        passwd->setFrame(false);
+        passwd->setEchoMode(QLineEdit::PasswordEchoOnEdit);
+        passwd->setText(hlp[iCol]);
+        _uploadEphTable->setCellWidget(iRow, iCol, passwd);
+      }
+      else if (iCol == 6) {
+        QLineEdit* system = new QLineEdit();
+        system->setFrame(false);
+        system->setText(hlp[iCol]);
+        _uploadEphTable->setCellWidget(iRow, iCol, system);
+      }
+      else if (iCol == 7) {
+        bncTableItem* bncIt = new bncTableItem();
+        bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
+        _uploadEphTable->setItem(iRow, iCol, bncIt);
+        BNC_CORE->_uploadEphTableItems[iRow] = bncIt;
+      }
+      else {
+        _uploadEphTable->setItem(iRow, iCol, new QTableWidgetItem(hlp[iCol]));
+      }
+    }
+  }
 }
 
 //
 ////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotDelCmbRow() {
-
-    const static QPalette paletteWhite(QColor(255, 255, 255));
-    const static QPalette paletteGray(QColor(230, 230, 230));
-
-    int nRows = _cmbTable->rowCount();
-    std::vector <bool> flg(nRows);
-    for (int iRow = 0; iRow < nRows; iRow++) {
-        if (_cmbTable->item(iRow, 1)->isSelected()) {
-            flg[iRow] = true;
-        }
-        else {
-            flg[iRow] = false;
-        }
-    }
-    for (int iRow = nRows - 1; iRow >= 0; iRow--) {
-        if (flg[iRow]) {
-            _cmbTable->removeRow(iRow);
-        }
-    }
-    nRows = _cmbTable->rowCount();
-    if (nRows < 1) {
-        enableWidget(false, _cmbMethodComboBox);
-        enableWidget(false, _cmbMaxresLineEdit);
-        enableWidget(false, _cmbMaxdisplacementLineEdit);
-        enableWidget(false, _cmbSamplComboBox);
-        enableWidget(false, _cmbLogPath);
-    }
+void bncWindow::slotAddUploadRawRow() {
+  int iRow = _uploadRawTable->rowCount();
+  _uploadRawTable->insertRow(iRow);
+  for (int iCol = 0; iCol < _uploadRawTable->columnCount(); iCol++) {
+    if (iCol == 4) {
+      QComboBox* ntripversion = new QComboBox();
+      ntripversion->setEditable(false);
+      ntripversion->addItems(QString("2s,2,1").split(","));
+      ntripversion->setFrame(false);
+      _uploadRawTable->setCellWidget(iRow, iCol, ntripversion);
+
+    }
+    else if (iCol == 5) {
+      QLineEdit* user = new QLineEdit();
+      user->setFrame(false);
+      _uploadRawTable->setCellWidget(iRow, iCol, user);
+    }
+    else if (iCol == 6) {
+      QLineEdit* passwd = new QLineEdit();
+      passwd->setFrame(false);
+      passwd->setEchoMode(QLineEdit::PasswordEchoOnEdit);
+      _uploadRawTable->setCellWidget(iRow, iCol, passwd);
+    }
+    else if (iCol == 7) {
+      bncTableItem* bncIt = new bncTableItem();
+      bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
+      _uploadRawTable->setItem(iRow, iCol, bncIt);
+      BNC_CORE->_uploadRawTableItems[iRow] = bncIt;
+    }
+    else {
+      _uploadRawTable->setItem(iRow, iCol, new QTableWidgetItem(""));
+    }
+  }
 }
 
 //
 ////////////////////////////////////////////////////////////////////////////
-void bncWindow::populateCmbTable() {
-
-    for (int iRow = _cmbTable->rowCount() - 1; iRow >= 0; iRow--) {
-        _cmbTable->removeRow(iRow);
-    }
-
-    bncSettings settings;
-
-    int iRow = -1;
-    QListIterator<QString> it(settings.value("cmbStreams").toStringList());
-    while (it.hasNext()) {
-        QStringList hlp = it.next().split(" ");
-        if (hlp.size() > 2) {
-            ++iRow;
-            _cmbTable->insertRow(iRow);
-        }
-        for (int iCol = 0; iCol < hlp.size(); iCol++) {
-            _cmbTable->setItem(iRow, iCol, new QTableWidgetItem(hlp[iCol]));
-        }
-    }
+void bncWindow::slotDelUploadRawRow() {
+  BNC_CORE->_uploadRawTableItems.clear();
+  int nRows = _uploadRawTable->rowCount();
+  std::vector <bool> flg(nRows);
+  for (int iRow = 0; iRow < nRows; iRow++) {
+    if (_uploadRawTable->item(iRow, 1)->isSelected()) {
+      flg[iRow] = true;
+    }
+    else {
+      flg[iRow] = false;
+    }
+  }
+  for (int iRow = nRows - 1; iRow >= 0; iRow--) {
+    if (flg[iRow]) {
+      _uploadRawTable->removeRow(iRow);
+    }
+  }
+  for (int iRow = 0; iRow < _uploadRawTable->rowCount(); iRow++) {
+    BNC_CORE->_uploadRawTableItems[iRow] =
+      (bncTableItem*)_uploadRawTable->item(iRow, 7);
+  }
 }
 
 //
 ////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotAddUploadRow() {
-    int iRow = _uploadTable->rowCount();
-    _uploadTable->insertRow(iRow);
-    for (int iCol = 0; iCol < _uploadTable->columnCount(); iCol++) {
-        if (iCol == 3) {
-            QComboBox* ntripversion = new QComboBox();
-            ntripversion->setEditable(false);
-            ntripversion->addItems(QString("2s,2,1").split(","));
-            ntripversion->setFrame(false);
-            _uploadTable->setCellWidget(iRow, iCol, ntripversion);
-
-        }
-        else if (iCol == 4) {
-            QLineEdit* user = new QLineEdit();
-            user->setFrame(false);
-            _uploadTable->setCellWidget(iRow, iCol, user);
-        }
-        else if (iCol == 5) {
-            QLineEdit* passwd = new QLineEdit();
-            passwd->setFrame(false);
-            passwd->setEchoMode(QLineEdit::PasswordEchoOnEdit);
-            _uploadTable->setCellWidget(iRow, iCol, passwd);
-        }
-        else if (iCol == 6) {
-            QComboBox* system = new QComboBox();
-            system->setEditable(false);
-            system->addItems(QString("IGS20,ETRF2000,GDA2020,SIRGAS2000,DREF91,Custom").split(","));
-            system->setFrame(false);
-            _uploadTable->setCellWidget(iRow, iCol, system);
-        }
-        else if (iCol == 7) {
-            QComboBox* format = new QComboBox();
-            format->setEditable(false);
-            //format->addItems(QString("IGS-SSR,RTCM-SSR,RTCM-NEW-SSR").split(","));
-            format->addItems(QString("IGS-SSR,RTCM-SSR").split(","));
-            format->setFrame(false);
-            _uploadTable->setCellWidget(iRow, iCol, format);
-        }
-        else if (iCol == 8) {
-            QCheckBox* com = new QCheckBox();
-            _uploadTable->setCellWidget(iRow, iCol, com);
-        }
-        else if (iCol == 15) {
-            bncTableItem* bncIt = new bncTableItem();
-            bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
-            _uploadTable->setItem(iRow, iCol, bncIt);
-            BNC_CORE->_uploadTableItems[iRow] = bncIt;
-        }
-        else {
-            _uploadTable->setItem(iRow, iCol, new QTableWidgetItem(""));
-        }
-    }
-}
-
-//
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotDelUploadRow() {
-    BNC_CORE->_uploadTableItems.clear();
-    int nRows = _uploadTable->rowCount();
-    std::vector <bool> flg(nRows);
-    for (int iRow = 0; iRow < nRows; iRow++) {
-        if (_uploadTable->item(iRow, 1)->isSelected()) {
-            flg[iRow] = true;
-        }
-        else {
-            flg[iRow] = false;
-        }
-    }
-    for (int iRow = nRows - 1; iRow >= 0; iRow--) {
-        if (flg[iRow]) {
-            _uploadTable->removeRow(iRow);
-        }
-    }
-    for (int iRow = 0; iRow < _uploadTable->rowCount(); iRow++) {
-        BNC_CORE->_uploadTableItems[iRow] =
-            (bncTableItem*)_uploadTable->item(iRow, 14);
-    }
-    nRows = _uploadTable->rowCount();
-    if (nRows < 1) {
-        enableWidget(false, _uploadIntrComboBox);
-        enableWidget(false, _uploadSamplRtcmEphCorrComboBox);
-        enableWidget(false, _uploadSamplSp3ComboBox);
-        enableWidget(false, _uploadSamplClkRnxSpinBox);
-        enableWidget(false, _uploadAntexFile);
-    }
-}
-
-//
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::populateUploadTable() {
-    for (int iRow = _uploadTable->rowCount() - 1; iRow >= 0; iRow--) {
-        _uploadTable->removeRow(iRow);
-    }
-
-    bncSettings settings;
-
-    int iRow = -1;
-    QListIterator<QString> it(settings.value("uploadMountpointsOut").toStringList());
-
-    while (it.hasNext()) {
-        QStringList hlp = it.next().split(",");
-        if (hlp.size() > 6) {
-            ++iRow;
-            _uploadTable->insertRow(iRow);
-        }
-        for (int iCol = 0; iCol < hlp.size(); iCol++) {
-            if (iCol == 3) {
-                QComboBox* ntripversion = new QComboBox();
-                ntripversion->setEditable(false);
-                ntripversion->addItems(QString("1,2,2s").split(","));
-                ntripversion->setFrame(false);
-                ntripversion->setCurrentIndex(ntripversion->findText(hlp[iCol]));
-                _uploadTable->setCellWidget(iRow, iCol, ntripversion);
-            }
-            else if (iCol == 4) {
-                QLineEdit* user = new QLineEdit();
-                user->setFrame(false);
-                user->setText(hlp[iCol]);
-                _uploadTable->setCellWidget(iRow, iCol, user);
-            }
-            else if (iCol == 5) {
-                QLineEdit* passwd = new QLineEdit();
-                passwd->setFrame(false);
-                passwd->setEchoMode(QLineEdit::PasswordEchoOnEdit);
-                passwd->setText(hlp[iCol]);
-                _uploadTable->setCellWidget(iRow, iCol, passwd);
-            }
-            else if (iCol == 6) {
-                QComboBox* system = new QComboBox();
-                system->setEditable(false);
-                system->addItems(QString("IGS20,ETRF2000,GDA2020,SIRGAS2000,DREF91,Custom").split(","));
-                system->setFrame(false);
-                system->setCurrentIndex(system->findText(hlp[iCol]));
-                _uploadTable->setCellWidget(iRow, iCol, system);
-            }
-            else if (iCol == 7) {
-                QComboBox* format = new QComboBox();
-                format->setEditable(false);
-                //format->addItems(QString("IGS-SSR,RTCM-SSR,RTCM-NEW-SSR").split(","));
-                format->addItems(QString("IGS-SSR,RTCM-SSR").split(","));
-                format->setFrame(false);
-                format->setCurrentIndex(format->findText(hlp[iCol]));
-                _uploadTable->setCellWidget(iRow, iCol, format);
-            }
-            else if (iCol == 8) {
-                QCheckBox* com = new QCheckBox();
-                if (hlp[iCol].toInt() == Qt::Checked) {
-                    com->setCheckState(Qt::Checked);
-                }
-                _uploadTable->setCellWidget(iRow, iCol, com);
-            }
-            else if (iCol == 15) {
-                bncTableItem* bncIt = new bncTableItem();
-                bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
-                _uploadTable->setItem(iRow, iCol, bncIt);
-                BNC_CORE->_uploadTableItems[iRow] = bncIt;
-            }
-            else {
-                _uploadTable->setItem(iRow, iCol, new QTableWidgetItem(hlp[iCol]));
-            }
-        }
-    }
-}
-
-//
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotSetUploadTrafo() {
-    bncCustomTrafo* dlg = new bncCustomTrafo(this);
-    dlg->exec();
-    delete dlg;
-}
-
-//
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotAddUploadEphRow() {
-    int iRow = _uploadEphTable->rowCount();
-    _uploadEphTable->insertRow(iRow);
-    for (int iCol = 0; iCol < _uploadEphTable->columnCount(); iCol++) {
-        if (iCol == 3) {
-            QComboBox* ntripversion = new QComboBox();
-            ntripversion->setEditable(false);
-            ntripversion->addItems(QString("2s,2,1").split(","));
-            ntripversion->setFrame(false);
-            _uploadEphTable->setCellWidget(iRow, iCol, ntripversion);
-
-        }
-        else if (iCol == 4) {
-            QLineEdit* user = new QLineEdit();
-            user->setFrame(false);
-            _uploadEphTable->setCellWidget(iRow, iCol, user);
-        }
-        else if (iCol == 5) {
-            QLineEdit* passwd = new QLineEdit();
-            passwd->setFrame(false);
-            passwd->setEchoMode(QLineEdit::PasswordEchoOnEdit);
-            _uploadEphTable->setCellWidget(iRow, iCol, passwd);
-        }
-        else if (iCol == 6) {
-            QLineEdit* system = new QLineEdit("GREC");
-            system->setFrame(false);
-            _uploadEphTable->setCellWidget(iRow, iCol, system);
-        }
-        else if (iCol == 7) {
-            bncTableItem* bncIt = new bncTableItem();
-            bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
-            _uploadEphTable->setItem(iRow, iCol, bncIt);
-            BNC_CORE->_uploadEphTableItems[iRow] = bncIt;
-        }
-        else {
-            _uploadEphTable->setItem(iRow, iCol, new QTableWidgetItem(""));
-        }
-    }
-}
-
-//
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotDelUploadEphRow() {
-    BNC_CORE->_uploadEphTableItems.clear();
-    int nRows = _uploadEphTable->rowCount();
-    std::vector <bool> flg(nRows);
-    for (int iRow = 0; iRow < nRows; iRow++) {
-        if (_uploadEphTable->item(iRow, 1)->isSelected()) {
-            flg[iRow] = true;
-        }
-        else {
-            flg[iRow] = false;
-        }
-    }
-    for (int iRow = nRows - 1; iRow >= 0; iRow--) {
-        if (flg[iRow]) {
-            _uploadEphTable->removeRow(iRow);
-        }
-    }
-    for (int iRow = 0; iRow < _uploadTable->rowCount(); iRow++) {
-        BNC_CORE->_uploadEphTableItems[iRow] =
-            (bncTableItem*)_uploadEphTable->item(iRow, 7);
-    }
-    nRows = _uploadEphTable->rowCount();
-    if (nRows < 1) {
-        enableWidget(false, _uploadSamplRtcmEphSpinBox);
-    }
-}
-
-//
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::populateUploadEphTable() {
-    for (int iRow = _uploadEphTable->rowCount() - 1; iRow >= 0; iRow--) {
-        _uploadEphTable->removeRow(iRow);
-    }
-
-    bncSettings settings;
-
-    int iRow = -1;
-    QListIterator<QString> it(settings.value("uploadEphMountpointsOut").toStringList());
-    while (it.hasNext()) {
-        QStringList hlp = it.next().split(",");
-        if (hlp.size() > 6) {
-            ++iRow;
-            _uploadEphTable->insertRow(iRow);
-        }
-        for (int iCol = 0; iCol < hlp.size(); iCol++) {
-            if (iCol == 3) {
-                QComboBox* ntripversion = new QComboBox();
-                ntripversion->setEditable(false);
-                ntripversion->addItems(QString("1,2,2s").split(","));
-                ntripversion->setFrame(false);
-                ntripversion->setCurrentIndex(ntripversion->findText(hlp[iCol]));
-                _uploadEphTable->setCellWidget(iRow, iCol, ntripversion);
-            }
-            else if (iCol == 4) {
-                QLineEdit* user = new QLineEdit();
-                user->setFrame(false);
-                user->setText(hlp[iCol]);
-                _uploadEphTable->setCellWidget(iRow, iCol, user);
-            }
-            else if (iCol == 5) {
-                QLineEdit* passwd = new QLineEdit();
-                passwd->setFrame(false);
-                passwd->setEchoMode(QLineEdit::PasswordEchoOnEdit);
-                passwd->setText(hlp[iCol]);
-                _uploadEphTable->setCellWidget(iRow, iCol, passwd);
-            }
-            else if (iCol == 6) {
-                QLineEdit* system = new QLineEdit();
-                system->setFrame(false);
-                system->setText(hlp[iCol]);
-                _uploadEphTable->setCellWidget(iRow, iCol, system);
-            }
-            else if (iCol == 7) {
-                bncTableItem* bncIt = new bncTableItem();
-                bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
-                _uploadEphTable->setItem(iRow, iCol, bncIt);
-                BNC_CORE->_uploadEphTableItems[iRow] = bncIt;
-            }
-            else {
-                _uploadEphTable->setItem(iRow, iCol, new QTableWidgetItem(hlp[iCol]));
-            }
-        }
-    }
-}
-
-//
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotAddUploadRawRow() {
-    int iRow = _uploadRawTable->rowCount();
-    _uploadRawTable->insertRow(iRow);
-    for (int iCol = 0; iCol < _uploadRawTable->columnCount(); iCol++) {
-        if (iCol == 4) {
-            QComboBox* ntripversion = new QComboBox();
-            ntripversion->setEditable(false);
-            ntripversion->addItems(QString("2s,2,1").split(","));
-            ntripversion->setFrame(false);
-            _uploadRawTable->setCellWidget(iRow, iCol, ntripversion);
-
-        }
-        else if (iCol == 5) {
-            QLineEdit* user = new QLineEdit();
-            user->setFrame(false);
-            _uploadRawTable->setCellWidget(iRow, iCol, user);
-        }
-        else if (iCol == 6) {
-            QLineEdit* passwd = new QLineEdit();
-            passwd->setFrame(false);
-            passwd->setEchoMode(QLineEdit::PasswordEchoOnEdit);
-            _uploadRawTable->setCellWidget(iRow, iCol, passwd);
-        }
-        else if (iCol == 7) {
-            bncTableItem* bncIt = new bncTableItem();
-            bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
-            _uploadRawTable->setItem(iRow, iCol, bncIt);
-            BNC_CORE->_uploadRawTableItems[iRow] = bncIt;
-        }
-        else {
-          _uploadRawTable->setItem(iRow, iCol, new QTableWidgetItem(""));
-        }
-    }
-}
-
-//
-////////////////////////////////////////////////////////////////////////////
-void bncWindow::slotDelUploadRawRow() {
-    BNC_CORE->_uploadRawTableItems.clear();
-    int nRows = _uploadRawTable->rowCount();
-    std::vector <bool> flg(nRows);
-    for (int iRow = 0; iRow < nRows; iRow++) {
-        if (_uploadRawTable->item(iRow, 1)->isSelected()) {
-            flg[iRow] = true;
-        }
-        else {
-            flg[iRow] = false;
-        }
-    }
-    for (int iRow = nRows - 1; iRow >= 0; iRow--) {
-        if (flg[iRow]) {
-            _uploadRawTable->removeRow(iRow);
-        }
-    }
-    for (int iRow = 0; iRow < _uploadRawTable->rowCount(); iRow++) {
-        BNC_CORE->_uploadRawTableItems[iRow] =
-            (bncTableItem*)_uploadRawTable->item(iRow, 7);
-    }
-}
-
-//
-////////////////////////////////////////////////////////////////////////////
 void bncWindow::populateUploadRawTable() {
-    for (int iRow = _uploadRawTable->rowCount() - 1; iRow >= 0; iRow--) {
-      _uploadRawTable->removeRow(iRow);
-    }
-
-    bncSettings settings;
-
-    int iRow = -1;
-    QListIterator<QString> it(settings.value("uploadRawMountpointsOut").toStringList());
-    while (it.hasNext()) {
-        QStringList hlp = it.next().split(",");
-        if (hlp.size() > 6) {
-            ++iRow;
-            _uploadRawTable->insertRow(iRow);
-        }
-        for (int iCol = 0; iCol < hlp.size(); iCol++) {
-            if (iCol == 4) {
-                QComboBox* ntripversion = new QComboBox();
-                ntripversion->setEditable(false);
-                ntripversion->addItems(QString("1,2,2s").split(","));
-                ntripversion->setFrame(false);
-                ntripversion->setCurrentIndex(ntripversion->findText(hlp[iCol]));
-                _uploadRawTable->setCellWidget(iRow, iCol, ntripversion);
-            }
-            else if (iCol == 5) {
-                QLineEdit* user = new QLineEdit();
-                user->setFrame(false);
-                user->setText(hlp[iCol]);
-                _uploadRawTable->setCellWidget(iRow, iCol, user);
-            }
-            else if (iCol == 6) {
-                QLineEdit* passwd = new QLineEdit();
-                passwd->setFrame(false);
-                passwd->setEchoMode(QLineEdit::PasswordEchoOnEdit);
-                passwd->setText(hlp[iCol]);
-                _uploadRawTable->setCellWidget(iRow, iCol, passwd);
-            }
-            else if (iCol == 7) {
-                bncTableItem* bncIt = new bncTableItem();
-                bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
-                _uploadRawTable->setItem(iRow, iCol, bncIt);
-                BNC_CORE->_uploadRawTableItems[iRow] = bncIt;
-            }
-            else {
-              _uploadRawTable->setItem(iRow, iCol, new QTableWidgetItem(hlp[iCol]));
-            }
-        }
-    }
+  for (int iRow = _uploadRawTable->rowCount() - 1; iRow >= 0; iRow--) {
+    _uploadRawTable->removeRow(iRow);
+  }
+
+  bncSettings settings;
+
+  int iRow = -1;
+  QListIterator<QString> it(settings.value("uploadRawMountpointsOut").toStringList());
+  while (it.hasNext()) {
+    QStringList hlp = it.next().split(",");
+    if (hlp.size() > 6) {
+      ++iRow;
+      _uploadRawTable->insertRow(iRow);
+    }
+    for (int iCol = 0; iCol < hlp.size(); iCol++) {
+      if (iCol == 4) {
+        QComboBox* ntripversion = new QComboBox();
+        ntripversion->setEditable(false);
+        ntripversion->addItems(QString("1,2,2s").split(","));
+        ntripversion->setFrame(false);
+        ntripversion->setCurrentIndex(ntripversion->findText(hlp[iCol]));
+        _uploadRawTable->setCellWidget(iRow, iCol, ntripversion);
+      }
+      else if (iCol == 5) {
+        QLineEdit* user = new QLineEdit();
+        user->setFrame(false);
+        user->setText(hlp[iCol]);
+        _uploadRawTable->setCellWidget(iRow, iCol, user);
+      }
+      else if (iCol == 6) {
+        QLineEdit* passwd = new QLineEdit();
+        passwd->setFrame(false);
+        passwd->setEchoMode(QLineEdit::PasswordEchoOnEdit);
+        passwd->setText(hlp[iCol]);
+        _uploadRawTable->setCellWidget(iRow, iCol, passwd);
+      }
+      else if (iCol == 7) {
+        bncTableItem* bncIt = new bncTableItem();
+        bncIt->setFlags(bncIt->flags() & ~Qt::ItemIsEditable);
+        _uploadRawTable->setItem(iRow, iCol, bncIt);
+        BNC_CORE->_uploadRawTableItems[iRow] = bncIt;
+      }
+      else {
+        _uploadRawTable->setItem(iRow, iCol, new QTableWidgetItem(hlp[iCol]));
+      }
+    }
+  }
 }
 
@@ -3490,5 +3509,5 @@
 ////////////////////////////////////////////////////////////////////////////
 void bncWindow::slotPostProcessingProgress(int nEpo) {
-    _actStart->setText(QString("%1 Epochs").arg(nEpo));
+  _actStart->setText(QString("%1 Epochs").arg(nEpo));
 }
 
@@ -3496,11 +3515,11 @@
 ////////////////////////////////////////////////////////////////////////////
 void bncWindow::slotPostProcessingFinished() {
-    delete _caster; _caster = 0; BNC_CORE->setCaster(0);
-    _runningPPP = false;
-    _runningEdit = false;
-    _runningQC = false;
-    _runningSp3Comp = false;
-    _actStart->setText(tr("Sta&rt"));
-    enableStartStop();
+  delete _caster; _caster = 0; BNC_CORE->setCaster(0);
+  _runningPPP = false;
+  _runningEdit = false;
+  _runningQC = false;
+  _runningSp3Comp = false;
+  _actStart->setText(tr("Sta&rt"));
+  enableStartStop();
 }
 
@@ -3508,9 +3527,9 @@
 ////////////////////////////////////////////////////////////////////////////
 void bncWindow::slotReqcEditOption() {
-    saveOptions();
-    reqcDlg* dlg = new reqcDlg(this);
-    dlg->move(this->pos().x() + 50, this->pos().y() + 50);
-    dlg->exec();
-    delete dlg;
+  saveOptions();
+  reqcDlg* dlg = new reqcDlg(this);
+  dlg->move(this->pos().x() + 50, this->pos().y() + 50);
+  dlg->exec();
+  delete dlg;
 }
 
@@ -3519,14 +3538,14 @@
 void bncWindow::enableStartStop() {
 
-    if (running()) {
-        _actStart->setEnabled(false);
-        if (_runningRealTime || _runningPPP) {
-            _actStop->setEnabled(true);
-        }
-    }
-    else {
-        _actStart->setEnabled(true);
-        _actStop->setEnabled(false);
-    }
+  if (running()) {
+    _actStart->setEnabled(false);
+    if (_runningRealTime || _runningPPP) {
+      _actStop->setEnabled(true);
+    }
+  }
+  else {
+    _actStart->setEnabled(true);
+    _actStop->setEnabled(false);
+  }
 }
 
@@ -3534,21 +3553,21 @@
 ////////////////////////////////////////////////////////////////////////////
 void bncWindow::slotMapMountPoints() {
-    saveOptions();
-    t_bncMap* bncMap = new t_bncMap(this);
-    bncMap->setMinimumSize(800, 600);
-    bncMap->setWindowTitle("Selected Mountpoints");
-
-    bncSettings settings;
-    QListIterator<QString> it(settings.value("mountPoints").toStringList());
-    while (it.hasNext()) {
-        QStringList hlp = it.next().split(" ");
-        if (hlp.size() < 5) continue;
-        QUrl   url(hlp[0]);
-        double latDeg = hlp[3].toDouble();
-        double lonDeg = hlp[4].toDouble();
-        bncMap->slotNewPoint(QFileInfo(url.path()).fileName(), latDeg, lonDeg);
-    }
-
-    bncMap->show();
+  saveOptions();
+  t_bncMap* bncMap = new t_bncMap(this);
+  bncMap->setMinimumSize(800, 600);
+  bncMap->setWindowTitle("Selected Mountpoints");
+
+  bncSettings settings;
+  QListIterator<QString> it(settings.value("mountPoints").toStringList());
+  while (it.hasNext()) {
+    QStringList hlp = it.next().split(" ");
+    if (hlp.size() < 5) continue;
+    QUrl   url(hlp[0]);
+    double latDeg = hlp[3].toDouble();
+    double lonDeg = hlp[4].toDouble();
+    bncMap->slotNewPoint(QFileInfo(url.path()).fileName(), latDeg, lonDeg);
+  }
+
+  bncMap->show();
 }
 
@@ -3557,19 +3576,19 @@
 void bncWindow::slotMapPPP() {
 #ifdef QT_WEBENGINE
-    saveOptions();
-    enableWidget(false, _pppWidgets._mapWinButton);
-    enableWidget(false, _pppWidgets._mapWinDotSize);
-    enableWidget(false, _pppWidgets._mapWinDotColor);
-
-    if (!_mapWin) {
-        _mapWin = new bncMapWin(this);
-        connect(_mapWin, SIGNAL(mapClosed()), this, SLOT(slotMapPPPClosed()));
-        connect(BNC_CORE, SIGNAL(newPosition(QByteArray, bncTime, QVector<double>)),
+  saveOptions();
+  enableWidget(false, _pppWidgets._mapWinButton);
+  enableWidget(false, _pppWidgets._mapWinDotSize);
+  enableWidget(false, _pppWidgets._mapWinDotColor);
+
+  if (!_mapWin) {
+    _mapWin = new bncMapWin(this);
+    connect(_mapWin, SIGNAL(mapClosed()), this, SLOT(slotMapPPPClosed()));
+    connect(BNC_CORE, SIGNAL(newPosition(QByteArray, bncTime, QVector<double>)),
             _mapWin, SLOT(slotNewPosition(QByteArray, bncTime, QVector<double>)));
-    }
-    _mapWin->show();
+  }
+  _mapWin->show();
 #else
-    QMessageBox::information(this, "Information",
-        "Qt Library compiled without QT_WEBENGINE");
+  QMessageBox::information(this, "Information",
+                           "Qt Library compiled without QT_WEBENGINE");
 #endif
 }
@@ -3579,16 +3598,16 @@
 void bncWindow::slotMapPPPClosed() {
 #ifdef QT_WEBENGINE
-    enableWidget(true, _pppWidgets._mapWinButton);
-    enableWidget(true, _pppWidgets._mapWinDotSize);
-    enableWidget(true, _pppWidgets._mapWinDotColor);
-    if (_mapWin) {
-        QListIterator<bncGetThread*> it(_threads);
-        while (it.hasNext()) {
-            bncGetThread* thread = it.next();
-            thread->disconnect(_mapWin);
-        }
-        _mapWin->deleteLater();
-        _mapWin = 0;
-    }
+  enableWidget(true, _pppWidgets._mapWinButton);
+  enableWidget(true, _pppWidgets._mapWinDotSize);
+  enableWidget(true, _pppWidgets._mapWinDotColor);
+  if (_mapWin) {
+    QListIterator<bncGetThread*> it(_threads);
+    while (it.hasNext()) {
+      bncGetThread* thread = it.next();
+      thread->disconnect(_mapWin);
+    }
+    _mapWin->deleteLater();
+    _mapWin = 0;
+  }
 #endif
 }
Index: /trunk/BNC/src/pppInclude.h
===================================================================
--- /trunk/BNC/src/pppInclude.h	(revision 10790)
+++ /trunk/BNC/src/pppInclude.h	(revision 10791)
@@ -5,4 +5,5 @@
 #include <vector>
 #include <newmat.h>
+#include <sstream>
 
 #include "bncconst.h"
@@ -14,4 +15,6 @@
 namespace BNC_PPP {
 
+const double ZEROVALUE = 1e-100;
+  
 class t_except {
  public:
@@ -40,127 +43,144 @@
 };
 
+class t_lc {
+public:
+  enum type {dummy = 0, code, phase, codeIF, phaseIF,  MW, CL, GIM, maxLc};
 
-class t_frqBand {
-public:
-  static t_frequency::type toFreq(char sys, char bb) {
-    switch (bb) {
-    case '1':
-      if      (sys == 'G') return t_frequency::G1;
-      else if (sys == 'R') return t_frequency::R1;
-      else if (sys == 'E') return t_frequency::E1;
-      else if (sys == 'C') return t_frequency::C1;
-      else                 return t_frequency::dummy;
-    case '2':
-      if      (sys == 'G') return t_frequency::G2;
-      else if (sys == 'R') return t_frequency::R2;
-      else if (sys == 'C') return t_frequency::C2;
-      else                 return t_frequency::dummy;
-    case '5':
-      if      (sys == 'G') return t_frequency::G5;
-      else if (sys == 'E') return t_frequency::E5;
-      else if (sys == 'C') return t_frequency::C5;
-      else                 return t_frequency::dummy;
-    case '6':
-      if      (sys == 'E') return t_frequency::E6;
-      else if (sys == 'C') return t_frequency::C6;
-      else                 return t_frequency::dummy;
-    case '7':
-      if      (sys == 'E') return t_frequency::E7;
-      else if (sys == 'C') return t_frequency::C7;
-      else                 return t_frequency::dummy;
-    case '8':
-      if      (sys == 'E') return t_frequency::E8;
-      else if (sys == 'C') return t_frequency::C8;
-      else                 return t_frequency::dummy;
-    }
-    return t_frequency::dummy;
+  t_lc() : _type(dummy), _frq1(t_frequency::dummy), _frq2(t_frequency::dummy) {}
+  
+  t_lc(type tt, t_frequency::type frq1, t_frequency::type frq2 = t_frequency::dummy)
+    : _type(tt), _frq1(frq1), _frq2(frq2) {
   }
-};
 
-class t_lc {
- public:
-  enum type {dummy = 0, c1, c2, cIF, l1, l2, lIF,  MW, CL, GIM, maxLc};
-
-  static bool includesPhase(type tt) {
-    switch (tt) {
-    case l1:
-    case l2:
-    case lIF:
-    case MW:
-    case CL:
-      return true;
-    case c1:
-    case c2:
-    case cIF:
-      return false;
-    case dummy:
-    case maxLc:
-    case GIM:
+  bool valid() const {
+    if      (_type == dummy) {
       return false;
     }
-    return false;
+    else if (_type == GIM) {
+      return true;
+    }
+    else {
+      if (_frq1 == t_frequency::dummy) {
+        return false;
+      }
+      if (t_lc::needs2ndFrq(_type) && _frq2 == t_frequency::dummy) {
+        return false;
+      }
+      return true;
+    }
   }
 
-  static bool includesCode(type tt) {
-    switch (tt) {
-    case c1:
-    case c2:
-    case cIF:
-    case MW:
-    case CL:
+  char system() const {
+    return t_frequency::toSystem(_frq1);
+  }
+
+  static bool needs2ndFrq(type tt) {
+    if (tt == codeIF || tt == phaseIF || tt == MW) {
       return true;
-    case l1:
-    case l2:
-    case lIF:
-      return false;
-    case dummy:
-    case maxLc:
-    case GIM:
+    }
+    else {
       return false;
     }
-    return false;
+  }
+  
+  bool includesPhase() const {
+    if (_type == phase || _type == phaseIF || _type == MW || _type == CL) {
+      return true;
+    }
+    else {
+      return false;
+    }
   }
 
-  static t_frequency::type toFreq(char sys, type tt) {
-    switch (tt) {
-    case l1: case c1:
-      if      (sys == 'G') return t_frequency::G1;
-      else if (sys == 'R') return t_frequency::R1;
-      else if (sys == 'E') return t_frequency::E1;
-      else if (sys == 'C') return t_frequency::C2;
-      else                 return t_frequency::dummy;
-    case l2: case c2:
-      if      (sys == 'G') return t_frequency::G2;
-      else if (sys == 'R') return t_frequency::R2;
-      else if (sys == 'E') return t_frequency::E5;
-      else if (sys == 'C') return t_frequency::C6;
-      else                 return t_frequency::dummy;
-    case lIF: case cIF: case MW: case CL:
-      return t_frequency::dummy;
-    case dummy:
-    case maxLc:
-    case GIM:
+  bool includesCode() const {
+    if (_type == code || _type == codeIF || _type == MW || _type == CL) {
+      return true;
+    }
+    else {
+      return false;
+    }
+  }
+
+  bool isIonoFree() const {
+    if (_type == codeIF || _type == phaseIF || _type == MW || _type == CL) {
+      return true;
+    }
+    else {
+      return false;
+    }
+  }
+  
+  bool isGeometryFree() const {
+    if (_type == MW || _type == CL || _type == GIM) {
+      return true;
+    }
+    else {
+      return false;
+    }
+  }
+  
+  t_frequency::type toFreq() const {
+    if (_frq2 != t_frequency::dummy) {
       return t_frequency::dummy;
     }
-    return t_frequency::dummy;
+    else {
+      return _frq1;
+    }
   }
 
-  static std::string toString(type tt) {
-    switch (tt) {
-    case l1:  return "l1";
-    case l2:  return "l2";
-    case lIF: return "lIF";
-    case MW:  return "MW";
-    case CL:  return "CL";
-    case c1:  return "c1";
-    case c2:  return "c2";
-    case cIF: return "cIF";
-    case GIM: return "GIM";
-    case dummy:
-    case maxLc:
-      return "";
+  std::string toString() const {
+    std::stringstream out;
+    if      (_type == code) {
+      out << 'c' << t_frequency::toString(_frq1);
     }
-    return "";
+    else if (_type == phase) {
+      out << 'l' << t_frequency::toString(_frq1);
+    }
+    else if (_type == codeIF) {
+      out << 'c' << t_frequency::toSystem(_frq1) << "IF" ;
+    }
+    else if (_type == phaseIF) {
+      out << 'l' << t_frequency::toSystem(_frq1) << "IF" ;
+    }
+    else if (_type == MW) {
+      out << t_frequency::toSystem(_frq1) << "MW" ;
+    }
+    else if (_type == CL) {
+      out << t_frequency::toSystem(_frq1) << "CL" ;
+    }
+    else if (_type == GIM) {
+      out << t_frequency::toSystem(_frq1) << "GIM" ;
+    }
+    return out.str();
   }
+
+  bool operator==(const t_lc& other) const {
+    if (_type == other._type && _frq1 == other._frq1 && _frq2 == other._frq2) {
+      return true;
+    }
+    else {
+      return false;
+    }
+  }
+
+  bool operator!=(const t_lc& other) const {
+    return !(*this == other);
+  }
+
+  bool operator <(const t_lc& other) const {
+    if      (_type != other._type) {
+      return _type < other._type;
+    }
+    else if (_frq1 != other._frq1) {
+      return _frq1 < other._frq1;
+    }
+    else {
+      return _frq2 < other._frq2;
+    }
+  }
+
+  type              _type;
+  t_frequency::type _frq1;
+  t_frequency::type _frq2;
 };
 
Index: /trunk/BNC/src/pppMain.cpp
===================================================================
--- /trunk/BNC/src/pppMain.cpp	(revision 10790)
+++ /trunk/BNC/src/pppMain.cpp	(revision 10791)
@@ -149,24 +149,36 @@
     t_pppOptions* opt = new t_pppOptions();
 
-    opt->_realTime         = _realTime;
-    opt->_roverName        = hlp[0].toStdString();
-    opt->_aprSigCrd[0]     = hlp[1].toDouble()+1e-10;
-    opt->_aprSigCrd[1]     = hlp[2].toDouble()+1e-10;
-    opt->_aprSigCrd[2]     = hlp[3].toDouble()+1e-10;
-    opt->_noiseCrd[0]      = hlp[4].toDouble()+1e-10;
-    opt->_noiseCrd[1]      = hlp[5].toDouble()+1e-10;
-    opt->_noiseCrd[2]      = hlp[6].toDouble()+1e-10;
-    opt->_aprSigTrp        = hlp[7].toDouble();
-    opt->_noiseTrp         = hlp[8].toDouble();
-    opt->_nmeaPort         = hlp[9].toInt();
-#ifdef USE_PPP
-    opt->_signalPriorities = hlp[10].toStdString();
-    if (!opt->_signalPriorities.size()) {
-      opt->_signalPriorities = "G:12&CWPSLX R:12&CP E:1&CBX E:5&QIX C:26&IQX";
-    }
-#endif
+    if      (settings.value("PPP/logMode").toString() == "debug") {
+      opt->_logMode = t_pppOptions::debug;
+    }
+    else if (settings.value("PPP/logMode").toString() == "all") {
+      opt->_logMode = t_pppOptions::all;
+    }
+    else {
+      opt->_logMode = t_pppOptions::normal;
+    }
+
+    opt->_realTime     = _realTime;
+    opt->_roverName    = hlp[0].toStdString();
+    opt->_aprSigCrd[0] = hlp[1].toDouble()+1e-10;
+    opt->_aprSigCrd[1] = hlp[2].toDouble()+1e-10;
+    opt->_aprSigCrd[2] = hlp[3].toDouble()+1e-10;
+    opt->_noiseCrd[0]  = hlp[4].toDouble()+1e-10;
+    opt->_noiseCrd[1]  = hlp[5].toDouble()+1e-10;
+    opt->_noiseCrd[2]  = hlp[6].toDouble()+1e-10;
+    opt->_aprSigTrp    = hlp[7].toDouble();
+    opt->_noiseTrp     = hlp[8].toDouble();
+    opt->_nmeaPort     = hlp[9].toInt();
+
+    string trkStr      = hlp[10].trimmed().toStdString();
+    if (trkStr.length() == 0) {
+      trkStr = "G:12&CWPSLX R:12&CP E:1&CBX E:5&QIX C:26&IQX";
+    }
+    opt->setTrkModes(trkStr);
+    
     if (_realTime) {
       opt->_corrMount.assign(settings.value("PPP/corrMount").toString().toStdString());
       opt->_isAPC = (opt->_corrMount.substr(0,4)=="SSRA");
+      opt->_biasMount.assign(settings.value("PPP/biasMount").toString().toStdString());
       opt->_ionoMount.assign(settings.value("PPP/ionoMount").toString().toStdString());
     }
@@ -177,4 +189,5 @@
       QFileInfo tmp = QFileInfo(QString::fromStdString(opt->_corrFile));
       opt->_isAPC = (tmp.baseName().mid(0,4)=="SSRA");
+      opt->_biasFile.assign(settings.value("PPP/biasFile").toString().toStdString());
       opt->_ionoFile.assign(settings.value("PPP/ionoFile").toString().toStdString());
     }
@@ -182,7 +195,5 @@
     opt->_crdFile.assign(settings.value("PPP/crdFile").toString().toStdString());
     opt->_antexFileName.assign(settings.value("PPP/antexFile").toString().toStdString());
-#ifdef USE_PPP
     opt->_blqFileName.assign(settings.value("PPP/blqFile").toString().toStdString());
-#endif
     opt->_sigmaC1      = settings.value("PPP/sigmaC1").toDouble(); if (opt->_sigmaC1 <= 0.0)  opt->_sigmaC1  = 1.00;
     opt->_sigmaL1      = settings.value("PPP/sigmaL1").toDouble(); if (opt->_sigmaL1 <= 0.0)  opt->_sigmaL1  = 0.01;
@@ -195,43 +206,4 @@
     opt->_pseudoObsIono  = false;
     opt->_refSatRequired = false;
-#ifdef USE_PPP_SSR_I
-    if (settings.value("PPP/lcGPS").toString() == "P3&L3") {
-      opt->_LCsGPS.push_back(t_lc::cIF);
-      opt->_LCsGPS.push_back(t_lc::lIF);
-    }
-    if (settings.value("PPP/lcGPS").toString() == "P3") {
-      opt->_LCsGPS.push_back(t_lc::cIF);
-    }
-    if (settings.value("PPP/lcGLONASS").toString() == "P3&L3") {
-      opt->_LCsGLONASS.push_back(t_lc::cIF);
-      opt->_LCsGLONASS.push_back(t_lc::lIF);
-    }
-    if (settings.value("PPP/lcGLONASS").toString() == "P3") {
-      opt->_LCsGLONASS.push_back(t_lc::cIF);
-    }
-    if (settings.value("PPP/lcGLONASS").toString() == "L3") {
-      opt->_LCsGLONASS.push_back(t_lc::lIF);
-    }
-    if (settings.value("PPP/lcGalileo").toString() == "P3&L3") {
-      opt->_LCsGalileo.push_back(t_lc::cIF);
-      opt->_LCsGalileo.push_back(t_lc::lIF);
-    }
-    if (settings.value("PPP/lcGalileo").toString() == "P3") {
-      opt->_LCsGalileo.push_back(t_lc::cIF);
-    }
-    if (settings.value("PPP/lcGalileo").toString() == "L3") {
-      opt->_LCsGalileo.push_back(t_lc::lIF);
-    }
-    if (settings.value("PPP/lcBDS").toString() == "P3&L3") {
-      opt->_LCsBDS.push_back(t_lc::cIF);
-      opt->_LCsBDS.push_back(t_lc::lIF);
-    }
-    if (settings.value("PPP/lcBDS").toString() == "P3") {
-      opt->_LCsBDS.push_back(t_lc::cIF);
-    }
-    if (settings.value("PPP/lcBDS").toString() == "L3") {
-      opt->_LCsBDS.push_back(t_lc::lIF);
-    }
-#else
     // Pseudo Observations
     if      (settings.value("PPP/constraints").toString() == "no") {
@@ -245,199 +217,9 @@
       opt->_ionoModelType = opt->est;
     }
-    // GPS
-    if (settings.value("PPP/lcGPS").toString() == "Pi&Li") {
-      opt->_LCsGPS.push_back(t_lc::c1);
-      opt->_LCsGPS.push_back(t_lc::c2);
-      opt->_LCsGPS.push_back(t_lc::l1);
-      opt->_LCsGPS.push_back(t_lc::l2);
-      if (opt->_pseudoObsIono) {
-        opt->_LCsGPS.push_back(t_lc::GIM);
-      }
-    }
-    if (settings.value("PPP/lcGPS").toString() == "Pi") {
-      opt->_LCsGPS.push_back(t_lc::c1);
-      opt->_LCsGPS.push_back(t_lc::c2);
-      if (opt->_pseudoObsIono) {
-        opt->_LCsGPS.push_back(t_lc::GIM);
-      }
-    }
-    if (settings.value("PPP/lcGPS").toString() == "P1&L1") {
-      opt->_LCsGPS.push_back(t_lc::c1);
-      opt->_LCsGPS.push_back(t_lc::l1);
-      if (opt->_pseudoObsIono) {
-        opt->_LCsGPS.push_back(t_lc::GIM);
-      }
-    }
-    if (settings.value("PPP/lcGPS").toString() == "P1") {
-        opt->_LCsGPS.push_back(t_lc::c1);
-        if (opt->_pseudoObsIono) {
-          opt->_LCsGPS.push_back(t_lc::GIM);
-        }
-    }
-    if (settings.value("PPP/lcGPS").toString() == "P3&L3") {
-      opt->_LCsGPS.push_back(t_lc::cIF);
-      opt->_LCsGPS.push_back(t_lc::lIF);
-    }
-    if (settings.value("PPP/lcGPS").toString() == "P3") {
-      opt->_LCsGPS.push_back(t_lc::cIF);
-    }
-    if (settings.value("PPP/lcGPS").toString() == "L3") {
-      opt->_LCsGPS.push_back(t_lc::lIF);
-    }
-    // GLONASS
-    if (settings.value("PPP/lcGLONASS").toString() == "Pi&Li") {
-      opt->_LCsGLONASS.push_back(t_lc::c1);
-      opt->_LCsGLONASS.push_back(t_lc::c2);
-      opt->_LCsGLONASS.push_back(t_lc::l1);
-      opt->_LCsGLONASS.push_back(t_lc::l2);
-      if (opt->_pseudoObsIono) {
-        opt->_LCsGLONASS.push_back(t_lc::GIM);
-      }
-    }
-    if (settings.value("PPP/lcGLONASS").toString() == "Pi") {
-      opt->_LCsGLONASS.push_back(t_lc::c1);
-      opt->_LCsGLONASS.push_back(t_lc::c2);
-      if (opt->_pseudoObsIono) {
-        opt->_LCsGLONASS.push_back(t_lc::GIM);
-      }
-    }
-    if (settings.value("PPP/lcGLONASS").toString() == "P1&L1") {
-      opt->_LCsGLONASS.push_back(t_lc::c1);
-      opt->_LCsGLONASS.push_back(t_lc::l1);
-      if (opt->_pseudoObsIono) {
-        opt->_LCsGLONASS.push_back(t_lc::GIM);
-      }
-    }
-    if (settings.value("PPP/lcGLONASS").toString() == "P1") {
-        opt->_LCsGLONASS.push_back(t_lc::c1);
-        if (opt->_pseudoObsIono) {
-          opt->_LCsGLONASS.push_back(t_lc::GIM);
-        }
-    }
-    if (settings.value("PPP/lcGLONASS").toString() == "P3&L3") {
-      opt->_LCsGLONASS.push_back(t_lc::cIF);
-      opt->_LCsGLONASS.push_back(t_lc::lIF);
-    }
-    if (settings.value("PPP/lcGLONASS").toString() == "P3") {
-      opt->_LCsGLONASS.push_back(t_lc::cIF);
-    }
-    if (settings.value("PPP/lcGLONASS").toString() == "L3") {
-      opt->_LCsGLONASS.push_back(t_lc::lIF);
-    }
-    // Galileo
-    if (settings.value("PPP/lcGalileo").toString() == "Pi&Li") {
-      opt->_LCsGalileo.push_back(t_lc::c1);
-      opt->_LCsGalileo.push_back(t_lc::c2);
-      opt->_LCsGalileo.push_back(t_lc::l1);
-      opt->_LCsGalileo.push_back(t_lc::l2);
-      if (opt->_pseudoObsIono) {
-        opt->_LCsGalileo.push_back(t_lc::GIM);
-      }
-    }
-    if (settings.value("PPP/lcGalileo").toString() == "Pi") {
-      opt->_LCsGalileo.push_back(t_lc::c1);
-      opt->_LCsGalileo.push_back(t_lc::c2);
-      if (opt->_pseudoObsIono) {
-        opt->_LCsGalileo.push_back(t_lc::GIM);
-      }
-    }
-    if (settings.value("PPP/lcGalileo").toString() == "P1&L1") {
-      opt->_LCsGalileo.push_back(t_lc::c1);
-      opt->_LCsGalileo.push_back(t_lc::l1);
-      if (opt->_pseudoObsIono) {
-        opt->_LCsGalileo.push_back(t_lc::GIM);
-      }
-    }
-    if (settings.value("PPP/lcGalileo").toString() == "P1") {
-        opt->_LCsGalileo.push_back(t_lc::c1);
-        if (opt->_pseudoObsIono) {
-          opt->_LCsGalileo.push_back(t_lc::GIM);
-        }
-    }
-    if (settings.value("PPP/lcGalileo").toString() == "P3&L3") {
-      opt->_LCsGalileo.push_back(t_lc::cIF);
-      opt->_LCsGalileo.push_back(t_lc::lIF);
-    }
-    if (settings.value("PPP/lcGalileo").toString() == "P3") {
-      opt->_LCsGalileo.push_back(t_lc::cIF);
-    }
-    if (settings.value("PPP/lcGalileo").toString() == "L3") {
-      opt->_LCsGalileo.push_back(t_lc::lIF);
-    }
-    // BDS
-    if (settings.value("PPP/lcBDS").toString() == "Pi&Li") {
-      opt->_LCsBDS.push_back(t_lc::c1);
-      opt->_LCsBDS.push_back(t_lc::c2);
-      opt->_LCsBDS.push_back(t_lc::l1);
-      opt->_LCsBDS.push_back(t_lc::l2);
-      if (opt->_pseudoObsIono) {
-        opt->_LCsBDS.push_back(t_lc::GIM);
-      }
-    }
-    if (settings.value("PPP/lcBDS").toString() == "Pi") {
-      opt->_LCsBDS.push_back(t_lc::c1);
-      opt->_LCsBDS.push_back(t_lc::c2);
-      if (opt->_pseudoObsIono) {
-        opt->_LCsBDS.push_back(t_lc::GIM);
-      }
-    }
-    if (settings.value("PPP/lcBDS").toString() == "P1&L1") {
-      opt->_LCsBDS.push_back(t_lc::c1);
-      opt->_LCsBDS.push_back(t_lc::l1);
-      if (opt->_pseudoObsIono) {
-        opt->_LCsBDS.push_back(t_lc::GIM);
-      }
-    }
-    if (settings.value("PPP/lcBDS").toString() == "P1") {
-        opt->_LCsBDS.push_back(t_lc::c1);
-        if (opt->_pseudoObsIono) {
-          opt->_LCsBDS.push_back(t_lc::GIM);
-        }
-    }
-    if (settings.value("PPP/lcBDS").toString() == "P3&L3") {
-      opt->_LCsBDS.push_back(t_lc::cIF);
-      opt->_LCsBDS.push_back(t_lc::lIF);
-    }
-    if (settings.value("PPP/lcBDS").toString() == "P3") {
-      opt->_LCsBDS.push_back(t_lc::cIF);
-    }
-    if (settings.value("PPP/lcBDS").toString() == "L3") {
-      opt->_LCsBDS.push_back(t_lc::lIF);
-    }
-
-    QString     priorStr  = QString::fromStdString(opt->_signalPriorities);
-    QStringList priorList = priorStr.split(" ", Qt::SkipEmptyParts);
-    QStringList hlpList;
-    vector<char> systems = opt->systems();
-    for (unsigned iSys= 0; iSys < systems.size(); iSys++) {
-      char sys = systems[iSys];
-      for (int ii = 0; ii < priorList.size(); ii++) {
-        if (priorList[ii].indexOf(":") != -1) {
-          hlpList = priorList[ii].split(":", Qt::SkipEmptyParts);
-          if (hlpList.size() == 2 && hlpList[0].length() == 1 && hlpList[0][0] == sys) {
-            hlpList = hlpList[1].split("&", Qt::SkipEmptyParts);
-            if (hlpList.size() == 2) {
-              for (int jj = 0; jj < hlpList[0].size(); jj++) {
-                char bb = hlpList[0][jj].toLatin1();
-                if      (sys == 'G' && opt->_frqBandsGPS.size() < 2) {
-                  opt->_frqBandsGPS.push_back(bb);
-                }
-                else if (sys == 'R' && opt->_frqBandsGLONASS.size() < 2) {
-                  opt->_frqBandsGLONASS.push_back(bb);
-                }
-                else if (sys == 'E' && opt->_frqBandsGalileo.size() < 2) {
-                  opt->_frqBandsGalileo.push_back(bb);
-                }
-                else if (sys == 'C' && opt->_frqBandsBDS.size() < 2) {
-                  opt->_frqBandsBDS.push_back(bb);
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-#endif
-
+    
+    opt->setLCs('G', settings.value("PPP/lcGPS")    .toString().trimmed().toStdString());
+    opt->setLCs('R', settings.value("PPP/lcGLONASS").toString().trimmed().toStdString());
+    opt->setLCs('E', settings.value("PPP/lcGalileo").toString().trimmed().toStdString());
+    opt->setLCs('C', settings.value("PPP/lcBDS")    .toString().trimmed().toStdString());
 
     // Information from the coordinate file
@@ -472,15 +254,28 @@
     opt->_seedingTime = settings.value("PPP/seedingTime").toDouble();
 
+    // Ambiguity Resolution
+    // --------------------
+    if (settings.value("PPP/arGPS").toInt() != 0) {
+      opt->_ar._systems.insert('G');
+    }
+    if (settings.value("PPP/arGalileo").toInt() != 0) {
+      opt->_ar._systems.insert('E');
+    }
+    if (settings.value("PPP/arBDS").toInt() != 0) {
+      opt->_ar._systems.insert('C');
+    }
+    opt->_ar._minEle    = opt->_minEle;
+    opt->_ar._minNumEpo = settings.value("PPP/arMinNumEpo").toInt();
+    opt->_ar._minNumSat = settings.value("PPP/arMinNumSat").toInt();
+    opt->_ar._useYaw    = (settings.value("PPP/arUseYaw").toInt() != 0);
+    opt->_ar._maxFrac   = settings.value("PPP/arMaxFrac").toDouble();
+    opt->_ar._maxSig    = settings.value("PPP/arMaxSig").toDouble();
+      
     // Some default values
     // -------------------
-    opt->_aprSigClk       = 3.0e5;
-    opt->_aprSigClkOff    = 3.0e5;
-    opt->_aprSigAmb       = 1.0e4;
-    opt->_aprSigIon       = 1.0e6;
-    opt->_noiseIon        = 1.0e6;
-    opt->_aprSigCodeBias  = 10000.0;
-    opt->_noiseCodeBias   = 10000.0;
-    opt->_aprSigPhaseBias = 10000.0;
-    opt->_noisePhaseBias  = 10000.0;
+    opt->_aprSigClk       = 1e3;
+    opt->_aprSigAmb       = 1e3;
+    opt->_aprSigIon       = 1e2;
+    opt->_aprSigCodeBias  = 1e1;
 
     _options << opt;
Index: /trunk/BNC/src/pppModel.cpp
===================================================================
--- /trunk/BNC/src/pppModel.cpp	(revision 10790)
+++ /trunk/BNC/src/pppModel.cpp	(revision 10791)
@@ -40,5 +40,5 @@
 
 #include <cmath>
-
+#include <newmatio.h>
 #include "pppModel.h"
 
@@ -542,6 +542,6 @@
 ///////////////////////////////////////////////////////////////////////////
 double t_windUp::value(const bncTime& etime, const ColumnVector& rRec,
-    t_prn prn, const ColumnVector& rSat, bool ssr,
-    double yaw, const ColumnVector& vSat) {
+                       t_prn prn, const ColumnVector& rSat, bool useYaw,
+                       double yaw, const ColumnVector& vSat) {
 
   if (etime.mjddec() != lastEtime[prn.toInt()]) {
@@ -555,5 +555,5 @@
     // -------------------------------------
     ColumnVector sHlp;
-    if (!ssr) {
+    if (!useYaw) {
       sHlp = t_astro::Sun(etime.mjddec());
     }
@@ -571,15 +571,26 @@
     ColumnVector sx = crossproduct(sy, sz);
 
-    if (ssr) {
-      // Yaw angle consideration
-      Matrix SXYZ(3, 3);
-      SXYZ.Column(1) = sx;
-      SXYZ.Column(2) = sy;
-      SXYZ.Column(3) = sz;
-      SXYZ = DotProduct(t_astro::rotZ(yaw), SXYZ);
-      sx = SXYZ.Column(1);
-      sy = SXYZ.Column(2);
-      sz = SXYZ.Column(3);
-    }
+    //// beg test
+    // {
+    //   ColumnVector sun = t_astro::Sun(etime.mjddec());
+    //   sun /= sun.NormFrobenius();
+    //   ColumnVector syHlp = crossproduct(sz, sun);
+    //   double yawDef = acos( DotProduct(sy, syHlp));
+    //   cout.setf(ios::fixed);
+    //   cout << string(etime) << ' ' << prn.toString()
+    //        << ' ' << setw(7) << setprecision(3) << yaw    * 180.0 / M_PI
+    //        << ' ' << setw(7) << setprecision(3) << yawDef * 180.0 / M_PI << endl;
+    // }
+    //// end test
+
+    // Yaw angle consideration (Rodrigues rotation formula)
+    // ----------------------------------------------------
+    if (useYaw) {
+      double cosY = cos(yaw);
+      double sinY = sin(yaw);
+      sx = sx * cosY + crossproduct(sz, sx) * sinY; // + sz * DotProduct(sz, sx) * (1.0 - cosY);
+      sy = sy * cosY + crossproduct(sz, sy) * sinY; // + sz * DotProduct(sz, sy) * (1.0 - cosY);
+    }
+    
     // Effective Dipole of the GPS Satellite Antenna
     // ---------------------------------------------
Index: /trunk/BNC/src/pppModel.h
===================================================================
--- /trunk/BNC/src/pppModel.h	(revision 10790)
+++ /trunk/BNC/src/pppModel.h	(revision 10791)
@@ -58,5 +58,5 @@
   ~t_windUp() {};
   double value(const bncTime& etime, const ColumnVector& rRec, t_prn prn,
-               const ColumnVector& rSat, bool ssr, double yaw,
+               const ColumnVector& rSat, bool useYaw, double yaw,
                const ColumnVector& vSat);
  private:
Index: /trunk/BNC/src/pppOptions.cpp
===================================================================
--- /trunk/BNC/src/pppOptions.cpp	(revision 10790)
+++ /trunk/BNC/src/pppOptions.cpp	(revision 10791)
@@ -39,4 +39,6 @@
  * -----------------------------------------------------------------------*/
 
+#include <QtCore>
+#include <set>
 #include <newmatio.h>
 #include "pppOptions.h"
@@ -61,5 +63,5 @@
 //
 //////////////////////////////////////////////////////////////////////////////
-const std::vector<t_lc::type>& t_pppOptions::LCs(char system) const {
+const std::vector<t_lc>& t_pppOptions::LCs(char system) const {
 
   if      (system == 'R') {
@@ -74,22 +76,4 @@
   else {
     return _LCsGPS;
-  }
-}
-
-//
-//////////////////////////////////////////////////////////////////////////////
-const std::vector<char>& t_pppOptions::frqBands(char system) const {
-
-  if      (system == 'R') {
-    return _frqBandsGLONASS;
-  }
-  else if (system == 'E') {
-    return _frqBandsGalileo;
-  }
-  else if (system == 'C') {
-    return  _frqBandsBDS;
-  }
-  else {
-    return _frqBandsGPS;
   }
 }
@@ -119,21 +103,27 @@
 //
 /////////////////////////////////////////////////////////////////////////////
-vector<t_lc::type> t_pppOptions::ambLCs(char system) const {
-
-  const vector<t_lc::type>& allLCs = LCs(system);
-  vector<t_lc::type>        phaseLCs;
+vector<t_lc> t_pppOptions::ambLCs(char system) const {
+
+  set<t_frequency::type> frqs;
+
+  int numPhaseLCs = 0;
+  const vector<t_lc>& allLCs = LCs(system);
   for (unsigned ii = 0; ii < allLCs.size(); ii++) {
-    if (t_lc::includesPhase(allLCs[ii])) {
-      phaseLCs.push_back(allLCs[ii]);
-    }
-  }
-
-  vector<t_lc::type> answ;
-  if      (phaseLCs.size() == 1) {
-    answ.push_back(phaseLCs[0]);
-  }
-  else if (phaseLCs.size() >  1) {
-    answ.push_back(t_lc::l1);
-    answ.push_back(t_lc::l2);
+    const t_lc& LC = allLCs[ii];
+    if (LC.includesPhase()) {
+      numPhaseLCs += 1;
+      frqs.insert(LC._frq1);
+      if (LC._frq2 != t_frequency::dummy) {
+        frqs.insert(LC._frq2);
+      }
+    }
+  }
+
+  vector<t_lc> answ;
+  for (auto it = frqs.begin(); it != frqs.end(); ++it) {
+    answ.push_back(t_lc(t_lc::phase, *it));
+    if (numPhaseLCs == 1) {
+      break;
+    }
   }
 
@@ -143,25 +133,161 @@
 //
 /////////////////////////////////////////////////////////////////////////////
-vector<t_lc::type> t_pppOptions::codeLCs(char system) const {
-
-  const vector<t_lc::type>& allLCs = LCs(system);
-  vector<t_lc::type>        codeLCs;
-  for (unsigned ii = 0; ii < allLCs.size(); ii++) {
-    if (t_lc::includesCode(allLCs[ii])) {
-      codeLCs.push_back(allLCs[ii]);
-    }
-  }
-
-  vector<t_lc::type> answ;
-  if      (codeLCs.size() == 1) {
-    answ.push_back(codeLCs[0]);
-  }
-  else if (codeLCs.size() >  1) {
-    answ.push_back(t_lc::c1);
-    answ.push_back(t_lc::c2);
-  }
-
-  return answ;
-}
-
-
+void t_pppOptions::setTrkModes(const std::string& trkStr) {
+
+  QStringList priorList = QString::fromStdString(trkStr).split(" ", Qt::SkipEmptyParts);
+  for (int ii = 0; ii < priorList.size(); ii++) {
+    if (priorList[ii].indexOf(":") != -1) {
+      QStringList sysList = priorList[ii].split(":", Qt::SkipEmptyParts);
+      if (sysList.size() == 2 && sysList[0].length() == 1) {
+        char sys = sysList[0].toStdString()[0];
+        SysTrkModes& sysTrkModes = _trkModesMap[sys];
+        QStringList hlpList = sysList[1].split("&", Qt::SkipEmptyParts);
+        if (hlpList.size() == 2) {
+          string frqStr = hlpList[0].toStdString();
+          string trkStr = hlpList[1].toStdString();
+          for (unsigned jj = 0; jj < frqStr.length(); jj++) {
+            char frqChar = frqStr[jj];
+            t_frequency::type frq = t_frequency::toFreq(sys, frqChar);
+            sysTrkModes._frqTrkModes.push_back(SysTrkModes::FrqTrkModes(frq, trkStr));
+          }
+        }
+      }
+    }
+  }
+
+  //// beg test
+  // for (const auto& [key, value] : _trkModesMap) {
+  //   cout << "system: " << key << endl;
+  //   for (const auto& frqTrk : value._frqTrkModes) {
+  //     cout << "    freq: "  << t_frequency::toString(frqTrk._frq) << ' '
+  //          << frqTrk._trkModes << endl;
+  //   }
+  // }
+  //// end test
+}
+
+//
+/////////////////////////////////////////////////////////////////////////////
+void t_pppOptions::defaultFrqs(char sys, t_frequency::type& frq1, t_frequency::type& frq2) const {
+
+  frq1 = t_frequency::dummy;
+  frq2 = t_frequency::dummy;
+
+  const SysTrkModes* sysTrkModes = this->sysTrkModes(sys);
+
+  if (sysTrkModes) {
+    if (sysTrkModes->_frqTrkModes.size() > 0) {
+      frq1 = sysTrkModes->_frqTrkModes[0]._frq;
+    }
+    if (sysTrkModes->_frqTrkModes.size() > 1) {
+      frq2 = sysTrkModes->_frqTrkModes[1]._frq;
+    }
+  }
+  else {
+    if      (sys == 'G') {
+      frq1 = t_frequency::G1;
+      frq2 = t_frequency::G2;
+    }
+    else if (sys == 'R') {
+      frq1 = t_frequency::R1;
+      frq2 = t_frequency::R2;
+    }
+    else if (sys == 'E') {
+      frq1 = t_frequency::E1;
+      frq2 = t_frequency::E5;
+    }
+    else if (sys == 'C') {
+      frq1 = t_frequency::C1;
+      frq2 = t_frequency::C5;
+    }
+  }
+}
+
+//
+/////////////////////////////////////////////////////////////////////////////
+void t_pppOptions::setLCs(char sys, const std::string& lcStr) {
+
+  std::vector<t_lc>* LCs = 0;
+  if      (sys == 'G') {
+    LCs = &_LCsGPS;
+  }
+  else if (sys == 'R') {
+    LCs = &_LCsGLONASS;
+  }
+  else if (sys == 'E') {
+    LCs = &_LCsGalileo;
+  }
+  else if (sys == 'C') {
+    LCs = &_LCsBDS;
+  }
+  else {
+    return;
+  }
+
+  t_frequency::type frq1 = t_frequency::dummy;
+  t_frequency::type frq2 = t_frequency::dummy;
+  defaultFrqs(sys, frq1, frq2);
+
+  if      (lcStr == "Pi&Li") {
+    if (frq1 != t_frequency::dummy) LCs->push_back(t_lc(t_lc::code,  frq1));
+    if (frq2 != t_frequency::dummy) LCs->push_back(t_lc(t_lc::code,  frq2));
+    if (frq1 != t_frequency::dummy) LCs->push_back(t_lc(t_lc::phase, frq1));
+    if (frq2 != t_frequency::dummy) LCs->push_back(t_lc(t_lc::phase, frq2));
+    if (_pseudoObsIono) {
+      LCs->push_back(t_lc(t_lc::GIM, t_frequency::dummy));
+    }
+  }
+  else if (lcStr == "Pi") {
+    if (frq1 != t_frequency::dummy) LCs->push_back(t_lc(t_lc::code, frq1));
+    if (frq2 != t_frequency::dummy) LCs->push_back(t_lc(t_lc::code, frq2));
+    if (_pseudoObsIono) {
+      LCs->push_back(t_lc(t_lc::GIM, t_frequency::dummy));
+    }
+  }
+  else if (lcStr == "P1&L1") {
+    if (frq1 != t_frequency::dummy) LCs->push_back(t_lc(t_lc::code,  frq1));
+    if (frq1 != t_frequency::dummy) LCs->push_back(t_lc(t_lc::phase, frq1));
+    if (_pseudoObsIono) {
+      LCs->push_back(t_lc(t_lc::GIM, t_frequency::dummy));
+    }
+  }
+  else if (lcStr == "P1") {
+    if (frq1 != t_frequency::dummy) LCs->push_back(t_lc(t_lc::code, frq1));
+    if (_pseudoObsIono) {
+      LCs->push_back(t_lc(t_lc::GIM, t_frequency::dummy));
+    }
+  }
+  else if (lcStr == "P3&L3") {
+    if (frq1 != t_frequency::dummy && frq2 != t_frequency::dummy) {
+      LCs->push_back(t_lc(t_lc::codeIF,  frq1, frq2));
+      LCs->push_back(t_lc(t_lc::phaseIF, frq1, frq2));
+    }
+  }
+  else if (lcStr == "P3") {
+    if (frq1 != t_frequency::dummy && frq2 != t_frequency::dummy) {
+      LCs->push_back(t_lc(t_lc::codeIF, frq1, frq2));
+    }
+  }
+  else if (lcStr == "L3") {
+    if (frq1 != t_frequency::dummy && frq2 != t_frequency::dummy) {
+      LCs->push_back(t_lc(t_lc::phaseIF, frq1, frq2));
+    }
+  }
+  else {
+    QStringListIterator it(QString(lcStr.c_str()).split("&", Qt::SkipEmptyParts));
+    while (it.hasNext()) {
+      string hlp = it.next().toStdString();
+      for (unsigned ii = 1; ii < hlp.length(); ++ii) {
+        t_frequency::type frq = t_frequency::toFreq(sys, hlp[ii]);
+        if (frq != t_frequency::dummy) {
+          if      (hlp[0] == 'P') {
+            LCs->push_back(t_lc(t_lc::code, frq));
+          }
+          else if (hlp[0] == 'L') {
+            LCs->push_back(t_lc(t_lc::phase, frq));
+          }
+        }
+      }
+    }
+  }
+}
Index: /trunk/BNC/src/pppOptions.h
===================================================================
--- /trunk/BNC/src/pppOptions.h	(revision 10790)
+++ /trunk/BNC/src/pppOptions.h	(revision 10791)
@@ -4,4 +4,5 @@
 #include <string>
 #include <vector>
+#include <set>
 #include <newmat.h>
 #include "pppInclude.h"
@@ -11,75 +12,102 @@
 class t_pppOptions {
  public:
-  enum iono_type {est,PPP_RTK};
+  enum iono_type {est};
+  enum e_logMode {normal, debug, all};
+
+  class SysTrkModes {
+  public:
+    class FrqTrkModes {
+    public:
+      FrqTrkModes(t_frequency::type frq, const std::string trkModes)
+        : _frq(frq), _trkModes(trkModes)  {}
+      t_frequency::type _frq;
+      std::string       _trkModes;
+    };
+    std::vector<FrqTrkModes> _frqTrkModes;
+  };
+
+  class ArOptions {
+  public:
+    std::set<char> _systems;
+    double         _minEle    = 0.0;
+    unsigned       _minNumEpo = 0;
+    int            _minNumSat = 0;
+    bool           _useYaw    = false;
+    double         _maxFrac   = 0.0;
+    double         _maxSig    = 0.0;
+  };
+  
   t_pppOptions();
   ~t_pppOptions();
 
-  std::vector<char>              systems() const;
-  const std::vector<t_lc::type>& LCs(char system) const;
-  const std::vector<char>&       frqBands(char system) const;
-  std::vector<t_lc::type>        ambLCs(char system) const;
-  std::vector<t_lc::type>        codeLCs(char system) const;
-  std::vector<t_lc::type>        ionoLCs(char system) const;
-  bool useSystem(char system) const {return LCs(system).size() > 0;}
-  bool useOrbClkCorr() const;
-  bool estTrp() const {return _aprSigTrp > 0.0 || _noiseTrp > 0.0;}
+  std::vector<char>        systems() const;
+  const std::vector<t_lc>& LCs(char system) const;
+  std::vector<t_lc>        ambLCs(char system) const;
+  bool                     useSystem(char system) const {return LCs(system).size() > 0;}
+  bool                     useOrbClkCorr() const;
+  bool                     estTrp() const {return _aprSigTrp > 0.0 || _noiseTrp > 0.0;}
   bool xyzAprRoverSet() const {
     return (_xyzAprRover[0] != 0.0 || _xyzAprRover[1] != 0.0 || _xyzAprRover[2] != 0.0);
   }
+  void setTrkModes(const std::string& trkStr);
+  const SysTrkModes* sysTrkModes(char sys) const {
+    auto it = _trkModesMap.find(sys);
+    return (it != _trkModesMap.end() ? &it->second : 0);
+  }
+  void setLCs(char sys, const std::string& lcStr);
+  void defaultFrqs(char sys, t_frequency::type& frq1, t_frequency::type& frq2) const;
+  bool ambRes() const {return _ar._systems.size() > 0;}
+  bool arSystem(char sys) const {return _ar._systems.find(sys) != _ar._systems.end();}
 
-  iono_type               _ionoModelType;
-  bool                    _realTime;
-  std::string             _crdFile;
-  std::string             _corrMount;
-  std::string             _ionoMount;
-  bool                    _isAPC;
-  std::string             _rinexObs;
-  std::string             _rinexNav;
-  std::string             _corrFile;
-  std::string             _ionoFile;
-  double                  _corrWaitTime;
-  std::string             _roverName;
-  ColumnVector            _xyzAprRover;
-  ColumnVector            _neuEccRover;
-  std::string             _recNameRover;
-  std::string             _antNameRover;
-  std::string             _antexFileName;
-  std::string             _blqFileName;
-  double                  _sigmaC1;
-  double                  _sigmaL1;
-  double                  _sigmaGIM;
-  double                  _maxResC1;
-  double                  _maxResL1;
-  double                  _maxResGIM;
-  bool                    _eleWgtCode;
-  bool                    _eleWgtPhase;
-  double                  _minEle;
-  int                     _minObs;
-  ColumnVector            _aprSigCrd;
-  double                  _aprSigClk;
-  double                  _aprSigClkOff;
-  double                  _aprSigTrp;
-  double                  _aprSigIon;
-  double                  _aprSigAmb;
-  double                  _aprSigCodeBias;
-  double                  _aprSigPhaseBias;
-  ColumnVector            _noiseCrd;
-  double                  _noiseTrp;
-  double                  _noiseIon;
-  double                  _noiseCodeBias;
-  double                  _noisePhaseBias;
-  int                     _nmeaPort;
-  std::string             _signalPriorities;
-  double                  _seedingTime;
-  std::vector<t_lc::type> _LCsGPS;
-  std::vector<t_lc::type> _LCsGLONASS;
-  std::vector<t_lc::type> _LCsGalileo;
-  std::vector<t_lc::type> _LCsBDS;
-  std::vector<char>       _frqBandsGPS;
-  std::vector<char>       _frqBandsGLONASS;
-  std::vector<char>       _frqBandsGalileo;
-  std::vector<char>       _frqBandsBDS;
-  bool                    _pseudoObsIono;
-  bool                    _refSatRequired;
+  iono_type                     _ionoModelType;
+  bool                          _realTime;
+  std::string                   _crdFile;
+  std::string                   _corrMount;
+  std::string                   _biasMount;
+  std::string                   _ionoMount;
+  bool                          _isAPC;
+  std::string                   _rinexObs;
+  std::string                   _rinexNav;
+  std::string                   _corrFile;
+  std::string                   _biasFile;
+  std::string                   _ionoFile;
+  double                        _corrWaitTime;
+  std::string                   _roverName;
+  ColumnVector                  _xyzAprRover;
+  ColumnVector                  _neuEccRover;
+  std::string                   _recNameRover;
+  std::string                   _antNameRover;
+  std::string                   _antexFileName;
+  std::string                   _blqFileName;
+  double                        _sigmaC1;
+  double                        _sigmaL1;
+  double                        _sigmaGIM;
+  double                        _maxResC1;
+  double                        _maxResL1;
+  double                        _maxResGIM;
+  bool                          _eleWgtCode;
+  bool                          _eleWgtPhase;
+  double                        _minEle;
+  int                           _minObs;
+  ColumnVector                  _aprSigCrd;
+  double                        _aprSigClk;
+  double                        _aprSigTrp;
+  double                        _aprSigIon;
+  double                        _aprSigAmb;
+  double                        _aprSigCodeBias;
+  ColumnVector                  _noiseCrd;
+  double                        _noiseTrp;
+  int                           _nmeaPort;
+  double                        _seedingTime;
+  std::vector<t_lc>             _LCsGPS;
+  std::vector<t_lc>             _LCsGLONASS;
+  std::vector<t_lc>             _LCsGalileo;
+  std::vector<t_lc>             _LCsBDS;
+  bool                          _pseudoObsIono;
+  bool                          _refSatRequired;
+  ArOptions                     _ar;
+  e_logMode                     _logMode;
+private:  
+  std::map<char, SysTrkModes>   _trkModesMap;
 };
 
Index: /trunk/BNC/src/pppRun.cpp
===================================================================
--- /trunk/BNC/src/pppRun.cpp	(revision 10790)
+++ /trunk/BNC/src/pppRun.cpp	(revision 10791)
@@ -133,4 +133,5 @@
     _rnxNavFile = 0;
     _corrFile   = 0;
+    _biasFile   = 0;
     _ionoFile   = 0;
     _speed      = settings.value("PPP/mapSpeedSlider").toInt();
@@ -274,4 +275,15 @@
   QMutexLocker locker(&_mutex);
 
+  //// beg test
+  // if (obsList.size() > 0) {
+  //   const double sampling = 5.0;
+  //   const bncTime& tt = obsList[0]._time;
+  //   double mod = remainder(tt.gpssec(), sampling);
+  //   if (fabs(mod) > 0.05) {
+  //     return;
+  //   }
+  // }
+  //// end test
+
   if (string(staID.data()) != _opt->_roverName) {
     return;
@@ -432,10 +444,13 @@
       return;
     }
-    if ( _opt->_ionoMount.empty() &&
-        !_opt->_corrMount.empty() && _opt->_corrMount != vTec._staID) {
-      return;
-    }
-    if (!_opt->_ionoMount.empty() && _opt->_ionoMount != vTec._staID) {
-      return;
+    if      (!_opt->_ionoMount.empty()) {
+      if (_opt->_ionoMount != vTec._staID) {
+        return;
+      }
+    }
+    else if (!_opt->_corrMount.empty()) {
+      if (_opt->_corrMount != vTec._staID) {
+        return;
+      }
     }
   }
@@ -499,6 +514,16 @@
 
   if (_opt->_realTime) {
-    if (_opt->_corrMount.empty() || _opt->_corrMount != codeBiases[0]._staID) {
+    if (_opt->_corrMount.empty() && _opt->_biasMount.empty()) {
       return;
+    }
+    if      (!_opt->_biasMount.empty()) {
+      if (_opt->_biasMount != codeBiases[0]._staID) {
+        return;
+      }
+    }
+    else if (!_opt->_corrMount.empty()) {
+      if (_opt->_corrMount != codeBiases[0]._staID) {
+        return;
+      }
     }
   }
@@ -523,6 +548,16 @@
 
   if (_opt->_realTime) {
-    if (_opt->_corrMount.empty() || _opt->_corrMount != phaseBiases[0]._staID) {
+    if (_opt->_corrMount.empty() && _opt->_biasMount.empty()) {
       return;
+    }
+    if      (!_opt->_biasMount.empty()) {
+      if (_opt->_biasMount != phaseBiases[0]._staID) {
+        return;
+      }
+    }
+    else if (!_opt->_corrMount.empty()) {
+      if (_opt->_corrMount != phaseBiases[0]._staID) {
+        return;
+      }
     }
   }
@@ -563,11 +598,19 @@
   if (!_opt->_corrFile.empty()) {
     _corrFile = new t_corrFile(QString(_opt->_corrFile.c_str()));
+    connect(_corrFile, SIGNAL(newOrbCorrections(QList<t_orbCorr>)), this, SLOT(slotNewOrbCorrections(QList<t_orbCorr>)));
+    connect(_corrFile, SIGNAL(newClkCorrections(QList<t_clkCorr>)), this, SLOT(slotNewClkCorrections(QList<t_clkCorr>)));
+    if (_opt->_biasFile.empty()) {
+      connect(_corrFile, SIGNAL(newCodeBiases(QList<t_satCodeBias>)), this, SLOT(slotNewCodeBiases(QList<t_satCodeBias>)));
+      connect(_corrFile, SIGNAL(newPhaseBiases(QList<t_satPhaseBias>)), this, SLOT(slotNewPhaseBiases(QList<t_satPhaseBias>)));
+    }
     if (_opt->_ionoFile.empty()) {
       connect(_corrFile, SIGNAL(newTec(t_vTec)), this, SLOT(slotNewTec(t_vTec)));
     }
-    connect(_corrFile, SIGNAL(newOrbCorrections(QList<t_orbCorr>)), this, SLOT(slotNewOrbCorrections(QList<t_orbCorr>)));
-    connect(_corrFile, SIGNAL(newClkCorrections(QList<t_clkCorr>)), this, SLOT(slotNewClkCorrections(QList<t_clkCorr>)));
-    connect(_corrFile, SIGNAL(newCodeBiases(QList<t_satCodeBias>)), this, SLOT(slotNewCodeBiases(QList<t_satCodeBias>)));
-    connect(_corrFile, SIGNAL(newPhaseBiases(QList<t_satPhaseBias>)), this, SLOT(slotNewPhaseBiases(QList<t_satPhaseBias>)));
+  }
+
+  if (!_opt->_biasFile.empty()) {
+    _biasFile = new t_corrFile(QString(_opt->_biasFile.c_str()));
+    connect(_biasFile, SIGNAL(newCodeBiases(QList<t_satCodeBias>)), this, SLOT(slotNewCodeBiases(QList<t_satCodeBias>)));
+    connect(_biasFile, SIGNAL(newPhaseBiases(QList<t_satPhaseBias>)), this, SLOT(slotNewPhaseBiases(QList<t_satPhaseBias>)));
   }
 
@@ -591,39 +634,21 @@
     // Get Corrections
     // ---------------
-    if (_corrFile) {
-      try {
-        _corrFile->syncRead(epo->tt);
-      }
-      catch (const char* msg) {
-        emit newMessage(QByteArray(msg), true);
-        break;
-      }
-      catch (const string& msg) {
-        emit newMessage(QByteArray(msg.c_str()), true);
-        break;
-      }
-      catch (...) {
-        emit newMessage("unknown exceptions in corrFile", true);
-        break;
-      }
-    }
-
-    // Get Additional VTEC Informations
-    // --------------------------------
-    if (_ionoFile) {
-      try {
-        _ionoFile->syncRead(epo->tt);
-      }
-      catch (const char* msg) {
-        emit newMessage(QByteArray(msg), true);
-        break;
-      }
-      catch (const string& msg) {
-        emit newMessage(QByteArray(msg.c_str()), true);
-        break;
-      }
-      catch (...) {
-        emit newMessage("unknown exceptions in ionoFile", true);
-        break;
+    for (t_corrFile* file : {_corrFile, _biasFile, _ionoFile}) {
+      if (file) {
+        try {
+          file->syncRead(epo->tt);
+        }
+        catch (const char* msg) {
+          emit newMessage(QByteArray(msg), true);
+          break;
+        }
+        catch (const string& msg) {
+          emit newMessage(QByteArray(msg.c_str()), true);
+          break;
+        }
+        catch (...) {
+          emit newMessage("unknown exceptions in file " + file->name().toLatin1(), true);
+          break;
+        }
       }
     }
Index: /trunk/BNC/src/pppRun.h
===================================================================
--- /trunk/BNC/src/pppRun.h	(revision 10790)
+++ /trunk/BNC/src/pppRun.h	(revision 10791)
@@ -71,4 +71,5 @@
   t_rnxNavFile*          _rnxNavFile;
   t_corrFile*            _corrFile;
+  t_corrFile*            _biasFile;
   t_corrFile*            _ionoFile;
   int                    _speed;
Index: /trunk/BNC/src/pppWidgets.cpp
===================================================================
--- /trunk/BNC/src/pppWidgets.cpp	(revision 10790)
+++ /trunk/BNC/src/pppWidgets.cpp	(revision 10791)
@@ -65,6 +65,8 @@
   _rinexNav     = new qtFileChooser(); _rinexNav    ->setObjectName("PPP/rinexNav");     _widgets << _rinexNav;
   _corrMount    = new QLineEdit();     _corrMount   ->setObjectName("PPP/corrMount");    _widgets << _corrMount;
+  _biasMount    = new QLineEdit();     _biasMount   ->setObjectName("PPP/biasMount");    _widgets << _biasMount;
   _ionoMount    = new QLineEdit();     _ionoMount   ->setObjectName("PPP/ionoMount");    _widgets << _ionoMount;
   _corrFile     = new qtFileChooser(); _corrFile    ->setObjectName("PPP/corrFile");     _widgets << _corrFile;
+  _biasFile     = new qtFileChooser(); _biasFile    ->setObjectName("PPP/biasFile");     _widgets << _biasFile;
   _ionoFile     = new qtFileChooser(); _ionoFile    ->setObjectName("PPP/ionoFile");     _widgets << _ionoFile;
   _crdFile      = new qtFileChooser(); _crdFile     ->setObjectName("PPP/crdFile");      _widgets << _crdFile;
@@ -72,12 +74,13 @@
   _blqFile      = new qtFileChooser(); _blqFile     ->setObjectName("PPP/blqFile");      _widgets << _blqFile;
   _logPath      = new QLineEdit();     _logPath     ->setObjectName("PPP/logPath");      _widgets << _logPath;
+  _logMode      = new QComboBox();     _logMode     ->setObjectName("PPP/logMode");      _widgets << _logMode;
   _nmeaPath     = new QLineEdit();     _nmeaPath    ->setObjectName("PPP/nmeaPath");     _widgets << _nmeaPath;
   _snxtroPath   = new QLineEdit();     _snxtroPath  ->setObjectName("PPP/snxtroPath");   _widgets << _snxtroPath;
-  _snxtroSampl  = new QComboBox();      _snxtroSampl->setObjectName("PPP/snxtroSampl");  _widgets << _snxtroSampl;
+  _snxtroSampl  = new QComboBox();     _snxtroSampl ->setObjectName("PPP/snxtroSampl");  _widgets << _snxtroSampl;
   _snxtroIntr   = new QComboBox();     _snxtroIntr  ->setObjectName("PPP/snxtroIntr");   _widgets << _snxtroIntr;
   _snxtroAc     = new QLineEdit();     _snxtroAc    ->setObjectName("PPP/snxtroAc");     _widgets << _snxtroAc;
   _snxtroSolId  = new QLineEdit();     _snxtroSolId ->setObjectName("PPP/snxtroSolId");  _widgets << _snxtroSolId;
   _snxtroSolType= new QLineEdit();     _snxtroSolType->setObjectName("PPP/snxtroSolType");_widgets << _snxtroSolType;
-  _snxtroCampId = new QLineEdit();     _snxtroCampId ->setObjectName("PPP/snxtroCampId");  _widgets << _snxtroCampId;
+  _snxtroCampId = new QLineEdit();     _snxtroCampId ->setObjectName("PPP/snxtroCampId");_widgets << _snxtroCampId;
   _staTable     = new QTableWidget();  _staTable    ->setObjectName("PPP/staTable");     _widgets << _staTable;
   _lcGPS        = new QComboBox();     _lcGPS       ->setObjectName("PPP/lcGPS");        _widgets << _lcGPS;
@@ -99,4 +102,13 @@
   _corrWaitTime = new QSpinBox();      _corrWaitTime->setObjectName("PPP/corrWaitTime"); _widgets << _corrWaitTime;
 
+  _arGPS        = new QCheckBox();     _arGPS       ->setObjectName("PPP/arGPS");        _widgets << _arGPS;
+  _arGalileo    = new QCheckBox();     _arGalileo   ->setObjectName("PPP/arGalileo");    _widgets << _arGalileo;
+  _arBDS        = new QCheckBox();     _arBDS       ->setObjectName("PPP/arBDS");        _widgets << _arBDS;
+  _arMinNumEpo  = new QSpinBox();      _arMinNumEpo ->setObjectName("PPP/arMinNumEpo");  _widgets << _arMinNumEpo;
+  _arMinNumSat  = new QSpinBox();      _arMinNumSat ->setObjectName("PPP/arMinNumSat");  _widgets << _arMinNumSat;
+  _arUseYaw     = new QCheckBox();     _arUseYaw    ->setObjectName("PPP/arUseYaw");     _widgets << _arUseYaw;
+  _arMaxFrac    = new QLineEdit();     _arMaxFrac   ->setObjectName("PPP/arMaxFrac");    _widgets << _arMaxFrac;
+  _arMaxSig     = new QLineEdit();     _arMaxSig    ->setObjectName("PPP/arMaxSig");     _widgets << _arMaxSig;
+
   _addStaButton = new QPushButton("Add Station");    _widgets << _addStaButton;
   _delStaButton = new QPushButton("Delete Station"); _widgets << _delStaButton;
@@ -116,4 +128,7 @@
   connect(_dataSource, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(slotEnableWidgets()));
   connect(_constraints, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(slotEnableWidgets()));
+  connect(_arGPS, SIGNAL(stateChanged(int)),  this, SLOT(slotEnableWidgets()));
+  connect(_arGalileo, SIGNAL(stateChanged(int)),  this, SLOT(slotEnableWidgets()));
+  connect(_arBDS, SIGNAL(stateChanged(int)),  this, SLOT(slotEnableWidgets()));
   connect(_snxtroPath, SIGNAL(textChanged(const QString &)), this, SLOT(slotPPPTextChanged()));
   connect(_snxtroAc, SIGNAL(textChanged(const QString &)), this, SLOT(slotPPPTextChanged()));
@@ -122,38 +137,24 @@
   connect(_snxtroCampId, SIGNAL(textChanged(const QString &)), this, SLOT(slotPPPTextChanged()));
 
+  _logMode->setEditable(false);
+  _logMode->addItems(QString("normal,debug,all").split(","));
+  
   slotEnableWidgets();
 
-  _lcGPS->setEditable(false);
-#ifdef USE_PPP_SSR_I
-  _lcGPS->addItems(QString("P3,P3&L3").split(","));
-#else
-  _lcGPS->addItems(QString("Pi&Li,Pi,P1&L1,P1,P3&L3,P3,L3,no").split(","));
-#endif
+  _lcGPS->setEditable(true);
+  _lcGPS->addItems(QString("Pi&Li,Pi,P1&L1,P1,P3&L3,P3,L3,no,P125&L125").split(","));
 
   _lcGLONASS->setEditable(false);
-#ifdef USE_PPP_SSR_I
-   _lcGLONASS->addItems(QString("no,P3,L3,P3&L3").split(","));
-#else
   _lcGLONASS->addItems(QString("Pi&Li,Pi,P1&L1,P1,P3&L3,P3,L3,no").split(","));
-#endif
-
-  _lcGalileo->setEditable(false);
-#ifdef USE_PPP_SSR_I
-  _lcGalileo->addItems(QString("no,P3,L3,P3&L3").split(","));
-#else
-  _lcGalileo->addItems(QString("Pi&Li,Pi,P1&L1,P1,P3&L3,P3,L3,no").split(","));
-#endif
-
-  _lcBDS->setEditable(false);
- #ifdef USE_PPP_SSR_I
-  _lcBDS->addItems(QString("no,P3,L3,P3&L3").split(","));
-#else
-  _lcBDS->addItems(QString("Pi&Li,Pi,P1&L1,P1,P3&L3,P3,L3,no").split(","));
-#endif
-
-#ifdef USE_PPP
+
+  _lcGalileo->setEditable(true);
+  _lcGalileo->addItems(QString("Pi&Li,Pi,P1&L1,P1,P3&L3,P3,L3,no,P1576&L1576").split(","));
+
+  _lcBDS->setEditable(true);
+  _lcBDS->addItems(QString("Pi&Li,Pi,P1&L1,P1,P3&L3,P3,L3,no,P1576&L1576").split(","));
+
   _constraints->setEditable(false);
   _constraints->addItems(QString("no,Ionosphere: pseudo-obs").split(","));
-#endif
+
   _snxtroSampl->setEditable(false);
   _snxtroSampl->addItems(QString("1 sec,5 sec,10 sec,30 sec,60 sec,300 sec").split(","));
@@ -172,4 +173,12 @@
   _minEle->setSuffix(" deg");
 
+  _arMinNumEpo->setMinimum(5);
+  _arMinNumEpo->setMaximum(60);
+  _arMinNumEpo->setSingleStep(5);
+
+  _arMinNumSat->setMinimum(4);
+  _arMinNumSat->setMaximum(8);
+  _arMinNumSat->setSingleStep(1);
+  
   _corrWaitTime->setMinimum(0);
   _corrWaitTime->setMaximum(20);
@@ -210,5 +219,4 @@
   // WhatsThis, PPP (3)
   // ------------------
-#ifdef USE_PPP
   _staTable->setWhatsThis(tr("<p>Specify values for Sigma and white Noise of the Stations North, East and Height coordinate components in meters. Specify also a Sigma in meters for a priori model based Tropospheric delays and a Sigma in meters per second for the delay's Noise. You can also specify a 'NMEA Port' to output coordinates in NMEA format through an IP port of your local host. Specify a list of signal priorities for the observations that shall be used for PPP.</p>"
                              "<p>'Sigma' is meant to describe the uncertainty of a single coordinate or tropospheric delay estimated for one epoch. 'Noise' is meant to describe the variation of estimates from epoch to epoch.</p><p><ul><li>A Sigma of 100.0 meters may be an appropriate choice e.g. for the initial N/E/H coordinates. However, this value may be significantly smaller (i.e. 0.01) for stations with well-known a priori coordinates.</li><li>A Noise of 100.0 meters for the estimated N/E/H coordinates may also be appropriate considering the potential movement of a rover position.</li><li>A value of 0.1 meters may be an appropriate Sigma for the a priori model based Tropospheric delay estimation.</li><li>Specify a Noise to describe the expected variation of the tropospheric effect over time. Supposing 1Hz observation data, specifying a value of 3e-6 would mean that the tropospheric effect may vary 3600 * 3e-6 = 0.01 meters per hour.</li></ul></p>"
@@ -222,7 +230,5 @@
                              "<p>But it is recommended to specify it in more detail per individual station, e.g.:</p> <ul>  <li>'G:12&W R:12&P E:1&C E:5&Q C:26&I'</li></ul> "
                              "<p> <i>[key: PPP/staTable]</i></p>"));
-#else
-  _staTable->setWhatsThis(tr("<p>Specify values for Sigma and white Noise of the Stations North, East and Height coordinate components in meters. Specify also a Sigma in meters for a priori model based Tropospheric delays and a Sigma in meters per second for the delay's Noise. You can also specify a 'NMEA Port' to output coordinates in NMEA format through an IP port of your local host.<i>[key: PPP/staTable]</i></p>"));
-#endif
+
   // WhatsThis, PPP (4)
   // ------------------
@@ -240,52 +246,4 @@
 ////////////////////////////////////////////////////////////////////////////
 t_pppWidgets::~t_pppWidgets() {
-  delete _dataSource;
-  delete _rinexObs;
-  delete _rinexNav;
-  delete _corrMount;
-  delete _ionoMount;
-  delete _corrFile;
-  delete _ionoFile;
-  delete _crdFile;
-  delete _antexFile;
-  delete _blqFile;
-  delete _logPath;
-  delete _nmeaPath;
-  delete _snxtroPath;
-  delete _snxtroSampl;
-  delete _snxtroIntr;
-  delete _snxtroAc;
-  delete _snxtroSolId;
-  delete _snxtroSolType;
-  delete _snxtroCampId;
-  for (int iRow = _staTable->rowCount()-1; iRow >=0; iRow--) {
-    _staTable->removeRow(iRow);
-  }
-  delete _staTable;
-  delete _lcGPS;
-  delete _lcGLONASS;
-  delete _lcGalileo;
-  delete _lcBDS;
-  delete _constraints;
-  delete _sigmaC1;
-  delete _sigmaL1;
-  delete _sigmaGIM;
-  delete _maxResC1;
-  delete _maxResL1;
-  delete _maxResGIM;
-  delete _minObs;
-  delete _minEle;
-  delete _eleWgtCode;
-  delete _eleWgtPhase;
-  delete _seedingTime;
-  delete _corrWaitTime;
-  delete _addStaButton;
-  delete _delStaButton;
-  delete _plotCoordinates;
-  delete _mapWinButton;
-  delete _audioResponse;
-  delete _mapWinDotSize;
-  delete _mapWinDotColor;
-  delete _mapSpeedSlider;
 }
 
@@ -296,124 +254,54 @@
   bncSettings settings;
 
-  // ComboBoxes
-  // ----------
-  int ii = _dataSource->findText(settings.value(_dataSource->objectName()).toString());
-  if (ii != -1) {
-    _dataSource->setCurrentIndex(ii);
-  }
-  ii = _lcGPS->findText(settings.value(_lcGPS->objectName()).toString());
-  if (ii != -1) {
-    _lcGPS->setCurrentIndex(ii);
-  }
-  ii = _lcGLONASS->findText(settings.value(_lcGLONASS->objectName()).toString());
-  if (ii != -1) {
-    _lcGLONASS->setCurrentIndex(ii);
-  }
-  ii = _lcGalileo->findText(settings.value(_lcGalileo->objectName()).toString());
-  if (ii != -1) {
-    _lcGalileo->setCurrentIndex(ii);
-  }
-  ii = _lcBDS->findText(settings.value(_lcBDS->objectName()).toString());
-  if (ii != -1) {
-    _lcBDS->setCurrentIndex(ii);
-  }
-  ii = _constraints->findText(settings.value(_constraints->objectName()).toString());
-  if (ii != -1) {
-    _constraints->setCurrentIndex(ii);
-  }
-  ii = _snxtroIntr->findText(settings.value(_snxtroIntr->objectName()).toString());
-  if (ii != -1) {
-    _snxtroIntr->setCurrentIndex(ii);
-  }
-
-  // FileChoosers
-  // ------------
-  _rinexObs ->setFileName(settings.value(_rinexObs ->objectName()).toString());
-  _rinexNav ->setFileName(settings.value(_rinexNav ->objectName()).toString());
-  _corrFile ->setFileName(settings.value(_corrFile ->objectName()).toString());
-  _ionoFile ->setFileName(settings.value(_ionoFile ->objectName()).toString());
-  _crdFile  ->setFileName(settings.value(_crdFile  ->objectName()).toString());
-  _antexFile->setFileName(settings.value(_antexFile->objectName()).toString());
-  _blqFile->setFileName(settings.value(_blqFile->objectName()).toString());
-
-  // LineEdits
-  // ---------
-  _corrMount    ->setText(settings.value(_corrMount     ->objectName()).toString());
-  _ionoMount    ->setText(settings.value(_ionoMount     ->objectName()).toString());
-  _logPath      ->setText(settings.value(_logPath       ->objectName()).toString());
-  _nmeaPath     ->setText(settings.value(_nmeaPath      ->objectName()).toString());
-  _snxtroPath   ->setText(settings.value(_snxtroPath    ->objectName()).toString());
-  _snxtroAc     ->setText(settings.value(_snxtroAc      ->objectName()).toString());
-  _snxtroSolId  ->setText(settings.value(_snxtroSolId   ->objectName()).toString());
-  _snxtroSolType->setText(settings.value(_snxtroSolType ->objectName()).toString());
-  _snxtroCampId ->setText(settings.value(_snxtroCampId  ->objectName()).toString());
-
-  if (!settings.value(_sigmaC1->objectName()).toString().isEmpty()) {
-    _sigmaC1->setText(settings.value(_sigmaC1->objectName()).toString());
-  }
-  else {
-    _sigmaC1->setText("1.0");
-  }
-
-  if (!settings.value(_sigmaL1->objectName()).toString().isEmpty()) {
-    _sigmaL1->setText(settings.value(_sigmaL1->objectName()).toString());
-  }
-  else {
-    _sigmaL1->setText("0.01");
-  }
-
-  if (!settings.value(_sigmaGIM->objectName()).toString().isEmpty()) {
-    _sigmaGIM->setText(settings.value(_sigmaGIM->objectName()).toString());
-  }
-  else {
-    _sigmaGIM->setText("1.0");
-  }
-
-  if (!settings.value(_maxResC1->objectName()).toString().isEmpty()) {
-    _maxResC1->setText(settings.value(_maxResC1->objectName()).toString());
-  }
-  else {
-    _maxResC1->setText("3.0");
-  }
-
-  if (!settings.value(_maxResL1->objectName()).toString().isEmpty()) {
-    _maxResL1->setText(settings.value(_maxResL1->objectName()).toString());
-  }
-  else {
-    _maxResL1->setText("0.03");
-  }
-
-  if (!settings.value(_maxResGIM->objectName()).toString().isEmpty()) {
-    _maxResGIM->setText(settings.value(_maxResGIM->objectName()).toString());
-  }
-  else {
-    _maxResGIM->setText("3.0");
-  }
-
-
-  if (!settings.value(_seedingTime->objectName()).toString().isEmpty()) {
-    _seedingTime->setText(settings.value(_seedingTime->objectName()).toString());
-  }
-  else {
-    _seedingTime->setText("0");
-  }
-
-  // CheckBoxes
-  // ----------
-  _eleWgtCode ->setCheckState(Qt::CheckState(settings.value(_eleWgtCode ->objectName()).toInt()));
-  _eleWgtPhase->setCheckState(Qt::CheckState(settings.value(_eleWgtPhase->objectName()).toInt()));
-
-  // SpinBoxex
-  // ---------
-  _minObs->setValue(settings.value(_minObs->objectName()).toInt());
-  _minEle->setValue(settings.value(_minEle->objectName()).toInt());
-  _corrWaitTime->setValue(settings.value(_corrWaitTime->objectName()).toInt());
-
-
-  ii = _snxtroSampl->findText(settings.value(_snxtroSampl->objectName()).toString());
-  if (ii != -1) {
-    _snxtroSampl->setCurrentIndex(ii);
-  }
-
+  auto setWidgetValue = [settings](QWidget* widget, QString defValue = QString()) {
+    if      (auto* obj = qobject_cast<QLineEdit*>(widget)) {
+      QString text = settings.value(obj->objectName()).toString();
+      if (text.isEmpty() && !defValue.isEmpty()) {
+        text = defValue;
+      }
+      obj->setText(text);
+    }
+    else if (auto* obj = qobject_cast<QComboBox*>(widget)) {
+      QString text = settings.value(obj->objectName()).toString();
+      int ii = obj->findText(text);
+      if (ii != -1) {
+        obj->setCurrentIndex(ii);
+      }
+      else if (obj->isEditable()) {
+        obj->insertItem(0, text);
+        obj->setCurrentIndex(0);
+      }
+    }
+    else if (auto* obj = qobject_cast<qtFileChooser*>(widget)) {
+      obj->setFileName(settings.value(obj->objectName()).toString());
+    }
+    else if (auto* obj = qobject_cast<QCheckBox*>(widget)) {
+      obj->setCheckState(Qt::CheckState(settings.value(obj->objectName()).toInt()));
+    }
+    else if (auto* obj = qobject_cast<QSpinBox*>(widget)) {
+      obj->setValue(settings.value(obj->objectName()).toInt());
+    }
+    else if (auto* obj = qobject_cast<QSlider*>(widget)) {
+      int value = settings.value(obj->objectName()).toInt();
+      if (value == 0) value = obj->maximum();
+      obj->setSliderPosition(value);
+    }
+  };
+  
+  QListIterator<QWidget*> iw(_widgets);
+  while (iw.hasNext()) {
+    setWidgetValue(iw.next());
+  }
+
+  // Set default values for some widgets
+  // -----------------------------------
+  setWidgetValue(_sigmaC1,     "1.0");
+  setWidgetValue(_sigmaL1,     "0.01");
+  setWidgetValue(_sigmaGIM,    "1.0");
+  setWidgetValue(_maxResC1,    "3.0");
+  setWidgetValue(_maxResL1,    "0.03");
+  setWidgetValue(_maxResGIM,   "3.0");
+  setWidgetValue(_seedingTime, "0");
+    
   // Table with stations
   // -------------------
@@ -431,19 +319,4 @@
     }
   }
-
-  // Plots and Maps
-  // --------------
-  _plotCoordinates ->setText(settings.value(_plotCoordinates->objectName()).toString());
-  _audioResponse   ->setText(settings.value(_audioResponse->objectName()).toString());
-  _mapWinDotSize   ->setText(settings.value(_mapWinDotSize->objectName()).toString());
-
-  ii = _mapWinDotColor->findText(settings.value(_mapWinDotColor->objectName()).toString());
-  if (ii != -1) {
-    _mapWinDotColor->setCurrentIndex(ii);
-  }
-
-  int speed = settings.value(_mapSpeedSlider->objectName()).toInt();
-  if (speed == 0) speed = _mapSpeedSlider->maximum();
-  _mapSpeedSlider->setSliderPosition(speed);
 }
 
@@ -454,40 +327,29 @@
   bncSettings settings;
 
-  settings.setValue(_dataSource  ->objectName(), _dataSource  ->currentText());
-  settings.setValue(_rinexObs    ->objectName(), _rinexObs    ->fileName());
-  settings.setValue(_rinexNav    ->objectName(), _rinexNav    ->fileName());
-  settings.setValue(_corrMount   ->objectName(), _corrMount   ->text());
-  settings.setValue(_ionoMount   ->objectName(), _ionoMount   ->text());
-  settings.setValue(_corrFile    ->objectName(), _corrFile    ->fileName());
-  settings.setValue(_ionoFile    ->objectName(), _ionoFile    ->fileName());
-  settings.setValue(_crdFile     ->objectName(), _crdFile     ->fileName());
-  settings.setValue(_antexFile   ->objectName(), _antexFile   ->fileName());
-  settings.setValue(_blqFile     ->objectName(), _blqFile   ->fileName());
-  settings.setValue(_logPath     ->objectName(), _logPath     ->text());
-  settings.setValue(_nmeaPath    ->objectName(), _nmeaPath    ->text());
-  settings.setValue(_snxtroPath  ->objectName(), _snxtroPath  ->text());
-  settings.setValue(_snxtroSampl ->objectName(), _snxtroSampl ->currentText());
-  settings.setValue(_snxtroIntr  ->objectName(), _snxtroIntr  ->currentText());
-  settings.setValue(_snxtroAc    ->objectName(), _snxtroAc    ->text());
-  settings.setValue(_snxtroSolId  ->objectName(), _snxtroSolId   ->text());
-  settings.setValue(_snxtroSolType->objectName(), _snxtroSolType ->text());
-  settings.setValue(_snxtroCampId ->objectName(), _snxtroCampId  ->text());
-  settings.setValue(_lcGPS       ->objectName(), _lcGPS       ->currentText());
-  settings.setValue(_lcGLONASS   ->objectName(), _lcGLONASS   ->currentText());
-  settings.setValue(_lcGalileo   ->objectName(), _lcGalileo   ->currentText());
-  settings.setValue(_lcBDS       ->objectName(), _lcBDS       ->currentText());
-  settings.setValue(_constraints ->objectName(), _constraints ->currentText());
-  settings.setValue(_sigmaC1     ->objectName(), _sigmaC1     ->text());
-  settings.setValue(_sigmaL1     ->objectName(), _sigmaL1     ->text());
-  settings.setValue(_sigmaGIM    ->objectName(), _sigmaGIM    ->text());
-  settings.setValue(_corrWaitTime->objectName(), _corrWaitTime->value());
-  settings.setValue(_maxResC1    ->objectName(), _maxResC1    ->text());
-  settings.setValue(_maxResL1    ->objectName(), _maxResL1    ->text());
-  settings.setValue(_maxResGIM   ->objectName(), _maxResGIM   ->text());
-  settings.setValue(_seedingTime ->objectName(), _seedingTime ->text());
-  settings.setValue(_minObs      ->objectName(), _minObs      ->value());
-  settings.setValue(_minEle      ->objectName(), _minEle      ->value());
-  settings.setValue(_eleWgtCode  ->objectName(), _eleWgtCode  ->checkState());
-  settings.setValue(_eleWgtPhase ->objectName(), _eleWgtPhase ->checkState());
+  auto storeWidgetValue = [&settings](QWidget* widget) {
+    if      (auto* obj = qobject_cast<QLineEdit*>(widget)) {
+      settings.setValue(obj->objectName(), obj->text());
+    }
+    else if (auto* obj = qobject_cast<QComboBox*>(widget)) {
+      settings.setValue(obj->objectName(), obj->currentText());
+    }
+    else if (auto* obj = qobject_cast<qtFileChooser*>(widget)) {
+      settings.setValue(obj->objectName(), obj->fileName());
+    }
+    else if (auto* obj = qobject_cast<QCheckBox*>(widget)) {
+      settings.setValue(obj->objectName(), obj->checkState());
+    }
+    else if (auto* obj = qobject_cast<QSpinBox*>(widget)) {
+      settings.setValue(obj->objectName(), obj->value());
+    }
+    else if (auto* obj = qobject_cast<QSlider*>(widget)) {
+      settings.setValue(obj->objectName(), obj->value());
+    }
+  };
+
+  QListIterator<QWidget*> it(_widgets);
+  while (it.hasNext()) {
+    storeWidgetValue(it.next());
+  }
 
   QStringList staList;
@@ -504,10 +366,4 @@
   }
   settings.setValue(_staTable->objectName(), staList);
-
-  settings.setValue(_plotCoordinates ->objectName(), _plotCoordinates ->text());
-  settings.setValue(_audioResponse   ->objectName(), _audioResponse   ->text());
-  settings.setValue(_mapWinDotSize   ->objectName(), _mapWinDotSize   ->text());
-  settings.setValue(_mapWinDotColor  ->objectName(), _mapWinDotColor  ->currentText());
-  settings.setValue(_mapSpeedSlider  ->objectName(), _mapSpeedSlider  ->value());
 }
 
@@ -534,8 +390,10 @@
     _rinexNav->setEnabled(false);
     _corrFile->setEnabled(false);
+    _biasFile->setEnabled(false);
     _ionoFile->setEnabled(false);
   }
   else if (rinexFiles) {
     _corrMount    ->setEnabled(false);
+    _biasMount    ->setEnabled(false);
     _ionoMount    ->setEnabled(false);
     _audioResponse->setEnabled(false);
@@ -543,18 +401,18 @@
 
   if ( _snxtroPath->text() != "" && !allDisabled) {
-    _snxtroSampl->setEnabled(true);
-    _snxtroIntr ->setEnabled(true);
-    _snxtroAc   ->setEnabled(true);
+    _snxtroSampl  ->setEnabled(true);
+    _snxtroIntr   ->setEnabled(true);
+    _snxtroAc     ->setEnabled(true);
     _snxtroSolId  ->setEnabled(true);
-    _snxtroSolType ->setEnabled(true);
-    _snxtroCampId  ->setEnabled(true);
+    _snxtroSolType->setEnabled(true);
+    _snxtroCampId ->setEnabled(true);
   }
   else {
-    _snxtroSampl->setEnabled(false);
-    _snxtroIntr ->setEnabled(false);
-    _snxtroAc   ->setEnabled(false);
+    _snxtroSampl  ->setEnabled(false);
+    _snxtroIntr   ->setEnabled(false);
+    _snxtroAc     ->setEnabled(false);
     _snxtroSolId  ->setEnabled(false);
-    _snxtroSolType ->setEnabled(false);
-    _snxtroCampId  ->setEnabled(false);
+    _snxtroSolType->setEnabled(false);
+    _snxtroCampId ->setEnabled(false);
   }
 
@@ -568,4 +426,13 @@
   }
 
+  bool ar = (_arGPS->checkState()     == Qt::Checked ||
+             _arGalileo->checkState() == Qt::Checked ||
+             _arBDS->checkState()     == Qt::Checked);
+  _arMinNumEpo->setEnabled(ar);
+  _arMinNumSat->setEnabled(ar);
+  _arUseYaw   ->setEnabled(ar); 
+  _arMaxFrac  ->setEnabled(ar);
+  _arMaxSig   ->setEnabled(ar); 
+  
   _dataSource->setEnabled(true);
 
@@ -629,5 +496,5 @@
 
   const static QPalette paletteWhite(QColor(255, 255, 255));
-  const static QPalette paletteGray(QColor(230, 230, 230));
+  const static QPalette paletteGray (QColor(230, 230, 230));
 
   // SNX TRO file sampling
@@ -635,33 +502,33 @@
   if (sender() == 0 || sender() == _snxtroPath) {
     if ( _snxtroPath->text() != "" ) {
-      _snxtroSampl->setEnabled(true);
-      _snxtroIntr ->setEnabled(true);
-      _snxtroAc   ->setEnabled(true);
+      _snxtroSampl  ->setEnabled(true);
+      _snxtroIntr   ->setEnabled(true);
+      _snxtroAc     ->setEnabled(true);
       _snxtroSolId  ->setEnabled(true);
-      _snxtroSolType ->setEnabled(true);
-      _snxtroCampId  ->setEnabled(true);
-      _snxtroSampl->setPalette(paletteWhite);
-      _snxtroIntr ->setPalette(paletteWhite);
-      _snxtroAc   ->setPalette(paletteWhite);
+      _snxtroSolType->setEnabled(true);
+      _snxtroCampId ->setEnabled(true);
+      _snxtroSampl  ->setPalette(paletteWhite);
+      _snxtroIntr   ->setPalette(paletteWhite);
+      _snxtroAc     ->setPalette(paletteWhite);
       _snxtroSolId  ->setPalette(paletteWhite);
-      _snxtroSolType ->setPalette(paletteWhite);
-      _snxtroCampId  ->setPalette(paletteWhite);
+      _snxtroSolType->setPalette(paletteWhite);
+      _snxtroCampId ->setPalette(paletteWhite);
     }
     else {
-    _snxtroSampl->setEnabled(false);
-    _snxtroIntr ->setEnabled(false);
-    _snxtroAc   ->setEnabled(false);
+    _snxtroSampl  ->setEnabled(false);
+    _snxtroIntr   ->setEnabled(false);
+    _snxtroAc     ->setEnabled(false);
     _snxtroSolId  ->setEnabled(false);
-    _snxtroSolType ->setEnabled(false);
-    _snxtroCampId  ->setEnabled(false);
-    _snxtroSampl->setPalette(paletteGray);
-    _snxtroIntr ->setPalette(paletteGray);
-    _snxtroAc   ->setPalette(paletteGray);
+    _snxtroSolType->setEnabled(false);
+    _snxtroCampId ->setEnabled(false);
+    _snxtroSampl  ->setPalette(paletteGray);
+    _snxtroIntr   ->setPalette(paletteGray);
+    _snxtroAc     ->setPalette(paletteGray);
     _snxtroSolId  ->setPalette(paletteGray);
-    _snxtroSolType ->setPalette(paletteGray);
-    _snxtroCampId  ->setPalette(paletteGray);
-    }
-  }
-
-
-}
+    _snxtroSolType->setPalette(paletteGray);
+    _snxtroCampId ->setPalette(paletteGray);
+    }
+  }
+
+
+}
Index: /trunk/BNC/src/pppWidgets.h
===================================================================
--- /trunk/BNC/src/pppWidgets.h	(revision 10790)
+++ /trunk/BNC/src/pppWidgets.h	(revision 10791)
@@ -38,7 +38,7 @@
 
 class t_pppWidgets : public QObject {
- Q_OBJECT
+  Q_OBJECT
 
- public:
+public:
   t_pppWidgets();
   ~t_pppWidgets();
@@ -49,6 +49,8 @@
   qtFileChooser* _rinexNav;
   QLineEdit*     _corrMount;
+  QLineEdit*     _biasMount;
   QLineEdit*     _ionoMount;
   qtFileChooser* _corrFile;
+  qtFileChooser* _biasFile;
   qtFileChooser* _ionoFile;
   qtFileChooser* _crdFile;
@@ -56,4 +58,5 @@
   qtFileChooser* _blqFile;
   QLineEdit*     _logPath;
+  QComboBox*     _logMode;
   QLineEdit*     _nmeaPath;
   QLineEdit*     _snxtroPath;
@@ -93,5 +96,14 @@
   QSlider*       _mapSpeedSlider;
 
- private slots:
+  QCheckBox*     _arGPS;
+  QCheckBox*     _arGalileo;
+  QCheckBox*     _arBDS;
+  QSpinBox*      _arMinNumEpo;
+  QSpinBox*      _arMinNumSat;
+  QCheckBox*     _arUseYaw;
+  QLineEdit*     _arMaxFrac;
+  QLineEdit*     _arMaxSig;
+
+private slots:
   void slotEnableWidgets();
   void slotAddStation();
@@ -99,5 +111,5 @@
   void slotPPPTextChanged();
 
- private:
+private:
   void readOptions();
   QList <QWidget*> _widgets;
Index: /trunk/BNC/src/rinex/corrfile.cpp
===================================================================
--- /trunk/BNC/src/rinex/corrfile.cpp	(revision 10790)
+++ /trunk/BNC/src/rinex/corrfile.cpp	(revision 10791)
@@ -49,4 +49,5 @@
 ////////////////////////////////////////////////////////////////////////////
 t_corrFile::t_corrFile(QString fileName) {
+  _name = fileName;
   expandEnvVar(fileName);
   _stream.open(fileName.toLatin1().data());
Index: /trunk/BNC/src/rinex/corrfile.h
===================================================================
--- /trunk/BNC/src/rinex/corrfile.h	(revision 10790)
+++ /trunk/BNC/src/rinex/corrfile.h	(revision 10791)
@@ -40,4 +40,5 @@
   void syncRead(const bncTime& tt);
   const QMap<QString, unsigned int>& corrIODs() const {return _corrIODs;}
+  const QString& name() const {return _name;}
 
  signals:
@@ -49,4 +50,5 @@
 
  private:
+  QString                     _name;
   std::ifstream               _stream;
   std::string                 _lastLine;
Index: /trunk/BNC/src/satObs.h
===================================================================
--- /trunk/BNC/src/satObs.h	(revision 10790)
+++ /trunk/BNC/src/satObs.h	(revision 10791)
@@ -31,4 +31,6 @@
     _lockTimeIndicator = -1;
   }
+  char frqChar() const {return _rnxType2ch.length() > 0 ? _rnxType2ch[0] : '?';}
+  char trkChar() const {return _rnxType2ch.length() > 1 ? _rnxType2ch[1] : '?';}
   std::string       _rnxType2ch;
   double            _code;
@@ -53,12 +55,12 @@
     _type = 0;
   }
-  t_satObs(const t_satObs& old) { // copy constructor (deep copy)
-    _staID = old._staID;
-    _prn   = old._prn;
-    _time  = old._time;
-    _type  = old._type;
-    for (unsigned ii = 0; ii < old._obs.size(); ii++) {
-      _obs.push_back(new t_frqObs(*old._obs[ii]));
+  t_satObs(const t_satObs& other) { // copy constructor (deep copy)
+    copyFields(other);
+  }
+  t_satObs operator=(const t_satObs& other) {
+    if (this != &other) { 
+      copyFields(other);
     }
+    return *this;
   }
   /**
@@ -73,6 +75,7 @@
    */
   inline void clear(void) {
-    for (unsigned ii = 0; ii < _obs.size(); ii++)
+    for (unsigned ii = 0; ii < _obs.size(); ii++) {
       delete _obs[ii];
+    }
     _obs.clear();
     _obs.resize(0);
@@ -88,4 +91,15 @@
   int                    _type; // MT
   std::vector<t_frqObs*> _obs;
+
+ private:
+  void copyFields(const t_satObs& other) {
+    _staID = other._staID;
+    _prn   = other._prn;
+    _time  = other._time;
+    _type  = other._type;
+    for (unsigned ii = 0; ii < other._obs.size(); ii++) {
+      _obs.push_back(new t_frqObs(*other._obs[ii]));
+    }
+  }
 };
 
Index: /trunk/BNC/src/src.pri
===================================================================
--- /trunk/BNC/src/src.pri	(revision 10790)
+++ /trunk/BNC/src/src.pri	(revision 10791)
@@ -134,14 +134,10 @@
   HEADERS += PPP/pppClient.h    PPP/pppObsPool.h   PPP/pppEphPool.h   \
              PPP/pppStation.h   PPP/pppFilter.h    PPP/pppParlist.h   \
-             PPP/pppSatObs.h    PPP/pppRefSat.h
+             PPP/pppSatObs.h    PPP/pppRefSat.h    PPP/lambda.h       \
+			 PPP/ambres.h       
   SOURCES += PPP/pppClient.cpp  PPP/pppObsPool.cpp PPP/pppEphPool.cpp \
              PPP/pppStation.cpp PPP/pppFilter.cpp  PPP/pppParlist.cpp \
-             PPP/pppSatObs.cpp
-}
-else {
-  INCLUDEPATH += PPP_SSR_I
-  DEFINES += USE_PPP_SSR_I
-  HEADERS += PPP_SSR_I/pppClient.h   PPP_SSR_I/pppFilter.h   PPP_SSR_I/pppUtils.h
-  SOURCES += PPP_SSR_I/pppClient.cpp PPP_SSR_I/pppFilter.cpp PPP_SSR_I/pppUtils.cpp
+             PPP/pppSatObs.cpp                     PPP/lambda.cpp     \
+			 PPP/ambres.cpp 
 }
 
Index: /trunk/BNC/src/t_prn.cpp
===================================================================
--- /trunk/BNC/src/t_prn.cpp	(revision 10790)
+++ /trunk/BNC/src/t_prn.cpp	(revision 10791)
@@ -6,4 +6,47 @@
 
 using namespace std;
+
+// Set from number
+//////////////////////////////////////////////////////////////////////////////
+void t_prn::set(unsigned nn) {
+  const static unsigned maxGPS     = MAXPRN_GPS;
+  const static unsigned maxGLONASS = MAXPRN_GPS + MAXPRN_GLONASS;
+  const static unsigned maxGALILEO = MAXPRN_GPS + MAXPRN_GLONASS + MAXPRN_GALILEO;
+  const static unsigned maxQZSS    = MAXPRN_GPS + MAXPRN_GLONASS + MAXPRN_GALILEO + MAXPRN_QZSS;
+  const static unsigned maxSBAS    = MAXPRN_GPS + MAXPRN_GLONASS + MAXPRN_GALILEO + MAXPRN_QZSS + MAXPRN_SBAS;
+  const static unsigned maxBDS     = MAXPRN_GPS + MAXPRN_GLONASS + MAXPRN_GALILEO + MAXPRN_QZSS + MAXPRN_SBAS + MAXPRN_BDS;
+  const static unsigned maxNavIC   = MAXPRN_GPS + MAXPRN_GLONASS + MAXPRN_GALILEO + MAXPRN_QZSS + MAXPRN_SBAS + MAXPRN_BDS + MAXPRN_NavIC;
+  _system = 'G';
+  _number = 0;
+  _flag   = 0;
+  if      (nn <= maxGPS) {
+    _system = 'G';
+    _number = nn;
+  }
+  else if (nn <= maxGLONASS) {
+    _system = 'R';
+    _number = nn - maxGPS;
+  }
+  else if (nn <= maxGALILEO) {
+    _system = 'E';
+    _number = nn - maxGLONASS;
+  }
+  else if (nn <= maxQZSS) {
+    _system = 'J';
+    _number = nn - maxGALILEO;
+  }
+  else if (nn <= maxSBAS) {
+    _system = 'S';
+    _number = nn - maxQZSS;
+  }
+  else if (nn <= maxBDS) {
+    _system = 'C';
+    _number = nn - maxSBAS;
+  }
+  else if (nn <= maxNavIC) {
+    _system = 'I';
+    _number = nn - maxBDS;
+  }
+} 
 
 //
Index: /trunk/BNC/src/t_prn.h
===================================================================
--- /trunk/BNC/src/t_prn.h	(revision 10790)
+++ /trunk/BNC/src/t_prn.h	(revision 10791)
@@ -16,16 +16,11 @@
       + MAXPRN_QZSS + MAXPRN_SBAS + MAXPRN_BDS + MAXPRN_NavIC;
 
-  t_prn() :
-      _system('G'), _number(0), _flag(0) {
-  }
-  t_prn(char system, int number) :
-      _system(system), _number(number), _flag(0) {
-  }
+  t_prn() : _system('G'), _number(0), _flag(0) {}
+  t_prn(char system, int number) : _system(system), _number(number), _flag(0) {}
+  t_prn(char system, int number, int flag) : _system(system), _number(number), _flag(flag) {}
+  ~t_prn() {}
 
-  t_prn(char system, int number, int flag) :
-      _system(system), _number(number), _flag(flag) {
-  }
-
-  ~t_prn() {
+  bool valid() const {
+    return _number != 0;
   }
 
@@ -41,4 +36,6 @@
     _flag  = flag;
   }
+
+  void set(unsigned nn);
 
   void setFlag(int flag) {
