Changeset 3407 in ntrip


Ignore:
Timestamp:
Sep 2, 2011, 8:23:29 PM (13 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncmodel.cpp

    r3406 r3407  
    936936// Outlier Detection
    937937////////////////////////////////////////////////////////////////////////////
    938 int bncModel::outlierDetection(int iPhase, const SymmetricMatrix& QQsav,
    939                                const ColumnVector& vv,
    940                                QMap<QString, t_satData*>& satDataGPS,
    941                                QMap<QString, t_satData*>& satDataGlo,
    942                                QMap<QString, t_satData*>& satDataGal) {
     938QString bncModel::outlierDetection(int iPhase, const SymmetricMatrix& QQsav,
     939                                   const ColumnVector& vv,
     940                                   QMap<QString, t_satData*>& satDataGPS,
     941                                   QMap<QString, t_satData*>& satDataGlo,
     942                                   QMap<QString, t_satData*>& satDataGal) {
    943943
    944944  Tracer tracer("bncModel::outlierDetection");
     
    952952  double  maxRes;
    953953
    954   int irc = 0;
    955 
    956954  if (iPhase == 0) {
    957955
    958956    // Check GPS Code
    959957    // --------------
    960     if (irc == 0) {
     958    if (prnRemoved.isEmpty()) {
    961959      findMaxRes(iPhase, vv,satDataGPS, prnCode, maxResCode, prnPhase, maxResPhase);
    962960      if (maxResCode > MAXRES_CODE_GPS) {
     
    964962        prnRemoved = prnCode;
    965963        maxRes     = maxResCode;
    966         irc        = 1;
    967964      }
    968965    }
     
    970967    // Check Galileo Code
    971968    // ------------------
    972     if (irc == 0) {
     969    if (prnRemoved.isEmpty()) {
    973970      findMaxRes(iPhase, vv,satDataGal, prnCode, maxResCode, prnPhase, maxResPhase);
    974971      if (maxResCode > MAXRES_CODE_GAL) {
     
    976973        prnRemoved = prnCode;
    977974        maxRes     = maxResCode;
    978         irc        = 1;
    979975      }
    980976    }
     
    985981    // Check Glonass Phase
    986982    // -------------------
    987     if (irc == 0) {
     983    if (prnRemoved.isEmpty()) {
    988984      findMaxRes(iPhase, vv,satDataGlo, prnCode, maxResCode, prnPhase, maxResPhase);
    989985      if (maxResPhase > MAXRES_PHASE_GLO) {
     
    991987        prnRemoved = prnPhase;
    992988        maxRes     = maxResPhase;
    993         irc        = 1;
    994989      }
    995990    }
     
    997992    // Check Galileo Phase
    998993    // -------------------
    999     if (irc == 0) {
     994    if (prnRemoved.isEmpty()) {
    1000995      findMaxRes(iPhase, vv,satDataGal, prnCode, maxResCode, prnPhase, maxResPhase);
    1001996      if      (maxResPhase > MAXRES_PHASE_GAL) {
     
    1003998        prnRemoved = prnPhase;
    1004999        maxRes     = maxResPhase;
    1005         irc        = 1;
    10061000      }
    10071001    }
     
    10091003    // Check GPS Phase
    10101004    // ---------------
    1011     if (irc == 0) {
     1005    if (prnRemoved.isEmpty()) {
    10121006      findMaxRes(iPhase, vv,satDataGPS, prnCode, maxResCode, prnPhase, maxResPhase);
    10131007      if      (maxResPhase > MAXRES_PHASE_GPS) {
     
    10151009        prnRemoved = prnPhase;
    10161010        maxRes     = maxResPhase;
    1017         irc        = 1;
    10181011      }
    10191012    }
    10201013  }
    10211014 
    1022   if (irc != 0) {
     1015  if (!prnRemoved.isEmpty()) {
    10231016    _log += "Outlier " + prnRemoved.toAscii() + " "
    10241017          + QByteArray::number(maxRes, 'f', 3) + "\n";
     
    10331026  }
    10341027
    1035   return irc;
     1028  return prnRemoved;
    10361029}
    10371030
     
    14511444      }
    14521445   
    1453       if (outlierDetection(iPhase, QQsav, vv, epoData->satDataGPS,
    1454                            epoData->satDataGlo, epoData->satDataGal) == 0) {
     1446      QString prnRemoved = outlierDetection(iPhase, QQsav, vv,
     1447                                            epoData->satDataGPS,
     1448                                            epoData->satDataGlo,
     1449                                            epoData->satDataGal);
     1450      if (prnRemoved.isEmpty()) {
    14551451        break;
    14561452      }
    1457       else {
     1453      else if (prnRemoved[0] == 'G') {
    14581454        ++numOutliers;
    14591455      }
  • trunk/BNC/bncmodel.h

    r3405 r3407  
    109109  void   predict(int iPhase, t_epoData* epoData);
    110110  t_irc  update_p(t_epoData* epoData);
    111   int    outlierDetection(int iPhase, const SymmetricMatrix& QQsav,
    112                           const ColumnVector& vv,
    113                           QMap<QString, t_satData*>& satDataGPS,
    114                           QMap<QString, t_satData*>& satDataGlo,
    115                           QMap<QString, t_satData*>& satDataGal);
     111  QString outlierDetection(int iPhase, const SymmetricMatrix& QQsav,
     112                           const ColumnVector& vv,
     113                           QMap<QString, t_satData*>& satDataGPS,
     114                           QMap<QString, t_satData*>& satDataGlo,
     115                           QMap<QString, t_satData*>& satDataGal);
    116116  void writeNMEAstr(const QString& nmStr);
    117117
Note: See TracChangeset for help on using the changeset viewer.