Changeset 6352 in ntrip for trunk/BNC/src/orbComp
- Timestamp:
- Nov 26, 2014, 7:08:04 PM (10 years ago)
- Location:
- trunk/BNC/src/orbComp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/orbComp/sp3Comp.cpp
r6351 r6352 96 96 97 97 try { 98 compare(); 98 ostringstream msg; 99 compare(msg); 100 *_log << msg.str().c_str(); 99 101 } 100 102 catch (const string& error) { … … 192 194 // Main Routine 193 195 //////////////////////////////////////////////////////////////////////////////// 194 void t_sp3Comp::compare( ) const {196 void t_sp3Comp::compare(ostringstream& out) const { 195 197 196 198 // Synchronize reading of two sp3 files … … 262 264 } 263 265 else { 264 cerr << "not found: " << prn << endl;266 throw "not found: " + prn.toString(); 265 267 } 266 268 } … … 277 279 const string all = "ZZZ"; 278 280 279 cout.setf(ios::fixed);280 cout << "!\n! MJD PRN radial along out clk clkRed iPRN"281 out.setf(ios::fixed); 282 out << "!\n! MJD PRN radial along out clk clkRed iPRN" 281 283 "\n! ----------------------------------------------------------------\n"; 282 284 for (unsigned ii = 0; ii < epochs.size(); ii++) { … … 287 289 const t_prn& prn = it->first; 288 290 const ColumnVector& rao = it->second; 289 cout << setprecision(6) << epo->_tt.mjddec() << ' ' << prn << ' '290 291 292 291 out << setprecision(6) << epo->_tt.mjddec() << ' ' << prn << ' ' 292 << setw(7) << setprecision(4) << rao[0] << ' ' 293 << setw(7) << setprecision(4) << rao[1] << ' ' 294 << setw(7) << setprecision(4) << rao[2] << " "; 293 295 stat[prn.toString()]._rao += SP(rao, rao); // Schur product 294 296 stat[prn.toString()]._nr += 1; … … 298 300 double clkRes = dc.find(prn)->second; 299 301 double clkResRed = clkRes - it->second[0]; // clock minus radial component 300 cout << setw(7) << setprecision(4) << clkRes << ' '301 302 out << setw(7) << setprecision(4) << clkRes << ' ' 303 << setw(7) << setprecision(4) << clkResRed; 302 304 stat[prn.toString()]._dc += clkRes * clkRes; 303 305 stat[prn.toString()]._dcRed += clkResRed * clkResRed; … … 308 310 } 309 311 else { 310 cout << " . . ";311 } 312 cout << " " << setw(2) << int(prn) << endl;312 out << " . . "; 313 } 314 out << " " << setw(2) << int(prn) << endl; 313 315 } 314 316 delete epo; … … 317 319 // Print Summary 318 320 // ------------- 319 cout << "!\n! RMS:\n";321 out << "!\n! RMS:\n"; 320 322 for (map<string, t_stat>::iterator it = stat.begin(); it != stat.end(); it++) { 321 323 const string& prn = it->first; … … 326 328 stat._rao[2] = sqrt(stat._rao[2] / stat._nr); 327 329 if (prn == all) { 328 cout << "!\n! Total ";330 out << "!\n! Total "; 329 331 } 330 332 else { 331 cout << "! " << prn << ' ';332 } 333 cout << setw(7) << setprecision(4) << stat._rao[0] << ' '334 335 333 out << "! " << prn << ' '; 334 } 335 out << setw(7) << setprecision(4) << stat._rao[0] << ' ' 336 << setw(7) << setprecision(4) << stat._rao[1] << ' ' 337 << setw(7) << setprecision(4) << stat._rao[2] << " "; 336 338 if (stat._nc > 0) { 337 339 stat._dc = sqrt(stat._dc / stat._nc); 338 340 stat._dcRed = sqrt(stat._dcRed / stat._nc); 339 cout << setw(7) << setprecision(4) << stat._dc << ' '340 341 out << setw(7) << setprecision(4) << stat._dc << ' ' 342 << setw(7) << setprecision(4) << stat._dcRed; 341 343 if (prn != all) { 342 cout << " offset " << setw(7) << setprecision(4) << stat._offset;344 out << " offset " << setw(7) << setprecision(4) << stat._offset; 343 345 } 344 346 } 345 347 else { 346 cout << " . . ";347 } 348 cout << endl;349 } 350 } 351 } 348 out << " . . "; 349 } 350 out << endl; 351 } 352 } 353 } -
trunk/BNC/src/orbComp/sp3Comp.h
r6348 r6352 30 30 #include <vector> 31 31 #include <string> 32 #include <sstream> 32 33 #include <QtCore> 33 34 #include <newmat.h> … … 83 84 void processClocks(const std::set<t_prn>& clkSats, std::vector<t_epoch*>& epochs, 84 85 std::map<std::string, t_stat>& stat) const; 85 void compare( ) const;86 void compare(std::ostringstream& out) const; 86 87 87 88 QStringList _sp3FileNames;
Note:
See TracChangeset
for help on using the changeset viewer.