Changeset 3414 in ntrip for trunk/BNC


Ignore:
Timestamp:
Sep 3, 2011, 3:02:05 PM (13 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncmodel.cpp

    r3413 r3414  
    908908  Tracer tracer("bncModel::outlierDetection");
    909909
    910   QString prn;
    911   double  maxRes  = 0.0;
    912   findMaxRes(vv, satData, prn, maxRes);
    913 
    914   if      (iPhase == 1 &&
    915            maxRes > (prn[0] == 'G' ? MAXRES_PHASE_GPS : MAXRES_PHASE_GLONASS)) {
    916     _log += "Outlier Phase " + prn + " "
    917           + QByteArray::number(maxRes, 'f', 3) + "\n";
    918     return prn;
    919   }
    920   else if (iPhase == 0 && maxRes > MAXRES_CODE) {
    921     _log += "Outlier Code  " + prn + " "
    922           + QByteArray::number(maxRes, 'f', 3) + "\n";
    923     return prn;
    924   }
    925   else {
    926     return QString();
    927   }
     910  QString prnGPS;
     911  QString prnGlo;
     912  double  maxResGPS = 0.0;
     913  double  maxResGlo = 0.0;
     914  findMaxRes(vv, satData, prnGPS, prnGlo, maxResGPS, maxResGlo);
     915
     916  if      (iPhase == 1) {
     917    if      (maxResGlo > MAXRES_PHASE_GLONASS) {
     918      _log += "Outlier Phase " + prnGlo + " "
     919            + QByteArray::number(maxResGlo, 'f', 3) + "\n";
     920      return prnGlo;
     921    }
     922    else if (maxResGPS > MAXRES_PHASE_GPS) {
     923      _log += "Outlier Phase " + prnGPS + " "
     924            + QByteArray::number(maxResGPS, 'f', 3) + "\n";
     925      return prnGPS;
     926    }
     927  }
     928  else if (iPhase == 0 && maxResGPS > MAXRES_CODE) {
     929    _log += "Outlier Code  " + prnGPS + " "
     930          + QByteArray::number(maxResGPS, 'f', 3) + "\n";
     931    return prnGPS;
     932  }
     933
     934  return QString();
    928935}
    929936
     
    11851192void bncModel::findMaxRes(const ColumnVector& vv,
    11861193                          const QMap<QString, t_satData*>& satData,
    1187                           QString& prn,  double& maxRes) {
     1194                          QString& prnGPS, QString& prnGlo,
     1195                          double& maxResGPS, double& maxResGlo) {
    11881196
    11891197  Tracer tracer("bncModel::findMaxRes");
    11901198
    1191   maxRes  = 0.0;
     1199  maxResGPS  = 0.0;
     1200  maxResGlo  = 0.0;
    11921201
    11931202  QMapIterator<QString, t_satData*> it(satData);
     
    11951204    it.next();
    11961205    t_satData* satData = it.value();
    1197     if (satData->obsIndex != 0 && fabs(vv(satData->obsIndex)) > maxRes) {
    1198       maxRes = fabs(vv(satData->obsIndex));
    1199       prn    = satData->prn;
     1206    if (satData->obsIndex != 0) {
     1207      QString prn = satData->prn;
     1208      if (prn[0] == 'R') {
     1209        if (fabs(vv(satData->obsIndex)) > maxResGlo) {
     1210          maxResGlo = fabs(vv(satData->obsIndex));
     1211          prnGlo    = prn;
     1212        }
     1213      }
     1214      else {
     1215        if (fabs(vv(satData->obsIndex)) > maxResGPS) {
     1216          maxResGPS = fabs(vv(satData->obsIndex));
     1217          prnGPS    = prn;
     1218        }
     1219      }
    12001220    }
    12011221  }
  • trunk/BNC/bncmodel.h

    r3412 r3414  
    103103  void   findMaxRes(const ColumnVector& vv,
    104104                    const QMap<QString, t_satData*>& satData,
    105                     QString& prn,  double& maxRes);
     105                    QString& prnGPS, QString& prnGlo, 
     106                    double& maxResGPS, double& maxResGlo);
    106107  double cmpValue(t_satData* satData, bool phase);
    107108  double delay_saast(double Ele);
Note: See TracChangeset for help on using the changeset viewer.