Changeset 9088 in ntrip


Ignore:
Timestamp:
Sep 2, 2020, 10:42:48 PM (4 years ago)
Author:
stuerze
Message:

adjusted allocation of slip and LTI according to the respective RTCM version

Location:
trunk/BNC/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/pppFilter.cpp

    r9084 r9088  
    441441
    442442        if (_slips[obs->prn()]._obsSlipCounter != -1 &&
    443             _slips[obs->prn()]._obsSlipCounter > obs->slipCounter()) {
     443            _slips[obs->prn()]._obsSlipCounter != obs->slipCounter()) {
    444444          LOG << epoTimeStr  << "cycle slip set (obsSlipCounter) " << obs->prn().toString()  << endl;
    445445          slip = true;
  • trunk/BNC/src/RTCM/RTCM2Decoder.cpp

    r8234 r9088  
    154154          frqObs1P->_phaseValid = true;
    155155          frqObs1P->_phase = _ObsBlock.resolvedPhase_L1(iSat);
    156           //frqObs1P->_slipCounter = _ObsBlock.slip_L1[iSat];
    157           frqObs1P->_slipCounter = -1; // because RTCM2 definition is vice versa to RTCM3
     156          frqObs1P->_slipCounter = _ObsBlock.slip_L1[iSat];
    158157          obs._obs.push_back(frqObs1P);
    159158
     
    164163          frqObs2P->_phaseValid = true;
    165164          frqObs2P->_phase = _ObsBlock.resolvedPhase_L2(iSat);
    166           //frqObs2P->_slipCounter = _ObsBlock.slip_L2[iSat];
    167           frqObs2P->_slipCounter = -1; // because RTCM2 definition is vice versa to RTCM3
     165          frqObs2P->_slipCounter = _ObsBlock.slip_L2[iSat];
    168166          obs._obs.push_back(frqObs2P);
    169167
  • trunk/BNC/src/RTCM3/RTCM3Decoder.cpp

    r9048 r9088  
    148148      frqObs->_codeValid = frqObs->_phaseValid = true;
    149149    }
    150     GETBITS(i, 7);
    151     frqObs->_lockTime = lti2sec(type,i);
     150    GETBITS(frqObs->_lockTimeIndicator, 7);
     151    frqObs->_lockTime = lti2sec(type, frqObs->_lockTimeIndicator);
    152152    frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0 && frqObs->_phaseValid);
    153     frqObs->_slipCounter = i;
    154153    if (type == 1002 || type == 1004) {
    155154      GETBITS(amb, 8);
     
    194193        frqObs->_phaseValid = true;
    195194      }
    196       GETBITS(i, 7);
    197       frqObs->_lockTime = lti2sec(type,i);
     195      GETBITS(frqObs->_lockTimeIndicator, 7);
     196      frqObs->_lockTime = lti2sec(type, frqObs->_lockTimeIndicator);
    198197      frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0 && frqObs->_phaseValid);
    199       frqObs->_slipCounter = i;
    200198      if (type == 1004) {
    201199        GETBITS(i, 8);
     
    768766                  frqObs->_lockTime = lti2sec(type,ll[count]);
    769767                  frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0);
    770                   frqObs->_slipCounter = ll[count];
     768                  frqObs->_lockTimeIndicator = ll[count];
    771769                }
    772770                break;
     
    783781                  frqObs->_lockTime = lti2sec(type,ll[count]);
    784782                  frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0);
    785                   frqObs->_slipCounter = ll[count];
     783                  frqObs->_lockTimeIndicator = ll[count];
    786784                }
    787785                break;
     
    798796                  frqObs->_lockTime = lti2sec(type,ll[count]);
    799797                  frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0);
    800                   frqObs->_slipCounter = ll[count];
     798                  frqObs->_lockTimeIndicator = ll[count];
    801799                }
    802800                frqObs->_snr = cnr[count];
     
    815813                  frqObs->_lockTime = lti2sec(type,ll[count]);
    816814                  frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0);
    817                   frqObs->_slipCounter = ll[count];
     815                  frqObs->_lockTimeIndicator = ll[count];
    818816                }
    819817                frqObs->_snr = cnr[count];
     
    836834                  frqObs->_lockTime = lti2sec(type,ll[count]);
    837835                  frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0);
    838                   frqObs->_slipCounter = ll[count];
     836                  frqObs->_lockTimeIndicator = ll[count];
    839837                }
    840838
     
    854852                  frqObs->_lockTime = lti2sec(type,ll[count]);
    855853                  frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0);
    856                   frqObs->_slipCounter = ll[count];
     854                  frqObs->_lockTimeIndicator = ll[count];
    857855                }
    858856
     
    938936    if ((i & ((1 << 20) - 1)) != 0x80000) {
    939937      frqObs->_code = l1range * 0.02;
    940       frqObs->_phase = (l1range * 0.02 + i * 0.0005)
    941           / GLO_WAVELENGTH_L1(freq - 7);
     938      frqObs->_phase = (l1range * 0.02 + i * 0.0005) / GLO_WAVELENGTH_L1(freq - 7);
    942939      frqObs->_codeValid = frqObs->_phaseValid = true;
    943940    }
    944     GETBITS(i, 7);
    945     frqObs->_lockTime = lti2sec(type,i);
     941    GETBITS(frqObs->_lockTimeIndicator, 7);
     942    frqObs->_lockTime = lti2sec(type, frqObs->_lockTimeIndicator);
    946943    frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0 && frqObs->_phaseValid);
    947     frqObs->_slipCounter = i;
    948944    if (type == 1010 || type == 1012) {
    949945      GETBITS(amb, 7);
     
    988984        frqObs->_phaseValid = true;
    989985      }
    990       GETBITS(i, 7);
    991       frqObs->_lockTime = lti2sec(type,i);
     986      GETBITS(frqObs->_lockTimeIndicator, 7);
     987      frqObs->_lockTime = lti2sec(type, frqObs->_lockTimeIndicator);
    992988      frqObs->_lockTimeValid = (frqObs->_lockTime >= 0.0 && frqObs->_phaseValid);
    993       frqObs->_slipCounter = i;
    994989      if (type == 1012) {
    995990        GETBITS(i, 8);
  • trunk/BNC/src/bnccaster.cpp

    r9020 r9088  
    178178    // Update/Set Slip Counters
    179179    // ------------------------
    180     //setSlipCounters(obs);
     180    setSlipCounters(obs);
    181181
    182182    // Output into the socket
  • trunk/BNC/src/bncrinex.cpp

    r8936 r9088  
    648648          << right << setw(14) << setprecision(3) << frqObs->_phase << ' '
    649649          << right << setw(4)                     << frqObs->_slipCounter;
     650          //<< right << setw(4)                     << frqObs->_lockTimeIndicator;
    650651    }
    651652    if (frqObs->_dopplerValid) {
  • trunk/BNC/src/bncutils.cpp

    r8903 r9088  
    10031003}
    10041004
    1005 // Convert RTCM3 lock-time indicator to lock time in seconds
     1005// Convert RTCM3 lock-time indicator to minimum lock time in seconds
    10061006////////////////////////////////////////////////////////////////////////////
    10071007double lti2sec(int type, int lti) {
     
    10171017    else if (lti< 127) return  32*lti-3096; // [744  32  905]
    10181018    else if (lti==127) return  937;
    1019     else               return  -1;
     1019    else               return  -1.0;
    10201020  }
    10211021  else if (type%10==2 || type%10==3 ||
     
    10381038      case(14) : return 262144e-3;
    10391039      case(15) : return 524288e-3;
    1040       default  : return     -1;
     1040      default  : return     -1.0;
    10411041    };
    10421042  }
     
    10651065    else if (lti< 704) return (1048576*lti-671088640 )*1e-3;
    10661066    else if (lti==704) return (2097152*lti-1409286144)*1e-3;
    1067     else               return (     -1               );
     1067    else               return (     -1.0               );
    10681068  }
    10691069  else {
    1070     return -1;
     1070    return -1.0;
    10711071  };
    10721072};
  • trunk/BNC/src/satObs.h

    r8617 r9088  
    1515 public:
    1616  t_frqObs() {
    17     _code            = 0.0;
    18     _codeValid       = false;
    19     _phase           = 0.0;
    20     _phaseValid      = false;
    21     _doppler         = 0.0;
    22     _dopplerValid    = false;
    23     _snr             = 0.0;
    24     _snrValid        = false;
    25     _lockTime        = 0.0;
    26     _lockTimeValid   = false;   
    27     _slip            = false;
    28     _slipCounter     = 0;
    29     _biasJumpCounter = 0;
     17    _code              = 0.0;
     18    _codeValid         = false;
     19    _phase             = 0.0;
     20    _phaseValid        = false;
     21    _doppler           = 0.0;
     22    _dopplerValid      = false;
     23    _snr               = 0.0;
     24    _snrValid          = false;
     25    _lockTime          = -1.0;
     26    _lockTimeValid     = false;
     27    _slip              = false;
     28    _slipCounter       =  0;
     29    _biasJumpCounter   =  0;
     30    _lockTimeIndicator = -1;
    3031  }
    3132  std::string       _rnxType2ch;
     
    3940  bool              _snrValid;
    4041  double            _lockTime;
    41   bool              _lockTimeValid;   
    42   bool              _slip;
    43   int               _slipCounter;
    44   int               _biasJumpCounter;
     42  bool              _lockTimeValid;
     43  bool              _slip;              // RINEX
     44  int               _slipCounter;       // RTCM2 or converted from RTCM3
     45  int               _lockTimeIndicator; // RTCM3
     46  int               _biasJumpCounter;   // ??
    4547};
    4648
Note: See TracChangeset for help on using the changeset viewer.