Index: /trunk/BNC/scripts/Bnc.pm
===================================================================
--- /trunk/BNC/scripts/Bnc.pm	(revision 10258)
+++ /trunk/BNC/scripts/Bnc.pm	(revision 10259)
@@ -493,6 +493,6 @@
     my $epochSec     = 0;
     my $epochDiff    = 0;
-    my ( @hlp, @N, @E, @U, %SATNUM, @TRPs, @G_CLKs, @R_CLKs, @E_CLKs, @C_CLKs );
-    my ( @EPOCHs, @EPOCHs_G_CLK, @EPOCHs_R_CLK, @EPOCHs_E_CLK, @EPOCHs_C_CLK);
+    my ( @hlp, @N, @E, @U, %SATNUM, @TRPs, @CLKs,   @OFF_GLOs, @OFF_GALs, @OFF_BDSs);
+    my ( @EPOCHs, @EPOCHs_CLK, @EPOCHs_OFF_GLO, @EPOCHs_OFF_GAL, @EPOCHs_OFF_BDS );
     my ( %AMB,        %RES,            %ELE,            %ION, %BIA );
     my ( $station,    $lki,            $sys,            $sat, $amb );
@@ -584,19 +584,19 @@
             push @{ $BIA{$lki}{$sys}{DATA} },  $hlp[4] + $hlp[5];
         }
-        elsif ( $ln =~ /\bREC_CLK  G\b/ ){
-            push ( @EPOCHs_G_CLK, $epochSec);
-        	push ( @G_CLKs, $hlp[3] + $hlp[4] );
-        }
-        elsif ( $ln =~ /\bREC_CLK  R\b/ ){
-            push ( @EPOCHs_R_CLK, $epochSec);
-        	push ( @R_CLKs, $hlp[3] + $hlp[4] );
-        }
-        elsif ( $ln =~ /\bREC_CLK  E\b/ ){
-            push ( @EPOCHs_E_CLK, $epochSec);
-        	push ( @E_CLKs, $hlp[3] + $hlp[4] );
-        }
-        elsif ( $ln =~ /\bREC_CLK  C\b/ ){
-            push ( @EPOCHs_C_CLK, $epochSec);
-        	push ( @C_CLKs, $hlp[3] + $hlp[4] );
+        elsif ( $ln =~ /\bREC_CLK\b/ ) {
+            push ( @EPOCHs_CLK, $epochSec );
+            push ( @CLKs,       $hlp[2] + $hlp[3] );
+        }
+        elsif ( $ln =~ /\bOFF_GLO\b/ ) {                # 2015-08... OFF_GLO 52.6806 -3.8042 +- 9.0077
+            push ( @EPOCHs_OFF_GLO, $epochSec );
+            push ( @OFF_GLOs,       $hlp[2] + $hlp[3] );
+        }
+        elsif ( $ln =~ /\bOFF_GAL\b/ ) {                # 2015-08... OFF_GAL 52.6806 -3.8042 +- 9.0077
+            push ( @EPOCHs_OFF_GAL, $epochSec );
+            push ( @OFF_GALs,       $hlp[2] + $hlp[3] );
+        }
+        elsif ( $ln =~ /\bOFF_BDS\b/ ) {                # 2015-08... OFF_BDS 52.6806 -3.8042 +- 9.0077
+            push ( @EPOCHs_OFF_BDS, $epochSec );
+            push ( @OFF_BDSs,       $hlp[2] + $hlp[3] );
         }
         elsif ( $ln =~ /\bSATNUM\b/ ) {     # 2015-09... SATNUM G  8
@@ -620,19 +620,12 @@
            . ", TRPs:"
            . scalar @TRPs
-           . ", GPS CLKs:"
-           . scalar @G_CLKs
-           . ", GLO CLKs:"
-           . scalar @R_CLKs
-           . ", GAL CLKs:"
-           . scalar @E_CLKs
-           . ", BDS CLKs:"
-           . scalar @E_CLKs
            );
-    if ( $nof_epochs != scalar @N )                    { LOGDIE "number of epochs and residuals not equal\n" }
-    if ( $nof_epochs != scalar @TRPs )                 { LOGDIE "number of epochs and TRPs not equal\n" }
-    if ( @G_CLKs && scalar @EPOCHs_G_CLK != scalar @G_CLKs ) {LOGDIE "number of epochs and G_CLKs not equal\n";}
-    if ( @R_CLKs && scalar @EPOCHs_R_CLK != scalar @R_CLKs ) {LOGDIE "number of epochs and R_CLKs not equal\n";}
-    if ( @E_CLKs && scalar @EPOCHs_E_CLK != scalar @E_CLKs ) {LOGDIE "number of epochs and E_CLKs not equal\n";}
-    if ( @C_CLKs && scalar @EPOCHs_C_CLK != scalar @C_CLKs ) {LOGDIE "number of epochs and C_CLKs not equal\n";}
+    if ( $nof_epochs != scalar @N )                                { LOGDIE "number of epochs and residuals not equal\n" }
+    if ( $nof_epochs != scalar @TRPs )                             { LOGDIE "number of epochs and TRPs not equal\n" }
+    if ( @CLKs     && scalar @EPOCHs_CLK != scalar @CLKs )         { LOGDIE "number of epochs and CLKs not equal\n" }
+    if ( @OFF_GLOs && scalar @EPOCHs_OFF_GLO != scalar @OFF_GLOs ) { LOGDIE "number of epochs and OFF_GLOs not equal\n" }
+    if ( @OFF_GALs && scalar @EPOCHs_OFF_GAL != scalar @OFF_GALs ) { LOGDIE "number of epochs and OFF_GALs not equal\n" }
+    if ( @OFF_BDSs && scalar @EPOCHs_OFF_BDS != scalar @OFF_BDSs ) { LOGDIE "number of epochs and OFF_BDSs not equal\n" }
+
     if ( !$station ) { WARN "could not grep stationname from file: $file\n" }
 
@@ -644,8 +637,8 @@
                  SATNUM     => \%SATNUM,
                  TRPs       => \@TRPs,
-                 G_CLKs  => \@G_CLKs,
-                 R_CLKs  => \@R_CLKs,
-                 E_CLKs  => \@E_CLKs,
-                 C_CLKs  => \@C_CLKs,
+                 CLKs      => \@CLKs,
+                 OFF_GLOs  => \@OFF_GLOs,
+                 OFF_GALs  => \@OFF_GALs,
+                 OFF_BDSs  => \@OFF_BDSs,
                  RES        => \%RES,
                  AMB        => \%AMB,
Index: /trunk/BNC/scripts/pppPlot.pl
===================================================================
--- /trunk/BNC/scripts/pppPlot.pl	(revision 10258)
+++ /trunk/BNC/scripts/pppPlot.pl	(revision 10259)
@@ -107,8 +107,8 @@
     my ( $station, $file ) = Bnc::parsePPPLogfile( $file, $sampling );
     my $EPOCHS       = $file->{'EPOCHS'};
-    my $EPOCHS_G_CLK = $file->{'EPOCHS_G_CLK'};
-    my $EPOCHS_R_CLK = $file->{'EPOCHS_R_CLK'};
-    my $EPOCHS_E_CLK = $file->{'EPOCHS_E_CLK'};
-    my $EPOCHS_C_CLK = $file->{'EPOCHS_C_CLK'};
+    my $EPOCHS_OFF_GLO = $file->{'EPOCHS_OFF_GLO'};
+    my $EPOCHS_OFF_GAL = $file->{'EPOCHS_OFF_GAL'};
+    my $EPOCHS_OFF_BDS = $file->{'EPOCHS_OFF_BDS'};
+    my $EPOCHS_CLK     = $file->{'EPOCHS_CLK'};    
     my %AMB            = %{ $file->{'AMB'} };
     my %RES            = %{ $file->{'RES'} };
@@ -212,124 +212,133 @@
         $png->image( $pdf->image_png($pngName), $x, $y, $width, $height );
 
-        ######### GPS CLK #####################
-        if ( scalar @{ $file->{'G_CLKs'} } < 1 ) {
-          DEBUG "No GPS CLKs found";
+        ######### CLK #####################
+        if ( scalar @{ $file->{'CLKs'} } < 1 ) {
+            DEBUG "No CLKs found";
         }
         else {
-          DEBUG "Plot GPS CLKs";
-          $pngName = sprintf ( "%s_CLK_G.png", $station );
-          my $chartCLK = newChart($station);
-          $chartCLK->set( output => $pngName );
-          $chartCLK->set( ylabel => "CLK [m]" );
-
-          $dataset = Chart::Gnuplot::DataSet->new(
-                                                   xdata   => $EPOCHS_G_CLK,
-                                                   ydata   => $file->{'G_CLKs'},
-                                                   title   => "GPS Receiver clock",
-                                                   timefmt => '%s',
-                                                   style   => "points",
-          );
-          $chartCLK->plot2d($dataset);
-          $y = $y - $dy;
-
-          if ( $y < 30 / mm ) {
-              $page = $pdf->page();
-              $page->mediabox('A4');
-              $y = $y0;
-          }
-          $png = $page->gfx();
-          LOGDIE("Unable to find image file: $!\n") unless -e $pngName;
-          $png->image( $pdf->image_png($pngName), $x, $y, $width, $height );
-        }
-         ######### GLONASS CLK #####################
-        if ( scalar @{ $file->{'R_CLKs'} } < 1 ) {
-          DEBUG "No GLONASS CLKs found";
-        }
-        else {
-          DEBUG "Plot GLONASS CLKs";
-          $pngName = sprintf ( "%s_CLK_R.png", $station );
-          my $chartCLK = newChart($station);
-          $chartCLK->set( output => $pngName );
-          $chartCLK->set( ylabel => "CLK [m]" );
-
-          $dataset = Chart::Gnuplot::DataSet->new(
-                                                   xdata   => $EPOCHS_R_CLK,
-                                                   ydata   => $file->{'R_CLKs'},
-                                                   title   => "GLONASS Receiver clock",
-                                                   timefmt => '%s',
-                                                   style   => "points",
-          );
-          $chartCLK->plot2d($dataset);
-          $y = $y - $dy;
-
-          if ( $y < 30 / mm ) {
-              $page = $pdf->page();
-              $page->mediabox('A4');
-              $y = $y0;
-          }
-          $png = $page->gfx();
-          LOGDIE("Unable to find image file: $!\n") unless -e $pngName;
-          $png->image( $pdf->image_png($pngName), $x, $y, $width, $height );
-        }
-         ######### Galileo CLK #####################
-        if ( scalar @{ $file->{'E_CLKs'} } < 1 ) {
-          DEBUG "No Galileo CLKs found";
-        }
-        else {
-          DEBUG "Plot Galileo CLKs";
-          $pngName = sprintf ( "%s_CLK_E.png", $station );
-          my $chartCLK = newChart($station);
-          $chartCLK->set( output => $pngName );
-          $chartCLK->set( ylabel => "CLK [m]" );
-
-          $dataset = Chart::Gnuplot::DataSet->new(
-                                                   xdata   => $EPOCHS_E_CLK,
-                                                   ydata   => $file->{'E_CLKs'},
-                                                   title   => "Galileo Receiver clock",
-                                                   timefmt => '%s',
-                                                   style   => "points",
-          );
-          $chartCLK->plot2d($dataset);
-          $y = $y - $dy;
-
-          if ( $y < 30 / mm ) {
-              $page = $pdf->page();
-              $page->mediabox('A4');
-              $y = $y0;
-          }
-          $png = $page->gfx();
-          LOGDIE("Unable to find image file: $!\n") unless -e $pngName;
-          $png->image( $pdf->image_png($pngName), $x, $y, $width, $height );
-        }
-
-        ######### Beidou CLK #####################
-        if ( scalar @{ $file->{'C_CLKs'} } < 1 ) {
-          DEBUG "No BDS CLKs found";
-        }
-        else {
-          DEBUG "Plot BDS CLKs";
-          $pngName = sprintf ( "%s_CLK_C.png", $station );
-          my $chartCLK = newChart($station);
-          $chartCLK->set( output => $pngName );
-          $chartCLK->set( ylabel => "CLK [m]" );
-
-          $dataset = Chart::Gnuplot::DataSet->new(
-                                                   xdata   => $EPOCHS_C_CLK,
-                                                   ydata   => $file->{'C_CLKs'},
-                                                   title   => "BDS Receiver clock",
-                                                   timefmt => '%s',
-                                                   style   => "points",
-          );
-          $chartCLK->plot2d($dataset);
-          $y = $y - $dy;
-
-          if ( $y < 30 / mm ) {
-              $page = $pdf->page();
-              $page->mediabox('A4');
-              $y = $y0;
-          }
-          $png = $page->gfx();
-          LOGDIE("Unable to find image file: $!\n") unless -e $pngName;
-          $png->image( $pdf->image_png($pngName), $x, $y, $width, $height );
+            DEBUG "Plot CLKs";
+            $pngName = sprintf ( "%s_CLK.png", $station );
+            my $chartCLK = newChart($station);
+            $chartCLK->set( output => $pngName );
+            $chartCLK->set( ylabel => "CLK [m]" );
+
+            $dataset = Chart::Gnuplot::DataSet->new(
+                                                     xdata   => $EPOCHS,
+                                                     ydata   => $file->{'CLKs'},
+                                                     title   => "Receiver clock",
+                                                     timefmt => '%s',
+                                                     style   => "linespoints",
+            );
+            $chartCLK->plot2d($dataset);
+            $y = $y - $dy;
+
+            if ( $y < 30 / mm ) {
+                $page = $pdf->page();
+                $page->mediabox('A4');
+                $y = $y0;
+            }
+            $png = $page->gfx();
+            LOGDIE("could not find image file: $!\n") unless -e $pngName;
+            $png->image( $pdf->image_png($pngName), $x, $y, $width, $height );
+        }
+
+
+        ######### OFF_GLO #####################
+        if ( grep ( $_ eq "ALL", @plotTypes ) ) {
+            if ( scalar @{ $file->{'OFF_GLOs'} } < 1 ) {
+                DEBUG "No OFF_GLOs found";
+            }
+            else {
+                DEBUG "Plot OFF_GLOs";
+                my $pngName  = sprintf ( "%s_OFF_R.png", $station );
+                my $chartOFF_GLO = newChart($station);
+                $chartOFF_GLO->set( output => $pngName );
+                $chartOFF_GLO->set( ylabel => "Offset GLONASS [m]" );
+
+                $dataset = Chart::Gnuplot::DataSet->new(
+                                                         xdata   => $EPOCHS_OFF_GLO,
+                                                         ydata   => $file->{'OFF_GLOs'},
+                                                         title   => "Receiver Offset GLONASS",
+                                                         timefmt => '%s',
+                                                         style   => "linespoints",
+                );
+                $chartOFF_GLO->plot2d($dataset);    #system ("display $pngName&");
+                $y = $y - $dy;
+
+                if ( $y < 30 / mm ) {
+                    $page = $pdf->page();
+                    $page->mediabox('A4');
+                    $y = $y0;
+                }
+                $png = $page->gfx();
+                LOGDIE("could not find image file: $!\n") unless -e $pngName;
+                $png->image( $pdf->image_png($pngName), $x, $y, $width, $height );
+            }
+        }
+
+        ######### OFF_GAL #####################
+        if ( grep ( $_ eq "ALL", @plotTypes ) ) {
+            if ( scalar @{ $file->{'OFF_GALs'} } < 1 ) {
+                DEBUG "No OFF_GALs found";
+            }
+            else {
+                DEBUG "Plot OFF_GALs";
+                my $pngName  = sprintf ( "%s_OFF_E.png", $station );
+                my $chartOFF_GAL = newChart($station);
+                $chartOFF_GAL->set( output => $pngName );
+                $chartOFF_GAL->set( ylabel => "Offset Galileo [m]" );
+
+                $dataset = Chart::Gnuplot::DataSet->new(
+                                                         xdata   => $EPOCHS_OFF_GAL,
+                                                         ydata   => $file->{'OFF_GALs'},
+                                                         title   => "Receiver Offset Galileo",
+                                                         timefmt => '%s',
+                                                         style   => "linespoints",
+                );
+                $chartOFF_GAL->plot2d($dataset);    #system ("display $pngName&");
+                $y = $y - $dy;
+
+                if ( $y < 30 / mm ) {
+                    $page = $pdf->page();
+                    $page->mediabox('A4');
+                    $y = $y0;
+                }
+                $png = $page->gfx();
+                LOGDIE("could not find image file: $!\n") unless -e $pngName;
+                $png->image( $pdf->image_png($pngName), $x, $y, $width, $height );
+            }
+        }
+
+        ######### OFF_BDS #####################
+        if ( grep ( $_ eq "ALL", @plotTypes ) ) {
+            if ( scalar @{ $file->{'OFF_BDSs'} } < 1 ) {
+                DEBUG "No OFF_BDSs found";
+            }
+            else {
+                DEBUG "Plot OFF_BDSs";
+                my $pngName  = sprintf ( "%s_OFF_C.png", $station );
+                my $chartOFF_BDS = newChart($station);
+                $chartOFF_BDS->set( output => $pngName );
+                $chartOFF_BDS->set( ylabel => "Offset Beidou [m]" );
+
+                $dataset = Chart::Gnuplot::DataSet->new(
+                                                         xdata   => $EPOCHS_OFF_BDS,
+                                                         ydata   => $file->{'OFF_BDSs'},
+                                                         title   => "Receiver Offset Beidou",
+                                                         timefmt => '%s',
+                                                         style   => "linespoints",
+                );
+                $chartOFF_BDS->plot2d($dataset);    #system ("display $pngName&");
+                $y = $y - $dy;
+
+                if ( $y < 30 / mm ) {
+                    $page = $pdf->page();
+                    $page->mediabox('A4');
+                    $y = $y0;
+                }
+                $png = $page->gfx();
+                LOGDIE("could not find image file: $!\n") unless -e $pngName;
+                $png->image( $pdf->image_png($pngName), $x, $y, $width, $height );
+            }
         }
 
Index: /trunk/BNC/src/PPP/pppClient.cpp
===================================================================
--- /trunk/BNC/src/PPP/pppClient.cpp	(revision 10258)
+++ /trunk/BNC/src/PPP/pppClient.cpp	(revision 10259)
@@ -49,4 +49,5 @@
 //////////////////////////////////////////////////////////////////////////////
 t_pppClient::t_pppClient(const t_pppOptions* opt) {
+  _running = true;
   _output   = 0;
   _opt      = new t_pppOptions(*opt);
@@ -75,4 +76,5 @@
 //////////////////////////////////////////////////////////////////////////////
 t_pppClient::~t_pppClient() {
+  _running = false;
   delete _log;
   delete _opt;
@@ -279,5 +281,5 @@
   }
 
-  while (true) {
+  while (_running) {
     Matrix BB(numBancroft, 4);
     int iObs = -1;
@@ -319,5 +321,5 @@
     // Check Blunders
     // --------------
-    const double BLUNDER = 200.0;
+    const double BLUNDER = 100.0;
     double   maxRes      = 0.0;
     unsigned maxResIndex = 0;
@@ -402,6 +404,6 @@
         offGlo = 0.0;
       }
-      if (fabs(maxRes) > OPT->_aprSigClkOff) {
-        LOG << "t_pppClient::cmpOffGR outlier " << maxResPrn.toString() << " " << maxRes << endl;
+      if (fabs(maxRes) > 100.0) {
+        LOG << "t_pppClient::cmpOffGlo outlier " << maxResPrn.toString() << " " << maxRes << endl;
         delete obsVector.at(maxResIndex);
         obsVector.erase(obsVector.begin() + maxResIndex);
@@ -455,6 +457,6 @@
       }
 
-      if (fabs(maxRes) > OPT->_aprSigClkOff) {
-        LOG << "t_pppClient::cmpOffGE outlier " << maxResPrn.toString() << " " << maxRes << endl;
+      if (fabs(maxRes) > 100.0) {
+        LOG << "t_pppClient::cmpOffGal outlier " << maxResPrn.toString() << " " << maxRes << endl;
         delete obsVector.at(maxResIndex);
         obsVector.erase(obsVector.begin() + maxResIndex);
@@ -509,6 +511,6 @@
       }
 
-      if (fabs(maxRes) > OPT->_aprSigClkOff) {
-        LOG << "t_pppClient::cmpOffGC outlier " << maxResPrn.toString() << " " << maxRes << endl;
+      if (fabs(maxRes) > 100.0) {
+        LOG << "t_pppClient::cmpOffBDS outlier " << maxResPrn.toString() << " " << maxRes << endl;
         delete obsVector.at(maxResIndex);
         obsVector.erase(obsVector.begin() + maxResIndex);
Index: /trunk/BNC/src/PPP/pppClient.h
===================================================================
--- /trunk/BNC/src/PPP/pppClient.h	(revision 10258)
+++ /trunk/BNC/src/PPP/pppClient.h	(revision 10259)
@@ -39,4 +39,7 @@
   double              offGal() const {return _offGal;}
   double              offBds() const {return _offBds;}
+  void                resetOffGlo() {_offGlo = 0.0;}
+  void                resetOffGal() {_offGal = 0.0;}
+  void                resetOffBds() {_offBds = 0.0;}
 
   std::ostringstream& log() {return *_log;}
@@ -81,4 +84,5 @@
   bool                      _pseudoObsIono;
   QMap<char, int>           _usedSystems;
+  bool                      _running;
 };
 
Index: /trunk/BNC/src/PPP/pppFilter.cpp
===================================================================
--- /trunk/BNC/src/PPP/pppFilter.cpp	(revision 10258)
+++ /trunk/BNC/src/PPP/pppFilter.cpp	(revision 10259)
@@ -372,5 +372,6 @@
         }
 
-        // Check Pre-Fit Residuals => switched off, because after a millisecond receiver clock jump, a cycle slip is detected for all satellites
+        // Check Pre-Fit Residuals
+        //=> switched off, because after a millisecond receiver clock jump, a cycle slip is detected for all satellites
         /* -----------------------
 
Index: /trunk/BNC/src/PPP/pppParlist.cpp
===================================================================
--- /trunk/BNC/src/PPP/pppParlist.cpp	(revision 10258)
+++ /trunk/BNC/src/PPP/pppParlist.cpp	(revision 10259)
@@ -497,18 +497,28 @@
   // GLONASS Clock Offset
   // --------------------
-  if (OPT->useSystem('R')) {
+  if ( _usedSystems.contains('R')  &&
+      (_usedSystems.contains('G') || _usedSystems.contains('E') || _usedSystems.contains('C'))) {
     required.push_back(new t_pppParam(t_pppParam::offGlo, t_prn(), t_lc::dummy));
+  }
+  else {
+    PPP_CLIENT->resetOffGlo();
   }
 
   // Galileo Clock Offset
   // --------------------
-  if (OPT->useSystem('E')) {
+  if (_usedSystems.contains('E') && _usedSystems.contains('G')) {
     required.push_back(new t_pppParam(t_pppParam::offGal, t_prn(), t_lc::dummy));
+  }
+  else {
+    PPP_CLIENT->resetOffGal();
   }
 
   // BDS Clock Offset
   // ----------------
-  if (OPT->useSystem('C')) {
+  if (_usedSystems.contains('C')  && (_usedSystems.contains('G') || _usedSystems.contains('E'))) {
     required.push_back(new t_pppParam(t_pppParam::offBds, t_prn(), t_lc::dummy));
+  }
+  else {
+    PPP_CLIENT->resetOffBds();
   }
 
Index: /trunk/BNC/src/pppMain.cpp
===================================================================
--- /trunk/BNC/src/pppMain.cpp	(revision 10258)
+++ /trunk/BNC/src/pppMain.cpp	(revision 10259)
@@ -528,5 +528,5 @@
     opt->_aprSigAmb       = 10000.0;
     opt->_aprSigClk       = 300000.0;
-    opt->_aprSigClkOff    = 100000.0;
+    opt->_aprSigClkOff    = 1000.0;
     opt->_aprSigIon       = 1000.0;
     opt->_noiseIon        = 100.0;
