Changeset 3748 in ntrip for trunk/BNC/rinex/rnxnavfile.cpp


Ignore:
Timestamp:
Mar 30, 2012, 11:21:04 AM (12 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/rinex/rnxnavfile.cpp

    r3747 r3748  
    161161// Read Next Ephemeris
    162162////////////////////////////////////////////////////////////////////////////
    163 t_eph* t_rnxNavFile::getNextEph() {
    164   if (!_ephs.empty()) {
     163t_eph* t_rnxNavFile::getNextEph(const bncTime& tt) {
     164  while (!_ephs.empty()) {
    165165    t_eph* eph = _ephs.front();
    166     _ephs.pop();
    167     return eph;
     166    bncTime ephTime(eph->GPSweek(), eph->GPSweeks());
     167    double dt = ephTime - tt;
     168    if (dt < 4*3600.0) {
     169      _ephs.pop();
     170      return eph;
     171    }
     172    else {
     173      return 0;
     174    }
    168175  }
    169176  return 0;
Note: See TracChangeset for help on using the changeset viewer.