Changeset 6109 in ntrip for trunk/BNC/src


Ignore:
Timestamp:
Sep 8, 2014, 3:49:16 PM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/RTCM/rtcm_utils.cpp

    r2492 r6109  
    3636  // --------------
    3737  rho = 0.0;
    38   eph->position(GPSWeek, GPSWeeks, xSat, ySat, zSat, clkSat);
     38  ColumnVector xc(4);
     39  ColumnVector vv(3);
     40  eph->getCrd(bncTime(GPSWeek, GPSWeeks), xc, vv, false);
     41  xSat   = xc(1);
     42  ySat   = xc(2);
     43  zSat   = xc(3);
     44  clkSat = xc(4);
    3945
    4046  ////cout << "----- cmpRho -----\n";
     
    7783    }
    7884     
    79     eph->position(GPSWeek_tot, GPSWeeks_tot, xSat, ySat, zSat, clkSat);
     85    eph->getCrd(bncTime(GPSWeek_tot, GPSWeeks_tot), xc, vv, false);
     86    xSat   = xc(1);
     87    ySat   = xc(2);
     88    zSat   = xc(3);
     89    clkSat = xc(4);
    8090
    8191    dx = xRec - xSat;
  • trunk/BNC/src/combination/bnccomb.cpp

    r5867 r6109  
    412412  ColumnVector oldXC(4);
    413413  ColumnVector oldVV(3);
    414   corr->eph->position(corr->tRao.gpsw(), corr->tRao.gpssec(),
    415                       oldXC.data(), oldVV.data());
     414  corr->eph->getCrd(corr->tRao, oldXC, oldVV, false);
    416415
    417416  ColumnVector newXC(4);
    418417  ColumnVector newVV(3);
    419   lastEph->position(corr->tRao.gpsw(), corr->tRao.gpssec(),
    420                     newXC.data(), newVV.data());
     418  lastEph->getCrd(corr->tRao, newXC, newVV, false);
    421419
    422420  ColumnVector dX = newXC.Rows(1,3) - oldXC.Rows(1,3);
     
    640638    const t_eph* eph = corr->eph;
    641639    if (eph) {
    642       double xx, yy, zz, cc;
    643       eph->position(_resTime.gpsw(), _resTime.gpssec(), xx, yy, zz, cc);
     640      ColumnVector xc(4);
     641      ColumnVector vv(3);
     642      eph->getCrd(_resTime, xc, vv, false);
    644643
    645644      out << _resTime.datestr().c_str() << " "
     
    648647      out << "Full Clock " << corr->prn << " " << corr->iod << " ";
    649648      out.setFieldWidth(14);
    650       out << (cc + corr->dClk) * t_CST::c << endl;
     649      out << (xc(4) + corr->dClk) * t_CST::c << endl;
    651650      out.setFieldWidth(0);
    652651    }
     
    679678    ColumnVector xc(4);
    680679    ColumnVector vv(3);
    681     corr->eph->position(_resTime.gpsw(), _resTime.gpssec(),
    682                         xc.data(), vv.data());
     680    corr->eph->getCrd(_resTime, xc, vv, false);
    683681   
    684682    // Correction Phase Center --> CoM
  • trunk/BNC/src/ephemeris.cpp

    r6044 r6109  
    4040//
    4141////////////////////////////////////////////////////////////////////////////
    42 t_irc t_eph::getCrd(const bncTime& tt, ColumnVector& xc,
    43                     ColumnVector& vv, bool useCorr) const {
     42t_irc t_eph::getCrd(const bncTime& tt, ColumnVector& xc, ColumnVector& vv, bool useCorr) const {
    4443  xc.ReSize(4);
    4544  vv.ReSize(3);
  • 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] 
  • trunk/BNC/src/rinex/reqcanalyze.cpp

    r6017 r6109  
    554554         
    555555          if (eph) {
    556             double xSat, ySat, zSat, clkSat;
    557             eph->position(oneObs->_GPSWeek, oneObs->_GPSWeeks,
    558                           xSat, ySat, zSat, clkSat);
     556            ColumnVector xc(4);
     557            ColumnVector vv(3);
     558            eph->getCrd(bncTime(oneObs->_GPSWeek, oneObs->_GPSWeeks), xc, vv, false);
    559559         
    560560            double rho, eleSat, azSat;
    561             topos(xyzSta(1), xyzSta(2), xyzSta(3),
    562                   xSat, ySat, zSat, rho, eleSat, azSat);
     561            topos(xyzSta(1), xyzSta(2), xyzSta(3), xc(1), xc(2), xc(3), rho, eleSat, azSat);
    563562         
    564563            aziDeg = azSat * 180.0/M_PI;
     
    764763    if (eph) {
    765764      ++nSatUsed;
    766       ColumnVector xSat(3);
    767       double clkSat;
    768       eph->position(_currEpo->tt.gpsw(), _currEpo->tt.gpssec(),
    769                     xSat(1), xSat(2), xSat(3), clkSat);
    770       ColumnVector dx = xSat - xyzSta;
     765      ColumnVector xSat(4);
     766      ColumnVector vv(3);
     767      eph->getCrd(_currEpo->tt, xSat, vv, false);
     768      ColumnVector dx = xSat.Rows(1,3) - xyzSta;
    771769      double rho = dx.norm_Frobenius();
    772770      AA(nSatUsed,1) = dx(1) / rho;
  • trunk/BNC/src/src.pri

    r6095 r6109  
    116116}
    117117
    118 exists(PPP) {
     118exists(PPPxxx) {
    119119  INCLUDEPATH += PPP
    120120  HEADERS += PPP/pppClient.h    PPP/pppObsPool.h   PPP/pppEphPool.h   \
  • trunk/BNC/src/upload/bncrtnetuploadcaster.cpp

    r5776 r6109  
    647647  ColumnVector xB(4);
    648648  ColumnVector vB(3);
    649   eph->position(GPSweek, GPSweeks, xB.data(), vB.data());
     649  eph->getCrd(bncTime(GPSweek, GPSweeks), xB, vB, false);
    650650
    651651  // Precise Position
Note: See TracChangeset for help on using the changeset viewer.