- Timestamp:
- Jun 24, 2012, 5:20:23 PM (12 years ago)
- Location:
- trunk/BNC/src/rinex
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/reqcanalyze.cpp
r4347 r4350 192 192 // Analyze the Multipath 193 193 // --------------------- 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*>; 199 196 200 197 QMapIterator<QString, t_satStat> it(_satStat); … … 203 200 QString prn = it.key(); 204 201 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); 237 203 } 238 204 … … 280 246 } 281 247 } 248 249 // 250 //////////////////////////////////////////////////////////////////////////// 251 void 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 78 78 79 79 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); 80 83 81 84 QString _logFileName;
Note:
See TracChangeset
for help on using the changeset viewer.