[5678] | 1 | #ifndef PPP_H
|
---|
| 2 | #define PPP_H
|
---|
| 3 |
|
---|
| 4 | #include <string>
|
---|
[5747] | 5 | #include <vector>
|
---|
[5742] | 6 |
|
---|
| 7 | #include "bncconst.h"
|
---|
[5708] | 8 | #include "bnctime.h"
|
---|
[5742] | 9 | #include "t_prn.h"
|
---|
[5678] | 10 |
|
---|
| 11 | namespace BNC {
|
---|
| 12 |
|
---|
[5763] | 13 | class pppExcept {
|
---|
| 14 | public:
|
---|
| 15 | pppExcept(const char* msg) {
|
---|
| 16 | _msg = msg;
|
---|
| 17 | }
|
---|
| 18 | ~pppExcept() {}
|
---|
| 19 | std::string what() {return _msg;}
|
---|
| 20 | private:
|
---|
| 21 | std::string _msg;
|
---|
| 22 | };
|
---|
| 23 |
|
---|
[5678] | 24 | enum e_pppMode {
|
---|
| 25 | mode_PPP_DF,
|
---|
| 26 | mode_SPP_DF,
|
---|
| 27 | mode_PPP_SF,
|
---|
| 28 | mode_SPP_SF,
|
---|
| 29 | };
|
---|
| 30 |
|
---|
[5743] | 31 | class t_output {
|
---|
[5678] | 32 | public:
|
---|
| 33 | bncTime _epoTime;
|
---|
| 34 | double _xyzRover[3];
|
---|
| 35 | double _covMatrix[6];
|
---|
| 36 | int _numSat;
|
---|
| 37 | double _pDop;
|
---|
| 38 | std::string _log;
|
---|
| 39 | bool _error;
|
---|
| 40 | };
|
---|
| 41 |
|
---|
[5780] | 42 | class t_pppObs {
|
---|
[5678] | 43 | public:
|
---|
[5780] | 44 | t_pppObs() {
|
---|
[5750] | 45 | _code = 0.0;
|
---|
| 46 | _codeValid = false;
|
---|
| 47 | _phase = 0.0;
|
---|
| 48 | _phaseValid = false;
|
---|
| 49 | _doppler = 0.0;
|
---|
| 50 | _dopplerValid = false;
|
---|
| 51 | _snr = 0.0;
|
---|
| 52 | _snrValid = false;
|
---|
| 53 | _slip = false;
|
---|
| 54 | _slipCounter = 0;
|
---|
| 55 | _biasJumpCounter = 0;
|
---|
| 56 | }
|
---|
[5678] | 57 | std::string _rnxType2ch;
|
---|
| 58 | double _code;
|
---|
| 59 | bool _codeValid;
|
---|
| 60 | double _phase;
|
---|
| 61 | bool _phaseValid;
|
---|
| 62 | double _doppler;
|
---|
| 63 | bool _dopplerValid;
|
---|
| 64 | double _snr;
|
---|
| 65 | bool _snrValid;
|
---|
| 66 | bool _slip;
|
---|
| 67 | int _slipCounter;
|
---|
[5742] | 68 | int _biasJumpCounter;
|
---|
[5678] | 69 | };
|
---|
| 70 |
|
---|
[5744] | 71 | class t_pppSatObs {
|
---|
[5678] | 72 | public:
|
---|
[5784] | 73 | t_pppSatObs() {}
|
---|
| 74 | ~t_pppSatObs() {for (unsigned ii = 0; ii < _obs.size(); ii++) delete _obs[ii];}
|
---|
| 75 | t_prn _prn;
|
---|
| 76 | bncTime _time;
|
---|
| 77 | std::vector<t_pppObs*> _obs;
|
---|
[5678] | 78 | };
|
---|
| 79 |
|
---|
[5742] | 80 | class t_orbCorr {
|
---|
[5678] | 81 | public:
|
---|
[5749] | 82 | t_prn prn() const {return _prn;}
|
---|
| 83 | unsigned short IOD() const {return _iod;}
|
---|
[5742] | 84 | t_prn _prn;
|
---|
[5678] | 85 | unsigned short _iod;
|
---|
| 86 | bncTime _time;
|
---|
| 87 | char _system;
|
---|
| 88 | double _xr[3];
|
---|
| 89 | double _dotXr[3];
|
---|
| 90 | };
|
---|
| 91 |
|
---|
[5742] | 92 | class t_clkCorr {
|
---|
[5678] | 93 | public:
|
---|
[5749] | 94 | t_prn prn() const {return _prn;}
|
---|
| 95 | unsigned short IOD() const {return _iod;}
|
---|
[5742] | 96 | t_prn _prn;
|
---|
[5678] | 97 | unsigned short _iod;
|
---|
| 98 | bncTime _time;
|
---|
| 99 | double _dClk;
|
---|
| 100 | double _dotDClk;
|
---|
| 101 | double _dotDotDClk;
|
---|
| 102 | double _clkPartial;
|
---|
| 103 | };
|
---|
| 104 |
|
---|
[5742] | 105 | class t_bias {
|
---|
[5678] | 106 | public:
|
---|
| 107 | std::string _rnxType3ch;
|
---|
| 108 | double _value;
|
---|
| 109 | };
|
---|
| 110 |
|
---|
[5742] | 111 | class t_satBiases {
|
---|
[5678] | 112 | public:
|
---|
[5742] | 113 | t_prn _prn;
|
---|
| 114 | bncTime _time;
|
---|
| 115 | int _nx;
|
---|
| 116 | int _jumpCount;
|
---|
| 117 | std::vector<t_bias> _biases;
|
---|
[5678] | 118 | };
|
---|
| 119 |
|
---|
| 120 | enum e_tropoModel{tropoModel_NO, tropoModel_SAAST, tropoModel_MARINI,
|
---|
| 121 | tropoModel_HOPF, tropoModel_UNB3M};
|
---|
| 122 |
|
---|
| 123 | enum e_tropoMF{tropoMF_INTRINSIC, tropoMF_COSZ, tropoMF_NIELL_DRY,
|
---|
| 124 | tropoMF_NIELL_WET, tropoMF_HOPF, tropoMF_GMF_DRY,
|
---|
| 125 | tropoMF_GMF_WET, tropoMF_GMF_COMB};
|
---|
| 126 |
|
---|
| 127 | class t_frequency {
|
---|
| 128 | public:
|
---|
| 129 | enum type {dummy = 0, G1, G2, R1, R2, maxFr};
|
---|
| 130 |
|
---|
| 131 | static std::string toString(type tt) {
|
---|
| 132 | if (tt == G1) return "G1";
|
---|
| 133 | else if (tt == G2) return "G2";
|
---|
| 134 | else if (tt == R1) return "R1";
|
---|
| 135 | else if (tt == R2) return "R2";
|
---|
| 136 | return std::string();
|
---|
| 137 | }
|
---|
| 138 | };
|
---|
| 139 |
|
---|
| 140 | class t_lc {
|
---|
| 141 | public:
|
---|
| 142 | enum type {dummy = 0, l1, l2, c1, c2, lIF, cIF, MW, CL, maxLc};
|
---|
| 143 |
|
---|
| 144 | static bool need2ndFreq(type tt) {
|
---|
| 145 | if (tt == l2 || tt == c2 || tt == lIF || tt == cIF || tt == MW) return true;
|
---|
| 146 | return false;
|
---|
| 147 | }
|
---|
| 148 |
|
---|
| 149 | static bool includesPhase(type tt) {
|
---|
| 150 | if (tt == l1 || tt == l2 || tt == lIF || tt == MW || tt == CL) return true;
|
---|
| 151 | return false;
|
---|
| 152 | }
|
---|
| 153 |
|
---|
| 154 | static bool includesCode(type tt) {
|
---|
| 155 | if (tt == c1 || tt == c2 || tt == cIF || tt == MW || tt == CL) return true;
|
---|
| 156 | return false;
|
---|
| 157 | }
|
---|
| 158 |
|
---|
| 159 | static std::string toString(type tt) {
|
---|
| 160 | if (tt == l1) return "l1";
|
---|
| 161 | else if (tt == l2) return "l2";
|
---|
| 162 | else if (tt == c1) return "c1";
|
---|
| 163 | else if (tt == c2) return "c2";
|
---|
| 164 | else if (tt == lIF) return "lIF";
|
---|
| 165 | else if (tt == cIF) return "cIF";
|
---|
| 166 | else if (tt == MW) return "MW";
|
---|
| 167 | else if (tt == CL) return "CL";
|
---|
| 168 | return std::string();
|
---|
| 169 | }
|
---|
| 170 | };
|
---|
| 171 |
|
---|
| 172 | } // namespace BNC
|
---|
| 173 |
|
---|
| 174 | #endif
|
---|