Changeset 4350 in ntrip for trunk/BNC


Ignore:
Timestamp:
Jun 24, 2012, 5:20:23 PM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src/rinex
Files:
2 edited

Legend:

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

    r4347 r4350  
    192192  // Analyze the Multipath
    193193  // ---------------------
    194   _log->setRealNumberNotation(QTextStream::FixedNotation);
    195   _log->setRealNumberPrecision(2);
    196 
    197   QVector<t_polarPoint*>*  dataMP1 = new QVector<t_polarPoint*>;
    198   QVector<t_polarPoint*>*  dataMP2 = new QVector<t_polarPoint*>;
     194  QVector<t_polarPoint*>* dataMP1 = new QVector<t_polarPoint*>;
     195  QVector<t_polarPoint*>* dataMP2 = new QVector<t_polarPoint*>;
    199196
    200197  QMapIterator<QString, t_satStat> it(_satStat);
     
    203200    QString          prn     = it.key();
    204201    const t_satStat& satStat = it.value();
    205  
    206     int numVal = satStat.anaObs.size();
    207     if (numVal > 1) {
    208       double mean1 = 0.0;
    209       double mean2 = 0.0;
    210       for (int ii = 0; ii < numVal; ii++) {
    211         const t_anaObs* anaObs = satStat.anaObs[ii];
    212         mean1 += anaObs->MP1;
    213         mean2 += anaObs->MP2;
    214       }
    215       mean1 /= numVal;
    216       mean2 /= numVal;
    217       double stddev1 = 0.0;
    218       double stddev2 = 0.0;
    219       for (int ii = 0; ii < numVal; ii++) {
    220         const t_anaObs* anaObs = satStat.anaObs[ii];
    221         double diff1 = anaObs->MP1 - mean1;
    222         double diff2 = anaObs->MP2 - mean2;
    223         stddev1 += diff1 * diff1;
    224         stddev2 += diff2 * diff2;
    225         //// beg test
    226         double bla = anaObs->zen/90.0;
    227         (*dataMP1) << (new t_polarPoint(anaObs->az, anaObs->zen, bla));
    228         (*dataMP2) << (new t_polarPoint(anaObs->az, anaObs->zen, bla));
    229         //// end test
    230       }
    231       double MP1 = sqrt(stddev1 / (numVal-1));
    232       double MP2 = sqrt(stddev2 / (numVal-1));
    233        
    234       *_log << "MP1 " << prn << " " << MP1 << endl;
    235       *_log << "MP2 " << prn << " " << MP2 << endl;
    236     }
     202    analyzeMultipath(prn, satStat, dataMP1, dataMP2);
    237203  }
    238204
     
    280246  }
    281247}
     248
     249// 
     250////////////////////////////////////////////////////////////////////////////
     251void t_reqcAnalyze::analyzeMultipath(const QString& prn,
     252                                     const t_satStat& satStat,
     253                                     QVector<t_polarPoint*>* dataMP1,
     254                                     QVector<t_polarPoint*>* dataMP2) {
     255
     256  int numVal = satStat.anaObs.size();
     257  if (numVal < 2) {
     258    return;
     259  }
     260
     261  double mean1 = 0.0;
     262  double mean2 = 0.0;
     263  for (int ii = 0; ii < numVal; ii++) {
     264    const t_anaObs* anaObs = satStat.anaObs[ii];
     265    mean1 += anaObs->MP1;
     266    mean2 += anaObs->MP2;
     267  }
     268  mean1 /= numVal;
     269  mean2 /= numVal;
     270  double stddev1 = 0.0;
     271  double stddev2 = 0.0;
     272  for (int ii = 0; ii < numVal; ii++) {
     273    const t_anaObs* anaObs = satStat.anaObs[ii];
     274    double diff1 = anaObs->MP1 - mean1;
     275    double diff2 = anaObs->MP2 - mean2;
     276    stddev1 += diff1 * diff1;
     277    stddev2 += diff2 * diff2;
     278    //// beg test
     279    double bla = anaObs->zen/90.0;
     280    (*dataMP1) << (new t_polarPoint(anaObs->az, anaObs->zen, bla));
     281    (*dataMP2) << (new t_polarPoint(anaObs->az, anaObs->zen, bla));
     282    //// end test
     283  }
     284  double MP1 = sqrt(stddev1 / (numVal-1));
     285  double MP2 = sqrt(stddev2 / (numVal-1));
     286       
     287  _log->setRealNumberNotation(QTextStream::FixedNotation);
     288  _log->setRealNumberPrecision(2);
     289
     290  *_log << "MP1 " << prn << " " << MP1 << endl;
     291  *_log << "MP2 " << prn << " " << MP2 << endl;
     292}
  • trunk/BNC/src/rinex/reqcanalyze.h

    r4342 r4350  
    7878
    7979  void analyzeFile(t_rnxObsFile* obsFile);
     80  void analyzeMultipath(const QString& prn, const t_satStat& satStat,
     81                        QVector<t_polarPoint*>* dataMP1,
     82                        QVector<t_polarPoint*>* dataMP2);
    8083
    8184  QString                  _logFileName;
Note: See TracChangeset for help on using the changeset viewer.