[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"
|
---|
[5742] | 10 | #include "t_prn.h"
|
---|
[5678] | 11 |
|
---|
[5814] | 12 | namespace BNC_PPP {
|
---|
[5678] | 13 |
|
---|
[5825] | 14 | class t_except {
|
---|
[5763] | 15 | public:
|
---|
[5825] | 16 | t_except(const char* msg) {
|
---|
[5763] | 17 | _msg = msg;
|
---|
| 18 | }
|
---|
[5825] | 19 | ~t_except() {}
|
---|
[5763] | 20 | std::string what() {return _msg;}
|
---|
| 21 | private:
|
---|
| 22 | std::string _msg;
|
---|
| 23 | };
|
---|
| 24 |
|
---|
[5743] | 25 | class t_output {
|
---|
[5678] | 26 | public:
|
---|
| 27 | bncTime _epoTime;
|
---|
| 28 | double _xyzRover[3];
|
---|
| 29 | double _covMatrix[6];
|
---|
[5877] | 30 | double _neu[3];
|
---|
[5678] | 31 | int _numSat;
|
---|
| 32 | double _pDop;
|
---|
| 33 | std::string _log;
|
---|
| 34 | bool _error;
|
---|
| 35 | };
|
---|
| 36 |
|
---|
[5819] | 37 | class t_frqObs {
|
---|
[5678] | 38 | public:
|
---|
[5819] | 39 | t_frqObs() {
|
---|
[5750] | 40 | _code = 0.0;
|
---|
| 41 | _codeValid = false;
|
---|
| 42 | _phase = 0.0;
|
---|
| 43 | _phaseValid = false;
|
---|
| 44 | _doppler = 0.0;
|
---|
| 45 | _dopplerValid = false;
|
---|
| 46 | _snr = 0.0;
|
---|
| 47 | _snrValid = false;
|
---|
| 48 | _slip = false;
|
---|
| 49 | _slipCounter = 0;
|
---|
| 50 | _biasJumpCounter = 0;
|
---|
| 51 | }
|
---|
[5678] | 52 | std::string _rnxType2ch;
|
---|
| 53 | double _code;
|
---|
| 54 | bool _codeValid;
|
---|
| 55 | double _phase;
|
---|
| 56 | bool _phaseValid;
|
---|
| 57 | double _doppler;
|
---|
| 58 | bool _dopplerValid;
|
---|
| 59 | double _snr;
|
---|
| 60 | bool _snrValid;
|
---|
| 61 | bool _slip;
|
---|
| 62 | int _slipCounter;
|
---|
[5742] | 63 | int _biasJumpCounter;
|
---|
[5678] | 64 | };
|
---|
| 65 |
|
---|
[5819] | 66 | class t_satObs {
|
---|
[5678] | 67 | public:
|
---|
[5819] | 68 | t_satObs() {}
|
---|
| 69 | ~t_satObs() {for (unsigned ii = 0; ii < _obs.size(); ii++) delete _obs[ii];}
|
---|
[5784] | 70 | t_prn _prn;
|
---|
| 71 | bncTime _time;
|
---|
[5819] | 72 | std::vector<t_frqObs*> _obs;
|
---|
[5678] | 73 | };
|
---|
| 74 |
|
---|
[5742] | 75 | class t_orbCorr {
|
---|
[5678] | 76 | public:
|
---|
[5749] | 77 | t_prn prn() const {return _prn;}
|
---|
| 78 | unsigned short IOD() const {return _iod;}
|
---|
[5742] | 79 | t_prn _prn;
|
---|
[5678] | 80 | unsigned short _iod;
|
---|
| 81 | bncTime _time;
|
---|
| 82 | char _system;
|
---|
| 83 | double _xr[3];
|
---|
[5839] | 84 | double _dotXr[3];
|
---|
[5678] | 85 | };
|
---|
| 86 |
|
---|
[5742] | 87 | class t_clkCorr {
|
---|
[5678] | 88 | public:
|
---|
[5749] | 89 | t_prn prn() const {return _prn;}
|
---|
| 90 | unsigned short IOD() const {return _iod;}
|
---|
[5742] | 91 | t_prn _prn;
|
---|
[5678] | 92 | unsigned short _iod;
|
---|
| 93 | bncTime _time;
|
---|
| 94 | double _dClk;
|
---|
| 95 | double _dotDClk;
|
---|
| 96 | double _dotDotDClk;
|
---|
| 97 | double _clkPartial;
|
---|
| 98 | };
|
---|
| 99 |
|
---|
[5825] | 100 | class t_frqBias {
|
---|
[5678] | 101 | public:
|
---|
[5825] | 102 | t_frqBias() {
|
---|
| 103 | _code = 0.0;
|
---|
| 104 | _codeValid = false;
|
---|
| 105 | _phase = 0.0;
|
---|
| 106 | _phaseValid = false;
|
---|
| 107 | }
|
---|
| 108 | std::string _rnxType2ch;
|
---|
| 109 | double _code;
|
---|
| 110 | bool _codeValid;
|
---|
| 111 | double _phase;
|
---|
| 112 | bool _phaseValid;
|
---|
[5678] | 113 | };
|
---|
| 114 |
|
---|
[5825] | 115 | class t_satBias {
|
---|
[5678] | 116 | public:
|
---|
[5825] | 117 | t_prn _prn;
|
---|
| 118 | bncTime _time;
|
---|
| 119 | int _nx;
|
---|
| 120 | int _jumpCount;
|
---|
| 121 | std::vector<t_frqBias> _bias;
|
---|
[5678] | 122 | };
|
---|
| 123 |
|
---|
[6016] | 124 | class t_frequency {
|
---|
| 125 | public:
|
---|
| 126 | enum type {dummy = 0, G1, G2, G5, R1, R2,
|
---|
| 127 | E1, // E1 / 1575.42
|
---|
| 128 | E5, // E5a / 1176.45
|
---|
| 129 | E7, // E5b / 1207.140
|
---|
| 130 | E8, // E5(E5a+E5b) / 1191.795
|
---|
| 131 | E6, // E6 / 1278.75
|
---|
| 132 | maxFr};
|
---|
| 133 |
|
---|
| 134 | static std::string toString(type tt) {
|
---|
| 135 | if (tt == G1) return "G1";
|
---|
| 136 | else if (tt == G2) return "G2";
|
---|
| 137 | else if (tt == G5) return "G5";
|
---|
| 138 | else if (tt == R1) return "R1";
|
---|
| 139 | else if (tt == R2) return "R2";
|
---|
| 140 | else if (tt == E1) return "E1";
|
---|
| 141 | else if (tt == E5) return "E5";
|
---|
| 142 | else if (tt == E6) return "E6";
|
---|
| 143 | else if (tt == E7) return "E7";
|
---|
| 144 | else if (tt == E8) return "E8";
|
---|
| 145 | return std::string();
|
---|
| 146 | }
|
---|
| 147 | };
|
---|
| 148 |
|
---|
| 149 |
|
---|
[5678] | 150 | class t_lc {
|
---|
| 151 | public:
|
---|
| 152 | enum type {dummy = 0, l1, l2, c1, c2, lIF, cIF, MW, CL, maxLc};
|
---|
| 153 |
|
---|
| 154 | static bool need2ndFreq(type tt) {
|
---|
| 155 | if (tt == l2 || tt == c2 || tt == lIF || tt == cIF || tt == MW) return true;
|
---|
| 156 | return false;
|
---|
| 157 | }
|
---|
| 158 |
|
---|
| 159 | static bool includesPhase(type tt) {
|
---|
| 160 | if (tt == l1 || tt == l2 || tt == lIF || tt == MW || tt == CL) return true;
|
---|
| 161 | return false;
|
---|
| 162 | }
|
---|
| 163 |
|
---|
| 164 | static bool includesCode(type tt) {
|
---|
| 165 | if (tt == c1 || tt == c2 || tt == cIF || tt == MW || tt == CL) return true;
|
---|
| 166 | return false;
|
---|
| 167 | }
|
---|
| 168 |
|
---|
| 169 | static std::string toString(type tt) {
|
---|
| 170 | if (tt == l1) return "l1";
|
---|
| 171 | else if (tt == l2) return "l2";
|
---|
| 172 | else if (tt == c1) return "c1";
|
---|
| 173 | else if (tt == c2) return "c2";
|
---|
| 174 | else if (tt == lIF) return "lIF";
|
---|
| 175 | else if (tt == cIF) return "cIF";
|
---|
| 176 | else if (tt == MW) return "MW";
|
---|
| 177 | else if (tt == CL) return "CL";
|
---|
| 178 | return std::string();
|
---|
| 179 | }
|
---|
| 180 | };
|
---|
| 181 |
|
---|
[5814] | 182 | } // namespace BNC_PPP
|
---|
[5678] | 183 |
|
---|
| 184 | #endif
|
---|