Index: /trunk/BNC/scripts/Bnc.pm
===================================================================
--- /trunk/BNC/scripts/Bnc.pm	(revision 10584)
+++ /trunk/BNC/scripts/Bnc.pm	(revision 10585)
@@ -493,8 +493,8 @@
     my $epochSec     = 0;
     my $epochDiff    = 0;
-    my ( @hlp, @N, @E, @U, %SATNUM, @TRP, @CLK, @OFF_GPS, @OFF_GLO, @OFF_GAL, @OFF_BDS);
-    my ( @EPOCH, @EPOCH_CLK, @EPOCH_OFF_GPS, @EPOCH_OFF_GLO, @EPOCH_OFF_GAL, @EPOCH_OFF_BDS );
-    my ( %AMB,        %RES,            %ELE,            %ION, %BIA );
-    my ( $station,    $lki,            $sys,            $sat, $amb );
+    my ( @hlp, @N, @E, @U, %SATNUM, @TRP);
+    my ( @EPOCH, );
+    my ( %RECCLK, %AMB, %RES, %ELE, %ION, %BIA);
+    my ( $station, $lki, $sys, $sat, $amb);
     open ( my $fh, "<", $file ) || LOGDIE "Could not open file $file: $!\n";
 
@@ -584,24 +584,4 @@
             push @{ $BIA{$lki}{$sys}{DATA} },  $hlp[4] + $hlp[5];
         }
-        elsif ( $ln =~ /\bREC_CLK\b/ ) {
-            push ( @EPOCH_CLK, $epochSec );
-            push ( @CLK,       $hlp[2] + $hlp[3] );
-        }
-        elsif ( $ln =~ /\bOFF_GPS\b/ ) {                # 2015-08... OFF_GPS 52.6806 -3.8042 +- 9.0077
-            push ( @EPOCH_OFF_GPS, $epochSec );
-            push ( @OFF_GPS,       $hlp[2] + $hlp[3] );
-        }
-        elsif ( $ln =~ /\bOFF_GLO\b/ ) {                # 2015-08... OFF_GLO 52.6806 -3.8042 +- 9.0077
-            push ( @EPOCH_OFF_GLO, $epochSec );
-            push ( @OFF_GLO,       $hlp[2] + $hlp[3] );
-        }
-        elsif ( $ln =~ /\bOFF_GAL\b/ ) {                # 2015-08... OFF_GAL 52.6806 -3.8042 +- 9.0077
-            push ( @EPOCH_OFF_GAL, $epochSec );
-            push ( @OFF_GAL,       $hlp[2] + $hlp[3] );
-        }
-        elsif ( $ln =~ /\bOFF_BDS\b/ ) {                # 2015-08... OFF_BDS 52.6806 -3.8042 +- 9.0077
-            push ( @EPOCH_OFF_BDS, $epochSec );
-            push ( @OFF_BDS,       $hlp[2] + $hlp[3] );
-        }
         elsif ( $ln =~ /\bSATNUM\b/ ) {     # 2015-09... SATNUM G  8
             push ( @{ $SATNUM{ $hlp[2] } }, $hlp[3] );
@@ -609,4 +589,10 @@
         elsif ( $ln =~ /\bTRP\b/ ) {        # 2015-08... TRP  2.3803 +0.1009 +- 0.0324
             push ( @TRP, $hlp[2] + $hlp[3] );
+        }
+        elsif ( $ln =~ /\bREC_CLK\b/) {
+            # 2024-10-20_03:57:30.000 RECCLK  G       0.0000    -1.7861 +-   0.5268
+            $sys = $hlp[2];
+            push @{ $RECCLK{$sys}{EPOCH} }, $epochSec;
+            push @{ $RECCLK{$sys}{DATA} },  $hlp[3] + $hlp[4];
         }
     }    # -----  next line  -----
@@ -627,9 +613,5 @@
     if ( $nof_epochs != scalar @N )                              { LOGDIE "number of epochs and residuals not equal\n" }
     if ( $nof_epochs != scalar @TRP )                            { LOGDIE "number of epochs and TRP not equal\n" }
-    if ( @CLK     && scalar @EPOCH_CLK     != scalar @CLK )      { LOGDIE "number of epochs and CLK not equal\n" }
-    if ( @OFF_GPS && scalar @EPOCH_OFF_GPS != scalar @OFF_GPS )  { LOGDIE "number of epochs and OFF_GPS not equal\n" }
-    if ( @OFF_GLO && scalar @EPOCH_OFF_GLO != scalar @OFF_GLO )  { LOGDIE "number of epochs and OFF_GLO not equal\n" }
-    if ( @OFF_GAL && scalar @EPOCH_OFF_GAL != scalar @OFF_GAL )  { LOGDIE "number of epochs and OFF_GAL not equal\n" }
-    if ( @OFF_BDS && scalar @EPOCH_OFF_BDS != scalar @OFF_BDS )  { LOGDIE "number of epochs and OFF_BDS not equal\n" }
+
 
     if ( !$station ) { WARN "could not grep stationname from file: $file\n" }
@@ -642,9 +624,5 @@
                  SATNUM  => \%SATNUM,
                  TRP     => \@TRP,
-                 CLK     => \@CLK,
-                 OFF_GPS => \@OFF_GPS,
-                 OFF_GLO => \@OFF_GLO,
-                 OFF_GAL => \@OFF_GAL,
-                 OFF_BDS => \@OFF_BDS,
+                 RECCLK  => \%RECCLK,
                  RES     => \%RES,
                  AMB     => \%AMB,
Index: /trunk/BNC/scripts/pppPlot.pl
===================================================================
--- /trunk/BNC/scripts/pppPlot.pl	(revision 10584)
+++ /trunk/BNC/scripts/pppPlot.pl	(revision 10585)
@@ -107,9 +107,5 @@
     my ( $station, $file ) = Bnc::parsePPPLogfile( $file, $sampling );
     my $EPOCH       = $file->{'EPOCH'};
-    my $EPOCH_OFF_GPS = $file->{'EPOCH_OFF_GPS'};
-    my $EPOCH_OFF_GLO = $file->{'EPOCH_OFF_GLO'};
-    my $EPOCH_OFF_GAL = $file->{'EPOCH_OFF_GAL'};
-    my $EPOCH_OFF_BDS = $file->{'EPOCH_OFF_BDS'};
-    my $EPOCH_CLK     = $file->{'EPOCH_CLK'};
+    my %RECCLK        = %{ $file->{'RECCLK'} };
     my %AMB            = %{ $file->{'AMB'} };
     my %RES            = %{ $file->{'RES'} };
@@ -154,5 +150,5 @@
     my $chartNEU = newChart($station);
     $chartNEU->set( output => $pngName );
-    $chartNEU->set( ylabel => "Displacements [m]", yrange => [ " -0.5 ", " 0.5 " ] );
+    $chartNEU->set( ylabel => "Displacements [m]", yrange => [ " -0.9 ", " 0.9 " ] );
 
     #y2label => "Number of Satellites [-]", y2range => [" 0 ", " 20 "], y2tics => 'on',
@@ -213,25 +209,39 @@
         $png->image( $pdf->image_png($pngName), $x, $y, $width, $height );
 
-        ######### CLK #####################
-        if ( scalar @{ $file->{'CLK'} } < 1 ) {
-            DEBUG "No CLK found";
-        }
-        else {
-            DEBUG "Plot CLK";
-            $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   => $EPOCH,
-                                                     ydata   => $file->{'CLK'},
-                                                     title   => "Receiver clock",
-                                                     timefmt => '%s',
-                                                     style   => "linespoints",
-            );
-            $chartCLK->plot2d($dataset);
+        ######### RECCLK #####################
+        DEBUG "Plot Receiver Clocks";
+        $page = $pdf->page();
+        $page->mediabox('A4');
+        $y             = $y0 + $dy;
+        $headline      = sprintf ( "Receiver Clocks for station %s", $station );
+        $headline_text = $page->text;
+        $headline_text->font( $font1, 11 / pt );
+        $headline_text->translate( 15 / mm, 280 / mm );
+        $headline_text->text($headline);
+
+        my $chartRECCLK = newChart($station);
+        $chartRECCLK->set( legend => { position => "outside right" } );
+        my @datasets = ();                                                # init datasets
+        my $pngName  = sprintf ( "%s_RECCLK.png", $station);
+            $chartRECCLK->set( output => $pngName );
+            $chartRECCLK->set( ylabel => "Receiver Clocks [m]" );
+            # SYSTEM
+            foreach my $key_sys ( sort keys %RECCLK ) {
+
+                $dataset = Chart::Gnuplot::DataSet->new(
+                    xdata   => \@{ $RECCLK{$key_sys}{EPOCH} },         # array of epochs
+                    ydata   => \@{ $RECCLK{$key_sys}{DATA} },          # array of elevations of one satellite
+                    title   => "$key_sys",
+                    timefmt => '%s',
+
+                    #style   => "points",
+                    style => "points",
+                );
+                push ( @datasets, $dataset );
+            }
+            $chartRECCLK->plot2d(@datasets);
+
+            # system ("display $pngName&");
             $y = $y - $dy;
-
             if ( $y < 30 / mm ) {
                 $page = $pdf->page();
@@ -240,140 +250,6 @@
             }
             $png = $page->gfx();
-            LOGDIE("could not find image file: $!\n") unless -e $pngName;
+            die ("could not find image file: $!") unless -e $pngName;
             $png->image( $pdf->image_png($pngName), $x, $y, $width, $height );
-        }
-
-        ######### OFF_GPS #####################
-        if ( grep ( $_ eq "ALL", @plotTypes ) ) {
-            if ( scalar @{ $file->{'OFF_GPS'} } < 1 ) {
-                DEBUG "No OFF_GPS found";
-            }
-            else {
-                DEBUG "Plot OFF_GPS";
-                my $pngName  = sprintf ( "%s_OFF_G.png", $station );
-                my $chartOFF_GPS = newChart($station);
-                $chartOFF_GPS->set( output => $pngName );
-                $chartOFF_GPS->set( ylabel => "Offset GPS [m]" );
-
-                $dataset = Chart::Gnuplot::DataSet->new(
-                                                         xdata   => $EPOCH_OFF_GPS,
-                                                         ydata   => $file->{'OFF_GPS'},
-                                                         title   => "Receiver Offset GPS",
-                                                         timefmt => '%s',
-                                                         style   => "linespoints",
-                );
-                $chartOFF_GPS->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_GLO #####################
-        if ( grep ( $_ eq "ALL", @plotTypes ) ) {
-            if ( scalar @{ $file->{'OFF_GLO'} } < 1 ) {
-                DEBUG "No OFF_GLO found";
-            }
-            else {
-                DEBUG "Plot OFF_GLO";
-                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   => $EPOCH_OFF_GLO,
-                                                         ydata   => $file->{'OFF_GLO'},
-                                                         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_GAL'} } < 1 ) {
-                DEBUG "No OFF_GAL found";
-            }
-            else {
-                DEBUG "Plot OFF_GAL";
-                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   => $EPOCH_OFF_GAL,
-                                                         ydata   => $file->{'OFF_GAL'},
-                                                         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_BDS'} } < 1 ) {
-                DEBUG "No OFF_BDS found";
-            }
-            else {
-                DEBUG "Plot OFF_BDS";
-                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   => $EPOCH_OFF_BDS,
-                                                         ydata   => $file->{'OFF_BDS'},
-                                                         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 );
-            }
-        }
 
         ######### ELE #####################
@@ -698,5 +574,5 @@
     $pdf->end();
 
-    system ("rm *.png");
+#    system ("rm *.png");
     if (Common::amInteractiv ) {
    system ("evince $inputDir/$pdf_name");
