Changeset 884 in ntrip for trunk/BNS/bns.cpp
- Timestamp:
- May 8, 2008, 3:36:12 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNS/bns.cpp
r874 r884 39 39 _bnseph = new t_bnseph(parent); 40 40 41 connect(_bnseph, SIGNAL(newEph( gpsEph*)), this, SLOT(slotNewEph(gpsEph*)));41 connect(_bnseph, SIGNAL(newEph(t_eph*)), this, SLOT(slotNewEph(t_eph*))); 42 42 connect(_bnseph, SIGNAL(newMessage(QByteArray)), 43 43 this, SLOT(slotMessage(const QByteArray))); … … 229 229 // 230 230 //////////////////////////////////////////////////////////////////////////// 231 void t_bns::slotNewEph( gpsEph* ep) {231 void t_bns::slotNewEph(t_eph* ep) { 232 232 233 233 QMutexLocker locker(&_mutex); 234 234 235 235 t_ephPair* pair; 236 if ( !_ephList.contains(ep->prn ) ) {236 if ( !_ephList.contains(ep->prn()) ) { 237 237 pair = new t_ephPair(); 238 _ephList.insert(ep->prn , pair);239 } 240 else { 241 pair = _ephList[ep->prn ];238 _ephList.insert(ep->prn(), pair); 239 } 240 else { 241 pair = _ephList[ep->prn()]; 242 242 } 243 243 … … 246 246 } 247 247 else { 248 if (ep->GPSweek > pair->eph->GPSweek || 249 (ep->GPSweek == pair->eph->GPSweek && ep->TOC > pair->eph->TOC)) { 248 if (ep->isNewerThan(pair->eph)) { 250 249 delete pair->oldEph; 251 250 pair->oldEph = pair->eph; … … 328 327 QString prn; 329 328 ColumnVector xx(4); 330 gpsEph*ep = 0;329 t_eph* ep = 0; 331 330 332 331 if (oldEph == 0) { … … 344 343 if ( _ephList.contains(prn) ) { 345 344 t_ephPair* pair = _ephList[prn]; 346 prn = pair->eph->prn ;345 prn = pair->eph->prn(); 347 346 xx = pair->xx; 348 347 ep = pair->oldEph; … … 379 378 // 380 379 //////////////////////////////////////////////////////////////////////////// 381 void t_bns::processSatellite( gpsEph* ep, int GPSweek, double GPSweeks,380 void t_bns::processSatellite(t_eph* ep, int GPSweek, double GPSweeks, 382 381 const QString& prn, const ColumnVector& xx, 383 382 struct ClockOrbit::SatData* sd) { … … 386 385 ColumnVector vv(3); 387 386 388 satellitePosition(GPSweek, GPSweeks, ep, xB(1), xB(2), xB(3), xB(4), 389 vv(1), vv(2), vv(3)); 387 ep->position(GPSweek, GPSweeks, xB, vv); 390 388 391 389 ColumnVector dx = xx.Rows(1,3) - xB.Rows(1,3); … … 397 395 if (sd) { 398 396 sd->ID = prn.mid(1).toInt(); 399 sd->IOD = int(ep->IODE);397 sd->IOD = ep->IOD(); 400 398 sd->Clock.DeltaA0 = dClk; 401 399 sd->Orbit.DeltaRadial = rsw(1); … … 406 404 if (_outStream) { 407 405 QString line; 408 line.sprintf("%d %.1f %s %3d %3d%8.3f %8.3f %8.3f %8.3f\n",409 GPSweek, GPSweeks, ep->prn .toAscii().data(),410 int(ep->IODC), int(ep->IODE), dClk, rsw(1), rsw(2), rsw(3));411 406 line.sprintf("%d %.1f %s %3d %8.3f %8.3f %8.3f %8.3f\n", 407 GPSweek, GPSweeks, ep->prn().toAscii().data(), 408 ep->IOD(), dClk, rsw(1), rsw(2), rsw(3)); 409 *_outStream << line; 412 410 _outStream->flush(); 413 411 }
Note:
See TracChangeset
for help on using the changeset viewer.