Changeset 10092 in ntrip for trunk/BNC/src/orbComp/sp3Comp.cpp
- Timestamp:
- Jun 16, 2023, 6:54:01 AM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/orbComp/sp3Comp.cpp
r9865 r10092 217 217 // Compute clock residuals 218 218 // ----------------------- 219 const string all = "ZZZ"; 219 220 for (unsigned ie = 0; ie < epochs.size(); ie++) { 220 map<t_prn, double>& dc = epochs[ie]->_dc; 221 map<t_prn, double>& dc = epochs[ie]->_dc; 222 map<t_prn, double>& dcRed = epochs[ie]->_dcRed; 223 const map<t_prn, ColumnVector>& dr = epochs[ie]->_dr; 221 224 for (map<t_prn, double>::iterator it = dc.begin(); it != dc.end(); it++) { 222 225 const t_prn& prn = it->first; 223 226 if (satIndex(clkSats, prn) != -1) { 224 227 int index = epochs.size() + satIndex(clkSats, prn); 225 dc[prn] 228 dc[prn] = it->second - xx[ie] - xx[index]; 226 229 stat[prn.toString()]._offset = xx[index]; 227 } 230 if (dr.find(prn) != dr.end()){ 231 dcRed[prn] = dc[prn] - dr.find(prn)->second[0]; // clock minus radial component 232 stat[prn.toString()]._dcRedMean += dcRed[prn]; 233 stat[all ]._dcRedMean += dcRed[prn]; 234 stat[prn.toString()]._nc += 1; 235 stat[all ]._nc += 1; 236 } 237 } 238 } 239 } 240 241 // Compute Clock Mean 242 // ------------------ 243 for (map<string, t_stat>::iterator it = stat.begin(); it != stat.end(); it++) { 244 t_stat& stat = it->second; 245 if (stat._nc > 0) { 246 stat._dcRedMean = stat._dcRedMean / stat._nc; 228 247 } 229 248 } … … 342 361 } 343 362 344 // Print Residuals345 // --------------- 363 // Print epoch-wise Clock Residuals 364 // -------------------------------- 346 365 const string all = "ZZZ"; 347 366 348 367 out.setf(ios::fixed); 368 out << "!\n! Clock residuals and orbit differences in [m]\n" 369 "! ----------------------------------------------------------------------------\n"; 349 370 out << "!\n! Epoch PRN radial along out clk clkRed iPRN" 350 371 "\n! ----------------------------------------------------------------------------\n"; … … 353 374 const map<t_prn, ColumnVector>& dr = epochs[ii]->_dr; 354 375 const map<t_prn, double>& dc = epochs[ii]->_dc; 376 const map<t_prn, double>& dcRed = epochs[ii]->_dcRed; 355 377 for (map<t_prn, ColumnVector>::const_iterator it = dr.begin(); it != dr.end(); it++) { 356 378 const t_prn& prn = it->first; … … 362 384 << setw(7) << setprecision(4) << rao[2] << " "; 363 385 stat[prn.toString()]._rao += SP(rao, rao); // Schur product 386 stat[all ]._rao += SP(rao, rao); 364 387 stat[prn.toString()]._nr += 1; 365 stat[all]._rao += SP(rao, rao); 366 stat[all]._nr += 1; 367 if (dc.find(prn) != dc.end()) { 388 stat[all ]._nr += 1; 389 if (dc.find(prn) != dc.end() && dcRed.find(prn) != dc.end()) { 368 390 double clkRes = dc.find(prn)->second; 369 double clkResRed = clkRes - it->second[0]; // clock minus radial component391 double clkResRed = dcRed.find(prn)->second; 370 392 out << setw(7) << setprecision(4) << clkRes << ' ' 371 393 << setw(7) << setprecision(4) << clkResRed; 372 stat[prn.toString()]._dc += clkRes * clkRes; 373 stat[prn.toString()]._dcRed += clkResRed * clkResRed; 374 stat[prn.toString()]._nc += 1; 375 stat[all]._dc += clkRes * clkRes; 376 stat[all]._dcRed += clkResRed * clkResRed; 377 stat[all]._nc += 1; 394 stat[prn.toString()]._dcRMS += clkRes * clkRes; 395 stat[all ]._dcRMS += clkRes * clkRes; 396 stat[prn.toString()]._dcRedRMS += clkResRed * clkResRed; 397 stat[all ]._dcRedRMS += clkResRed * clkResRed; 398 stat[prn.toString()]._dcRedSig += (clkResRed - stat[prn.toString()]._dcRedMean) * 399 (clkResRed - stat[prn.toString()]._dcRedMean); 400 stat[all ]._dcRedSig += (clkResRed - stat[all ]._dcRedMean) * 401 (clkResRed - stat[all ]._dcRedMean); 378 402 } 379 403 else { … … 388 412 // Print Summary 389 413 // ------------- 390 out << "!\n! RMS[m]\n"; 391 out << "!\n! PRN radial along out nOrb clk clkRed nClk Offset" 392 "\n! ----------------------------------------------------------------------\n"; 414 out << "!\n! Summary"; 415 out << "\n! -----------------------------------------------------------------------------------------------------------------\n"; 416 out << "!\n! PRN radialRMS alongRMS outRMS 3DRMS nOrb clkRMS clkRedRMS clkRedSig nClk Offset " 417 "\n! [mm] [mm] [mm] [mm] [-] [ns] [ns] [ns] [-] [ns] " 418 "\n! -----------------------------------------------------------------------------------------------------------------\n"; 393 419 for (map<string, t_stat>::iterator it = stat.begin(); it != stat.end(); it++) { 394 420 const string& prn = it->first; … … 398 424 stat._rao[1] = sqrt(stat._rao[1] / stat._nr); 399 425 stat._rao[2] = sqrt(stat._rao[2] / stat._nr); 426 stat._rao3DRMS = stat._rao.NormFrobenius(); 400 427 if (prn == all) { 401 out << "!\n! Total ";428 out << "!\n! Total "; 402 429 } 403 430 else { 404 out << "! " << prn << ' '; 405 } 406 out << setw(7) << setprecision(4) << stat._rao[0] << ' ' 407 << setw(7) << setprecision(4) << stat._rao[1] << ' ' 408 << setw(7) << setprecision(4) << stat._rao[2] << ' ' 409 << setw(6) << stat._nr << " "; 431 out << "! " << prn << ' '; 432 } 433 // orbit values in millimeters 434 out << setw(10) << setprecision(1) << stat._rao[0] * 1e3 << ' ' 435 << setw(10) << setprecision(1) << stat._rao[1] * 1e3 << ' ' 436 << setw(10) << setprecision(1) << stat._rao[2] * 1e3 << ' ' 437 << setw(10) << setprecision(1) << stat._rao3DRMS * 1e3 << ' ' 438 << setw( 7) << stat._nr << " "; 410 439 if (stat._nc > 0) { 411 stat._dc = sqrt(stat._dc / stat._nc); 412 stat._dcRed = sqrt(stat._dcRed / stat._nc); 413 out << setw(7) << setprecision(4) << stat._dc << ' ' 414 << setw(7) << setprecision(4) << stat._dcRed << ' ' 415 << setw(6) << stat._nc << " "; 440 stat._dcRMS = sqrt(stat._dcRMS / stat._nc); 441 stat._dcRedRMS = sqrt(stat._dcRedRMS / stat._nc); 442 stat._dcRedSig = sqrt(stat._dcRedSig / stat._nc); 443 // clock values in nano seconds 444 out << setw(10) << setprecision(2) << stat._dcRMS / t_CST::c * 1e9 << ' ' 445 << setw(10) << setprecision(2) << stat._dcRedRMS / t_CST::c * 1e9 << ' ' 446 << setw(10) << setprecision(2) << stat._dcRedSig / t_CST::c * 1e9 << ' ' 447 << setw( 9) << stat._nc << " "; 416 448 if (prn != all) { 417 out << setw(9) << setprecision( 4) << stat._offset;449 out << setw(9) << setprecision(2) << stat._offset / t_CST::c * 1e9; 418 450 } 419 451 }
Note:
See TracChangeset
for help on using the changeset viewer.