Changeset 4675 in ntrip for trunk/BNC/src/rinex/reqcanalyze.cpp


Ignore:
Timestamp:
Sep 9, 2012, 10:48:39 AM (12 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/rinex/reqcanalyze.cpp

    r4674 r4675  
    221221  // --------------------
    222222  try {
     223    unsigned iEpo = 0;
    223224    while ( (_currEpo = obsFile->nextEpoch()) != 0) {
    224225 
     
    238239 
    239240        _allObsMap[prn].addObs(obs);
     241
     242        prepareObsStat(iEpo, obsFile->interval());
    240243      }
    241244 
     
    260263
    261264  QMutableMapIterator<QString, t_allObs> it(_allObsMap);
    262   bool firstPrn = true;
    263265  while (it.hasNext()) {
    264266    it.next();
    265267    QString    prn     = it.key();
    266268    preparePlotData(prn, xyz, obsFile->interval(),
    267                     dataMP1, dataMP2, dataSNR1, dataSNR2, firstPrn);
    268     firstPrn = false;
     269                    dataMP1, dataMP2, dataSNR1, dataSNR2);
    269270  }
    270271
     
    379380// 
    380381////////////////////////////////////////////////////////////////////////////
     382void t_reqcAnalyze::prepareObsStat(unsigned iEpo, double obsInterval) {
     383  const int numEpo = int(600.0 / obsInterval); // # epochs in one chunk (10 min)
     384  if (iEpo % numEpo == 0) {
     385    _obsStat._mjdX24 << _currEpo->tt.mjddec() * 24.0;
     386    _obsStat._numSat << _currEpo->rnxSat.size();
     387  }
     388}
     389
     390// 
     391////////////////////////////////////////////////////////////////////////////
    381392void t_reqcAnalyze::preparePlotData(const QString& prn, const ColumnVector& xyz,
    382393                                    double obsInterval,
     
    384395                                    QVector<t_polarPoint*>* dataMP2,
    385396                                    QVector<t_polarPoint*>* dataSNR1,
    386                                     QVector<t_polarPoint*>* dataSNR2,
    387                                     bool firstPrn) {
     397                                    QVector<t_polarPoint*>* dataSNR2) {
    388398
    389399  const int chunkStep = int( 30.0 / obsInterval); // chunk step (30 sec) 
     
    391401
    392402  t_allObs& allObs = _allObsMap[prn];
    393 
    394   if (firstPrn) {
    395     _obsStat.reset();
    396   }
    397403
    398404  // Loop over all Chunks of Data
     
    401407       chunkStart += chunkStep) {
    402408
    403     // Chunk-Speicific Variables
    404     // -------------------------
     409    // Chunk-Specific Variables
     410    // ------------------------
    405411    bncTime currTime;
    406412    bncTime prevTime;
    407413    bncTime chunkStartTime;
     414    double  mjdX24  = 0.0;
    408415    bool    availL1 = false;
    409416    bool    availL2 = false;
     
    433440      if (ii == 0) {
    434441        chunkStartTime = currTime;
     442        mjdX24 = chunkStartTime.mjddec() * 24.0;
    435443
    436444        if (xyz.size()) {
     
    457465        }
    458466      }
    459 
     467 
    460468      // Check Interval
    461469      // --------------
     
    518526    // Availability Plot Data
    519527    // ----------------------
    520     double mjdX24 = chunkStartTime.mjddec() * 24.0;
    521528    if (availL1) {
    522529      if      (slipL1) {
Note: See TracChangeset for help on using the changeset viewer.