Changeset 2768 in ntrip for trunk/BNS


Ignore:
Timestamp:
Dec 12, 2010, 10:14:49 AM (13 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNS/bns.cpp

    r2767 r2768  
    467467        }
    468468
     469        // Use old ephemeris if the new one is too recent
     470        // ----------------------------------------------
    469471        t_eph* ep = 0;
    470472        if (pair) {
    471473          ep = pair->eph;
    472           //// ep = pair->oldEph;
     474          if (pair->oldEph && ep &&
     475              ep->receptDateTime().secsTo(QDateTime::currentDateTime()) < 60) {
     476            ep = pair->oldEph;
     477          }
    473478        }
    474479
  • trunk/BNS/bnseph.cpp

    r2645 r2768  
    177177   
    178178  if (eph->read(lines) == success) {
     179    eph->setRecepDateTime(QDateTime::currentDateTime());
    179180    emit(newEph(eph, nBytes));
    180181  }
  • trunk/BNS/bnseph.h

    r2618 r2768  
    1717  bool    isNewerThan(const t_eph* eph) const;
    1818  QString prn() const {return _prn;}
     19  void    setRecepDateTime(const QDateTime& dateTime) {
     20    _receptDateTime = dateTime;
     21  }
     22  const QDateTime& receptDateTime() const {return _receptDateTime;}
    1923
    2024  virtual void position(int GPSweek, double GPSweeks, ColumnVector& xc,
     
    2529
    2630 protected: 
    27   QString _prn;
    28   int     _GPSweek;
    29   double  _GPSweeks;
     31  QString   _prn;
     32  int       _GPSweek;
     33  double    _GPSweeks;
     34  QDateTime _receptDateTime;
    3035};
    3136
Note: See TracChangeset for help on using the changeset viewer.