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


Ignore:
Timestamp:
Jun 24, 2012, 6:03:12 PM (12 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

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

    r4352 r4353  
    254254                                     QVector<t_polarPoint*>* dataMP2) {
    255255
    256   const int LENGTH = 10;  // number of epochs in one chunk
     256  const int    LENGTH = 10;  // number of epochs in one chunk
     257  const double SLIP   = 5.0; // cycle-slip threshold
    257258
    258259  int numEpo = satStat.anaObs.size();
     
    262263    // Compute Mean
    263264    // ------------
    264     double mean1 = 0.0;
    265     double mean2 = 0.0;
     265    bool   slipFlag = false;
     266    double mean1    = 0.0;
     267    double mean2    = 0.0;
     268
    266269    for (int ii = 0; ii < LENGTH; ii++) {
    267270      int iEpo = chunkStart + ii;
     
    269272      mean1 += anaObs->MP1;
    270273      mean2 += anaObs->MP2;
    271     }
     274 
     275      // Check Slip
     276      // ----------
     277      if (ii > 0) {
     278        double diff1 = anaObs->MP1 - satStat.anaObs[iEpo-1]->MP1;
     279        double diff2 = anaObs->MP2 - satStat.anaObs[iEpo-1]->MP2;
     280        if (fabs(diff1) > SLIP || fabs(diff2) > SLIP) {
     281          slipFlag = true;
     282          break;
     283        }
     284      }
     285    }
     286
     287    if (slipFlag) {
     288      continue;
     289    }
     290
    272291    mean1 /= LENGTH;
    273292    mean2 /= LENGTH;
     
    288307    double MP2 = sqrt(stddev2 / (LENGTH-1));
    289308
     309    // Add new Point
     310    // -------------
    290311    const t_anaObs* anaObs = satStat.anaObs[chunkStart];
    291312    (*dataMP1) << (new t_polarPoint(anaObs->az, anaObs->zen, MP1));
     
    293314
    294315    _log->setRealNumberNotation(QTextStream::FixedNotation);
     316
    295317    _log->setRealNumberPrecision(2);
    296     *_log << "MP1 " << prn << " " << anaObs->az << " " << anaObs->zen << " "
    297           << MP1 << endl;
    298     *_log << "MP2 " << prn << " " << anaObs->az << " " << anaObs->zen << " "
    299           << MP2 << endl;
    300   }
    301 }
     318    *_log << "MP1 " << prn << " " << anaObs->az << " " << anaObs->zen << " ";
     319    _log->setRealNumberPrecision(3);
     320    *_log << MP1 << endl;
     321
     322    _log->setRealNumberPrecision(2);
     323    *_log << "MP2 " << prn << " " << anaObs->az << " " << anaObs->zen << " ";
     324    _log->setRealNumberPrecision(3);
     325    *_log << MP2 << endl;
     326  }
     327}
Note: See TracChangeset for help on using the changeset viewer.