Changeset 6137 in ntrip for trunk/BNC/src/pppRun.cpp


Ignore:
Timestamp:
Sep 13, 2014, 12:19:37 PM (10 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

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

    r6046 r6137  
    9090    }
    9191
    92     connect(BNC_CORE->caster(), SIGNAL(newObs(QByteArray, QList<t_obs>)),
    93             this, SLOT(slotNewObs(QByteArray, QList<t_obs>)),conType);
     92    connect(BNC_CORE->caster(), SIGNAL(newObs(QByteArray, QList<t_satObs>)),
     93            this, SLOT(slotNewObs(QByteArray, QList<t_satObs>)),conType);
    9494
    9595    connect(BNC_CORE, SIGNAL(newEphGPS(gpsephemeris)),
     
    186186//
    187187////////////////////////////////////////////////////////////////////////////
    188 void t_pppRun::slotNewObs(QByteArray staID, QList<t_obs> obsList) {
     188void t_pppRun::slotNewObs(QByteArray staID, QList<t_satObs> obsList) {
    189189  QMutexLocker locker(&_mutex);
    190190
     
    195195  // Loop over all obsevations (possible different epochs)
    196196  // -----------------------------------------------------
    197   QListIterator<t_obs> it(obsList);
     197  QListIterator<t_satObs> it(obsList);
    198198  while (it.hasNext()) {
    199     const t_obs& oldObs = it.next();
    200     t_satObs* newObs = new t_satObs;
    201    
    202     newObs->_prn.set(oldObs.satSys, oldObs.satNum);
    203     newObs->_time.set(oldObs.GPSWeek, oldObs.GPSWeeks);
     199    const t_satObs& oldObs = it.next();
     200    t_satObs*       newObs = new t_satObs(oldObs);
    204201
    205202    // Find the corresponding data epoch or create a new one
     
    221218    }
    222219
    223     // Fill the new observation and add it to the corresponding epoch
    224     // --------------------------------------------------------------
     220    // Put data into the epoch
     221    // -----------------------
    225222    if (epoch != 0) {
    226223      epoch->_satObs.push_back(newObs);
    227       map<string, t_frqObs*> frqObsMap;
    228       for (unsigned iEntry = 0; iEntry < GNSSENTRY_NUMBER; iEntry++) {
    229         string hlp = oldObs.rnxStr(iEntry).toAscii().data();
    230         if (hlp.length() >= 2 && oldObs._measdata[iEntry] != 0.0) {
    231           char   obsType    = hlp[0];
    232           string rnxType2ch = hlp.substr(1);
    233           if (obsType == 'C' || obsType == 'L') {
    234             t_frqObs* frqObs = 0;
    235             if (frqObsMap.find(rnxType2ch) == frqObsMap.end()) {
    236               frqObs                = new t_frqObs();
    237               frqObsMap[rnxType2ch] = frqObs;
    238               frqObs->_rnxType2ch   = rnxType2ch;
    239               newObs->_obs.push_back(frqObs);
    240             }
    241             else {
    242               frqObs = frqObsMap[rnxType2ch];
    243             }
    244             if      (obsType == 'C') {
    245               frqObs->_code      = oldObs._measdata[iEntry];
    246               frqObs->_codeValid = true;
    247             }
    248             else if (obsType == 'L') {
    249               frqObs->_phase      = oldObs._measdata[iEntry];
    250               frqObs->_phaseValid = true;
    251             }
    252           }
    253         }
    254       }
     224    }
     225    else {
     226      delete newObs;
    255227    }
    256228  }
     
    477449    // Create list of observations and start epoch processing
    478450    // ------------------------------------------------------
    479     QList<t_obs> obsList;
     451    QList<t_satObs> obsList;
    480452    for (unsigned iObs = 0; iObs < epo->rnxSat.size(); iObs++) {
    481453      const t_rnxObsFile::t_rnxSat& rnxSat = epo->rnxSat[iObs];
    482454   
    483       t_obs obs;
     455      t_satObs obs;
    484456      t_rnxObsFile::setObsFromRnx(_rnxObsFile, epo, rnxSat, obs);
    485457      obsList << obs;
Note: See TracChangeset for help on using the changeset viewer.