Changeset 6109 in ntrip for trunk/BNC/src/ephemeris.h


Ignore:
Timestamp:
Sep 8, 2014, 3:49:16 PM (10 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

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

    r5853 r6109  
    2525  virtual ~t_eph() {};
    2626
    27   static bool earlierTime(const t_eph* eph1, const t_eph* eph2) {
    28     return eph1->_TOC < eph2->_TOC;
    29   }
    30 
    31   virtual e_type type() const = 0;
     27  virtual e_type  type() const = 0;
    3228  virtual QString toString(double version) const = 0;
    33   virtual void position(int GPSweek, double GPSweeks,
    34                         double* xc, double* vv) const = 0;
    35   virtual int  IOD() const = 0;
    36 
    37   bool ok() const {return _ok;}
     29  virtual int     IOD() const = 0;
     30  virtual int     slotNum() const {return 0;}
     31  bool    ok() const {return _ok;}
    3832  bncTime TOC() const {return _TOC;}
    39   bool isNewerThan(const t_eph* eph) const {
    40     return earlierTime(eph, this);
    41   }
    42   t_prn prn() const {return _prn;}
     33  bool    isNewerThan(const t_eph* eph) const {return earlierTime(eph, this);}
     34  t_prn   prn() const {return _prn;}
     35  t_irc   getCrd(const bncTime& tt, ColumnVector& xc, ColumnVector& vv, bool useCorr) const;
     36  void    setOrbCorr(const BNC_PPP::t_orbCorr* orbCorr);
     37  void    setClkCorr(const BNC_PPP::t_clkCorr* clkCorr);
    4338  const QDateTime& receptDateTime() const {return _receptDateTime;}
    44 
    45   void position(int GPSweek, double GPSweeks,
    46                 double& xx, double& yy, double& zz, double& cc) const {
    47     double tmp_xx[4];
    48     double tmp_vv[4];
    49     position(GPSweek, GPSweeks, tmp_xx, tmp_vv);
    50 
    51     xx = tmp_xx[0];
    52     yy = tmp_xx[1];
    53     zz = tmp_xx[2];
    54     cc = tmp_xx[3];
    55   }
    56 
    57   t_irc getCrd(const bncTime& tt, ColumnVector& xc,
    58                ColumnVector& vv, bool useCorr) const;
    59   void setOrbCorr(const BNC_PPP::t_orbCorr* orbCorr);
    60   void setClkCorr(const BNC_PPP::t_clkCorr* clkCorr);
    61   virtual int slotNum() const {return 0;}
    62 
    63   static QString rinexDateStr(const bncTime& tt, const t_prn& prn,
    64                               double version);
    65 
    66   static QString rinexDateStr(const bncTime& tt, const QString& prnStr,
    67                               double version);
     39  static QString rinexDateStr(const bncTime& tt, const t_prn& prn, double version);
     40  static QString rinexDateStr(const bncTime& tt, const QString& prnStr, double version);
     41  static bool earlierTime(const t_eph* eph1, const t_eph* eph2) {return eph1->_TOC < eph2->_TOC;}
    6842
    6943 protected: 
    70   t_prn           _prn;
    71   bncTime         _TOC;
    72   QDateTime       _receptDateTime;
    73   bool            _ok;
     44  virtual void position(int GPSweek, double GPSweeks, double* xc, double* vv) const = 0;
     45  t_prn               _prn;
     46  bncTime             _TOC;
     47  QDateTime           _receptDateTime;
     48  bool                _ok;
    7449  BNC_PPP::t_orbCorr* _orbCorr;
    7550  BNC_PPP::t_clkCorr* _clkCorr;
     
    8560
    8661  virtual e_type type() const {return t_eph::GPS;}
    87 
    8862  virtual QString toString(double version) const;
    89 
     63  virtual int  IOD() const { return static_cast<int>(_IODC); }
    9064  void set(const gpsephemeris* ee);
    91 
    92   virtual void position(int GPSweek, double GPSweeks,
    93                         double* xc,
    94                         double* vv) const;
    95 
    96   virtual int  IOD() const { return static_cast<int>(_IODC); }
    97 
    9865  double TGD() const {return _TGD;} // Timing Group Delay (P1-P2 DCB)
    9966
    10067 private:
     68  virtual void position(int GPSweek, double GPSweeks, double* xc, double* vv) const;
     69
    10170  double  _clock_bias;      // [s]   
    10271  double  _clock_drift;     // [s/s] 
     
    142111  t_ephGlo() { _xv.ReSize(6); }
    143112  t_ephGlo(float rnxVersion, const QStringList& lines);
    144 
    145113  virtual ~t_ephGlo() {}
    146114
    147115  virtual e_type type() const {return t_eph::GLONASS;}
    148 
    149116  virtual QString toString(double version) const;
    150 
    151   virtual void position(int GPSweek, double GPSweeks,
    152                         double* xc,
    153                         double* vv) const;
    154 
    155117  virtual int  IOD() const;
    156 
     118  virtual int slotNum() const {return int(_frequency_number);}
    157119  void set(const glonassephemeris* ee);
    158120
    159   virtual int slotNum() const {return int(_frequency_number);}
    160 
    161121 private:
    162   static ColumnVector glo_deriv(double /* tt */, const ColumnVector& xv,
    163                                 double* acc);
     122  virtual void position(int GPSweek, double GPSweeks, double* xc, double* vv) const;
     123  static ColumnVector glo_deriv(double /* tt */, const ColumnVector& xv, double* acc);
    164124
    165125  mutable bncTime      _tt;  // time
     
    195155
    196156  virtual QString toString(double version) const;
    197 
    198157  virtual e_type type() const {return t_eph::Galileo;}
    199 
     158  virtual int  IOD() const { return static_cast<int>(_IODnav); }
    200159  void set(const galileoephemeris* ee);
    201160
    202   virtual void position(int GPSweek, double GPSweeks,
    203                         double* xc,
    204                         double* vv) const;
    205 
    206   virtual int  IOD() const { return static_cast<int>(_IODnav); }
    207 
    208161 private:
     162  virtual void position(int GPSweek, double GPSweeks, double* xc, double* vv) const;
     163
    209164  double  _clock_bias;       //  [s]   
    210165  double  _clock_drift;      //  [s/s] 
Note: See TracChangeset for help on using the changeset viewer.