Changeset 10757 in ntrip for trunk/BNC/src/bncrinex.cpp


Ignore:
Timestamp:
Sep 17, 2025, 4:12:45 PM (3 months ago)
Author:
stuerze
Message:

minor changes regarding RINEX OBS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncrinex.cpp

    r10532 r10757  
    571571    for (unsigned ii = 0; ii < satObs._obs.size(); ii++) {
    572572      const t_frqObs* frqObs = satObs._obs[ii];
     573      // CODE
    573574      if (frqObs->_codeValid) {
    574575        QString type = 'C' + QString(frqObs->_rnxType2ch.c_str());
    575         t_rnxObsFile::t_rnxObs rnxObs;
    576         rnxObs.value = frqObs->_code;
    577         rnxSat.obs[type] = rnxObs;
    578       }
     576        if (rnxSat.obs.contains(type)) {
     577          t_rnxObsFile::t_rnxObs rnxObs;
     578          rnxObs.value = frqObs->_code;
     579          rnxSat.obs[type] = rnxObs;
     580        }
     581      }
     582      // PHASE
    579583      if (frqObs->_phaseValid) {
    580584        QString type = 'L' + QString(frqObs->_rnxType2ch.c_str());
    581         t_rnxObsFile::t_rnxObs rnxObs;
    582         rnxObs.value = frqObs->_phase;
    583         if (frqObs->_slip) {
    584           rnxObs.lli |= 1;
     585        if (rnxSat.obs.contains(type)) {
     586          t_rnxObsFile::t_rnxObs rnxObs;
     587          rnxObs.value = frqObs->_phase;
     588          if (frqObs->_slip) {
     589            rnxObs.lli |= 1;
     590          }
     591          rnxSat.obs[type] = rnxObs;
    585592        }
    586         rnxSat.obs[type] = rnxObs;
    587       }
     593      }
     594      // DOPPLER
    588595      if (frqObs->_dopplerValid) {
    589596        QString type = 'D' + QString(frqObs->_rnxType2ch.c_str());
    590         t_rnxObsFile::t_rnxObs rnxObs;
    591         rnxObs.value = frqObs->_doppler;
    592         rnxSat.obs[type] = rnxObs;
    593       }
     597        if (rnxSat.obs.contains(type)) {
     598          t_rnxObsFile::t_rnxObs rnxObs;
     599          rnxObs.value = frqObs->_doppler;
     600          rnxSat.obs[type] = rnxObs;
     601        }
     602      }
     603      // SNR
    594604      if (frqObs->_snrValid) {
    595605        QString type = 'S' + QString(frqObs->_rnxType2ch.c_str());
    596         t_rnxObsFile::t_rnxObs rnxObs;
    597         rnxObs.value = frqObs->_snr;
    598         rnxSat.obs[type] = rnxObs;
    599       }
    600     }
    601 
     606        if (rnxSat.obs.contains(type)) {
     607          t_rnxObsFile::t_rnxObs rnxObs;
     608          rnxObs.value = frqObs->_snr;
     609          rnxSat.obs[type] = rnxObs;
     610        }
     611      }
     612    }
    602613
    603614    rnxEpo.rnxSat.push_back(rnxSat);
     
    618629void bncRinex::closeFile() {
    619630
    620   if (_header.version() == 3) {
     631  if (_header.version() >= 3) {
    621632    _out << ">                              4  1" << endl;
    622633    _out << "END OF FILE" << endl;
Note: See TracChangeset for help on using the changeset viewer.