Changeset 9947 in ntrip for trunk/BNC/scripts
- Timestamp:
- Dec 19, 2022, 12:58:57 PM (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/scripts/pppPlot.pl
r9910 r9947 6 6 # 7 7 # Plot metrics: 8 # - code and phase residuals in [m], 9 # - receiver clock errors in [m], 10 # - a-priori and correction values of tropospheric zenith delay in [m], 11 # - time offset between GPS time and Galileo/GLONASS/BDS time in [m], 12 # - ambiguities, given per satellite 13 # - elevations, given per satellite 8 # - NEU displacements w.r.t. coordinates in Crd file 9 # - A-priori + correction values of tropospheric zenith delay in [m], 10 # - GNSS Receiver clock errors in [m], 11 # - Elevations, given per satellite 12 # - Ambiguities, given per satellite 13 # - Ionosphere Delay [m], 14 # - Receiver Bias [m] 15 # - Code and phase residuals in [m], 14 16 # 15 17 # Author : Andrea Stuerze … … 105 107 my ( $station, $file ) = Bnc::parsePPPLogfile( $file, $sampling ); 106 108 my $EPOCHS = $file->{'EPOCHS'}; 107 my $EPOCHS_OGR = $file->{'EPOCHS_OGR'};108 my $EPOCHS_OGE = $file->{'EPOCHS_OGE'};109 my $EPOCHS_OGC = $file->{'EPOCHS_OGC'};110 109 my $EPOCHS_G_CLK = $file->{'EPOCHS_G_CLK'}; 111 110 my $EPOCHS_R_CLK = $file->{'EPOCHS_R_CLK'}; … … 192 191 my $chartTRP = newChart($station); 193 192 $chartTRP->set( output => $pngName ); 194 #$chartTRP->set( ylabel => "Tropospheric Delay[m]", yrange => [ " 2.0 ", " 2.6 " ] ); 195 $chartTRP->set( ylabel => "Tropospheric Delay[m]", yrange => [ " 1.0 ", " 3.0 " ] ); 193 $chartTRP->set( ylabel => "Tropospheric Delay [m]", yrange => [ " 1.0 ", " 3.0 " ] ); 196 194 197 195 my $dataTRP = Chart::Gnuplot::DataSet->new( … … 400 398 401 399 # AMBIGUITY_TYPE #print Dumper \%AMB; 402 foreach my $key_ambType (%AMB) { #print "$key_ambType \n"; ??????400 foreach my $key_ambType (%AMB) { #print "$key_ambType \n"; 403 401 foreach my $key_sys ( sort keys %{ $AMB{$key_ambType} } ) { 404 402 … … 493 491 } 494 492 495 ######### RES #####################496 DEBUG "Plot Residuals";497 $page = $pdf->page();498 $page->mediabox('A4');499 $y = $y0 + $dy;500 $headline = sprintf ( "Residuals for station %s", $station );501 $headline_text = $page->text;502 $headline_text->font( $font1, 11 / pt );503 $headline_text->translate( 15 / mm, 280 / mm );504 $headline_text->text($headline);505 506 my $chartRES = newChart($station);507 $chartRES->set( legend => { position => "outside right" } );508 509 # RESIDUAL_TYPE #print Dumper \%RES;510 foreach my $key_resType ( sort keys %RES ) { #print "key_resType: $key_resType \n";511 #SYSTEM512 foreach my $key_sys ( sort keys %{ $RES{$key_resType} } ) {513 514 #print "key_sys: $key_sys \n"; #print Dumper $RES{$key_resType};515 my @datasets;516 my $pngName = sprintf ( "%s_RES_%s_%s.png", $station, $key_resType, $key_sys );517 $chartRES->set( output => $pngName );518 $chartRES->set( ylabel => "Residuals $key_resType [m]" );519 520 if ( $key_resType =~ /^c/ ) {521 #$chartRES->set( yrange => [ " -6.0 ", " 6.0 " ] );522 $chartRES->set( yrange => [ " -10.0 ", " 10.0 " ] );523 }524 elsif ( $key_resType =~ /^l/ ) {525 #$chartRES->set( yrange => [ " -0.06 ", " 0.06 " ] );526 $chartRES->set( yrange => [ " -0.10 ", " 0.10 " ] );527 }528 529 elsif ( $key_resType =~ /^GIM/ ) {530 $chartRES->set( yrange => [ " -6.0 ", " 6.0 " ] );531 }532 533 # SATELLITE534 foreach my $key_sat ( sort keys %{ $RES{$key_resType}{$key_sys} } ) {535 536 #print "$key_sat = $RES{$key_resType}{$key_sys}{$key_sat} \n";537 $dataset = Chart::Gnuplot::DataSet->new(538 xdata => $RES{$key_resType}{$key_sys}{$key_sat}{EPOCH}, # array of epochs539 ydata => $RES{$key_resType}{$key_sys}{$key_sat}{DATA}, # array of residuals of one satellite540 title => "$key_sat",541 timefmt => '%s',542 543 #style => "linespoints",544 style => "linespoints",545 );546 push ( @datasets, $dataset );547 }548 $chartRES->plot2d(@datasets);549 $y = $y - $dy;550 if ( $y < 30 / mm ) {551 $page = $pdf->page();552 $page->mediabox('A4');553 $y = $y0;554 }555 $png = $page->gfx();556 LOGDIE("could not find image file: $!\n") unless -e $pngName;557 $png->image( $pdf->image_png($pngName), $x, $y, $width, $height );558 }559 }560 561 493 ######### ION ##################### 562 494 if ( grep ( $_ eq "ALL", @plotTypes ) ) { … … 656 588 } 657 589 } 590 591 ######### RES ##################### 592 DEBUG "Plot Residuals"; 593 $page = $pdf->page(); 594 $page->mediabox('A4'); 595 $y = $y0 + $dy; 596 $headline = sprintf ( "Residuals for station %s", $station ); 597 $headline_text = $page->text; 598 $headline_text->font( $font1, 11 / pt ); 599 $headline_text->translate( 15 / mm, 280 / mm ); 600 $headline_text->text($headline); 601 602 my $chartRES = newChart($station); 603 $chartRES->set( legend => { position => "outside right" } ); 604 605 # RESIDUAL_TYPE #print Dumper \%RES; 606 foreach my $key_resType ( sort keys %RES ) { #print "key_resType: $key_resType \n"; 607 #SYSTEM 608 foreach my $key_sys ( sort keys %{ $RES{$key_resType} } ) { 609 610 #print "key_sys: $key_sys \n"; #print Dumper $RES{$key_resType}; 611 my @datasets; 612 my $pngName = sprintf ( "%s_RES_%s_%s.png", $station, $key_resType, $key_sys ); 613 $chartRES->set( output => $pngName ); 614 $chartRES->set( ylabel => "Residuals $key_resType [m]" ); 615 616 if ( $key_resType =~ /^c/ ) { 617 $chartRES->set( yrange => [ " -10.0 ", " 10.0 " ] ); 618 } 619 elsif ( $key_resType =~ /^l/ ) { 620 $chartRES->set( yrange => [ " -0.10 ", " 0.10 " ] ); 621 } 622 623 elsif ( $key_resType =~ /^GIM/ ) { 624 $chartRES->set( yrange => [ " -6.0 ", " 6.0 " ] ); 625 } 626 627 # SATELLITE 628 foreach my $key_sat ( sort keys %{ $RES{$key_resType}{$key_sys} } ) { 629 630 #print "$key_sat = $RES{$key_resType}{$key_sys}{$key_sat} \n"; 631 $dataset = Chart::Gnuplot::DataSet->new( 632 xdata => $RES{$key_resType}{$key_sys}{$key_sat}{EPOCH}, # array of epochs 633 ydata => $RES{$key_resType}{$key_sys}{$key_sat}{DATA}, # array of residuals of one satellite 634 title => "$key_sat", 635 timefmt => '%s', 636 637 #style => "linespoints", 638 style => "linespoints", 639 ); 640 push ( @datasets, $dataset ); 641 } 642 $chartRES->plot2d(@datasets); 643 $y = $y - $dy; 644 if ( $y < 30 / mm ) { 645 $page = $pdf->page(); 646 $page->mediabox('A4'); 647 $y = $y0; 648 } 649 $png = $page->gfx(); 650 LOGDIE("could not find image file: $!\n") unless -e $pngName; 651 $png->image( $pdf->image_png($pngName), $x, $y, $width, $height ); 652 } 653 } 658 654 } # end if ALL @plotTypes 659 655 … … 663 659 system ("rm *.png"); 664 660 if (Common::amInteractiv ) { 665 # 661 # system ("evince $inputDir/$pdf_name"); 666 662 } 667 663 } # ----- next logfile ----- … … 688 684 689 685 OPTIONS: 690 -p, --plotTypes ALL or NEU (default)691 -l, --logFiles comma separated list of BNC's PPP logfiles692 -s, --sampling sampling interval in seconds for the logfile data (default: 1); for a daily logfile <30> seconds should be usefull693 -h, --help show help contents686 -p, --plotTypes ALL or NEU (default) 687 -l, --logFiles comma separated list of BNC's PPP logfiles 688 -s, --sampling sampling interval in seconds for the logfile data (default: 1); for a daily logfile <30> seconds should be usefull 689 -h, --help show help contents 694 690 695 691 EXAMPLES:
Note:
See TracChangeset
for help on using the changeset viewer.