Changeset 9910 in ntrip


Ignore:
Timestamp:
Nov 24, 2022, 10:29:49 PM (17 months ago)
Author:
stuerze
Message:

ppp plot script updated

Location:
trunk/BNC/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/scripts/Bnc.pm

    r9597 r9910  
    488488        $startSec = time () - $goBackSecs;
    489489    }
    490     my $isFreePPP = 1;    # Free or closed PPP version
    491490    my $epo;
    492491    my $old_epochSec = 0;
     
    494493    my $epochDiff    = 0;
    495494    my (
    496          @hlp,    @EPOCHs, @N,      @E,      @U,    %SATNUM, @TRPs, @CLKs,
    497          @G_CLKs, @R_CLKs, @E_CLKs, @C_CLKs, @OGRs, @OGEs,   @OGCs, @OFFGLOs
     495         @hlp,    @EPOCHs, @N,      @E,      @U,    %SATNUM, @TRPs,
     496         @G_CLKs, @R_CLKs, @E_CLKs, @C_CLKs,
    498497    );
    499     my ( @EPOCHs_OGE,   @EPOCHs_OGR,   @EPOCHs_OGC );
    500498    my ( @EPOCHs_G_CLK, @EPOCHs_R_CLK, @EPOCHs_E_CLK, @EPOCHs_C_CLK );
    501499    my ( %AMB,          %RES,          %ELE, %ION, %BIA );
     
    516514
    517515            # PPP of Epoch 2015-08-27_14:00:15.000
    518             if ( $ln =~ /PPP of Epoch (\d{4}-\d{2}-\d{2}_\d{2}:\d{2}:\d{2})\.\d+/ ) {    # closed PPP
    519                 $isFreePPP = 0;
    520                 $epo       = $1;                                                         #print "$epo\n";
    521             }
    522             elsif ( $ln =~ /Point Positioning of Epoch (\d{4}-\d{2}-\d{2}_\d{2}:\d{2}:\d{2})\.\d+/ ) {    # free PPP
    523                 $isFreePPP = 1;
    524                 $epo       = $1;
     516            if ( $ln =~ /PPP of Epoch (\d{4}-\d{2}-\d{2}_\d{2}:\d{2}:\d{2})\.\d+/ ) {
     517                $epo       = $1;              #print "$epo\n";
    525518            }
    526519            else { ERROR "strange line: \"$ln\""; next }
    527520
    528             #my $date = sprintf ( "%s %s", split ( /_/, $epo ) );
    529521            my $tp = Time::Piece->strptime( $epo, '%Y-%m-%d_%H:%M:%S' );
    530522            $epochSec  = $tp->epoch();
     
    539531        @hlp = split ( /\s+/, $ln );
    540532
    541         if ( $ln =~ /\bOFFGLO\b/ ) {    # ... OFFGLO       8.417 +- 28.479
    542             push ( @OFFGLOs, $hlp[2] );
    543         }
    544 
    545         elsif ( $ln =~ /\bdN\b/ ) {
     533        if ( $ln =~ /\bdN\b/ ) {
    546534            push ( @EPOCHs, $epochSec );    # besser $epo ?
    547535            $old_epochSec = $epochSec;
    548536
    549 #2015-08-27_13:59:50.000 DIEP1 X = 3842152.9054 +- 0.0242 Y = 563402.0331 +- 0.0176 Z = 5042888.5182 +- 0.0319 dN = 0.0130 +- 0.0193 dE = -0.0032 +- 0.0178 dU = -0.0248 +- 0.0349
     537            #2015-08-27_13:59:50.000 DIEP1 X = 3842152.9054 +- 0.0242 Y = 563402.0331 +- 0.0176 Z = 5042888.5182 +- 0.0319 dN = 0.0130 +- 0.0193 dE = -0.0032 +- 0.0178 dU = -0.0248 +- 0.0349
    550538            $station = $hlp[1];
    551539
     
    559547        }
    560548        elsif ( ( $ln =~ /\bAMB\b/ ) && ( $ln !~ /RESET/ ) ) {
    561             if ($isFreePPP) {    # 2015-10... AMB G05  -6.754 +-  0.086  nEpo = 633
    562                 $sat = $hlp[2];
    563                 $sys = substr ( $sat, 0, 1 );
    564                 $amb = $hlp[4];
    565                 push @{ $AMB{$sys}{$sat}{EPOCH} },  $epochSec;
    566                 push @{ $AMB{$sys}{$sat}{DATA} },   $amb;
    567                 push @{ $AMB{$sys}{$sat}{NUMEPO} }, $hlp[9];
    568             }
    569             else {               # 2015-08... AMB lIF G04 253.0000 -8.9924 +- 1.7825 el = 22.03 epo = 86
    570                 $lki = $hlp[2];
    571                 $sat = $hlp[3];
    572                 $sys = substr ( $sat, 0, 1 );
    573                 $amb = $hlp[4] + $hlp[5];
    574                 push @{ $AMB{$lki}{$sys}{$sat}{EPOCH} },  $epochSec;
    575                 push @{ $AMB{$lki}{$sys}{$sat}{DATA} },   $amb;
    576                 push @{ $AMB{$lki}{$sys}{$sat}{NUMEPO} }, $hlp[13];
    577                 push @{ $ELE{$sys}{$sat}{EPOCH} }, $epochSec;
    578                 push @{ $ELE{$sys}{$sat}{DATA} },  $hlp[10];
    579             }
     549              # 2015-08... AMB lIF G04 253.0000 -8.9924 +- 1.7825 el = 22.03 epo = 86
     550              $lki = $hlp[2];
     551              $sat = $hlp[3];
     552              $sys = substr ( $sat, 0, 1 );
     553              $amb = $hlp[4] + $hlp[5];
     554              push @{ $AMB{$lki}{$sys}{$sat}{EPOCH} },  $epochSec;
     555              push @{ $AMB{$lki}{$sys}{$sat}{DATA} },   $amb;
     556              push @{ $AMB{$lki}{$sys}{$sat}{NUMEPO} }, $hlp[13];
     557              push @{ $ELE{$sys}{$sat}{EPOCH} }, $epochSec;
     558              push @{ $ELE{$sys}{$sat}{DATA} },  $hlp[10];
    580559        }
    581560        elsif ( $ln =~ /\bRES\b/ && $ln !~ /Neglected/ ) {
    582             if ($isFreePPP) {    # 2015-10... RES R08   L3   -0.0069
    583                 $sat = $hlp[2];
    584                 $lki = $hlp[3];
    585             }
    586             else {               # 2015-08... RES lIF G30  -0.0076
    587                 $sat = $hlp[3];
    588                 $lki = $hlp[2];
    589             }
     561            # 2015-08... RES lIF G30  -0.0076
     562            $sat = $hlp[3];
     563            $lki = $hlp[2];
    590564            $sys = substr ( $sat, 0, 1 );
    591565
     
    610584            push @{ $BIA{$lki}{$sys}{DATA} },  $hlp[4] + $hlp[5];
    611585        }
    612         elsif ( $ln =~ /\bCLK\b/ ) {
    613             if   ($isFreePPP) { push ( @CLKs, $hlp[2] ) }
    614             else              { push ( @CLKs, $hlp[2] + $hlp[3] ) }
    615         }
    616 
    617586        # REC_CLK in BNC 2.13
    618         #elsif ( $ln =~ /\bREC_CLK\b/ ) {
    619         elsif ( $ln =~ /\bREC_CLK\s{8}/ ) {
    620             push ( @CLKs, $hlp[2] + $hlp[3] );
    621         }
    622587        elsif ( $ln =~ /\bREC_CLK  G\b/ ) {
    623588            push ( @EPOCHs_G_CLK, $epochSec );
     
    635600            push ( @EPOCHs_C_CLK, $epochSec );
    636601            push ( @C_CLKs,       $hlp[3] + $hlp[4] );
    637         }
    638         elsif ( $ln =~ /\bOGR\b/ ) {    # 2015-08... OGR 52.6806 -3.8042 +- 9.0077
    639             push ( @EPOCHs_OGR, $epochSec );
    640             push ( @OGRs,       $hlp[2] + $hlp[3] );    # only https so far
    641         }
    642         elsif ( $ln =~ /\bOGE\b/ ) {                    # 2015-08... OGE 52.6806 -3.8042 +- 9.0077
    643             push ( @EPOCHs_OGE, $epochSec );
    644             push ( @OGEs,       $hlp[2] + $hlp[3] );    # only https so far
    645         }
    646         elsif ( $ln =~ /\bOGC\b/ ) {                    # 2015-08... OGC 52.6806 -3.8042 +- 9.0077
    647             push ( @EPOCHs_OGC, $epochSec );
    648             push ( @OGCs,       $hlp[2] + $hlp[3] );    # only https so far
    649602        }
    650603        elsif ( $ln =~ /\bSATNUM\b/ ) {                 # 2015-09... SATNUM G  8
     
    668621           . scalar @U
    669622           . ", TRPs:"
    670            . scalar @TRPs
    671            . ", CLKs:"
    672            . scalar @CLKs
    673            . ", OFFGLOs:"
    674            . scalar @OFFGLOs );
     623           . scalar @TRPs );
    675624    if ( $nof_epochs != scalar @N )                          { LOGDIE "number of epochs and residuals not equal\n" }
    676625    if ( $nof_epochs != scalar @TRPs )                       { LOGDIE "number of epochs and TRPs not equal\n" }
    677     if ( @CLKs && $nof_epochs != scalar @CLKs )              { LOGDIE "number of epochs and CLKs not equal\n" }
    678626    if ( @G_CLKs && scalar @EPOCHs_G_CLK != scalar @G_CLKs ) { LOGDIE "number of epochs and G_CLKs not equal\n" }
    679627    if ( @R_CLKs && scalar @EPOCHs_R_CLK != scalar @R_CLKs ) { LOGDIE "number of epochs and R_CLKs not equal\n" }
    680628    if ( @E_CLKs && scalar @EPOCHs_E_CLK != scalar @E_CLKs ) { LOGDIE "number of epochs and E_CLKs not equal\n" }
    681629    if ( @C_CLKs && scalar @EPOCHs_C_CLK != scalar @C_CLKs ) { LOGDIE "number of epochs and C_CLKs not equal\n" }
    682     if ( @OGRs && scalar @EPOCHs_OGR != scalar @OGRs )       { LOGDIE "number of epochs and OGRs not equal\n" }
    683     if ( @OGEs && scalar @EPOCHs_OGE != scalar @OGEs )       { LOGDIE "number of epochs and OGEs not equal\n" }
    684     if ( @OGCs && scalar @EPOCHs_OGC != scalar @OGCs )       { LOGDIE "number of epochs and OGCs not equal\n" }
    685630
    686631    my %data = (
     
    691636                 SATNUM  => \%SATNUM,
    692637                 TRPs    => \@TRPs,
    693                  CLKs    => \@CLKs,
    694638                 G_CLKs  => \@G_CLKs,
    695639                 R_CLKs  => \@R_CLKs,
    696640                 E_CLKs  => \@E_CLKs,
    697641                 C_CLKs  => \@C_CLKs,
    698                  OGRs    => \@OGRs,
    699                  OGEs    => \@OGEs,
    700                  OGCs    => \@OGCs,
    701                  OFFGLOs => \@OFFGLOs,
    702642                 RES     => \%RES,
    703643                 AMB     => \%AMB,
     
    707647    );
    708648
    709     return ( $station, \%data, $isFreePPP );
     649    return ( $station, \%data, 0 );
    710650}
    711651
  • trunk/BNC/scripts/pppPlot.pl

    r9836 r9910  
    192192        my $chartTRP = newChart($station);
    193193        $chartTRP->set( output => $pngName );
    194         $chartTRP->set( ylabel => "Tropospheric Delay[m]", yrange => [ " 2.0 ", " 2.6 " ] );
     194        #$chartTRP->set( ylabel => "Tropospheric Delay[m]", yrange => [ " 2.0 ", " 2.6 " ] );
     195        $chartTRP->set( ylabel => "Tropospheric Delay[m]", yrange => [ " 1.0 ", " 3.0 " ] );
    195196
    196197        my $dataTRP = Chart::Gnuplot::DataSet->new(
     
    213214        $png->image( $pdf->image_png($pngName), $x, $y, $width, $height );
    214215
    215         ######### CLK #####################
    216         if ( scalar @{ $file->{'CLKs'} } < 1 ) {
    217             DEBUG "No CLKs found";
    218         }
    219         else {
    220             DEBUG "Plot CLKs";
    221             $pngName = sprintf ( "%s_CLK.png", $station );
    222             my $chartCLK = newChart($station);
    223             $chartCLK->set( output => $pngName );
    224             $chartCLK->set( ylabel => "CLK [m]" );
    225 
    226             $dataset = Chart::Gnuplot::DataSet->new(
    227                                                      xdata   => $EPOCHS,
    228                                                      ydata   => $file->{'CLKs'},
    229                                                      title   => "Receiver clock",
    230                                                      timefmt => '%s',
    231                                                      style   => "linespoints",
    232             );
    233             $chartCLK->plot2d($dataset);
    234             $y = $y - $dy;
    235 
    236             if ( $y < 30 / mm ) {
    237                 $page = $pdf->page();
    238                 $page->mediabox('A4');
    239                 $y = $y0;
    240             }
    241             $png = $page->gfx();
    242             LOGDIE("could not find image file: $!\n") unless -e $pngName;
    243             $png->image( $pdf->image_png($pngName), $x, $y, $width, $height );
    244         }
    245216        ######### GPS CLK #####################
    246217        if ( scalar @{ $file->{'G_CLKs'} } < 1 ) {
     
    363334            LOGDIE("could not find image file: $!\n") unless -e $pngName;
    364335            $png->image( $pdf->image_png($pngName), $x, $y, $width, $height );
    365         }
    366 
    367         ######### OGR #####################
    368         if ( grep ( $_ eq "ALL", @plotTypes ) ) {
    369             if ( scalar @{ $file->{'OGRs'} } < 1 ) {
    370                 DEBUG "No OGRs found";
    371             }
    372             else {
    373                 DEBUG "Plot OGRs";
    374                 my $pngName  = sprintf ( "%s_OGR.png", $station );
    375                 my $chartOGR = newChart($station);
    376                 $chartOGR->set( output => $pngName );
    377                 $chartOGR->set( ylabel => "OGR [m]" );
    378 
    379                 $dataset = Chart::Gnuplot::DataSet->new(
    380                                                          xdata   => $EPOCHS_OGR,
    381                                                          ydata   => $file->{'OGRs'},
    382                                                          title   => "Offset GPS - GLONASS",
    383                                                          timefmt => '%s',
    384                                                          style   => "linespoints",
    385                 );
    386                 $chartOGR->plot2d($dataset);    #system ("display $pngName&");
    387                 $y = $y - $dy;
    388 
    389                 if ( $y < 30 / mm ) {
    390                     $page = $pdf->page();
    391                     $page->mediabox('A4');
    392                     $y = $y0;
    393                 }
    394                 $png = $page->gfx();
    395                 LOGDIE("could not find image file: $!\n") unless -e $pngName;
    396                 $png->image( $pdf->image_png($pngName), $x, $y, $width, $height );
    397             }
    398         }
    399 
    400         ######### OGE #####################
    401         if ( grep ( $_ eq "ALL", @plotTypes ) ) {
    402             if ( scalar @{ $file->{'OGEs'} } < 1 ) {
    403                 DEBUG "No OGEs found";
    404             }
    405             else {
    406                 DEBUG "Plot OGEs";
    407                 my $pngName  = sprintf ( "%s_OGE.png", $station );
    408                 my $chartOGE = newChart($station);
    409                 $chartOGE->set( output => $pngName );
    410                 $chartOGE->set( ylabel => "OGE [m]" );
    411 
    412                 $dataset = Chart::Gnuplot::DataSet->new(
    413                                                          xdata   => $EPOCHS_OGE,
    414                                                          ydata   => $file->{'OGEs'},
    415                                                          title   => "Offset GPS - Galileo",
    416                                                          timefmt => '%s',
    417                                                          style   => "linespoints",
    418                 );
    419                 $chartOGE->plot2d($dataset);    #system ("display $pngName&");
    420                 $y = $y - $dy;
    421 
    422                 if ( $y < 30 / mm ) {
    423                     $page = $pdf->page();
    424                     $page->mediabox('A4');
    425                     $y = $y0;
    426                 }
    427                 $png = $page->gfx();
    428                 LOGDIE("could not find image file: $!\n") unless -e $pngName;
    429                 $png->image( $pdf->image_png($pngName), $x, $y, $width, $height );
    430             }
    431         }
    432 
    433         ######### OGC #####################
    434         if ( grep ( $_ eq "ALL", @plotTypes ) ) {
    435             if ( scalar @{ $file->{'OGCs'} } < 1 ) {
    436                 DEBUG "No OGCs found";
    437             }
    438             else {
    439                 DEBUG "Plot OGCs";
    440                 my $pngName  = sprintf ( "%s_OGC.png", $station );
    441                 my $chartOGC = newChart($station);
    442                 $chartOGC->set( output => $pngName );
    443                 $chartOGC->set( ylabel => "OGC [m]" );
    444 
    445                 $dataset = Chart::Gnuplot::DataSet->new(
    446                                                          xdata   => $EPOCHS_OGC,
    447                                                          ydata   => $file->{'OGCs'},
    448                                                          title   => "Offset GPS - BDS",
    449                                                          timefmt => '%s',
    450                                                          style   => "linespoints",
    451                 );
    452                 $chartOGC->plot2d($dataset);    #system ("display $pngName&");
    453                 $y = $y - $dy;
    454 
    455                 if ( $y < 30 / mm ) {
    456                     $page = $pdf->page();
    457                     $page->mediabox('A4');
    458                     $y = $y0;
    459                 }
    460                 $png = $page->gfx();
    461                 LOGDIE("could not find image file: $!\n") unless -e $pngName;
    462                 $png->image( $pdf->image_png($pngName), $x, $y, $width, $height );
    463             }
    464336        }
    465337
     
    647519
    648520                if ( $key_resType =~ /^c/ ) {
    649                     $chartRES->set( yrange => [ " -6.0 ", " 6.0 " ] );
     521                    #$chartRES->set( yrange => [ " -6.0 ", " 6.0 " ] );
     522                    $chartRES->set( yrange => [ " -10.0 ", " 10.0 " ] );
    650523                }
    651524                elsif ( $key_resType =~ /^l/ ) {
    652                     $chartRES->set( yrange => [ " -0.06 ", " 0.06 " ] );
     525                   #$chartRES->set( yrange => [ " -0.06 ", " 0.06 " ] );
     526                    $chartRES->set( yrange => [ " -0.10 ", " 0.10 " ] );
    653527                }
    654528
     
    787661    $pdf->end();
    788662
    789     #system ("rm *.png");
     663    system ("rm *.png");
    790664    if (Common::amInteractiv ) {
    791         system ("evince $inputDir/$pdf_name");
     665#       system ("evince $inputDir/$pdf_name");
    792666    }
    793667}    # -----  next logfile  -----
Note: See TracChangeset for help on using the changeset viewer.