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