- Timestamp:
- Jun 25, 2012, 10:35:30 AM (12 years ago)
- Location:
- trunk/BNC/src/rinex
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/reqcanalyze.cpp
r4360 r4361 40 40 41 41 #include <iostream> 42 #include <iomanip> 42 43 #include "reqcanalyze.h" 43 44 #include "bncapp.h" … … 216 217 QString prn = it.key(); 217 218 const t_satStat& satStat = it.value(); 218 analyzeMultipath(prn, satStat, xyz, dataMP1, dataMP2);219 analyzeMultipath(prn, satStat, xyz, obsFile->interval(), dataMP1, dataMP2); 219 220 } 220 221 … … 243 244 newObs->_MP1 = obs.p1() - L1 - 2.0*f2*f2/(f1*f1-f2*f2) * (L1 - L2); 244 245 okFlag = true; 246 247 //// beg test 248 // cout.setf(ios::fixed); 249 // cout << obs.satSys << setw(2) << obs.satNum << " " 250 // << setprecision(1) << obs.GPSWeeks << " " 251 // << setprecision(4) << newObs->_MP1 << endl; 252 //// end test 245 253 } 246 254 if (obs.p2() != 0.0) { … … 265 273 const t_satStat& satStat, 266 274 const ColumnVector& xyz, 275 double obsInterval, 267 276 QVector<t_polarPoint*>* dataMP1, 268 277 QVector<t_polarPoint*>* dataMP2) { 269 278 270 const int LENGTH = 120; // number of epochs in one chunk271 272 int numEpo = satStat.anaObs.size(); 273 274 for (int chunkStart = 0; chunkStart + LENGTH < numEpo; chunkStart += LENGTH) {279 const int chunkStep = 30.0 / obsInterval; // chunk step (30 sec) 280 const int numEpo = 600.0 / obsInterval; // # epochs in one chunk (10 min) 281 282 for (int chunkStart = 0; chunkStart + numEpo < satStat.anaObs.size(); 283 chunkStart += chunkStep) { 275 284 276 285 // Compute Mean … … 280 289 double mean2 = 0.0; 281 290 282 for (int ii = 0; ii < LENGTH; ii++) {291 for (int ii = 0; ii < numEpo; ii++) { 283 292 int iEpo = chunkStart + ii; 284 293 const t_anaObs* anaObs = satStat.anaObs[iEpo]; … … 302 311 } 303 312 304 mean1 /= LENGTH;305 mean2 /= LENGTH;313 mean1 /= numEpo; 314 mean2 /= numEpo; 306 315 307 316 // Compute Standard Deviation … … 309 318 double stddev1 = 0.0; 310 319 double stddev2 = 0.0; 311 for (int ii = 0; ii < LENGTH; ii++) {320 for (int ii = 0; ii < numEpo; ii++) { 312 321 int iEpo = chunkStart + ii; 313 322 const t_anaObs* anaObs = satStat.anaObs[iEpo]; … … 317 326 stddev2 += diff2 * diff2; 318 327 } 319 double MP1 = sqrt(stddev1 / ( LENGTH-1));320 double MP2 = sqrt(stddev2 / ( LENGTH-1));328 double MP1 = sqrt(stddev1 / (numEpo-1)); 329 double MP2 = sqrt(stddev2 / (numEpo-1)); 321 330 322 331 const t_anaObs* anaObs0 = satStat.anaObs[chunkStart]; -
trunk/BNC/src/rinex/reqcanalyze.h
r4355 r4361 84 84 const t_satStat& satStat, 85 85 const ColumnVector& xyz, 86 double obsInterval, 86 87 QVector<t_polarPoint*>* dataMP1, 87 88 QVector<t_polarPoint*>* dataMP2);
Note:
See TracChangeset
for help on using the changeset viewer.