Changeset 10120 in ntrip
- Timestamp:
- Jul 12, 2023, 6:12:18 PM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/orbComp/sp3Comp.cpp
r10108 r10120 219 219 // Compute clock residuals 220 220 // ----------------------- 221 const string all = "ZZZ";222 221 for (unsigned ie = 0; ie < epochs.size(); ie++) { 223 222 map<t_prn, double>& dc = epochs[ie]->_dc; … … 226 225 for (map<t_prn, double>::iterator it = dc.begin(); it != dc.end(); it++) { 227 226 const t_prn& prn = it->first; 227 std::string sys; sys.assign(1, prn.system()); 228 228 if (satIndex(clkSats, prn) != -1) { 229 229 int index = epochs.size() + satIndex(clkSats, prn); … … 233 233 dcRed[prn] = dc[prn] - dr.find(prn)->second[0]; // clock minus radial component 234 234 stat[prn.toString()]._dcRedMean += dcRed[prn]; 235 stat[ all]._dcRedMean += dcRed[prn];235 stat[sys ]._dcRedMean += dcRed[prn]; 236 236 stat[prn.toString()]._nc += 1; 237 stat[ all]._nc += 1;237 stat[sys ]._nc += 1; 238 238 } 239 239 } … … 365 365 // Print epoch-wise Clock Residuals 366 366 // -------------------------------- 367 const string all = "ZZZ";368 369 367 out.setf(ios::fixed); 370 368 if (!_summaryOnly) { … … 381 379 for (map<t_prn, ColumnVector>::const_iterator it = dr.begin(); it != dr.end(); it++) { 382 380 const t_prn& prn = it->first; 381 std::string sys; sys.assign(1, prn.system()); 383 382 if (!excludeSat(prn)) { 384 383 const ColumnVector& rao = it->second; … … 390 389 } 391 390 stat[prn.toString()]._rao += SP(rao, rao); // Schur product 392 stat[ all]._rao += SP(rao, rao);391 stat[sys ]._rao += SP(rao, rao); 393 392 stat[prn.toString()]._nr += 1; 394 stat[ all]._nr += 1;393 stat[sys ]._nr += 1; 395 394 if (dc.find(prn) != dc.end() && dcRed.find(prn) != dc.end()) { 396 395 double clkRes = dc.find(prn)->second; … … 401 400 } 402 401 stat[prn.toString()]._dcRMS += clkRes * clkRes; 403 stat[ all]._dcRMS += clkRes * clkRes;402 stat[sys ]._dcRMS += clkRes * clkRes; 404 403 stat[prn.toString()]._dcRedRMS += clkResRed * clkResRed; 405 stat[ all]._dcRedRMS += clkResRed * clkResRed;404 stat[sys ]._dcRedRMS += clkResRed * clkResRed; 406 405 stat[prn.toString()]._dcRedSig += (clkResRed - stat[prn.toString()]._dcRedMean) * 407 406 (clkResRed - stat[prn.toString()]._dcRedMean); 408 stat[ all ]._dcRedSig += (clkResRed - stat[all]._dcRedMean) *409 (clkResRed - stat[ all]._dcRedMean);407 stat[sys ]._dcRedSig += (clkResRed - stat[sys ]._dcRedMean) * 408 (clkResRed - stat[sys ]._dcRedMean); 410 409 } 411 410 else { … … 432 431 const string& prn = it->first; 433 432 t_stat& stat = it->second; 433 std::string sys; sys.assign(1, prn[0]); 434 434 if (stat._nr > 0) { 435 435 stat._rao[0] = sqrt(stat._rao[0] / stat._nr); … … 437 437 stat._rao[2] = sqrt(stat._rao[2] / stat._nr); 438 438 stat._rao3DRMS = stat._rao.NormFrobenius(); 439 if (prn == all) { 440 (_summaryOnly) ? out << "\n Total " : out << "!\n! Total "; 441 } 442 else { 443 (_summaryOnly) ? out << " " << prn << ' ' : out << "! " << prn << ' '; 439 if (prn != sys) { 440 (_summaryOnly) ? out << " " << prn << ' ' : 441 out << "! " << prn << ' '; 444 442 } 445 443 // orbit values in millimeters 446 out << setw(10) << setprecision(1) << stat._rao[0] * 1e3 << ' ' 447 << setw(10) << setprecision(1) << stat._rao[1] * 1e3 << ' ' 448 << setw(10) << setprecision(1) << stat._rao[2] * 1e3 << ' ' 449 << setw(10) << setprecision(1) << stat._rao3DRMS * 1e3 << ' ' 450 << setw( 7) << stat._nr << " "; 444 if (prn != sys) { 445 out << setw(10) << setprecision(1) << stat._rao[0] * 1e3 << ' ' 446 << setw(10) << setprecision(1) << stat._rao[1] * 1e3 << ' ' 447 << setw(10) << setprecision(1) << stat._rao[2] * 1e3 << ' ' 448 << setw(10) << setprecision(1) << stat._rao3DRMS * 1e3 << ' ' 449 << setw( 7) << stat._nr << " "; 450 } 451 451 if (stat._nc > 0) { 452 452 stat._dcRMS = sqrt(stat._dcRMS / stat._nc); … … 454 454 stat._dcRedSig = sqrt(stat._dcRedSig / stat._nc); 455 455 // clock values in nano seconds 456 out << setw(10) << setprecision(2) << stat._dcRMS / t_CST::c * 1e9 << ' '457 << setw(10) << setprecision(2) << stat._dcRedRMS/ t_CST::c * 1e9 << ' '458 << setw(10) << setprecision(2) << stat._dcRedSig/ t_CST::c * 1e9 << ' '459 << setw( 9) << stat._nc << " ";460 if (prn != all) {461 out << setw(9) << setprecision(2) << stat._offset / t_CST::c * 1e9;456 if (prn != sys) { 457 out << setw(10) << setprecision(2) << stat._dcRMS / t_CST::c * 1e9 << ' ' 458 << setw(10) << setprecision(2) << stat._dcRedRMS / t_CST::c * 1e9 << ' ' 459 << setw(10) << setprecision(2) << stat._dcRedSig / t_CST::c * 1e9 << ' ' 460 << setw( 9) << stat._nc << " " 461 << setw( 9) << setprecision(2) << stat._offset / t_CST::c * 1e9; 462 462 } 463 463 } … … 465 465 out << " . . "; 466 466 } 467 out << "\n"; 467 if (prn != sys) { 468 out << "\n"; 469 } 470 } 471 } 472 // Print Total 473 // ------------ 474 out << "!\n! Mean"; 475 out << "\n! -----------------------------------------------------------------------------------------------------------------\n"; 476 out << "!\n! GNSS radialRMS alongRMS outRMS 3DRMS nOrb clkRMS clkRedRMS clkRedSig nClk " 477 "\n! [mm] [mm] [mm] [mm] [-] [ns] [ns] [ns] [-] " 478 "\n! -----------------------------------------------------------------------------------------------------------------"; 479 for (map<string, t_stat>::iterator it = stat.begin(); it != stat.end(); it++) { 480 const string& prn = it->first; 481 t_stat& stat = it->second; 482 std::string sys; sys.assign(1, prn[0]); 483 if (stat._nr > 0) { 484 if (prn == sys) { 485 (_summaryOnly) ? out << "\n " << sys << " " : 486 out << "\n! " << sys << " "; 487 } 488 // orbit values in millimeters 489 if (prn == sys) { 490 out << setw(10) << setprecision(1) << stat._rao[0] * 1e3 << ' ' 491 << setw(10) << setprecision(1) << stat._rao[1] * 1e3 << ' ' 492 << setw(10) << setprecision(1) << stat._rao[2] * 1e3 << ' ' 493 << setw(10) << setprecision(1) << stat._rao3DRMS * 1e3 << ' ' 494 << setw( 7) << stat._nr << " "; 495 } 496 if (stat._nc > 0) { 497 // clock values in nano seconds 498 if (prn == sys) { 499 out << setw(10) << setprecision(2) << stat._dcRMS / t_CST::c * 1e9 << ' ' 500 << setw(10) << setprecision(2) << stat._dcRedRMS / t_CST::c * 1e9 << ' ' 501 << setw(10) << setprecision(2) << stat._dcRedSig / t_CST::c * 1e9 << ' ' 502 << setw( 9) << stat._nc << " "; 503 } 504 } 505 else { 506 out << " . . "; 507 } 468 508 } 469 509 }
Note:
See TracChangeset
for help on using the changeset viewer.