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