Changeset 10090 in ntrip


Ignore:
Timestamp:
Jun 15, 2023, 3:42:03 PM (11 months ago)
Author:
wiese
Message:

sync

File:
1 edited

Legend:

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

    r10034 r10090  
    7171# Parse Message-Types with repetition rate from a BNC/scanRTCM logfile
    7272#
    73 # Param  : $logfile     [required] Path to the BNC-logfile.
     73# Param  : $logfile     [required] Path of the BNC/scanRTCM logfile
    7474#          $caAbbr      [optional] caster name or abbreviation
     75#          $tmpPath     [optional] write working files to this path
    7576#
    7677# Return : Message-types for each mountpoint (as Hash-Ref)
     
    304305            my @mpts_def = ();
    305306            foreach (@mpts) {
     307
    306308                #  user:passwd@igs-ip.net:2101/ASPA0 RTCM_3.0 ASM -14.33 189.28 no 1
    307309                if ( $_ =~
     
    491493    my $epochSec     = 0;
    492494    my $epochDiff    = 0;
    493     my (
    494          @hlp,    @EPOCHs,   @N,        @E,       @U,
    495          %SATNUM, @TRPs,
    496          @CLKs,   @OFF_GLOs, @OFF_GALs, @OFF_BDSs,
    497     );
     495    my ( @hlp, @EPOCHs, @N, @E, @U, %SATNUM, @TRPs, @CLKs, @OFF_GLOs, @OFF_GALs, @OFF_BDSs, );
    498496    my ( @EPOCHs_CLK, @EPOCHs_OFF_GLO, @EPOCHs_OFF_GAL, @EPOCHs_OFF_BDS );
    499     my ( %AMB,          %RES,          %ELE, %ION, %BIA );
    500     my ( $station,      $lki,          $sys, $sat, $amb );
     497    my ( %AMB,        %RES,            %ELE,            %ION, %BIA );
     498    my ( $station,    $lki,            $sys,            $sat, $amb );
    501499    open ( my $fh, "<", $file ) || LOGDIE "Could not open file $file: $!\n";
    502500
     
    515513            # PPP of Epoch 2015-08-27_14:00:15.000
    516514            if ( $ln =~ /PPP of Epoch (\d{4}-\d{2}-\d{2}_\d{2}:\d{2}:\d{2})\.\d+/ ) {
    517                 $epo       = $1;              #print "$epo\n";
     515                $epo = $1;    #print "$epo\n";
    518516            }
    519517            else { ERROR "strange line: \"$ln\""; next }
     
    535533            $old_epochSec = $epochSec;
    536534
    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
     535#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
    538536            $station = $hlp[1];
    539537
     
    547545        }
    548546        elsif ( ( $ln =~ /\bAMB\b/ ) && ( $ln !~ /RESET/ ) ) {
    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];
     547
     548            # 2015-08... AMB lIF G04 253.0000 -8.9924 +- 1.7825 el = 22.03 epo = 86
     549            $lki = $hlp[2];
     550            $sat = $hlp[3];
     551            $sys = substr ( $sat, 0, 1 );
     552            $amb = $hlp[4] + $hlp[5];
     553            push @{ $AMB{$lki}{$sys}{$sat}{EPOCH} },  $epochSec;
     554            push @{ $AMB{$lki}{$sys}{$sat}{DATA} },   $amb;
     555            push @{ $AMB{$lki}{$sys}{$sat}{NUMEPO} }, $hlp[13];
     556            push @{ $ELE{$sys}{$sat}{EPOCH} }, $epochSec;
     557            push @{ $ELE{$sys}{$sat}{DATA} },  $hlp[10];
    559558        }
    560559        elsif ( $ln =~ /\bRES\b/ && $ln !~ /Neglected/ ) {
     560
    561561            # 2015-08... RES lIF G30  -0.0076
    562562            $sat = $hlp[3];
     
    588588            push ( @CLKs,       $hlp[2] + $hlp[3] );
    589589        }
    590         elsif ( $ln =~ /\bOFF_GLO\b/ ) {                # 2015-08... OFF_GLO 52.6806 -3.8042 +- 9.0077
     590        elsif ( $ln =~ /\bOFF_GLO\b/ ) {    # 2015-08... OFF_GLO 52.6806 -3.8042 +- 9.0077
    591591            push ( @EPOCHs_OFF_GLO, $epochSec );
    592592            push ( @OFF_GLOs,       $hlp[2] + $hlp[3] );
    593593        }
    594         elsif ( $ln =~ /\bOFF_GAL\b/ ) {                # 2015-08... OFF_GAL 52.6806 -3.8042 +- 9.0077
     594        elsif ( $ln =~ /\bOFF_GAL\b/ ) {    # 2015-08... OFF_GAL 52.6806 -3.8042 +- 9.0077
    595595            push ( @EPOCHs_OFF_GAL, $epochSec );
    596596            push ( @OFF_GALs,       $hlp[2] + $hlp[3] );
    597597        }
    598         elsif ( $ln =~ /\bOFF_BDS\b/ ) {                # 2015-08... OFF_BDS 52.6806 -3.8042 +- 9.0077
     598        elsif ( $ln =~ /\bOFF_BDS\b/ ) {    # 2015-08... OFF_BDS 52.6806 -3.8042 +- 9.0077
    599599            push ( @EPOCHs_OFF_BDS, $epochSec );
    600600            push ( @OFF_BDSs,       $hlp[2] + $hlp[3] );
    601601        }
    602         elsif ( $ln =~ /\bSATNUM\b/ ) {                 # 2015-09... SATNUM G  8
     602        elsif ( $ln =~ /\bSATNUM\b/ ) {     # 2015-09... SATNUM G  8
    603603            push ( @{ $SATNUM{ $hlp[2] } }, $hlp[3] );
    604604        }
    605         elsif ( $ln =~ /\bTRP\b/ ) {                    # 2015-08... TRP  2.3803 +0.1009 +- 0.0324
     605        elsif ( $ln =~ /\bTRP\b/ ) {        # 2015-08... TRP  2.3803 +0.1009 +- 0.0324
    606606            push ( @TRPs, $hlp[2] + $hlp[3] );
    607607        }
     
    612612
    613613    my $nof_epochs = scalar @EPOCHs;
    614     DEBUG(   "epochs:$nof_epochs, North displac.: "
     614    DEBUG(   "$station: epochs:$nof_epochs, North displac.: "
    615615           . scalar @N
    616616           . ", East displac.: "
     
    620620           . ", TRPs:"
    621621           . scalar @TRPs );
    622     if ( $nof_epochs != scalar @N )                                { LOGDIE "number of epochs and residuals not equal\n" }
    623     if ( $nof_epochs != scalar @TRPs )                             { LOGDIE "number of epochs and TRPs not equal\n" }
    624     if ( @CLKs && scalar @EPOCHs_CLK != scalar @CLKs )             { LOGDIE "number of epochs and CLKs not equal\n" }
    625     if ( @OFF_GLOs && scalar @EPOCHs_OFF_GLO != scalar @OFF_GLOs ) { LOGDIE "number of epochs and OFF_GLOs not equal\n" }
    626     if ( @OFF_GALs && scalar @EPOCHs_OFF_GAL != scalar @OFF_GALs ) { LOGDIE "number of epochs and OFF_GALs not equal\n" }
    627     if ( @OFF_BDSs && scalar @EPOCHs_OFF_BDS != scalar @OFF_BDSs ) { LOGDIE "number of epochs and OFF_BDSs not equal\n" }
    628 
     622    if ( $nof_epochs != scalar @N )                    { LOGDIE "number of epochs and residuals not equal\n" }
     623    if ( $nof_epochs != scalar @TRPs )                 { LOGDIE "number of epochs and TRPs not equal\n" }
     624    if ( @CLKs && scalar @EPOCHs_CLK != scalar @CLKs ) { LOGDIE "number of epochs and CLKs not equal\n" }
     625
     626    if ( @OFF_GLOs && scalar @EPOCHs_OFF_GLO != scalar @OFF_GLOs ) {
     627        LOGDIE "number of epochs and OFF_GLOs not equal\n";
     628    }
     629    if ( @OFF_GALs && scalar @EPOCHs_OFF_GAL != scalar @OFF_GALs ) {
     630        LOGDIE "number of epochs and OFF_GALs not equal\n";
     631    }
     632    if ( @OFF_BDSs && scalar @EPOCHs_OFF_BDS != scalar @OFF_BDSs ) {
     633        LOGDIE "number of epochs and OFF_BDSs not equal\n";
     634    }
     635    if ( !$station ) { WARN "could not grep stationname from file: $file\n" }
    629636
    630637    my %data = (
    631                  EPOCHS    => \@EPOCHs,
    632                  N         => \@N,
    633                  E         => \@E,
    634                  U         => \@U,
    635                  SATNUM    => \%SATNUM,
    636                  TRPs      => \@TRPs,
    637                  CLKs    => \@CLKs,
    638                  OFF_GLOs  => \@OFF_GLOs,
    639                  OFF_GALs  => \@OFF_GALs,
    640                  OFF_BDSs  => \@OFF_BDSs,
    641                  RES       => \%RES,
    642                  AMB       => \%AMB,
    643                  ELE       => \%ELE,
    644                  ION       => \%ION,
    645                  BIA       => \%BIA,
     638                 EPOCHS     => \@EPOCHs,
     639                 N          => \@N,
     640                 E          => \@E,
     641                 U          => \@U,
     642                 SATNUM     => \%SATNUM,
     643                 TRPs       => \@TRPs,
     644                 CLKs       => \@CLKs,
     645                 CLK_EPOCHS => \@EPOCHs_CLK,
     646                 OFF_GLOs   => \@OFF_GLOs,
     647                 OFF_GALs   => \@OFF_GALs,
     648                 OFF_BDSs   => \@OFF_BDSs,
     649                 RES        => \%RES,
     650                 AMB        => \%AMB,
     651                 ELE        => \%ELE,
     652                 ION        => \%ION,
     653                 BIA        => \%BIA,
    646654    );
    647655
Note: See TracChangeset for help on using the changeset viewer.