Changeset 4415 in ntrip for trunk/BNC/src/RTCM
- Timestamp:
- Jul 8, 2012, 7:58:51 PM (13 years ago)
- Location:
- trunk/BNC/src/RTCM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/RTCM/GPSDecoder.cpp
r4414 r4415 93 93 ////////////////////////////////////////////////////////////////////////////// 94 94 void t_obs::setMeasdata(const QString& rnxStr, float rnxVers, double value) { 95 int ie = iEntry(rnxStr, rnxVers , false);95 int ie = iEntry(rnxStr, rnxVers); 96 96 if (ie != -1) { 97 97 _measdata[ie] = value; … … 102 102 ////////////////////////////////////////////////////////////////////////////// 103 103 double t_obs::measdata(const QString& rnxStr, float rnxVers) const { 104 int ie = iEntry(rnxStr, rnxVers , true);104 int ie = iEntry(rnxStr, rnxVers); 105 105 if (ie != -1) { 106 106 return _measdata[ie]; … … 111 111 } 112 112 113 113 114 // 114 115 ////////////////////////////////////////////////////////////////////////////// 115 int t_obs::iEntry(const QString& rnxStr, float rnxVers, bool nonEmpty) const { 116 117 if (rnxVers >= 3.0) { 118 return iEntryV3(rnxStr); 119 } 120 121 if (satSys == 'E') { 122 return iEntryV3(rnxStr); 123 } 124 else { 125 if (rnxStr == "C1") return iEntryV3("C1C"); 126 else if (rnxStr == "P1") return iEntryV3("C1P"); 127 else if (rnxStr == "C2") return iEntryV3("C2C"); 128 else if (rnxStr == "P2") return iEntryV3("C2P"); 129 130 const QString chars = "PWNCZI "; 131 for (int ii = 0; ii < chars.length(); ii++) { 132 QString hlpStr = rnxStr + chars[ii]; 133 int ie = iEntryV3(hlpStr.trimmed()); 134 if (ie != -1 && (!nonEmpty || _measdata[ie] != 0.0)) { 135 return ie; 136 } 137 } 138 } 139 140 return -1; 141 } 142 143 // 144 ////////////////////////////////////////////////////////////////////////////// 145 int t_obs::iEntryV3(const QString& rnxStr) const { 116 int t_obs::iEntry(QString rnxStr, float rnxVers) const { 146 117 147 118 int retVal = -1; 119 120 if (rnxVers < 3.0) { 121 if (rnxStr == "C1") rnxStr = "C1C"; 122 else if (rnxStr == "P1") rnxStr = "C1P"; 123 else if (rnxStr == "C2") rnxStr = "C2C"; 124 else if (rnxStr == "P2") rnxStr = "C2P"; 125 } 148 126 149 127 // GPS … … 261 239 else if (rnxStr.indexOf("S1") == 0) retVal = GNSSENTRY_S1PDATA; 262 240 263 else if (rnxStr.indexOf("C5") == 0) 264 else if (rnxStr.indexOf("L5") == 0) 265 else if (rnxStr.indexOf("D5") == 0) 266 else if (rnxStr.indexOf("S5") == 0) 241 else if (rnxStr.indexOf("C5") == 0) retVal = GNSSENTRY_C5DATA; 242 else if (rnxStr.indexOf("L5") == 0) retVal = GNSSENTRY_L5DATA; 243 else if (rnxStr.indexOf("D5") == 0) retVal = GNSSENTRY_D5DATA; 244 else if (rnxStr.indexOf("S5") == 0) retVal = GNSSENTRY_S5DATA; 267 245 } 268 246 -
trunk/BNC/src/RTCM/GPSDecoder.h
r4405 r4415 81 81 82 82 private: 83 int iEntry(const QString& rnxStr, float rnxVer, bool nonEmpty) const; 84 int iEntryV3(const QString& rnxStr) const; 83 int iEntry(QString rnxStr, float rnxVer) const; 85 84 }; 86 85
Note:
See TracChangeset
for help on using the changeset viewer.