Changeset 5912 in ntrip
- Timestamp:
- Aug 12, 2014, 4:21:23 PM (10 years ago)
- Location:
- trunk/BNC/src/PPP
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppOptions.cpp
r5843 r5912 49 49 t_pppOptions::t_pppOptions() { 50 50 _xyzAprRover.ReSize(3); _xyzAprRover = 0.0; 51 _ellAprRover.ReSize(3); _ellAprRover = 0.0;52 51 _neuEccRover.ReSize(3); _neuEccRover = 0.0; 52 _aprSigCrd.ReSize(3); _aprSigCrd = 0.0; 53 _noiseCrd.ReSize(3); _noiseCrd = 0.0; 53 54 } 54 55 … … 58 59 } 59 60 60 //61 //////////////////////////////////////////////////////////////////////////////62 bool t_pppOptions::dualFreqRequired() const {63 return true;64 }65 61 66 62 // 67 63 ////////////////////////////////////////////////////////////////////////////// 68 bool t_pppOptions::biasRequired() const { 69 return false; 70 } 71 72 // 73 ////////////////////////////////////////////////////////////////////////////// 74 bool t_pppOptions::corrRequired() const { 75 if (_corrMount.empty()) { 76 return false; 64 const std::vector<t_lc::type>& t_pppOptions::LCs(char system) const { 65 if (system == 'R') { 66 return _LCsGLONASS; 67 } 68 else if (system == 'E') { 69 return _LCsGalileo; 77 70 } 78 71 else { 79 return true;72 return _LCsGPS; 80 73 } 81 74 } … … 83 76 // 84 77 ////////////////////////////////////////////////////////////////////////////// 85 bool t_pppOptions::useGlonass() const { 86 return (_lcGLONASS.size() > 0); 78 bool t_pppOptions::dualFreqRequired(char system) const { 79 const std::vector<t_lc::type>& lcs = LCs(system); 80 for (unsigned ii = 0; ii < lcs.size(); ii++) { 81 if (t_lc::need2ndFreq(lcs[ii])) { 82 return true; 83 } 84 } 85 return false; 86 } 87 88 // 89 ////////////////////////////////////////////////////////////////////////////// 90 bool t_pppOptions::useOrbClkCorr() const { 91 if (_realTime) { 92 return !_corrMount.empty(); 93 } 94 else { 95 return !_corrFile.empty(); 96 } 97 } 98 99 // Processed satellite systems 100 ///////////////////////////////////////////////////////////////////////////// 101 vector<char> t_pppOptions::systems() const { 102 vector<char> answ; 103 if (_LCsGPS.size() > 0) answ.push_back('G'); 104 if (_LCsGLONASS.size() > 0) answ.push_back('R'); 105 return answ; 87 106 } 88 107 89 108 // 90 ////////////////////////////////////////////////////////////////////////////// 91 bool t_pppOptions::xyzAprRoverSet() const { 92 return (_xyzAprRover[0] != 0.0 || _xyzAprRover[1] != 0.0 || _xyzAprRover[2] != 0.0); 93 } 94 95 // 96 ////////////////////////////////////////////////////////////////////////////// 97 bool t_pppOptions::estTropo() const { 98 return (_sigTropo > 0.0 || _noiseTropo > 0.0); 99 } 100 101 // 102 ////////////////////////////////////////////////////////////////////////////// 103 vector<t_lc::type> t_pppOptions::LCs() const { 104 105 vector<t_lc::type> allLCs = _lcGPS; 106 107 for (unsigned ii = 0; ii < _lcGLONASS.size(); ii++) { 108 bool found = false; 109 for (unsigned iAll = 0; iAll < allLCs.size(); iAll++) { 110 if (allLCs[iAll] == _lcGLONASS[ii]) { 111 found = true; 112 break; 113 } 114 } 115 if (!found) { 116 allLCs.push_back(_lcGLONASS[ii]); 109 ///////////////////////////////////////////////////////////////////////////// 110 vector<t_lc::type> t_pppOptions::ambLCs(char system) const { 111 112 const vector<t_lc::type>& allLCs = LCs(system); 113 vector<t_lc::type> phaseLCs; 114 for (unsigned ii = 0; ii < allLCs.size(); ii++) { 115 if (t_lc::includesPhase(allLCs[ii])) { 116 phaseLCs.push_back(allLCs[ii]); 117 117 } 118 118 } 119 119 120 for (unsigned ii = 0; ii < _lcGalileo.size(); ii++) { 121 bool found = false; 122 for (unsigned iAll = 0; iAll < allLCs.size(); iAll++) { 123 if (allLCs[iAll] == _lcGalileo[ii]) { 124 found = true; 125 break; 126 } 127 } 128 if (!found) { 129 allLCs.push_back(_lcGalileo[ii]); 130 } 120 vector<t_lc::type> answ; 121 if (phaseLCs.size() == 1) { 122 answ.push_back(phaseLCs[0]); 123 } 124 else if (phaseLCs.size() > 1) { 125 answ.push_back(t_lc::l1); 126 answ.push_back(t_lc::l2); 131 127 } 132 128 133 return a llLCs;129 return answ; 134 130 } 135 136 //137 //////////////////////////////////////////////////////////////////////////////138 double t_pppOptions::maxRes(t_lc::type tLC) const {139 140 if (t_lc::includesCode(tLC)) {141 return _maxResC1;142 }143 else {144 return _maxResL1;145 }146 } -
trunk/BNC/src/PPP/pppOptions.h
r5814 r5912 11 11 class t_pppOptions { 12 12 public: 13 class t_optBias {14 public:15 t_optBias(char system, t_lc::type tLC) : _system(system), _tLC(tLC) {}16 char _system;17 t_lc::type _tLC;18 };19 20 13 t_pppOptions(); 21 14 ~t_pppOptions(); 22 bool dualFreqRequired() const;23 bool biasRequired() const;24 bool corrRequired() const;25 bool useGlonass() const ;26 bool xyzAprRoverSet() const;27 bool estTropo() const ;28 std::vector<t_lc::type> LCs() const;29 double maxRes(t_lc::type tLC) const;30 15 31 bool _realTime; 32 std::string _roverName; 33 std::string _crdFile; 34 std::string _antexFile; 35 std::string _corrMount; 36 std::string _rinexObs; 37 std::string _rinexNav; 38 std::string _corrFile; 16 const std::vector<t_lc::type>& LCs(char system) const; 17 bool dualFreqRequired(char system) const; 18 bool useOrbClkCorr() const; 19 std::vector<char> systems() const; 20 std::vector<t_lc::type> ambLCs(char system) const; 21 bool useGlonass() const {return _LCsGLONASS.size() > 0;} 22 bool estTrp() const {return _aprSigTrp > 0.0 || _noiseTrp > 0.0;} 23 bool xyzAprRoverSet() const { 24 return (_xyzAprRover[0] != 0.0 || _xyzAprRover[1] != 0.0 || _xyzAprRover[2] != 0.0); 25 } 39 26 40 double _sigCrd[3]; 41 double _noiseCrd[3]; 42 double _sigTropo; 43 double _noiseTropo; 44 double _sigmaC1; 45 double _sigmaL1; 46 double _corrWaitTime; 47 std::vector<t_lc::type> _lcGPS; 48 std::vector<t_lc::type> _lcGLONASS; 49 std::vector<t_lc::type> _lcGalileo; 50 std::vector<t_optBias> _estBias; 51 52 ColumnVector _xyzAprRover; 53 ColumnVector _ellAprRover; 54 ColumnVector _neuEccRover; 55 std::string _antNameRover; 56 int _minObs; 57 double _minEle; 58 double _maxResC1; 59 double _maxResL1; 60 bool _eleWgtCode; 61 bool _eleWgtPhase; 27 bool _realTime; 28 std::string _crdFile; 29 std::string _corrMount; 30 std::string _rinexObs; 31 std::string _rinexNav; 32 std::string _corrFile; 33 std::string _roverName; 34 ColumnVector _xyzAprRover; 35 ColumnVector _neuEccRover; 36 std::string _antNameRover; 37 std::string _antexFileName; 38 double _sigmaC1; 39 double _sigmaL1; 40 double _maxResC1; 41 double _maxResL1; 42 bool _eleWgtCode; 43 bool _eleWgtPhase; 44 double _minEle; 45 int _minObs; 46 ColumnVector _aprSigCrd; 47 ColumnVector _noiseCrd; 48 double _noiseClk; 49 double _aprSigTrp; 50 double _noiseTrp; 51 double _aprSigAmb; 52 std::vector<t_lc::type> _LCsGPS; 53 std::vector<t_lc::type> _LCsGLONASS; 54 std::vector<t_lc::type> _LCsGalileo; 62 55 }; 63 56
Note:
See TracChangeset
for help on using the changeset viewer.