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