Changeset 6362 in ntrip for trunk/BNC/src
- Timestamp:
- Dec 1, 2014, 7:44:42 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/orbComp/sp3Comp.cpp
r6361 r6362 209 209 // Synchronize reading of two sp3 files 210 210 // ------------------------------------ 211 bncSP3 in1(_sp3FileNames[0]); 212 bncSP3 in2(_sp3FileNames[1]); 211 bncSP3 in1(_sp3FileNames[0]); in1.nextEpoch(); 212 bncSP3 in2(_sp3FileNames[1]); in2.nextEpoch(); 213 213 214 214 vector<t_epoch*> epochs; 215 215 set<t_prn> clkSats; 216 while (in1.nextEpoch()) { 217 bncTime tt = in1.currEpoch()->_tt; 218 while (in2.nextEpoch()) { 219 if (tt == in2.currEpoch()->_tt) { 220 t_epoch* epo = new t_epoch; epo->_tt = tt; 221 222 bool epochOK = false; 223 for (int i1 = 0; i1 < in1.currEpoch()->_sp3Sat.size(); i1++) { 224 bncSP3::t_sp3Sat* sat1 = in1.currEpoch()->_sp3Sat[i1]; 225 for (int i2 = 0; i2 < in2.currEpoch()->_sp3Sat.size(); i2++) { 226 bncSP3::t_sp3Sat* sat2 = in2.currEpoch()->_sp3Sat[i2]; 227 if (sat1->_prn == sat2->_prn) { 228 epochOK = true; 229 epo->_dr[sat1->_prn] = sat1->_xyz - sat2->_xyz; 230 epo->_xyz[sat1->_prn] = sat1->_xyz; 231 if (sat1->_clkValid && sat2->_clkValid) { 232 epo->_dc[sat1->_prn] = sat1->_clk - sat2->_clk; 233 clkSats.insert(sat1->_prn); 234 } 216 while (in1.currEpoch() && in2.currEpoch()) { 217 bncTime t1 = in1.currEpoch()->_tt; 218 bncTime t2 = in2.currEpoch()->_tt; 219 if (t1 < t2) { 220 in1.nextEpoch(); 221 } 222 else if (t1 > t2) { 223 in2.nextEpoch(); 224 } 225 else if (t1 == t2) { 226 t_epoch* epo = new t_epoch; epo->_tt = t1; 227 bool epochOK = false; 228 for (int i1 = 0; i1 < in1.currEpoch()->_sp3Sat.size(); i1++) { 229 bncSP3::t_sp3Sat* sat1 = in1.currEpoch()->_sp3Sat[i1]; 230 for (int i2 = 0; i2 < in2.currEpoch()->_sp3Sat.size(); i2++) { 231 bncSP3::t_sp3Sat* sat2 = in2.currEpoch()->_sp3Sat[i2]; 232 if (sat1->_prn == sat2->_prn) { 233 epochOK = true; 234 epo->_dr[sat1->_prn] = sat1->_xyz - sat2->_xyz; 235 epo->_xyz[sat1->_prn] = sat1->_xyz; 236 if (sat1->_clkValid && sat2->_clkValid) { 237 epo->_dc[sat1->_prn] = sat1->_clk - sat2->_clk; 238 clkSats.insert(sat1->_prn); 235 239 } 236 240 } 237 241 } 238 if (epochOK) { 239 epochs.push_back(epo); 240 } 241 else { 242 delete epo; 243 } 244 break; 245 } 242 } 243 if (epochOK) { 244 epochs.push_back(epo); 245 } 246 else { 247 delete epo; 248 } 249 in1.nextEpoch(); 250 in2.nextEpoch(); 246 251 } 247 252 }
Note:
See TracChangeset
for help on using the changeset viewer.