Changeset 2049 in ntrip
- Timestamp:
- Nov 29, 2009, 10:21:42 AM (15 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncpppclient.cpp
r2044 r2049 203 203 } 204 204 205 // Correct Time of Transmission 206 //////////////////////////////////////////////////////////////////////////// 207 t_irc bncPPPclient::cmpToT(const QString& prn, t_satData* satData) { 208 209 double prange = satData->C1; 210 if (prange == 0.0) { 211 prange = satData->P1; 212 } 213 if (prange == 0.0) { 214 return failure; 215 } 216 217 double clkSat = 0.0; 218 for (int ii = 1; ii <= 10; ii++) { 219 220 t_time ToT = _epoData->tt - prange / t_CST::c - clkSat; 221 222 ColumnVector xc(4); 223 ColumnVector vv(3); 224 bool corr = false; 225 if (getSatPos(ToT, prn, xc, vv, corr) != success) { 226 return failure; 227 } 228 229 double clkSatOld = clkSat; 230 clkSat = xc(4) * t_CST::c; 231 232 if ( fabs(clkSat-clkSatOld) * t_CST::c < 1.e-4 ) { 233 satData->xx = xc.Rows(1,3); 234 satData->vv = vv; 235 satData->clk = clkSat; 236 satData->clkCorr = corr; 237 return success; 238 } 239 } 240 241 return failure; 242 } 243 205 244 // 206 245 //////////////////////////////////////////////////////////////////////////// … … 209 248 cout.setf(ios::fixed); 210 249 211 QMapIterator<QString, t_satData*> it(_epoData->satData); 250 QMutableMapIterator<QString, t_satData*> it(_epoData->satData); 251 212 252 while (it.hasNext()) { 213 253 it.next(); … … 215 255 t_satData* satData = it.value(); 216 256 217 ColumnVector xc(4); 218 ColumnVector vv(3); 219 220 bool corr = false; 221 if (getSatPos(_epoData->tt, prn, xc, vv, corr) == success) { 222 cout << _epoData->tt.timestr(1) << " " << prn.toAscii().data() << " " 223 << setw(14) << setprecision(3) << xc(1) << " " 224 << setw(14) << setprecision(3) << xc(2) << " " 225 << setw(14) << setprecision(3) << xc(3) << " " 226 << setw(12) << setprecision(6) << xc(4)*1.e6; 227 if (corr) { 228 cout << endl; 229 } 230 else { 231 cout << " !\n"; 232 } 257 if (cmpToT(prn, satData) != success) { 258 delete satData; 259 it.remove(); 260 continue; 261 } 262 263 cout << _epoData->tt.timestr(1) << " " << prn.toAscii().data() << " " 264 << setw(14) << setprecision(3) << satData->xx(1) << " " 265 << setw(14) << setprecision(3) << satData->xx(2) << " " 266 << setw(14) << setprecision(3) << satData->xx(3) << " " 267 << setw(12) << setprecision(3) << satData->clk; 268 269 if (satData->clkCorr) { 270 cout << endl; 271 } 272 else { 273 cout << " !\n"; 233 274 } 234 275 } … … 237 278 cout.flush(); 238 279 } 280 -
trunk/BNC/bncpppclient.h
r2044 r2049 45 45 double L1; 46 46 double L2; 47 ColumnVector xx; 48 ColumnVector vv; 49 double clk; 50 bool clkCorr; 47 51 }; 48 52 … … 89 93 void processEpoch(); 90 94 void applyCorr(const t_corr* cc, ColumnVector& xc, ColumnVector& vv); 95 t_irc cmpToT(const QString& prn, t_satData* satData); 91 96 92 97 QByteArray _staID;
Note:
See TracChangeset
for help on using the changeset viewer.