1  #ifndef BNCRTNETUPLOADCASTER_H


2  #define BNCRTNETUPLOADCASTER_H


3 


4  #include <newmat.h>


5  #include "bncuploadcaster.h"


6  #include "bnctime.h"


7  #include "ephemeris.h"


8  extern "C" {


9  #include "clock_orbit_rtcm.h"


10  }


11 


12  class bncEphUser;


13  class bncoutf;


14  class bncClockRinex;


15  class bncSP3;


16 


17  class bncRtnetUploadCaster : public bncUploadCaster {


18  Q_OBJECT


19  public:


20  bncRtnetUploadCaster(const QString& mountpoint,


21  const QString& outHost, int outPort,


22  const QString& ntripVersion,


23  const QString& userName,const QString& password,


24  const QString& crdTrafo, bool CoM,


25  const QString& sp3FileName,


26  const QString& rnxFileName,


27  int PID, int SID, int IOD, int iRow);


28  void decodeRtnetStream(char* buffer, int bufLen);


29  protected:


30  virtual ~bncRtnetUploadCaster();


31  private:


32  void processSatellite(const t_eph* eph, int GPSweek,


33  double GPSweeks, const QString& prn,


34  const ColumnVector& rtnAPC,


35  double rtnClk,


36  const ColumnVector& rtnVel,


37  const ColumnVector& rtnCoM,


38  struct ClockOrbit::SatData* sd,


39  QString& outLine);


40  void crdTrafo(int GPSWeek, ColumnVector& xyz, double& dc);


41 


42  int determineUpdateInd(double samplingRate);


43 


44  QString _casterID;


45  bncEphUser* _ephUser;


46  QString _rtnetStreamBuffer;


47  QString _crdTrafo;


48  bool _CoM;


49  int _PID;


50  int _SID;


51  int _IOD;


52  int _samplRtcmClkCorr;


53  double _samplRtcmEphCorr;


54  double _dx;


55  double _dy;


56  double _dz;


57  double _dxr;


58  double _dyr;


59  double _dzr;


60  double _ox;


61  double _oy;


62  double _oz;


63  double _oxr;


64  double _oyr;


65  double _ozr;


66  double _sc;


67  double _scr;


68  double _t0;


69  bncClockRinex* _rnx;


70  bncSP3* _sp3;


71  QMap<QString, const t_eph*>* _usedEph;


72  };


73 


74  struct phaseBiasesSat {


75  phaseBiasesSat() {


76  yawAngle = 0.0;


77  yawRate = 0.0;


78  }


79  double yawAngle;


80  double yawRate;


81  };


82 


83  struct phaseBiasSignal {


84  phaseBiasSignal() {


85  bias = 0.0;


86  integerIndicator = 0;


87  wlIndicator = 0;


88  discontinuityCounter = 0;


89  }


90  QString type;


91  double bias;


92  unsigned int integerIndicator;


93  unsigned int wlIndicator;


94  unsigned int discontinuityCounter;


95  };


96 


97  #endif

