Changeset 5370 in ntrip for trunk/BNC/src/RTCM
- Timestamp:
- Aug 29, 2013, 6:21:28 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/RTCM/GPSDecoder.cpp
r5369 r5370 123 123 return 0.0; 124 124 } 125 }126 127 //128 //////////////////////////////////////////////////////////////////////////////129 int t_obs::iEntry(QString rnxStr, float rnxVers) const {130 if (rnxVers < 3.0) {131 if (rnxStr == "C1") rnxStr = "C1C";132 else if (rnxStr == "P1") rnxStr = "C1P";133 else if (rnxStr == "C2") rnxStr = "C2C";134 else if (rnxStr == "P2") rnxStr = "C2P";135 }136 int res = 0;137 switch(rnxStr[0].toAscii())138 {139 case 'C': res += GNSSENTRY_CODE; break;140 case 'L': res += GNSSENTRY_PHASE; break;141 case 'D': res += GNSSENTRY_DOPPLER; break;142 case 'S': res += GNSSENTRY_SNR; break;143 default:144 return -1;145 }146 switch(rnxStr[1].toAscii())147 {148 case '1':149 switch(rnxStr[2].toAscii())150 {151 default:152 case 'C': res += GNSSENTRY_TYPEC1; break;153 case 'P': case'W': case 'Y': res += GNSSENTRY_TYPEP1; break;154 case 'A': case'B':155 case 'S': case'L': case 'X': res += GNSSENTRY_TYPEC1; break;156 case 'Z': res += GNSSENTRY_TYPECSAIF; break;157 }158 break;159 case '2':160 switch(rnxStr[2].toAscii())161 {162 default:163 case 'P': case 'W': case 'Y': res += GNSSENTRY_TYPEP2; break;164 case 'C': case 'S': case 'L': case 'X': res += GNSSENTRY_TYPEC2; break;165 case 'I':166 if (satSys == 'C') {167 res += GNSSENTRY_TYPEC2;168 }169 else {170 res += GNSSENTRY_TYPEC5B;171 }172 }173 break;174 case '5':175 res += GNSSENTRY_TYPEC5;176 break;177 case '6':178 res += GNSSENTRY_TYPEC6;179 break;180 case '7':181 res += GNSSENTRY_TYPEC5B;182 break;183 case '8':184 res += GNSSENTRY_TYPEC5AB;185 break;186 }187 return res;188 125 } 189 126 … … 201 138 return str.trimmed(); 202 139 } 140 141 // 142 ////////////////////////////////////////////////////////////////////////////// 143 int t_obs::iEntry(QString rnxStr, float rnxVers) const { 144 145 if (rnxVers < 3.0) { 146 if (rnxStr == "C1") rnxStr = "C1C"; 147 else if (rnxStr == "P1") rnxStr = "C1P"; 148 else if (rnxStr == "C2") rnxStr = "C2C"; 149 else if (rnxStr == "P2") rnxStr = "C2P"; 150 } 151 152 int res = 0; 153 154 // Observation Type (Code, Phase, Doppler, SNR) 155 // -------------------------------------------- 156 if (rnxStr[0] == 'C') { 157 res += GNSSENTRY_CODE; 158 } 159 else if (rnxStr[0] == 'L') { 160 res += GNSSENTRY_PHASE; 161 } 162 else if (rnxStr[0] == 'D') { 163 res += GNSSENTRY_DOPPLER; 164 } 165 else if (rnxStr[0] == 'S') { 166 res += GNSSENTRY_SNR; 167 } 168 else { 169 return -1; 170 } 171 172 // Frequency 173 // --------- 174 if (rnxStr[1] == '1') { 175 if (rnxStr.length() < 3) { 176 res += GNSSENTRY_TYPEC1; 177 } 178 else if (QString("ABCSLX").indexOf(rnxStr[2]) != -1) { 179 res += GNSSENTRY_TYPEC1; 180 } 181 else if (QString("PWY").indexOf(rnxStr[2]) != -1) { 182 res += GNSSENTRY_TYPEP1; 183 } 184 else if (rnxStr[2] == 'Z') { 185 res += GNSSENTRY_TYPECSAIF; 186 } 187 else { 188 return -1; 189 } 190 } 191 else if (rnxStr[1] == '2') { 192 if (rnxStr.length() < 3) { 193 res += GNSSENTRY_TYPEP2; 194 } 195 else if (QString("PWY").indexOf(rnxStr[2]) != -1) { 196 res += GNSSENTRY_TYPEP2; 197 } 198 else if (QString("CSLX").indexOf(rnxStr[2]) != -1) { 199 res += GNSSENTRY_TYPEC2; 200 } 201 else if (rnxStr[2] == 'I') { 202 if (satSys == 'C') { 203 res += GNSSENTRY_TYPEC2; 204 } 205 else { 206 res += GNSSENTRY_TYPEC5B; 207 } 208 } 209 else { 210 return -1; 211 } 212 } 213 else if (rnxStr[1] == '5') { 214 res += GNSSENTRY_TYPEC5; 215 } 216 else if (rnxStr[1] == '6') { 217 res += GNSSENTRY_TYPEC6; 218 } 219 else if (rnxStr[1] == '7') { 220 res += GNSSENTRY_TYPEC5B; 221 } 222 else if (rnxStr[1] == '8') { 223 res += GNSSENTRY_TYPEC5AB; 224 } 225 else { 226 return -1; 227 } 228 229 return res; 230 }
Note:
See TracChangeset
for help on using the changeset viewer.