Changeset 10806 in ntrip for trunk/BNC/scripts/pppPlot.pl
- Timestamp:
- Feb 4, 2026, 8:42:15 AM (6 days ago)
- File:
-
- 1 edited
-
trunk/BNC/scripts/pppPlot.pl (modified) (29 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/scripts/pppPlot.pl
r10798 r10806 106 106 # Read logfile 107 107 # ----------------------------------------------------------------------------- 108 my ( $station, $file ) = Bnc::parsePPPLogfile( $file, $sampling ); 109 my $EPOCH = $file->{'EPOCH'}; 110 my $N = $file->{'N'}; 111 my $E = $file->{'E'}; 112 my $U = $file->{'U'}; 113 my $ISFIX = $file->{'ISFIX'}; 114 my $NUMFIX = $file->{'NUMFIX'}; 115 my %RECCLK = %{ $file->{'RECCLK'} }; 116 my %AMB = %{ $file->{'AMB'} }; 117 my %RES = %{ $file->{'RES'} }; 118 my %ELE = %{ $file->{'ELE'} }; 119 my %ION = %{ $file->{'ION'} }; 120 my %BIA = %{ $file->{'BIA'} }; 108 my ( $dateStr, $station, $ssrData, $file ) = Bnc::parsePPPLogfile( $file, $sampling ); 109 print "TEST: $ssrData\n"; 110 # PPP # 111 my $EPOCH_PPP = $file->{'EPOCH_PPP'}; 112 my $N = $file->{'N'}; 113 my $E = $file->{'E'}; 114 my $U = $file->{'U'}; 115 my $ISFIX = $file->{'ISFIX'}; 116 my $NUMFIX = $file->{'NUMFIX'}; 117 my %RECCLK = %{ $file->{'RECCLK'} }; 118 my %AMB = %{ $file->{'AMB'} }; 119 my %RES = %{ $file->{'RES'} }; 120 my %ELE = %{ $file->{'ELE'} }; 121 my %ION = %{ $file->{'ION'} }; 122 my %BIA = %{ $file->{'BIA'} }; 123 124 # SSR # 125 my $EPOCH_SSR = $file->{'EPOCH_SSR'}; 126 my %CLKCORR = %{ $file->{'CLKCORR'} }; 127 my %YAW_SSR = %{ $file->{'YAW_SSR'} }; 128 my %YAW_DEF = %{ $file->{'YAW_DEF'} }; 129 my %CODEBIAS = %{ $file->{'CODEBIAS'} }; 130 my %PHASEBIAS = %{ $file->{'PHASEBIAS'} }; 131 my %JUMPCOUNT = %{ $file->{'JUMPCOUNT'}}; 121 132 122 133 # ----------------------------------------------------------------------------- … … 140 151 $str_rms_u = sprintf( " %.2f ", $rms_u ); 141 152 $str_rms_trp = sprintf( " %.2f ", $rms_trp ); 142 DEBUG("RMS: North: $str_rms_n, East: $str_rms_e, Up: $str_rms_u, TRP: $str_rms_trp"); 153 DEBUG( 154 "RMS: North: $str_rms_n, East: $str_rms_e, Up: $str_rms_u, TRP: $str_rms_trp" 155 ); 143 156 144 157 # ----------------------------------------------------------------------------- … … 146 159 # ----------------------------------------------------------------------------- 147 160 my $dataset; 148 $page = $pdf->page();149 $page->mediabox('A4');150 $headline = sprintf( "PPP results for station %s", $station );151 $headline_text = $page->text;152 $headline_text->font( $font1, 11 / pt );153 $headline_text->translate( 15 / mm, 280 / mm );154 $headline_text->text($headline);155 $y = $y0;156 157 161 ######### NEU ##################### 158 DEBUG "Plot NEU"; 159 my $pngNameNEU = sprintf( "%s_NEU.png", $station ); 160 my $chartNEU = newChart($station); 161 $chartNEU->set( 162 output => $pngNameNEU, 163 ylabel => "Displacements [m]", 164 yrange => [ " -0.5 ", " 0.5 " ], 165 ); 166 my $dataN = Chart::Gnuplot::DataSet->new( 167 xdata => $EPOCH, 168 ydata => $N, 169 title => "Displacements N, RMS + -$str_rms_n m", 170 timefmt => '%s', 171 style => "dots", 172 ); 173 my $dataE = Chart::Gnuplot::DataSet->new( 174 xdata => $EPOCH, 175 ydata => $E, 176 title => "Displacements E, RMS + -$str_rms_e m", 177 timefmt => '%s', 178 style => "dots", 179 ); 180 my $dataU = Chart::Gnuplot::DataSet->new( 181 xdata => $EPOCH, 182 ydata => $U, 183 title => "Displacements U, RMS + -$str_rms_u m", 184 timefmt => '%s', 185 style => "dots", 186 ); 187 188 my @datasets = ( $dataN, $dataE, $dataU ); 189 $chartNEU->plot2d(@datasets); 190 191 $png = $page->gfx(); 192 LOGDIE("could not find image file: $!\n") unless -e $pngNameNEU; 193 $png->image( $pdf->image_png($pngNameNEU), $x, $y, $width, $height ); 194 162 if ( grep ( $_ eq "PPP", @plotTypes ) ) { 163 $page = $pdf->page(); 164 $page->mediabox('A4'); 165 $headline = sprintf( "PPP results for station %s", $station ); 166 $headline_text = $page->text; 167 $headline_text->font( $font1, 11 / pt ); 168 $headline_text->translate( 15 / mm, 280 / mm ); 169 $headline_text->text($headline); 170 $y = $y0; 171 DEBUG "Plot NEU "; 172 my $pngNameNEU = sprintf( "%s_NEU.png", $station ); 173 my $chartNEU = newChart("$station ($dateStr)"); 174 $chartNEU->set( 175 output => $pngNameNEU, 176 ylabel => "Displacements [m]", 177 yrange => [ " -0.5 ", " 0.5 " ], 178 ); 179 my $dataN = Chart::Gnuplot::DataSet->new( 180 xdata => $EPOCH_PPP, 181 ydata => $N, 182 title => "Displacements N, RMS + -$str_rms_n m", 183 timefmt => '%s', 184 style => "dots", 185 ); 186 my $dataE = Chart::Gnuplot::DataSet->new( 187 xdata => $EPOCH_PPP, 188 ydata => $E, 189 title => "Displacements E, RMS + -$str_rms_e m", 190 timefmt => '%s', 191 style => "dots", 192 ); 193 my $dataU = Chart::Gnuplot::DataSet->new( 194 xdata => $EPOCH_PPP, 195 ydata => $U, 196 title => "Displacements U, RMS + -$str_rms_u m", 197 timefmt => '%s', 198 style => "dots", 199 ); 200 my @datasets = ( $dataN, $dataE, $dataU ); 201 $chartNEU->plot2d(@datasets); 202 $png = $page->gfx(); 203 LOGDIE("could not find image file: $!\n") unless -e $pngNameNEU; 204 $png->image( $pdf->image_png($pngNameNEU), $x, $y, $width, $height ); 205 } 195 206 ######### FIX ##################### 196 if ( grep ( $_ eq " ALL", @plotTypes ) ) {207 if ( grep ( $_ eq "PPP", @plotTypes ) ) { 197 208 DEBUG "Plot FIX"; 198 209 my $pngNameFIX = sprintf( "%s_FIX.png", $station ); 199 my $chartFIX = newChart( $station);210 my $chartFIX = newChart("$station ($dateStr)"); 200 211 $chartFIX->set( 201 212 output => $pngNameFIX, … … 204 215 ytics => 20, 205 216 ); 206 207 217 my $dataNUMFIX = Chart::Gnuplot::DataSet->new( 208 xdata => $EPOCH, 218 xdata => $EPOCH_PPP, 209 219 ydata => $NUMFIX, 210 220 timefmt => '%s', … … 212 222 color => "green", 213 223 ); 214 215 224 $chartFIX->plot2d($dataNUMFIX); 216 225 $y = $y - $dy; … … 225 234 } 226 235 ######### TRP ##################### 227 if ( grep ( $_ eq " ALL", @plotTypes ) ) {236 if ( grep ( $_ eq "PPP", @plotTypes ) ) { 228 237 DEBUG "Plot TRP"; 229 238 my $pngNameTRP = sprintf( "%s_TRP.png", $station ); 230 my $chartTRP = newChart( $station);239 my $chartTRP = newChart("$station ($dateStr)"); 231 240 $chartTRP->set( output => $pngNameTRP ); 232 241 $chartTRP->set( 233 242 ylabel => "Tropospheric Delay [m]", 234 yrange => [ " 1.0 ", " 3.0 " ] 243 yrange => [ " 1.0 ", " 3.0 " ], 235 244 ); 236 245 my $dataTRP = Chart::Gnuplot::DataSet->new( 237 xdata => $EPOCH, 246 xdata => $EPOCH_PPP, 238 247 ydata => $file->{'TRP'}, 239 248 title => "Tropospheric Delay, RMS + -$str_rms_trp m", … … 252 261 LOGDIE("could not find image file: $!\n") unless -e $pngNameTRP; 253 262 $png->image( $pdf->image_png($pngNameTRP), $x, $y, $width, $height ); 254 255 ######### RECCLK ##################### 263 } 264 ######### RECCLK ##################### 265 if ( grep ( $_ eq "PPP", @plotTypes ) ) { 256 266 DEBUG "Plot Receiver Clocks"; 257 267 $page = $pdf->page(); … … 263 273 $headline_text->translate( 15 / mm, 280 / mm ); 264 274 $headline_text->text($headline); 265 266 my $chartRECCLK = newChart($station); 267 $chartRECCLK->set( legend => { position => "outside right" } ); 275 my $chartRECCLK = newChart("$station ($dateStr)"); 276 $chartRECCLK->set( 277 legend => { position => "outside right" } , 278 ); 268 279 my @datasets = (); # init datasets 269 280 my $pngNameRECCLK = sprintf( "%s_RECCLK.png", $station ); 270 281 $chartRECCLK->set( output => $pngNameRECCLK ); 271 282 $chartRECCLK->set( ylabel => "Receiver Clocks [m]" ); 272 273 283 # SYSTEM 274 284 foreach my $key_sys ( sort keys %RECCLK ) { 275 276 285 $dataset = Chart::Gnuplot::DataSet->new( 277 xdata => \@{ $RECCLK{$key_sys}{EPOCH } },# array of epochs286 xdata => \@{ $RECCLK{$key_sys}{EPOCH_PPP} }, # array of epochs 278 287 ydata => \@{ $RECCLK{$key_sys}{DATA} } 279 288 , # array of elevations of one satellite … … 285 294 } 286 295 $chartRECCLK->plot2d(@datasets); 287 288 # system ("display $pngName&");289 296 $y = $y - $dy; 290 297 if ( $y < 30 / mm ) { … … 296 303 die("could not find image file: $!") unless -e $pngNameRECCLK; 297 304 $png->image( $pdf->image_png($pngNameRECCLK), $x, $y, $width, $height ); 298 299 ######### ELE ##################### 305 } 306 ######### ELE ##################### 307 if ( grep ( $_ eq "PPP", @plotTypes ) ) { 300 308 DEBUG "Plot Elevations"; 301 309 $page = $pdf->page(); … … 307 315 $headline_text->translate( 15 / mm, 280 / mm ); 308 316 $headline_text->text($headline); 309 310 my$chartELE= newChart($station);311 $chartELE->set(legend => { position => "outside right" });312 317 my $chartELE = newChart("$station ($dateStr)"); 318 $chartELE->set( 319 legend => { position => "outside right" }, 320 ); 313 321 # SYSTEM #print Dumper \%ELE; 314 322 foreach my $key_sys ( sort keys %ELE ) { 315 316 323 # print "$key_sys \n";# print Dumper $ELE{$key_sys}; 317 324 my @datasets = (); # init datasets … … 322 329 yrange => [ " 0.0 ", " 90.0 " ] 323 330 ); 324 325 331 # SATELLITE 326 foreach my $key_sat ( sort keys %{ $ELE{$key_sys} } ) { 327 328 # print "$key_sat = $ELE{$key_sys}{$key_sat} \n"; 332 foreach my $key_sat ( sort keys %{ $ELE{$key_sys} } ) { # print "$key_sat = $ELE{$key_sys}{$key_sat} \n"; 329 333 $dataset = Chart::Gnuplot::DataSet->new( 330 xdata => \@{ $ELE{$key_sys}{$key_sat}{EPOCH} } 334 xdata => \@{ $ELE{$key_sys}{$key_sat}{EPOCH_PPP} } 331 335 , # array of epochs 332 336 ydata => \@{ $ELE{$key_sys}{$key_sat}{DATA} } … … 339 343 } 340 344 $chartELE->plot2d(@datasets); 341 342 # system ("display $pngName&");343 345 $y = $y - $dy; 344 346 if ( $y < 30 / mm ) { … … 352 354 $height ); 353 355 } 354 355 ######### AMB ##################### 356 } 357 ######### AMB ##################### 358 if ( grep ( $_ eq "PPP", @plotTypes ) ) { 356 359 DEBUG "Plot Ambiguities"; 357 360 $page = $pdf->page(); … … 363 366 $headline_text->translate( 15 / mm, 280 / mm ); 364 367 $headline_text->text($headline); 365 366 368 # AMBIGUITY_TYPE #print Dumper \%AMB; 367 foreach my $key_ambType (%AMB) { #print "$key_ambType \n";369 foreach my $key_ambType (%AMB) { 368 370 foreach my $key_sys ( sort keys %{ $AMB{$key_ambType} } ) { 369 370 #print "$key_sys \n"; print Dumper $AMB{$key_ambType};371 371 my ( @datasets_amb, @datasets_epo ); # init datasets 372 my $pngNameAMB = sprintf( "%s_AMB_%s_%s.png", 373 $station, $key_ambType, $key_sys ); 374 my $pngNameEPO = sprintf( "%s_EPO_%s_%s.png", 375 $station, $key_ambType, $key_sys ); 372 my $pngNameAMB = sprintf( "%s_AMB_%s_%s.png", $station, $key_ambType, $key_sys ); 373 my $pngNameEPO = sprintf( "%s_EPO_%s_%s.png", $station, $key_ambType, $key_sys ); 376 374 my $chartAMB = Chart::Gnuplot->new( 377 375 output => $pngNameAMB, … … 379 377 title => $station, 380 378 ylabel => "Ambiguities $key_ambType [m]", 381 382 # yrange => [" 0.0 ", " 90.0 "],383 xlabel => "Time [h]",384 379 timeaxis => 'x', 385 380 xtics => { labelfmt => '%H:%M', rotate => '-270', }, … … 392 387 title => $station, 393 388 ylabel => "Number of Epochs $key_ambType [-]", 394 395 # yrange => [" 0.0 ", " 90.0 "],396 xlabel => "Time [h]",397 389 timeaxis => 'x', 398 390 xtics => { labelfmt => '%H:%M', rotate => '-270', }, … … 400 392 grid => 'on', 401 393 ); 402 403 394 # SATELLITE 404 foreach 405 my $key_sat ( sort keys %{ $AMB{$key_ambType}{$key_sys} } ) 406 { 407 408 #print "$key_sat = $AMB{$key_ambType}{$key_sys}{$key_sat} \n"; 409 # ambiguities 395 foreach my $key_sat ( sort keys %{ $AMB{$key_ambType}{$key_sys} } ){ 396 # ambiguities 410 397 my $dataset_amb = Chart::Gnuplot::DataSet->new( 411 xdata => $AMB{$key_ambType}{$key_sys}{$key_sat}{EPOCH} 412 , # array of epochs 413 ydata => $AMB{$key_ambType}{$key_sys}{$key_sat}{DATA} 414 , # array of ambiguities of one satellite 398 xdata => $AMB{$key_ambType}{$key_sys}{$key_sat}{EPOCH_PPP} , # array of epochs 399 ydata => $AMB{$key_ambType}{$key_sys}{$key_sat}{DATA} , # array of ambiguities of one satellite 415 400 title => "$key_sat", 416 401 timefmt => '%s', … … 418 403 ); 419 404 push( @datasets_amb, $dataset_amb ); 420 421 405 # number of epochs used for ambiguity 422 406 my $dataset_epo = Chart::Gnuplot::DataSet->new( 423 xdata => $AMB{$key_ambType}{$key_sys}{$key_sat}{EPOCH} 424 , # array of epochs 425 ydata => $AMB{$key_ambType}{$key_sys}{$key_sat}{NUMEPO} 426 , # array of ambiguities of one satellite 407 xdata => $AMB{$key_ambType}{$key_sys}{$key_sat}{EPOCH_PPP} , # array of epochs 408 ydata => $AMB{$key_ambType}{$key_sys}{$key_sat}{NUMEPO} , # array of ambiguities of one satellite 427 409 title => "$key_sat", 428 410 timefmt => '%s', … … 431 413 push( @datasets_epo, $dataset_epo ); 432 414 } 433 434 415 # ambiguities 435 416 $chartAMB->plot2d(@datasets_amb); 436 437 # system ("display $pngName_amb&");438 417 $y = $y - $dy; 439 418 if ( $y < 30 / mm ) { … … 443 422 } 444 423 $png = $page->gfx(); 445 LOGDIE("could not find image file: $!\n") unless -e $pngNameAMB; 446 $png->image( $pdf->image_png($pngNameAMB), 447 $x, $y, $width, $height ); 448 424 LOGDIE("could not find image file: $!\n") 425 unless -e $pngNameAMB; 426 $png->image( $pdf->image_png($pngNameAMB), $x, $y, $width, $height ); 449 427 # number of epochs used for ambiguity 450 428 $chartEPO->plot2d(@datasets_epo); 451 452 # system ("display $pngName_epo&");453 429 $y = $y - $dy; 454 430 if ( $y < 30 / mm ) { … … 464 440 } 465 441 } 466 467 ######### ION ##################### 468 if ( grep ( $_ eq "ALL", @plotTypes ) ) { 469 DEBUG "Plot ION"; 470 $page = $pdf->page(); 471 $page->mediabox('A4'); 472 $y = $y0 + $dy; 473 $headline = sprintf( "Ionosphere Delay for station %s", $station ); 474 $headline_text = $page->text; 475 $headline_text->font( $font1, 11 / pt ); 476 $headline_text->translate( 15 / mm, 280 / mm ); 477 $headline_text->text($headline); 478 479 my $chartION = newChart($station); 480 $chartION->set( ylabel => "Ionophere Delay [m]" ); 481 $chartION->set( legend => { position => "outside right" } ); 482 483 # SYSTEM 484 foreach my $ksys ( sort keys %ION ) 485 { #print "$key_sys \n"; #print Dumper $ION{$key_sys}; 442 } 443 ######### ION ##################### 444 if ( grep ( $_ eq "PPP", @plotTypes ) ) { 445 DEBUG "Plot ION"; 446 $page = $pdf->page(); 447 $page->mediabox('A4'); 448 $y = $y0 + $dy; 449 $headline = sprintf( "Ionosphere Delay for station %s", $station ); 450 $headline_text = $page->text; 451 $headline_text->font( $font1, 11 / pt ); 452 $headline_text->translate( 15 / mm, 280 / mm ); 453 $headline_text->text($headline); 454 my $chartION = newChart("$station ($dateStr)"); 455 $chartION->set( ylabel => "Ionophere Delay [m]" ); 456 $chartION->set( legend => { position => "outside right" } ); 457 # SYSTEM 458 foreach my $ksys ( sort keys %ION ) { 459 my @datasets; # init datasets 460 my $pngNameION = sprintf( "%s_ION_%s.png", $station, $ksys ); 461 $chartION->set( output => $pngNameION ); 462 # SATELLITE 463 foreach my $sat ( sort keys %{ $ION{$ksys} } ) { 464 my $dataset = Chart::Gnuplot::DataSet->new( 465 xdata => $ION{$ksys}{$sat}{EPOCH_PPP}, # array of epochs 466 ydata => $ION{$ksys}{$sat}{DATA} 467 , # array of ionvations of one satellite 468 title => "$sat", 469 timefmt => '%s', 470 style => "dots", 471 ); 472 push( @datasets, $dataset ); 473 } 474 $chartION->plot2d(@datasets); #system ("display $pngName&"); 475 $y = $y - $dy; 476 if ( $y < 30 / mm ) { 477 $page = $pdf->page(); 478 $page->mediabox('A4'); 479 $y = $y0; 480 } 481 $png = $page->gfx(); 482 die("could not find image file: $!") unless -e $pngNameION; 483 $png->image( $pdf->image_png($pngNameION), $x, $y, $width, 484 $height ); 485 } 486 } 487 ######### BIAS ##################### 488 if ( grep ( $_ eq "PPP", @plotTypes ) ) { 489 DEBUG "Plot BIAS"; 490 $page = $pdf->page(); 491 $page->mediabox('A4'); 492 $y = $y0 + $dy; 493 $headline = sprintf( "Receiver Biases for station %s", $station ); 494 $headline_text = $page->text; 495 $headline_text->font( $font1, 11 / pt ); 496 $headline_text->translate( 15 / mm, 280 / mm ); 497 $headline_text->text($headline); 498 my $chartBIAS = newChart("$station ($dateStr)"); 499 $chartBIAS->set( legend => { position => "outside right" } ); 500 501 # BIAS_TYPE #print Dumper \%BIA; 502 foreach my $key_biasType ( sort keys %BIA ) { #print "key_biasType: $key_biasType \n"; 503 foreach my $key_sys ( sort keys %{ $BIA{$key_biasType} } ) { #print "key_sys: $key_sys \n"; #print Dumper $BIA{$key_biasType}; 486 504 my @datasets; # init datasets 487 my $pngNameION = sprintf( "%s_ION_%s.png", $station, $ksys ); 488 $chartION->set( output => $pngNameION ); 489 490 # SATELLITE 491 foreach my $sat ( sort keys %{ $ION{$ksys} } ) 492 { #print "$key_sat = $ION{$key_sys}{$key_sat} \n"; 493 my $dataset = Chart::Gnuplot::DataSet->new( 494 xdata => $ION{$ksys}{$sat}{EPOCH}, # array of epochs 495 ydata => $ION{$ksys}{$sat}{DATA} 496 , # array of ionvations of one satellite 497 title => "$sat", 498 timefmt => '%s', 499 style => "dots", 500 ); 501 push( @datasets, $dataset ); 502 } 503 504 $chartION->plot2d(@datasets); #system ("display $pngName&"); 505 my $pngNameBIA = sprintf( "%s_BIAS_%s_%s.png", 506 $station, $key_biasType, $key_sys ); 507 $chartBIAS->set( output => $pngNameBIA ); 508 $chartBIAS->set( ylabel => "Receiver Bias $key_biasType [m]" ); 509 510 my $dataset = Chart::Gnuplot::DataSet->new( 511 xdata => $BIA{$key_biasType}{$key_sys}{EPOCH_PPP}, 512 ydata => $BIA{$key_biasType}{$key_sys}{DATA}, 513 title => "$key_sys", 514 timefmt => '%s', 515 style => "dots", 516 ); 517 push( @datasets, $dataset ); 518 519 $chartBIAS->plot2d(@datasets); 505 520 $y = $y - $dy; 506 521 if ( $y < 30 / mm ) { … … 510 525 } 511 526 $png = $page->gfx(); 512 die("could not find image file: $!") unless -e $pngNameION; 513 $png->image( $pdf->image_png($pngNameION), 514 $x, $y, $width, $height ); 515 } 516 } 517 518 ######### BIAS ##################### 519 if ( grep ( $_ eq "ALL", @plotTypes ) ) { 520 DEBUG "Plot BIAS"; 521 $page = $pdf->page(); 522 $page->mediabox('A4'); 523 $y = $y0 + $dy; 524 $headline = sprintf( "Receiver Biases for station %s", $station ); 525 $headline_text = $page->text; 526 $headline_text->font( $font1, 11 / pt ); 527 $headline_text->translate( 15 / mm, 280 / mm ); 528 $headline_text->text($headline); 529 530 my $chartBIAS = newChart($station); 531 $chartBIAS->set( legend => { position => "outside right" } ); 532 533 # BIAS_TYPE #print Dumper \%BIA; 534 foreach my $key_biasType ( sort keys %BIA ) 535 { #print "key_biasType: $key_biasType \n"; 536 foreach my $key_sys ( sort keys %{ $BIA{$key_biasType} } ) { 537 538 #print "key_sys: $key_sys \n"; #print Dumper $BIA{$key_biasType}; 539 my @datasets; # init datasets 540 my $pngNameBIA = sprintf( "%s_BIAS_%s_%s.png", 541 $station, $key_biasType, $key_sys ); 542 $chartBIAS->set( output => $pngNameBIA ); 543 $chartBIAS->set( 544 ylabel => "Receiver Bias $key_biasType [m]" ); 545 546 my $dataset = Chart::Gnuplot::DataSet->new( 547 xdata => $BIA{$key_biasType}{$key_sys}{EPOCH}, 548 ydata => $BIA{$key_biasType}{$key_sys}{DATA}, 549 title => "$key_sys", 550 timefmt => '%s', 551 style => "dots", 552 ); 553 push( @datasets, $dataset ); 554 555 $chartBIAS->plot2d(@datasets); 556 $y = $y - $dy; 557 if ( $y < 30 / mm ) { 558 $page = $pdf->page(); 559 $page->mediabox('A4'); 560 $y = $y0; 561 } 562 $png = $page->gfx(); 563 die("could not find image file: $!") unless -e $pngNameBIA; 564 $png->image( $pdf->image_png($pngNameBIA), 565 $x, $y, $width, $height ); 566 } 567 } 568 } 569 570 ######### RES ##################### 527 die("could not find image file: $!") unless -e $pngNameBIA; 528 $png->image( $pdf->image_png($pngNameBIA), $x, $y, $width, $height ); 529 } 530 } 531 } 532 ######### RES ##################### 533 if ( grep ( $_ eq "PPP", @plotTypes ) ) { 571 534 DEBUG "Plot Residuals"; 572 535 $page = $pdf->page(); … … 578 541 $headline_text->translate( 15 / mm, 280 / mm ); 579 542 $headline_text->text($headline); 580 581 my $chartRES = newChart($station); 543 my $chartRES = newChart("$station ($dateStr)"); 582 544 $chartRES->set( legend => { position => "outside right" } ); 583 584 545 # RESIDUAL_TYPE #print Dumper \%RES; 585 foreach my $key_resType ( sort keys %RES ) 586 { #print "key_resType: $key_resType \n"; 587 #SYSTEM 588 foreach my $key_sys ( sort keys %{ $RES{$key_resType} } ) { 589 590 #print "key_sys: $key_sys \n"; #print Dumper $RES{$key_resType}; 546 foreach my $key_resType ( sort keys %RES ){ #print "key_resType: $key_resType \n"; 547 #SYSTEM 548 foreach my $key_sys ( sort keys %{ $RES{$key_resType} } ) { #print "key_sys: $key_sys \n"; #print Dumper $RES{$key_resType}; 591 549 my @datasets; 592 my $pngNameRES = sprintf( "%s_RES_%s_%s.png", 593 $station, $key_resType, $key_sys ); 550 my $pngNameRES = sprintf( "%s_RES_%s_%s.png", $station, $key_resType, $key_sys ); 594 551 $chartRES->set( output => $pngNameRES ); 595 $chartRES->set( ylabel => "Residuals $key_resType [m]" ); 596 552 $chartRES->set(ylabel => "Residuals $key_resType [m]" ); 597 553 if ( $key_resType =~ /^c/ ) { 598 554 $chartRES->set( yrange => [ " -6.0 ", " 6.0 " ] ); … … 601 557 $chartRES->set( yrange => [ " -0.06 ", " 0.06 " ] ); 602 558 } 603 604 559 elsif ( $key_resType =~ /^GIM/ ) { 605 560 $chartRES->set( yrange => [ " -6.0 ", " 6.0 " ] ); 606 561 } 607 608 562 # SATELLITE 609 foreach 610 my $key_sat ( sort keys %{ $RES{$key_resType}{$key_sys} } ) 611 { 612 613 #print "$key_sat = $RES{$key_resType}{$key_sys}{$key_sat} \n"; 563 foreach my $key_sat ( sort keys %{ $RES{$key_resType}{$key_sys} } ) { #print "$key_sat = $RES{$key_resType}{$key_sys}{$key_sat} \n"; 614 564 $dataset = Chart::Gnuplot::DataSet->new( 615 xdata => $RES{$key_resType}{$key_sys}{$key_sat}{EPOCH} 616 , # array of epochs 565 xdata => $RES{$key_resType}{$key_sys}{$key_sat}{EPOCH_PPP}, # array of epochs 617 566 ydata => $RES{$key_resType}{$key_sys}{$key_sat}{DATA} 618 567 , # array of residuals of one satellite … … 631 580 } 632 581 $png = $page->gfx(); 633 LOGDIE("could not find image file: $!\n") unless -e $pngNameRES; 634 $png->image( $pdf->image_png($pngNameRES), 635 $x, $y, $width, $height ); 636 } 637 } 638 } # end if ALL @plotTypes 639 640 $pdf->save(); 641 $pdf->end(); 642 643 system("rm *.png"); 644 if (Common::amInteractiv) { 645 system("evince $inputDir/$pdf_name"); 646 } 582 LOGDIE("could not find image file: $!\n") 583 unless -e $pngNameRES; 584 $png->image( $pdf->image_png($pngNameRES), $x, $y, $width, $height ); 585 } 586 } 587 } 588 ######### CLKCORR ##################### 589 if ( grep ( $_ eq "SSR", @plotTypes ) ) { 590 DEBUG "Plot CLKCORR"; 591 $page = $pdf->page(); 592 $page->mediabox('A4'); 593 $y = $y0 + $dy; 594 $headline = sprintf( "Clock Corrections from %s", $ssrData ); 595 $headline_text = $page->text; 596 $headline_text->font( $font1, 11 / pt ); 597 $headline_text->translate( 15 / mm, 280 / mm ); 598 $headline_text->text($headline); 599 my $chartCLKCORR = newChart("$station ($dateStr)"); 600 $chartCLKCORR->set( ylabel => "Clock Corrections [m]" ); 601 $chartCLKCORR->set( legend => { position => "outside right" } ); 602 # SYSTEM 603 foreach my $ksys ( sort keys %CLKCORR ) { #print "$key_sys \n"; #print Dumper $CLKCORR{$key_sys}; 604 my @datasets; 605 my $pngNameCLKCORR = sprintf( "%s_CLKCORR_%s.png", $station, $ksys ); 606 $chartCLKCORR->set( output => $pngNameCLKCORR ); 607 # SATELLITE 608 foreach my $sat ( sort keys %{ $CLKCORR{$ksys} } ) { #print "$key_sat = $CLKCORR{$key_sys}{$key_sat} \n"; 609 my $dataset = Chart::Gnuplot::DataSet->new( 610 xdata => $CLKCORR{$ksys}{$sat}{EPOCH_SSR}, # array of epochs 611 ydata => $CLKCORR{$ksys}{$sat}{DATA}, # array of ionvations of one satellite 612 title => "$sat", 613 timefmt => '%s', 614 style => "dots", 615 ); 616 push( @datasets, $dataset ); 617 } 618 $chartCLKCORR->plot2d(@datasets); #system ("display $pngName&"); 619 $y = $y - $dy; 620 if ( $y < 30 / mm ) { 621 $page = $pdf->page(); 622 $page->mediabox('A4'); 623 $y = $y0; 624 } 625 $png = $page->gfx(); 626 die("could not find image file: $!") unless -e $pngNameCLKCORR; 627 $png->image( $pdf->image_png($pngNameCLKCORR), 628 $x, $y, $width, $height ); 629 } 630 } 631 ######### YAW ANGLE ##################### 632 if ( grep ( $_ eq "SSR", @plotTypes ) ) { 633 DEBUG "Plot YAW"; 634 $page = $pdf->page(); 635 $page->mediabox('A4'); 636 $y = $y0 + $dy; 637 $headline = 638 sprintf( "Yaw angle from %s versus Standard Model", $ssrData ); 639 $headline_text = $page->text; 640 $headline_text->font( $font1, 11 / pt ); 641 $headline_text->translate( 15 / mm, 280 / mm ); 642 $headline_text->text($headline); 643 # SATELLITE 644 foreach my $sat ( sort keys %YAW_SSR ) { 645 my @datasets; 646 my $chartYAW = newChart("Yaw Angle Satellite $sat ($dateStr)"); 647 $chartYAW->set( ylabel => "Yaw Angle [°]" ); 648 #$chartYAW->set( legend => { position => "outside right" } ); 649 my $pngNameYAW = sprintf( "%s_YAW_%s.png", $station, $sat ); 650 $chartYAW->set( output => $pngNameYAW ); 651 # YAW from SSR data 652 my $datasetYAW_SSR = Chart::Gnuplot::DataSet->new( 653 xdata => $YAW_SSR{$sat}{EPOCH_SSR}, # array of epochs 654 ydata => $YAW_SSR{$sat}{DATA} , # array of ionvations of one satellite 655 title => $ssrData, 656 timefmt => '%s', 657 style => "line", 658 ); 659 push( @datasets, $datasetYAW_SSR ); 660 # YAW from standard model 661 my $datasetYAW_DEF = Chart::Gnuplot::DataSet->new( 662 xdata => $YAW_DEF{$sat}{EPOCH_SSR}, # array of epochs 663 ydata => $YAW_DEF{$sat}{DATA} , # array of ionvations of one satellite 664 title => "Standard Model", 665 timefmt => '%s', 666 style => "line", 667 ); 668 push( @datasets, $datasetYAW_DEF ); 669 $chartYAW->plot2d(@datasets); 670 $y = $y - $dy; 671 if ( $y < 30 / mm ) { 672 $page = $pdf->page(); 673 $page->mediabox('A4'); 674 $y = $y0; 675 } 676 $png = $page->gfx(); 677 die("could not find image file: $!") unless -e $pngNameYAW; 678 $png->image( $pdf->image_png($pngNameYAW), $x, $y, $width, $height ); 679 } 680 } 681 ######### CODE BIASES ##################### 682 if ( grep ( $_ eq "SSR", @plotTypes ) ) { 683 DEBUG "Plot Code Biases"; 684 $page = $pdf->page(); 685 $page->mediabox('A4'); 686 $y = $y0 + $dy; 687 $headline = sprintf( "Code Biases from %s ", $ssrData ); 688 $headline_text = $page->text; 689 $headline_text->font( $font1, 11 / pt ); 690 $headline_text->translate( 15 / mm, 280 / mm ); 691 $headline_text->text($headline); 692 my $chartCB = newChart("$ssrData ($dateStr)"); 693 $chartCB->set( legend => { position => "outside right" } ); 694 foreach my $key_type ( sort keys %CODEBIAS ) { 695 #SYSTEM 696 foreach my $key_sys ( sort keys %{ $CODEBIAS{$key_type} } ) { 697 my @datasets; 698 my $pngNameCB = sprintf( "%s_CB_%s_%s.png", $station, $key_type, $key_sys ); 699 $chartCB->set( output => $pngNameCB ); 700 $chartCB->set( ylabel => "Code Biases $key_type [m]" ); 701 # SATELLITE 702 foreach my $key_sat ( sort keys %{ $CODEBIAS{$key_type}{$key_sys} } ) { 703 $dataset = Chart::Gnuplot::DataSet->new( 704 xdata => $CODEBIAS{$key_type}{$key_sys}{$key_sat}{EPOCH_SSR}, # array of epochs 705 ydata => $CODEBIAS{$key_type}{$key_sys}{$key_sat}{DATA} , # array of residuals of one satellite 706 title => "$key_sat", 707 timefmt => '%s', 708 style => "dots", 709 ); 710 push( @datasets, $dataset ); 711 } 712 $chartCB->plot2d(@datasets); 713 $y = $y - $dy; 714 if ( $y < 30 / mm ) { 715 $page = $pdf->page(); 716 $page->mediabox('A4'); 717 $y = $y0; 718 } 719 $png = $page->gfx(); 720 LOGDIE("could not find image file: $!\n") 721 unless -e $pngNameCB; 722 $png->image( $pdf->image_png($pngNameCB),$x, $y, $width, $height ); 723 } 724 } 725 } 726 ######### PHASE BIASES ##################### 727 if ( grep ( $_ eq "SSR", @plotTypes ) ) { 728 DEBUG "Plot Phase Biases"; 729 $page = $pdf->page(); 730 $page->mediabox('A4'); 731 $y = $y0 + $dy; 732 $headline = sprintf( "Phase Biases from %s ", $ssrData ); 733 $headline_text = $page->text; 734 $headline_text->font( $font1, 11 / pt ); 735 $headline_text->translate( 15 / mm, 280 / mm ); 736 $headline_text->text($headline); 737 foreach my $key_type ( sort keys %PHASEBIAS ) { 738 #SYSTEM 739 foreach my $key_sys ( sort keys %{ $PHASEBIAS{$key_type} } ) { 740 my (@datasetsPB, $datasetPB); 741 my (@datasetsJC, $datasetJC); 742 my $pngNamePB = sprintf( "%s_PB_%s_%s.png", $station, $key_type, $key_sys ); 743 my $pngNameJC = sprintf( "%s_JC_%s_%s.png", $station, $key_type, $key_sys ); 744 my $chartPB = newChart("$ssrData ($dateStr)"); 745 $chartPB->set( legend => { position => "outside right" } ); 746 $chartPB->set( output => $pngNamePB ); 747 $chartPB->set( ylabel => "Phase Biases $key_type [m]" ); 748 my $chartJC = newChart("$ssrData ($dateStr)"); 749 $chartJC->set( legend => { position => "outside right" } ); 750 $chartJC->set( output => $pngNameJC ); 751 $chartJC->set( ylabel => "Counter Value $key_type " ); 752 # SATELLITE 753 foreach my $key_sat ( sort keys %{ $PHASEBIAS{$key_type}{$key_sys} } ) { 754 $datasetPB = Chart::Gnuplot::DataSet->new( 755 xdata => $PHASEBIAS{$key_type}{$key_sys}{$key_sat}{EPOCH_SSR}, # array of epochs 756 ydata => $PHASEBIAS{$key_type}{$key_sys}{$key_sat}{DATA}, # array of residuals of one satellite 757 title => "$key_sat", 758 timefmt => '%s', 759 style => "linespoints", 760 ); 761 push( @datasetsPB, $datasetPB ); 762 $datasetJC = Chart::Gnuplot::DataSet->new( 763 xdata => $JUMPCOUNT{$key_type}{$key_sys}{$key_sat}{EPOCH_SSR}, # array of epochs 764 ydata => $JUMPCOUNT{$key_type}{$key_sys}{$key_sat}{DATA}, # array of residuals of one satellite 765 title => "$key_sat", 766 timefmt => '%s', 767 style => "linespoints", 768 ); 769 push( @datasetsJC, $datasetJC ); 770 } 771 #phase biases 772 $chartPB->plot2d(@datasetsPB); 773 $y = $y - $dy; 774 if ( $y < 30 / mm ) { 775 $page = $pdf->page(); 776 $page->mediabox('A4'); 777 $y = $y0; 778 } 779 $png = $page->gfx(); 780 LOGDIE("could not find image file: $!\n") 781 unless -e $pngNamePB; 782 $png->image( $pdf->image_png($pngNamePB),$x, $y, $width, $height ); 783 #jump counter 784 $chartJC->plot2d(@datasetsJC); 785 $y = $y - $dy; 786 if ( $y < 30 / mm ) { 787 $page = $pdf->page(); 788 $page->mediabox('A4'); 789 $y = $y0; 790 } 791 $png = $page->gfx(); 792 LOGDIE("could not find image file: $!\n") 793 unless -e $pngNameJC; 794 $png->image( $pdf->image_png($pngNameJC),$x, $y, $width, $height ); 795 } 796 } 797 } 798 799 $pdf->save(); 800 $pdf->end(); 801 802 system("rm *.png"); 803 if (Common::amInteractiv) { 804 system("evince $inputDir/$pdf_name"); 805 } 806 647 807 } # ----- next logfile ----- 648 808 … … 653 813 terminal => 'png', 654 814 title => $title, 655 xlabel => "Time [h]",656 815 timeaxis => 'x', 816 xlabel => "Time [h]", 657 817 xtics => { labelfmt => '%H:%M', rotate => '-270' }, 818 #xtics => { labelfmt => '%H:%M\n%m-%d', rotate => '-270'}, 658 819 grid => 'on', 659 820 ); … … 668 829 669 830 OPTIONS: 670 -p, --plotTypes ALL or NEU (default)831 -p, --plotTypes PPP or SSR (requires PPP files in debug mode) 671 832 -l, --logFiles comma separated list of BNC's PPP logfiles 672 833 -s, --sampling sampling interval in seconds for the logfile data (default: 1); for a daily logfile <30> seconds should be usefull … … 674 835 675 836 EXAMPLES: 676 $prog --plotTypes ALL-s 30 -l /path/to/FFMJ186730.ppp837 $prog --plotTypes PPP -s 30 -l /path/to/FFMJ186730.ppp 677 838 678 839 2021 andrea.stuerze\@bkg.bund.de
Note:
See TracChangeset
for help on using the changeset viewer.
