source: ntrip/trunk/BNC/src/pppInclude.h@ 9071

Last change on this file since 9071 was 8961, checked in by stuerze, 4 years ago

PPP update: pseudo obs tropo added

File size: 3.1 KB
RevLine 
[5678]1#ifndef PPP_H
2#define PPP_H
3
4#include <string>
[5747]5#include <vector>
[5839]6#include <newmat.h>
[5742]7
8#include "bncconst.h"
[5708]9#include "bnctime.h"
[6101]10#include "ephemeris.h"
[5742]11#include "t_prn.h"
[6135]12#include "satObs.h"
[5678]13
[5814]14namespace BNC_PPP {
[5678]15
[5825]16class t_except {
[5763]17 public:
[5825]18 t_except(const char* msg) {
[5763]19 _msg = msg;
20 }
[5825]21 ~t_except() {}
[5763]22 std::string what() {return _msg;}
23 private:
24 std::string _msg;
25};
26
[5743]27class t_output {
[5678]28 public:
[7926]29 bncTime _epoTime;
30 double _xyzRover[3];
31 double _covMatrix[6];
32 double _neu[3];
[6653]33 double _trp0;
34 double _trp;
35 double _trpStdev;
[7926]36 int _numSat;
37 double _hDop;
38 std::string _log;
39 bool _error;
[5678]40};
41
42class t_lc {
43 public:
[8961]44 enum type {dummy = 0, l1, l2, c1, c2, lIF, cIF, MW, CL, GIM, Tz0, maxLc};
[5678]45
46 static bool includesPhase(type tt) {
[6021]47 switch (tt) {
48 case l1:
49 case l2:
50 case lIF:
51 case MW:
52 case CL:
53 return true;
54 case c1:
55 case c2:
56 case cIF:
57 return false;
[8961]58 case dummy:
59 case maxLc:
[8905]60 case GIM:
[8961]61 case Tz0:
[8905]62 return false;
[6021]63 }
[5678]64 return false;
65 }
66
67 static bool includesCode(type tt) {
[6021]68 switch (tt) {
69 case c1:
70 case c2:
71 case cIF:
72 case MW:
73 case CL:
74 return true;
75 case l1:
76 case l2:
77 case lIF:
78 return false;
[8961]79 case dummy:
80 case maxLc:
[8905]81 case GIM:
[8961]82 case Tz0:
[8905]83 return false;
[6021]84 }
[5678]85 return false;
86 }
87
[6021]88 static t_frequency::type toFreq(char sys, type tt) {
89 switch (tt) {
90 case l1: case c1:
91 if (sys == 'G') return t_frequency::G1;
92 else if (sys == 'R') return t_frequency::R1;
93 else if (sys == 'E') return t_frequency::E1;
[6973]94 else if (sys == 'C') return t_frequency::C2;
[6021]95 else return t_frequency::dummy;
96 case l2: case c2:
97 if (sys == 'G') return t_frequency::G2;
98 else if (sys == 'R') return t_frequency::R2;
[6973]99 else if (sys == 'E') return t_frequency::E5;
100 else if (sys == 'C') return t_frequency::C7;
[6021]101 else return t_frequency::dummy;
[7926]102 case lIF: case cIF: case MW: case CL:
[6021]103 return t_frequency::dummy;
[8961]104 case dummy:
105 case maxLc:
[8905]106 case GIM:
[8961]107 case Tz0:
[8905]108 return t_frequency::dummy;
[6021]109 }
110 return t_frequency::dummy;
111 }
112
[5678]113 static std::string toString(type tt) {
[6021]114 switch (tt) {
115 case l1: return "l1";
116 case l2: return "l2";
117 case lIF: return "lIF";
118 case MW: return "MW";
119 case CL: return "CL";
120 case c1: return "c1";
121 case c2: return "c2";
122 case cIF: return "cIF";
[8905]123 case GIM: return "GIM";
[8961]124 case Tz0: return "Tz0";
125 case dummy:
126 case maxLc:
[8905]127 return "";
[6021]128 }
129 return "";
[5678]130 }
131};
132
[6101]133class interface_pppClient {
134 public:
[6103]135 virtual ~interface_pppClient() {};
[6101]136 virtual void processEpoch(const std::vector<t_satObs*>& satObs, t_output* output) = 0;
[7926]137 virtual void putEphemeris(const t_eph* eph) = 0;
138 virtual void putOrbCorrections(const std::vector<t_orbCorr*>& corr) = 0;
139 virtual void putClkCorrections(const std::vector<t_clkCorr*>& corr) = 0;
[6465]140 virtual void putCodeBiases(const std::vector<t_satCodeBias*>& satCodeBias) = 0;
[7926]141};
[6101]142
[5814]143} // namespace BNC_PPP
[5678]144
145#endif
Note: See TracBrowser for help on using the repository browser.