- Timestamp:
- Jul 9, 2012, 3:20:05 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/RTCM/GPSDecoder.cpp
r4415 r4419 111 111 } 112 112 113 extern "C" { 114 int rrinex3codetoentry(const char* code); 115 } 113 116 114 117 // … … 125 128 } 126 129 127 // GPS 128 // --- 129 if (satSys == 'G') { 130 if (rnxStr.indexOf(QRegExp("C1[CSLX]")) == 0) retVal = GNSSENTRY_C1DATA; 131 else if (rnxStr.indexOf("C1") == 0) retVal = GNSSENTRY_P1DATA; 132 else if (rnxStr.indexOf(QRegExp("L1[CSLX]")) == 0) retVal = GNSSENTRY_L1CDATA; 133 else if (rnxStr.indexOf("L1") == 0) retVal = GNSSENTRY_L1PDATA; 134 else if (rnxStr.indexOf(QRegExp("D1[CSLX]")) == 0) retVal = GNSSENTRY_D1CDATA; 135 else if (rnxStr.indexOf("D1") == 0) retVal = GNSSENTRY_D1PDATA; 136 else if (rnxStr.indexOf(QRegExp("S1[CSLX]")) == 0) retVal = GNSSENTRY_S1CDATA; 137 else if (rnxStr.indexOf("S1") == 0) retVal = GNSSENTRY_S1PDATA; 138 139 else if (rnxStr.indexOf(QRegExp("C2[CSLX]")) == 0) retVal = GNSSENTRY_C2DATA; 140 else if (rnxStr.indexOf("C2") == 0) retVal = GNSSENTRY_P2DATA; 141 else if (rnxStr.indexOf(QRegExp("L2[CSLX]")) == 0) retVal = GNSSENTRY_L2CDATA; 142 else if (rnxStr.indexOf("L2") == 0) retVal = GNSSENTRY_L2PDATA; 143 else if (rnxStr.indexOf(QRegExp("D2[CSLX]")) == 0) retVal = GNSSENTRY_D2CDATA; 144 else if (rnxStr.indexOf("D2") == 0) retVal = GNSSENTRY_D2PDATA; 145 else if (rnxStr.indexOf(QRegExp("S2[CSLX]")) == 0) retVal = GNSSENTRY_S2CDATA; 146 else if (rnxStr.indexOf("S2") == 0) retVal = GNSSENTRY_S2PDATA; 147 148 else if (rnxStr.indexOf("C5") == 0) retVal = GNSSENTRY_C5DATA; 149 else if (rnxStr.indexOf("D5") == 0) retVal = GNSSENTRY_D5DATA; 150 else if (rnxStr.indexOf("L5") == 0) retVal = GNSSENTRY_L5DATA; 151 else if (rnxStr.indexOf("S5") == 0) retVal = GNSSENTRY_S5DATA; 152 } 153 154 // Glonass 155 // ------- 156 else if (satSys == 'R') { 157 if (rnxStr == "C1C") retVal = GNSSENTRY_C1DATA; 158 else if (rnxStr.indexOf("C1") == 0) retVal = GNSSENTRY_P1DATA; 159 else if (rnxStr == "L1C") retVal = GNSSENTRY_L1CDATA; 160 else if (rnxStr.indexOf("L1") == 0) retVal = GNSSENTRY_L1PDATA; 161 else if (rnxStr == "D1C") retVal = GNSSENTRY_D1CDATA; 162 else if (rnxStr.indexOf("D1") == 0) retVal = GNSSENTRY_D1PDATA; 163 else if (rnxStr == "S1C") retVal = GNSSENTRY_S1CDATA; 164 else if (rnxStr.indexOf("S1") == 0) retVal = GNSSENTRY_S1PDATA; 165 166 else if (rnxStr == "C2C") retVal = GNSSENTRY_C2DATA; 167 else if (rnxStr.indexOf("C2") == 0) retVal = GNSSENTRY_P2DATA; 168 else if (rnxStr == "L2C") retVal = GNSSENTRY_L2CDATA; 169 else if (rnxStr.indexOf("L2") == 0) retVal = GNSSENTRY_L2PDATA; 170 else if (rnxStr == "D2C") retVal = GNSSENTRY_D2CDATA; 171 else if (rnxStr.indexOf("D2") == 0) retVal = GNSSENTRY_D2PDATA; 172 else if (rnxStr == "S2C") retVal = GNSSENTRY_S2CDATA; 173 else if (rnxStr.indexOf("S2") == 0) retVal = GNSSENTRY_S2PDATA; 174 } 175 176 // Galileo 177 // ------- 178 else if (satSys == 'E') { 179 if (rnxStr.indexOf("C1") == 0) retVal = GNSSENTRY_C1DATA; 180 else if (rnxStr.indexOf("L1") == 0) retVal = GNSSENTRY_L1CDATA; 181 else if (rnxStr.indexOf("D1") == 0) retVal = GNSSENTRY_D1CDATA; 182 else if (rnxStr.indexOf("S1") == 0) retVal = GNSSENTRY_S1CDATA; 183 184 else if (rnxStr.indexOf("C5") == 0) retVal = GNSSENTRY_C5DATA; 185 else if (rnxStr.indexOf("L5") == 0) retVal = GNSSENTRY_L5DATA; 186 else if (rnxStr.indexOf("D5") == 0) retVal = GNSSENTRY_D5DATA; 187 else if (rnxStr.indexOf("S5") == 0) retVal = GNSSENTRY_S5DATA; 188 189 else if (rnxStr.indexOf("C6") == 0) retVal = GNSSENTRY_C6DATA; 190 else if (rnxStr.indexOf("L6") == 0) retVal = GNSSENTRY_L6DATA; 191 else if (rnxStr.indexOf("D6") == 0) retVal = GNSSENTRY_D6DATA; 192 else if (rnxStr.indexOf("S6") == 0) retVal = GNSSENTRY_S6DATA; 193 194 else if (rnxStr.indexOf("C7") == 0) retVal = GNSSENTRY_C5BDATA; 195 else if (rnxStr.indexOf("L7") == 0) retVal = GNSSENTRY_L5BDATA; 196 else if (rnxStr.indexOf("D7") == 0) retVal = GNSSENTRY_D5BDATA; 197 else if (rnxStr.indexOf("S7") == 0) retVal = GNSSENTRY_S5BDATA; 198 199 else if (rnxStr.indexOf("C8") == 0) retVal = GNSSENTRY_C5ABDATA; 200 else if (rnxStr.indexOf("L8") == 0) retVal = GNSSENTRY_L5ABDATA; 201 else if (rnxStr.indexOf("D8") == 0) retVal = GNSSENTRY_D5ABDATA; 202 else if (rnxStr.indexOf("S8") == 0) retVal = GNSSENTRY_S5ABDATA; 203 } 204 205 // QZSS 206 // ---- 207 else if (satSys == 'J') { 208 if (rnxStr.indexOf("C1") == 0) retVal = GNSSENTRY_C1DATA; 209 else if (rnxStr.indexOf("L1") == 0) retVal = GNSSENTRY_L1CDATA; 210 else if (rnxStr.indexOf("D1") == 0) retVal = GNSSENTRY_D1CDATA; 211 else if (rnxStr.indexOf("S1") == 0) retVal = GNSSENTRY_S1CDATA; 212 213 else if (rnxStr.indexOf("C2") == 0) retVal = GNSSENTRY_C5BDATA; 214 else if (rnxStr.indexOf("L2") == 0) retVal = GNSSENTRY_L5BDATA; 215 else if (rnxStr.indexOf("D2") == 0) retVal = GNSSENTRY_D5BDATA; 216 else if (rnxStr.indexOf("S2") == 0) retVal = GNSSENTRY_S5BDATA; 217 218 else if (rnxStr.indexOf("C5") == 0) retVal = GNSSENTRY_C5DATA; 219 else if (rnxStr.indexOf("L5") == 0) retVal = GNSSENTRY_L5DATA; 220 else if (rnxStr.indexOf("D5") == 0) retVal = GNSSENTRY_D5DATA; 221 else if (rnxStr.indexOf("S5") == 0) retVal = GNSSENTRY_S5DATA; 222 223 else if (rnxStr.indexOf("C6") == 0) retVal = GNSSENTRY_C6DATA; 224 else if (rnxStr.indexOf("L6") == 0) retVal = GNSSENTRY_L6DATA; 225 else if (rnxStr.indexOf("D6") == 0) retVal = GNSSENTRY_D6DATA; 226 else if (rnxStr.indexOf("S6") == 0) retVal = GNSSENTRY_S6DATA; 227 } 228 229 // SBAS 230 // ---- 231 else if (satSys == 'S') { 232 if (rnxStr == "C1C") retVal = GNSSENTRY_C1DATA; 233 else if (rnxStr.indexOf("C1") == 0) retVal = GNSSENTRY_P1DATA; 234 else if (rnxStr == "L1C") retVal = GNSSENTRY_L1CDATA; 235 else if (rnxStr.indexOf("L1") == 0) retVal = GNSSENTRY_L1PDATA; 236 else if (rnxStr == "D1C") retVal = GNSSENTRY_D1CDATA; 237 else if (rnxStr.indexOf("D1") == 0) retVal = GNSSENTRY_D1PDATA; 238 else if (rnxStr == "S1C") retVal = GNSSENTRY_S1CDATA; 239 else if (rnxStr.indexOf("S1") == 0) retVal = GNSSENTRY_S1PDATA; 240 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; 245 } 246 247 // Compass 248 // ------- 249 else if (satSys == 'C') { 250 if (rnxStr.indexOf("C2") == 0) retVal = GNSSENTRY_CB1DATA; 251 else if (rnxStr.indexOf("L2") == 0) retVal = GNSSENTRY_LB1DATA; 252 else if (rnxStr.indexOf("D2") == 0) retVal = GNSSENTRY_DB1DATA; 253 else if (rnxStr.indexOf("S2") == 0) retVal = GNSSENTRY_SB1DATA; 254 255 else if (rnxStr.indexOf("C6") == 0) retVal = GNSSENTRY_CB3DATA; 256 else if (rnxStr.indexOf("L6") == 0) retVal = GNSSENTRY_LB3DATA; 257 else if (rnxStr.indexOf("D6") == 0) retVal = GNSSENTRY_DB3DATA; 258 else if (rnxStr.indexOf("S6") == 0) retVal = GNSSENTRY_SB3DATA; 259 260 else if (rnxStr.indexOf("C7") == 0) retVal = GNSSENTRY_CB2DATA; 261 else if (rnxStr.indexOf("L7") == 0) retVal = GNSSENTRY_LB2DATA; 262 else if (rnxStr.indexOf("D7") == 0) retVal = GNSSENTRY_DB2DATA; 263 else if (rnxStr.indexOf("S7") == 0) retVal = GNSSENTRY_SB2DATA; 264 } 265 266 return retVal; 267 } 268 130 return rrinex3codetoentry(rnxStr.toAscii().data()); 131 132 // // GPS 133 // // --- 134 // if (satSys == 'G') { 135 // if (rnxStr.indexOf(QRegExp("C1[CSLX]")) == 0) retVal = GNSSENTRY_C1DATA; 136 // else if (rnxStr.indexOf("C1") == 0) retVal = GNSSENTRY_P1DATA; 137 // else if (rnxStr.indexOf(QRegExp("L1[CSLX]")) == 0) retVal = GNSSENTRY_L1CDATA; 138 // else if (rnxStr.indexOf("L1") == 0) retVal = GNSSENTRY_L1PDATA; 139 // else if (rnxStr.indexOf(QRegExp("D1[CSLX]")) == 0) retVal = GNSSENTRY_D1CDATA; 140 // else if (rnxStr.indexOf("D1") == 0) retVal = GNSSENTRY_D1PDATA; 141 // else if (rnxStr.indexOf(QRegExp("S1[CSLX]")) == 0) retVal = GNSSENTRY_S1CDATA; 142 // else if (rnxStr.indexOf("S1") == 0) retVal = GNSSENTRY_S1PDATA; 143 // 144 // else if (rnxStr.indexOf(QRegExp("C2[CSLX]")) == 0) retVal = GNSSENTRY_C2DATA; 145 // else if (rnxStr.indexOf("C2") == 0) retVal = GNSSENTRY_P2DATA; 146 // else if (rnxStr.indexOf(QRegExp("L2[CSLX]")) == 0) retVal = GNSSENTRY_L2CDATA; 147 // else if (rnxStr.indexOf("L2") == 0) retVal = GNSSENTRY_L2PDATA; 148 // else if (rnxStr.indexOf(QRegExp("D2[CSLX]")) == 0) retVal = GNSSENTRY_D2CDATA; 149 // else if (rnxStr.indexOf("D2") == 0) retVal = GNSSENTRY_D2PDATA; 150 // else if (rnxStr.indexOf(QRegExp("S2[CSLX]")) == 0) retVal = GNSSENTRY_S2CDATA; 151 // else if (rnxStr.indexOf("S2") == 0) retVal = GNSSENTRY_S2PDATA; 152 // 153 // else if (rnxStr.indexOf("C5") == 0) retVal = GNSSENTRY_C5DATA; 154 // else if (rnxStr.indexOf("D5") == 0) retVal = GNSSENTRY_D5DATA; 155 // else if (rnxStr.indexOf("L5") == 0) retVal = GNSSENTRY_L5DATA; 156 // else if (rnxStr.indexOf("S5") == 0) retVal = GNSSENTRY_S5DATA; 157 // } 158 // 159 // // Glonass 160 // // ------- 161 // else if (satSys == 'R') { 162 // if (rnxStr == "C1C") retVal = GNSSENTRY_C1DATA; 163 // else if (rnxStr.indexOf("C1") == 0) retVal = GNSSENTRY_P1DATA; 164 // else if (rnxStr == "L1C") retVal = GNSSENTRY_L1CDATA; 165 // else if (rnxStr.indexOf("L1") == 0) retVal = GNSSENTRY_L1PDATA; 166 // else if (rnxStr == "D1C") retVal = GNSSENTRY_D1CDATA; 167 // else if (rnxStr.indexOf("D1") == 0) retVal = GNSSENTRY_D1PDATA; 168 // else if (rnxStr == "S1C") retVal = GNSSENTRY_S1CDATA; 169 // else if (rnxStr.indexOf("S1") == 0) retVal = GNSSENTRY_S1PDATA; 170 // 171 // else if (rnxStr == "C2C") retVal = GNSSENTRY_C2DATA; 172 // else if (rnxStr.indexOf("C2") == 0) retVal = GNSSENTRY_P2DATA; 173 // else if (rnxStr == "L2C") retVal = GNSSENTRY_L2CDATA; 174 // else if (rnxStr.indexOf("L2") == 0) retVal = GNSSENTRY_L2PDATA; 175 // else if (rnxStr == "D2C") retVal = GNSSENTRY_D2CDATA; 176 // else if (rnxStr.indexOf("D2") == 0) retVal = GNSSENTRY_D2PDATA; 177 // else if (rnxStr == "S2C") retVal = GNSSENTRY_S2CDATA; 178 // else if (rnxStr.indexOf("S2") == 0) retVal = GNSSENTRY_S2PDATA; 179 // } 180 // 181 // // Galileo 182 // // ------- 183 // else if (satSys == 'E') { 184 // if (rnxStr.indexOf("C1") == 0) retVal = GNSSENTRY_C1DATA; 185 // else if (rnxStr.indexOf("L1") == 0) retVal = GNSSENTRY_L1CDATA; 186 // else if (rnxStr.indexOf("D1") == 0) retVal = GNSSENTRY_D1CDATA; 187 // else if (rnxStr.indexOf("S1") == 0) retVal = GNSSENTRY_S1CDATA; 188 // 189 // else if (rnxStr.indexOf("C5") == 0) retVal = GNSSENTRY_C5DATA; 190 // else if (rnxStr.indexOf("L5") == 0) retVal = GNSSENTRY_L5DATA; 191 // else if (rnxStr.indexOf("D5") == 0) retVal = GNSSENTRY_D5DATA; 192 // else if (rnxStr.indexOf("S5") == 0) retVal = GNSSENTRY_S5DATA; 193 // 194 // else if (rnxStr.indexOf("C6") == 0) retVal = GNSSENTRY_C6DATA; 195 // else if (rnxStr.indexOf("L6") == 0) retVal = GNSSENTRY_L6DATA; 196 // else if (rnxStr.indexOf("D6") == 0) retVal = GNSSENTRY_D6DATA; 197 // else if (rnxStr.indexOf("S6") == 0) retVal = GNSSENTRY_S6DATA; 198 // 199 // else if (rnxStr.indexOf("C7") == 0) retVal = GNSSENTRY_C5BDATA; 200 // else if (rnxStr.indexOf("L7") == 0) retVal = GNSSENTRY_L5BDATA; 201 // else if (rnxStr.indexOf("D7") == 0) retVal = GNSSENTRY_D5BDATA; 202 // else if (rnxStr.indexOf("S7") == 0) retVal = GNSSENTRY_S5BDATA; 203 // 204 // else if (rnxStr.indexOf("C8") == 0) retVal = GNSSENTRY_C5ABDATA; 205 // else if (rnxStr.indexOf("L8") == 0) retVal = GNSSENTRY_L5ABDATA; 206 // else if (rnxStr.indexOf("D8") == 0) retVal = GNSSENTRY_D5ABDATA; 207 // else if (rnxStr.indexOf("S8") == 0) retVal = GNSSENTRY_S5ABDATA; 208 // } 209 // 210 // // QZSS 211 // // ---- 212 // else if (satSys == 'J') { 213 // if (rnxStr.indexOf("C1") == 0) retVal = GNSSENTRY_C1DATA; 214 // else if (rnxStr.indexOf("L1") == 0) retVal = GNSSENTRY_L1CDATA; 215 // else if (rnxStr.indexOf("D1") == 0) retVal = GNSSENTRY_D1CDATA; 216 // else if (rnxStr.indexOf("S1") == 0) retVal = GNSSENTRY_S1CDATA; 217 // 218 // else if (rnxStr.indexOf("C2") == 0) retVal = GNSSENTRY_C5BDATA; 219 // else if (rnxStr.indexOf("L2") == 0) retVal = GNSSENTRY_L5BDATA; 220 // else if (rnxStr.indexOf("D2") == 0) retVal = GNSSENTRY_D5BDATA; 221 // else if (rnxStr.indexOf("S2") == 0) retVal = GNSSENTRY_S5BDATA; 222 // 223 // else if (rnxStr.indexOf("C5") == 0) retVal = GNSSENTRY_C5DATA; 224 // else if (rnxStr.indexOf("L5") == 0) retVal = GNSSENTRY_L5DATA; 225 // else if (rnxStr.indexOf("D5") == 0) retVal = GNSSENTRY_D5DATA; 226 // else if (rnxStr.indexOf("S5") == 0) retVal = GNSSENTRY_S5DATA; 227 // 228 // else if (rnxStr.indexOf("C6") == 0) retVal = GNSSENTRY_C6DATA; 229 // else if (rnxStr.indexOf("L6") == 0) retVal = GNSSENTRY_L6DATA; 230 // else if (rnxStr.indexOf("D6") == 0) retVal = GNSSENTRY_D6DATA; 231 // else if (rnxStr.indexOf("S6") == 0) retVal = GNSSENTRY_S6DATA; 232 // } 233 // 234 // // SBAS 235 // // ---- 236 // else if (satSys == 'S') { 237 // if (rnxStr == "C1C") retVal = GNSSENTRY_C1DATA; 238 // else if (rnxStr.indexOf("C1") == 0) retVal = GNSSENTRY_P1DATA; 239 // else if (rnxStr == "L1C") retVal = GNSSENTRY_L1CDATA; 240 // else if (rnxStr.indexOf("L1") == 0) retVal = GNSSENTRY_L1PDATA; 241 // else if (rnxStr == "D1C") retVal = GNSSENTRY_D1CDATA; 242 // else if (rnxStr.indexOf("D1") == 0) retVal = GNSSENTRY_D1PDATA; 243 // else if (rnxStr == "S1C") retVal = GNSSENTRY_S1CDATA; 244 // else if (rnxStr.indexOf("S1") == 0) retVal = GNSSENTRY_S1PDATA; 245 // 246 // else if (rnxStr.indexOf("C5") == 0) retVal = GNSSENTRY_C5DATA; 247 // else if (rnxStr.indexOf("L5") == 0) retVal = GNSSENTRY_L5DATA; 248 // else if (rnxStr.indexOf("D5") == 0) retVal = GNSSENTRY_D5DATA; 249 // else if (rnxStr.indexOf("S5") == 0) retVal = GNSSENTRY_S5DATA; 250 // } 251 // 252 // // Compass 253 // // ------- 254 // else if (satSys == 'C') { 255 // if (rnxStr.indexOf("C2") == 0) retVal = GNSSENTRY_CB1DATA; 256 // else if (rnxStr.indexOf("L2") == 0) retVal = GNSSENTRY_LB1DATA; 257 // else if (rnxStr.indexOf("D2") == 0) retVal = GNSSENTRY_DB1DATA; 258 // else if (rnxStr.indexOf("S2") == 0) retVal = GNSSENTRY_SB1DATA; 259 // 260 // else if (rnxStr.indexOf("C6") == 0) retVal = GNSSENTRY_CB3DATA; 261 // else if (rnxStr.indexOf("L6") == 0) retVal = GNSSENTRY_LB3DATA; 262 // else if (rnxStr.indexOf("D6") == 0) retVal = GNSSENTRY_DB3DATA; 263 // else if (rnxStr.indexOf("S6") == 0) retVal = GNSSENTRY_SB3DATA; 264 // 265 // else if (rnxStr.indexOf("C7") == 0) retVal = GNSSENTRY_CB2DATA; 266 // else if (rnxStr.indexOf("L7") == 0) retVal = GNSSENTRY_LB2DATA; 267 // else if (rnxStr.indexOf("D7") == 0) retVal = GNSSENTRY_DB2DATA; 268 // else if (rnxStr.indexOf("S7") == 0) retVal = GNSSENTRY_SB2DATA; 269 // } 270 // 271 // return retVal; 272 } 273
Note:
See TracChangeset
for help on using the changeset viewer.