Changeset 6425 in ntrip
- Timestamp:
- Dec 24, 2014, 5:00:48 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/orbComp/sp3Comp.cpp
r6366 r6425 133 133 ++ret; 134 134 } 135 throw "satellite not found " + prn.toString();135 return -1; 136 136 } 137 137 … … 165 165 Matrix AA(dc.size(), nPar); AA = 0.0; 166 166 ColumnVector ll(dc.size()); ll = 0.0; 167 map<t_prn, double>::const_iterator it; int ii; 168 for (it = dc.begin(), ii = 0; it != dc.end(); it++, ii++) { 167 map<t_prn, double>::const_iterator it; 168 int ii = -1; 169 for (it = dc.begin(); it != dc.end(); it++) { 169 170 const t_prn& prn = it->first; 170 int index = epochs.size() + satIndex(clkSats, prn); 171 AA[ii][ie] = 1.0; // epoch-specfic offset (common for all satellites) 172 AA[ii][index] = 1.0; // satellite-specific offset (common for all epochs) 173 ll[ii] = it->second; 171 if (satIndex(clkSats, prn) != -1) { 172 ++ii; 173 int index = epochs.size() + satIndex(clkSats, prn); 174 AA[ii][ie] = 1.0; // epoch-specfic offset (common for all satellites) 175 AA[ii][index] = 1.0; // satellite-specific offset (common for all epochs) 176 ll[ii] = it->second; 177 } 174 178 } 175 179 SymmetricMatrix dN; dN << AA.t() * AA; … … 196 200 for (map<t_prn, double>::iterator it = dc.begin(); it != dc.end(); it++) { 197 201 const t_prn& prn = it->first; 198 int index = epochs.size() + satIndex(clkSats, prn); 199 dc[prn] = it->second - xx[ie] - xx[index]; 200 stat[prn.toString()]._offset = xx[index]; 202 if (satIndex(clkSats, prn) != -1) { 203 int index = epochs.size() + satIndex(clkSats, prn); 204 dc[prn] = it->second - xx[ie] - xx[index]; 205 stat[prn.toString()]._offset = xx[index]; 206 } 201 207 } 202 208 } … … 256 262 } 257 263 258 set<t_prn> clkSats ;264 set<t_prn> clkSatsAll; 259 265 260 266 for (unsigned ie = 0; ie < epochs.size(); ie++) { … … 280 286 XYZ_to_RSW(x1, vel, dx, dr[prn]); 281 287 if (epoch->_dc.find(prn) != epoch->_dc.end()) { 282 clkSats .insert(prn);288 clkSatsAll.insert(prn); 283 289 } 284 290 } … … 295 301 // Estimate Clock Offsets 296 302 // ---------------------- 297 processClocks(clkSats, epochs, stat); 303 string systems = "GR"; 304 for (unsigned iSys = 0; iSys < systems.size(); iSys++) { 305 char system = systems[iSys]; 306 set<t_prn> clkSats; 307 set<t_prn>::const_iterator it; 308 for (it = clkSatsAll.begin(); it != clkSatsAll.end(); it++) { 309 if (it->system() == system) { 310 clkSats.insert(*it); 311 } 312 } 313 processClocks(clkSats, epochs, stat); 314 } 298 315 299 316 // Print Residuals
Note:
See TracChangeset
for help on using the changeset viewer.