Changeset 622 in ntrip for trunk/BNC/bncrinex.cpp
- Timestamp:
- Dec 16, 2007, 4:27:13 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncrinex.cpp
r607 r622 96 96 //////////////////////////////////////////////////////////////////////////// 97 97 bncRinex::~bncRinex() { 98 QListIterator< Observation*> it(_obs);98 QListIterator<p_obs> it(_obs); 99 99 while (it.hasNext()) { 100 100 delete it.next(); … … 466 466 // Stores Observation into Internal Array 467 467 //////////////////////////////////////////////////////////////////////////// 468 void bncRinex::deepCopy(const Observation*obs) {469 Observation* newObs = new Observation();468 void bncRinex::deepCopy(const p_obs obs) { 469 p_obs newObs = new t_obs(); 470 470 memcpy(newObs, obs, sizeof(*obs)); 471 471 _obs.push_back(newObs); … … 478 478 // Select observations older than maxTime 479 479 // -------------------------------------- 480 QList< Observation*> dumpList;481 QMutableListIterator< Observation*> mIt(_obs);480 QList<p_obs> dumpList; 481 QMutableListIterator<p_obs> mIt(_obs); 482 482 while (mIt.hasNext()) { 483 Observation* ob= mIt.next();484 if (ob ->GPSWeek * 7*24*3600 + ob->GPSWeeks < maxTime - 0.05) {485 dumpList.push_back(ob );483 p_obs obs = mIt.next(); 484 if (obs->_o.GPSWeek * 7*24*3600 + obs->_o.GPSWeeks < maxTime - 0.05) { 485 dumpList.push_back(obs); 486 486 mIt.remove(); 487 487 } … … 496 496 // Time of Epoch 497 497 // ------------- 498 Observation*fObs = *dumpList.begin();499 QDateTime datTim = dateAndTimeFromGPSweek(fObs-> GPSWeek, fObs->GPSWeeks);500 QDateTime datTimNom = dateAndTimeFromGPSweek(fObs-> GPSWeek,501 floor(fObs-> GPSWeeks+0.5));498 p_obs fObs = *dumpList.begin(); 499 QDateTime datTim = dateAndTimeFromGPSweek(fObs->_o.GPSWeek, fObs->_o.GPSWeeks); 500 QDateTime datTimNom = dateAndTimeFromGPSweek(fObs->_o.GPSWeek, 501 floor(fObs->_o.GPSWeeks+0.5)); 502 502 503 503 // Close the file … … 514 514 } 515 515 516 double sec = double(datTim.time().second()) + fmod(fObs-> GPSWeeks,1.0);516 double sec = double(datTim.time().second()) + fmod(fObs->_o.GPSWeeks,1.0); 517 517 518 518 // RINEX Version 3 … … 523 523 << " " << 0 << setw(3) << dumpList.size() << endl; 524 524 525 QListIterator< Observation*> it(dumpList);525 QListIterator<p_obs> it(dumpList); 526 526 while (it.hasNext()) { 527 Observation* ob= it.next();528 _out << ob ->satSys529 << setw(2) << setfill('0') << ob ->satNum << setfill(' ')530 << setw(14) << setprecision(3) << ob ->C1 << " "531 << setw(14) << setprecision(3) << ob ->L1 << " "532 << setw(1) << ob ->SNR1533 << setw(14) << setprecision(3) << ob ->S1 << " "534 << setw(14) << setprecision(3) << ob ->P2 << " "535 << setw(14) << setprecision(3) << ob ->L2 << " "536 << setw(1) << ob ->SNR2537 << setw(14) << setprecision(3) << ob ->S2527 p_obs obs = it.next(); 528 _out << obs->_o.satSys 529 << setw(2) << setfill('0') << obs->_o.satNum << setfill(' ') 530 << setw(14) << setprecision(3) << obs->_o.C1 << " " 531 << setw(14) << setprecision(3) << obs->_o.L1 << " " 532 << setw(1) << obs->_o.SNR1 533 << setw(14) << setprecision(3) << obs->_o.S1 << " " 534 << setw(14) << setprecision(3) << obs->_o.P2 << " " 535 << setw(14) << setprecision(3) << obs->_o.L2 << " " 536 << setw(1) << obs->_o.SNR2 537 << setw(14) << setprecision(3) << obs->_o.S2 538 538 << endl; 539 delete ob ;539 delete obs; 540 540 } 541 541 } … … 548 548 << " " << 0 << setw(3) << dumpList.size(); 549 549 550 QListIterator< Observation*> it(dumpList); int iSat = 0;550 QListIterator<p_obs> it(dumpList); int iSat = 0; 551 551 while (it.hasNext()) { 552 552 iSat++; 553 Observation* ob= it.next();554 _out << ob ->satSys << setw(2) << ob->satNum;553 p_obs obs = it.next(); 554 _out << obs->_o.satSys << setw(2) << obs->_o.satNum; 555 555 if (iSat == 12 && it.hasNext()) { 556 556 _out << endl << " "; … … 562 562 it.toFront(); 563 563 while (it.hasNext()) { 564 Observation* ob= it.next();564 p_obs obs = it.next(); 565 565 566 566 char lli = ' '; 567 567 char snr = ' '; 568 _out << setw(14) << setprecision(3) << ob ->C1 << lli << snr;569 _out << setw(14) << setprecision(3) << ob ->C2 << lli << snr;570 _out << setw(14) << setprecision(3) << ob ->P1 << lli << snr;571 _out << setw(14) << setprecision(3) << ob ->P2 << lli << snr;572 _out << setw(14) << setprecision(3) << ob ->L1 << lli573 << setw(1) << ob ->SNR1 << endl;574 _out << setw(14) << setprecision(3) << ob ->L2 << lli575 << setw(1) << ob ->SNR2;576 _out << setw(14) << setprecision(3) << ob ->S1 ;577 _out << setw(16) << setprecision(3) << ob ->S2 ;568 _out << setw(14) << setprecision(3) << obs->_o.C1 << lli << snr; 569 _out << setw(14) << setprecision(3) << obs->_o.C2 << lli << snr; 570 _out << setw(14) << setprecision(3) << obs->_o.P1 << lli << snr; 571 _out << setw(14) << setprecision(3) << obs->_o.P2 << lli << snr; 572 _out << setw(14) << setprecision(3) << obs->_o.L1 << lli 573 << setw(1) << obs->_o.SNR1 << endl; 574 _out << setw(14) << setprecision(3) << obs->_o.L2 << lli 575 << setw(1) << obs->_o.SNR2; 576 _out << setw(14) << setprecision(3) << obs->_o.S1 ; 577 _out << setw(16) << setprecision(3) << obs->_o.S2 ; 578 578 _out << endl; 579 579 580 delete ob ;580 delete obs; 581 581 } 582 582 }
Note:
See TracChangeset
for help on using the changeset viewer.