Changeset 3382 in ntrip
- Timestamp:
- Aug 28, 2011, 6:08:33 PM (13 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncmodel.cpp
r3381 r3382 259 259 _ellBanc.ReSize(3); _ellBanc = 0.0; 260 260 261 // Save for Outlier Detection262 // -------------------------- 263 _epoData_sav = 0;261 // Save copy of data (used in outlier detection) 262 // --------------------------------------------- 263 _epoData_sav = new t_epoData(); 264 264 } 265 265 … … 1374 1374 else { 1375 1375 if (nNeglected == 0) { 1376 delete _epoData_sav; 1377 _epoData_sav = new t_epoData(*epoData); 1376 _epoData_sav->deepCopy(epoData); 1378 1377 } 1379 1378 } … … 1545 1544 } 1546 1545 1547 delete _epoData_sav; 1548 _epoData_sav = new t_epoData(*epoData); 1546 _epoData_sav->deepCopy(epoData); 1549 1547 } 1550 1548 … … 1568 1566 } 1569 1567 1570 epoData->tt = _epoData_sav->tt; 1571 QMapIterator<QString, t_satData*> itGPS(_epoData_sav->satDataGPS); 1572 while (itGPS.hasNext()) { 1573 itGPS.next(); 1574 epoData->satDataGPS.remove(itGPS.key()); 1575 epoData->satDataGPS[itGPS.key()] = new t_satData(*itGPS.value()); 1576 } 1577 QMapIterator<QString, t_satData*> itGlo(_epoData_sav->satDataGlo); 1578 while (itGlo.hasNext()) { 1579 itGlo.next(); 1580 epoData->satDataGlo.remove(itGlo.key()); 1581 epoData->satDataGlo[itGlo.key()] = new t_satData(*itGlo.value()); 1582 } 1583 QMapIterator<QString, t_satData*> itGal(_epoData_sav->satDataGal); 1584 while (itGal.hasNext()) { 1585 itGal.next(); 1586 epoData->satDataGal.remove(itGal.key()); 1587 epoData->satDataGal[itGal.key()] = new t_satData(*itGal.value()); 1588 } 1589 1568 epoData->deepCopy(_epoData_sav); 1590 1569 } 1591 1570 … … 1595 1574 std::vector<QString>* allPrns) { 1596 1575 1576 // GPS 1577 // --- 1597 1578 QMapIterator<QString, t_satData*> itGPS(epoData->satDataGPS); 1598 1579 while (itGPS.hasNext()) { -
trunk/BNC/bncpppclient.h
r3377 r3382 66 66 t_epoData() {} 67 67 68 t_epoData(const t_epoData& ed) { 69 tt = ed.tt; 70 QMapIterator<QString, t_satData*> itGPS(ed.satDataGPS); 68 ~t_epoData() { 69 clear(); 70 } 71 72 void clear() { 73 QMapIterator<QString, t_satData*> itGPS(satDataGPS); 74 while (itGPS.hasNext()) { 75 itGPS.next(); 76 delete itGPS.value(); 77 } 78 satDataGPS.clear(); 79 QMapIterator<QString, t_satData*> itGlo(satDataGlo); 80 while (itGlo.hasNext()) { 81 itGlo.next(); 82 delete itGlo.value(); 83 } 84 satDataGlo.clear(); 85 QMapIterator<QString, t_satData*> itGal(satDataGal); 86 while (itGal.hasNext()) { 87 itGal.next(); 88 delete itGal.value(); 89 } 90 satDataGal.clear(); 91 } 92 93 void deepCopy(const t_epoData* from) { 94 clear(); 95 tt = from->tt; 96 QMapIterator<QString, t_satData*> itGPS(from->satDataGPS); 71 97 while (itGPS.hasNext()) { 72 98 itGPS.next(); 73 99 satDataGPS[itGPS.key()] = new t_satData(*itGPS.value()); 74 100 } 75 QMapIterator<QString, t_satData*> itGlo( ed.satDataGlo);101 QMapIterator<QString, t_satData*> itGlo(from->satDataGlo); 76 102 while (itGlo.hasNext()) { 77 103 itGlo.next(); 78 104 satDataGlo[itGlo.key()] = new t_satData(*itGlo.value()); 79 105 } 80 QMapIterator<QString, t_satData*> itGal( ed.satDataGal);106 QMapIterator<QString, t_satData*> itGal(from->satDataGal); 81 107 while (itGal.hasNext()) { 82 108 itGal.next(); … … 85 111 } 86 112 87 ~t_epoData() {88 QMapIterator<QString, t_satData*> itGPS(satDataGPS);89 while (itGPS.hasNext()) {90 itGPS.next();91 delete itGPS.value();92 }93 QMapIterator<QString, t_satData*> itGlo(satDataGlo);94 while (itGlo.hasNext()) {95 itGlo.next();96 delete itGlo.value();97 }98 QMapIterator<QString, t_satData*> itGal(satDataGal);99 while (itGal.hasNext()) {100 itGal.next();101 delete itGal.value();102 }103 }104 113 unsigned sizeGPS() const {return satDataGPS.size();} 105 114 unsigned sizeGlo() const {return satDataGlo.size();}
Note:
See TracChangeset
for help on using the changeset viewer.