Changeset 4781 in ntrip for trunk


Ignore:
Timestamp:
Oct 26, 2012, 7:30:49 PM (12 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/RTRover/bncrtrover.cpp

    r4780 r4781  
    241241////////////////////////////////////////////////////////////////////////////
    242242void copyObs(const t_obs& obsBnc, rtrover_satObs& satObs) {
     243
    243244  bncTime obsTime(obsBnc.GPSWeek, obsBnc.GPSWeeks);
    244245  satObs._satellite._system = obsBnc.satSys;
     
    247248  satObs._time._sec  = obsTime.daysec();
    248249  satObs._slotNumber = obsBnc.slotNum;
     250
    249251  QMap<QByteArray, rtrover_obs> allObs;
    250252  for (int iEntry = 0; iEntry < GNSSENTRY_NUMBER; ++iEntry) {
     
    253255      if (rnxStr.length() == 3) {
    254256        QByteArray codeType = rnxStr.mid(1);
    255         if (!allObs.contains(codeType)) {
    256           rtrover_initObs(&allObs[codeType]);
    257           allObs[codeType]._rnxType[0]  = codeType[0];
    258           allObs[codeType]._rnxType[1]  = codeType[1];
    259         }
     257
     258        bool existed = allObs.contains(codeType);
    260259        rtrover_obs& currObs = allObs[codeType];
     260        if (!existed) {
     261          rtrover_initObs(&currObs);
     262          currObs._rnxType[0] = codeType[0];
     263          currObs._rnxType[1] = codeType[1];
     264        }
     265
    261266        if      (rnxStr[0] == 'C') {
    262267          currObs._code         = obsBnc._measdata[iEntry];
     
    290295    }
    291296  }
     297  satObs._numObs = allObs.size();
     298  satObs._obs    = new rtrover_obs[satObs._numObs];
     299  int iObs = 1;
     300  QMapIterator<QByteArray, rtrover_obs> it(allObs);
     301  while (it.hasNext()) {
     302    it.next();
     303    ++iObs;
     304    satObs._obs[iObs] = it.value();
     305  }
    292306}
    293307
Note: See TracChangeset for help on using the changeset viewer.