Changeset 2040 in ntrip


Ignore:
Timestamp:
Nov 26, 2009, 3:30:26 PM (14 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/RTCM3/ephemeris.h

    r1807 r2040  
    5050  t_ephGPS() { }
    5151  ~t_ephGPS() {}
     52  double TOC() const {return _TOC;}
    5253
    5354  void set(const gpsephemeris* ee);
  • trunk/BNC/bncpppclient.cpp

    r2039 r2040  
    115115  QString prn = QString("G%1").arg(gpseph.satellite, 2, 10, QChar('0'));
    116116
     117  cout << "EPH " << prn.toAscii().data() << " " << gpseph.IODE << " "
     118       << gpseph.IODC << endl;
     119
    117120  if (_eph.contains(prn)) {
    118     (static_cast<t_ephGPS*>(_eph.value(prn)))->set(&gpseph);
     121    t_ephGPS* ee = static_cast<t_ephGPS*>(_eph.value(prn));
     122    if ( (ee->GPSweek() <  gpseph.GPSweek) ||
     123         (ee->GPSweek() == gpseph.GPSweek && 
     124          ee->TOC()     <  gpseph.TOC) ) { 
     125      ee->set(&gpseph);
     126    }
    119127  }
    120128  else {
     
    160168
    161169  if (_eph.contains(prn)) {
    162     _eph.value(prn)->position(tt.gpsw(), tt.gpssec(), xc.data(), vv.data());
     170    t_eph* ee = _eph.value(prn);
     171    ee->position(tt.gpsw(), tt.gpssec(), xc.data(), vv.data());
     172
     173    if (_corr.contains(prn)) {
     174      t_corr* cc = _corr.value(prn);
     175      cout << "found: " << prn.toAscii().data()
     176           << " age: "  << (tt - cc->tt) << " "
     177           << ee->IOD() << " " << cc->iod << endl;
     178    }
     179    else {
     180      cout << "not found: " << prn.toAscii().data() << endl;
     181    }
     182
    163183    return success;
    164184  }
Note: See TracChangeset for help on using the changeset viewer.