Changeset 5839 in ntrip for trunk/BNC


Ignore:
Timestamp:
Aug 6, 2014, 3:59:50 PM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/pppInclude.h

    r5825 r5839  
    44#include <string>
    55#include <vector>
     6#include <newmat.h>
    67
    78#include "bncconst.h"
     
    7374class t_orbCorr {
    7475 public:
     76  ColumnVector getX(const bncTime& tt) const {
     77    ColumnVector xx(3);
     78    double dt = tt - _time;
     79    xx[0] = _xr[0] + _dotXr[0] * dt;
     80    xx[1] = _xr[1] + _dotXr[1] * dt;
     81    xx[2] = _xr[2] + _dotXr[2] * dt;
     82    return xx;
     83  }
    7584  t_prn          prn() const {return _prn;}
    7685  unsigned short IOD() const {return _iod;}
     
    8089  char           _system;
    8190  double         _xr[3];
    82   double         _dotXr[3];
     91  double         _dotXr[3]; 
    8392};
    8493
    8594class t_clkCorr {
    8695 public:
     96  double getClk(const bncTime& tt) const {
     97    double dt = tt - _time;
     98    return _dClk + dt * _dotDClk + dt * dt * _dotDotDClk;   
     99  }
    87100  t_prn          prn() const {return _prn;}
    88101  unsigned short IOD() const {return _iod;}
  • trunk/BNC/src/ephemeris.cpp

    r5815 r5839  
    1212#include "bnctime.h"
    1313#include "bnccore.h"
     14#include "bncutils.h"
    1415#include "PPP/pppInclude.h"
    1516
     
    6364  position(tt.gpsw(), tt.gpssec(), xc.data(), vv.data());
    6465  if (useCorr) {
    65     throw "t_eph::getCrd: not yet implemented";
     66    if (_orbCorr && _clkCorr) {
     67      ColumnVector xr = _orbCorr->getX(tt);
     68      ColumnVector dx(3);
     69      if (_orbCorr->_system == 'R') {
     70        RSW_to_XYZ(xc.Rows(1,3), vv.Rows(1,3), xr, dx);
     71      }
     72      else {
     73        dx = xr;
     74      }
     75      xc[0] -= dx[0];
     76      xc[1] -= dx[1];
     77      xc[2] -= dx[2];
     78      xc[3] += _clkCorr->getClk(tt);
     79    }
     80    else {
     81      return failure;
     82    }
    6683  }
    6784  return success;
Note: See TracChangeset for help on using the changeset viewer.