Changeset 2919 in ntrip for trunk/BNC/combination


Ignore:
Timestamp:
Jan 27, 2011, 5:56:05 PM (14 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/combination
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/combination/bnccomb.cpp

    r2918 r2919  
    9393
    9494  if (newEpoch->corr.find(newCorr->prn) != newEpoch->corr.end()) {
    95     delete newEpoch->corr[newCorr->prn];     
     95    newEpoch->corr[newCorr->prn]->readLine(line); // merge (multiple messages)
    9696  }
    97   newEpoch->corr[newCorr->prn] = newCorr;
     97  else {
     98    newEpoch->corr[newCorr->prn] = newCorr;
     99  }
    98100
    99101  processEpochsBefore(newCorr->tt);
     
    104106void bncComb::processEpochsBefore(const bncTime& time) {
    105107
    106   const double waitTime = 10.0; // wait 10 seconds
     108  const double waitTime = 20.0; // wait 10 seconds
     109
     110  bool corrProcessed = false;
    107111
    108112  QMapIterator<QString, cmbAC*> itAC(_ACs);
     
    122126          itCorr.next();
    123127          t_corr* corr = itCorr.value();
    124           cout << AC->name.toAscii().data() << " "
    125                << AC->mountPoint.toAscii().data() << " "
    126                << corr->prn.toAscii().data() << " "
    127                << corr->tt.datestr() << " " << corr->tt.timestr() << " "
    128                << corr->iod << " " << corr->dClk << endl;
     128          processSingleCorr(AC, corr);
     129          corrProcessed = true;
    129130        }
    130131      }
     
    136137    }
    137138  }
     139
     140  if (corrProcessed) {
     141    printResults();
     142  }
    138143}
     144
     145//
     146////////////////////////////////////////////////////////////////////////////
     147void bncComb::processSingleCorr(const cmbAC* AC, const t_corr* corr) {
     148  cout << AC->name.toAscii().data() << " "
     149       << AC->mountPoint.toAscii().data() << " "
     150       << corr->prn.toAscii().data() << " "
     151       << corr->tt.datestr() << " " << corr->tt.timestr() << " "
     152       << corr->iod << " " << corr->dClk << endl;
     153}
     154
     155//
     156////////////////////////////////////////////////////////////////////////////
     157void bncComb::printResults() const {
     158
     159  cout << "Corrections processed" << endl << endl;
     160
     161}
  • trunk/BNC/combination/bnccomb.h

    r2918 r2919  
    4949
    5050  void processEpochsBefore(const bncTime& time);
     51  void processSingleCorr(const cmbAC* AC, const t_corr* corr);
     52  void printResults() const;
    5153
    5254  QMap<QString, cmbAC*> _ACs;   // Analytical Centers (key is mountpoint)
Note: See TracChangeset for help on using the changeset viewer.