Changeset 5749 in ntrip


Ignore:
Timestamp:
Aug 3, 2014, 10:55:00 AM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/ephpool.cpp

    r5743 r5749  
    4949/////////////////////////////////////////////////////////////////////////////
    5050void t_ephPool::putEphemeris(t_eph* eph) {
    51   if (eph && eph->isOK()) {
     51  if (eph && eph->ok()) {
    5252    _satEphPool[eph->prn().toInt()].putEphemeris(_maxQueueSize, eph);
    5353  }
     
    119119  for (unsigned ii = 0; ii < _ephs.size(); ii++) {
    120120    t_eph* eph = _ephs[ii];
    121     if (eph->IOD() == corr->IOD() || corr->absClk()) {
     121    if (eph->IOD() == corr->IOD()) {
    122122      eph->setClkCorr(corr);
    123123    }
     
    133133    t_eph* eph = _ephs[ii];
    134134    t_irc irc = eph->getCrd(tt, xc, vv);
    135     if (irc == t_irc::success) {
    136       if (eph->prn().system() == 'R') {
    137         double age = tt - eph->toc();
     135    if (irc == success) {
     136      if (eph->system() == 'R') {
     137        double age = tt - eph->TOC();
    138138        if (fabs(age) > 3600.0) {
    139139          continue;
     
    143143    }
    144144  }
    145   return t_irc::failure;
     145  return failure;
    146146}
    147147
     
    150150int t_ephPool::t_satEphPool::getChannel() const {
    151151  if (_ephs.size() > 0) {
    152     return _ephs[0]->getChannel();
     152    return _ephs[0]->slotNum();
    153153  }
    154154  return 0;
  • trunk/BNC/src/PPP/ppp.h

    r5747 r5749  
    5454class t_orbCorr {
    5555 public:
     56  t_prn          prn() const {return _prn;}
     57  unsigned short IOD() const {return _iod;}
    5658  t_prn          _prn;
    5759  unsigned short _iod;
     
    6466class t_clkCorr {
    6567 public:
     68  t_prn          prn() const {return _prn;}
     69  unsigned short IOD() const {return _iod;}
    6670  t_prn          _prn;
    6771  unsigned short _iod;
    6872  bncTime        _time;
    69   bool           _absClk;
    7073  double         _dClk;
    7174  double         _dotDClk;
  • trunk/BNC/src/ephemeris.cpp

    r5738 r5749  
    1212#include "bnctime.h"
    1313#include "bnccore.h"
    14 
     14#include "PPP/ppp.h"
     15
     16using namespace BNC;
    1517using namespace std;
    1618
     
    3032  }
    3133  return crc;
     34}
     35
     36// Constructor
     37////////////////////////////////////////////////////////////////////////////
     38t_eph::t_eph() {
     39  _ok      = false;
     40  _orbCorr = 0;
     41  _clkCorr = 0;
     42}
     43
     44//
     45////////////////////////////////////////////////////////////////////////////
     46void t_eph::setOrbCorr(const BNC::t_orbCorr* orbCorr) {
     47  delete _orbCorr;
     48  _orbCorr = new t_orbCorr(*orbCorr);
     49}
     50
     51//
     52////////////////////////////////////////////////////////////////////////////
     53void t_eph::setClkCorr(const BNC::t_clkCorr* clkCorr) {
     54  delete _clkCorr;
     55  _clkCorr = new t_clkCorr(*clkCorr);
     56}
     57
     58//
     59////////////////////////////////////////////////////////////////////////////
     60t_irc t_eph::getCrd(const bncTime& tt, ColumnVector& xc,
     61                    ColumnVector& vv, bool noCorr) const {
     62  xc.ReSize(4);
     63  vv.ReSize(3);
     64  position(tt.gpsw(), tt.gpssec(), xc.data(), vv.data());
     65  if (!noCorr) {
     66    throw "t_eph::getCrd: not yet implemented";
     67  }
     68  return success;
    3269}
    3370
  • trunk/BNC/src/ephemeris.h

    r5738 r5749  
    77#include <string>
    88#include "bnctime.h"
     9#include "bncconst.h"
    910extern "C" {
    1011#include "rtcm3torinex.h"
    1112}
    1213
     14namespace BNC {
     15  class t_orbCorr;
     16  class t_clkCorr;
     17}
     18
    1319class t_eph {
    1420 public:
     
    1622  enum e_type {unknown, GPS, GLONASS, Galileo};
    1723
    18   t_eph() {_ok = false;}
     24  t_eph();
    1925  virtual ~t_eph() {};
    2026
     
    3642  }
    3743  QString prn() const {return _prn;}
     44  char system() const {return _prn[0].toAscii();}
    3845  const QDateTime& receptDateTime() const {return _receptDateTime;}
    3946
     
    5057  }
    5158
     59  t_irc getCrd(const bncTime& tt, ColumnVector& xc,
     60               ColumnVector& vv, bool noCorr = false) const;
     61  void setOrbCorr(const BNC::t_orbCorr* orbCorr);
     62  void setClkCorr(const BNC::t_clkCorr* clkCorr);
     63  virtual int slotNum() const {return 0;}
     64
    5265  static QString rinexDateStr(const bncTime& tt, const QString& prn,
    5366                              double version);
    5467
    5568 protected: 
    56   QString   _prn;
    57   bncTime   _TOC;
    58   QDateTime _receptDateTime;
    59   bool      _ok;
     69  QString         _prn;
     70  bncTime         _TOC;
     71  QDateTime       _receptDateTime;
     72  bool            _ok;
     73  BNC::t_orbCorr* _orbCorr;
     74  BNC::t_clkCorr* _clkCorr;
    6075};
    6176
     
    143158  void set(const glonassephemeris* ee);
    144159
    145   int slotNum() const {return int(_frequency_number);}
     160  virtual int slotNum() const {return int(_frequency_number);}
    146161
    147162 private:
Note: See TracChangeset for help on using the changeset viewer.