Changeset 8023 in ntrip for trunk


Ignore:
Timestamp:
Aug 24, 2016, 6:24:23 PM (8 years ago)
Author:
stuerze
Message:

bug is fixed in RTCM2Decoder: a real check of observations validity is added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/RTCM/RTCM2Decoder.cpp

    r7874 r8023  
    144144          t_frqObs* frqObs1C = new t_frqObs;
    145145          frqObs1C->_rnxType2ch = "1C";
    146           frqObs1C->_codeValid = true;
    147146          frqObs1C->_code = _ObsBlock.rng_C1[iSat];
     147          if (frqObs1C->_code) {
     148            frqObs1C->_codeValid = true;
     149          }
     150          else {
     151            frqObs1C->_codeValid = false;
     152          }
    148153          obs._obs.push_back(frqObs1C);
    149154
    150155          t_frqObs* frqObs1P = new t_frqObs;
    151156          frqObs1P->_rnxType2ch = (sys == 'G') ? "1W" : "1P";
    152           frqObs1P->_codeValid = true;
    153157          frqObs1P->_code = _ObsBlock.rng_P1[iSat];
    154           frqObs1P->_phaseValid = true;
     158          if (frqObs1P->_code) {
     159            frqObs1P->_codeValid = true;
     160          }
     161          else {
     162            frqObs1P->_codeValid = false;
     163          }
    155164          frqObs1P->_phase = _ObsBlock.resolvedPhase_L1(iSat);
     165          if (frqObs1P->_phase) {
     166            frqObs1P->_phaseValid = true;
     167          }
     168          else {
     169            frqObs1P->_phaseValid = false;
     170          }
    156171          //frqObs1P->_slipCounter = _ObsBlock.slip_L1[iSat];
    157172          frqObs1P->_slipCounter = -1; // because RTCM2 definition is vice versa to RTCM3
     
    160175          t_frqObs* frqObs2P = new t_frqObs;
    161176          frqObs2P->_rnxType2ch = (sys == 'G') ? "2W" : "2P";
    162           frqObs2P->_codeValid = true;
    163177          frqObs2P->_code = _ObsBlock.rng_P2[iSat];
    164           frqObs2P->_phaseValid = true;
     178          if (frqObs2P->_code) {
     179            frqObs2P->_codeValid = true;
     180          }
     181          else {
     182            frqObs2P->_codeValid = false;
     183          }
    165184          frqObs2P->_phase = _ObsBlock.resolvedPhase_L2(iSat);
     185          if (frqObs2P->_phase) {
     186            frqObs2P->_phaseValid = true;
     187          }
     188          else {
     189            frqObs2P->_phaseValid = false;
     190          }
    166191          //frqObs2P->_slipCounter = _ObsBlock.slip_L2[iSat];
    167192          frqObs2P->_slipCounter = -1; // because RTCM2 definition is vice versa to RTCM3
     
    173198      }
    174199    }
    175 
    176200    else if (_PP.ID() == 20 || _PP.ID() == 21) {
    177201      _msg2021.extract(_PP);
Note: See TracChangeset for help on using the changeset viewer.