Changeset 6854 in ntrip for trunk/BNC/src/RTCM3
- Timestamp:
- May 26, 2015, 5:25:26 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp
r6851 r6854 216 216 // Orbit and clock corrections of all satellites 217 217 // --------------------------------------------- 218 for (unsigned ii = 0; ii < CLOCKORBIT_NUMGPS + _clkOrb.NumberOfSat[CLOCKORBIT_SATGLONASS]; ii++) { 218 for (unsigned ii = 0; ii < CLOCKORBIT_NUMGPS 219 + CLOCKORBIT_NUMGLONASS 220 + CLOCKORBIT_NUMGALILEO 221 + CLOCKORBIT_NUMQZSS 222 + CLOCKORBIT_NUMSBAS 223 + _clkOrb.NumberOfSat[CLOCKORBIT_SATBDS]; 224 ii++) { 219 225 char sysCh = ' '; 220 226 if (ii < _clkOrb.NumberOfSat[CLOCKORBIT_SATGPS]) { 221 227 sysCh = 'G'; 222 228 } 223 else if (ii >= CLOCKORBIT_NUMGPS) { 229 else if (ii >= CLOCKORBIT_OFFSETGLONASS && 230 ii < _clkOrb.NumberOfSat[CLOCKORBIT_SATGLONASS]) { 224 231 sysCh = 'R'; 232 } 233 else if (ii >= CLOCKORBIT_OFFSETGALILEO && 234 ii < _clkOrb.NumberOfSat[CLOCKORBIT_SATGALILEO]) { 235 sysCh = 'E'; 236 } 237 else if (ii >= CLOCKORBIT_OFFSETQZSS && 238 ii < _clkOrb.NumberOfSat[CLOCKORBIT_SATQZSS]) { 239 sysCh = 'J'; 240 } 241 else if (ii >= CLOCKORBIT_OFFSETSBAS && 242 ii < _clkOrb.NumberOfSat[CLOCKORBIT_SATSBAS]) { 243 sysCh = 'S'; 244 } 245 else if (ii >= CLOCKORBIT_OFFSETBDS && 246 ii < _clkOrb.NumberOfSat[CLOCKORBIT_SATBDS]) { 247 sysCh = 'C'; 225 248 } 226 249 else { … … 232 255 if ( _clkOrb.messageType == COTYPE_GPSCOMBINED || 233 256 _clkOrb.messageType == COTYPE_GLONASSCOMBINED || 234 _clkOrb.messageType == COTYPE_GPSORBIT || 235 _clkOrb.messageType == COTYPE_GLONASSORBIT ) { 257 _clkOrb.messageType == COTYPE_GALILEOCOMBINED || 258 _clkOrb.messageType == COTYPE_QZSSCOMBINED || 259 _clkOrb.messageType == COTYPE_SBASCOMBINED || 260 _clkOrb.messageType == COTYPE_BDSCOMBINED || 261 _clkOrb.messageType == COTYPE_GPSORBIT || 262 _clkOrb.messageType == COTYPE_GLONASSORBIT || 263 _clkOrb.messageType == COTYPE_GALILEOORBIT || 264 _clkOrb.messageType == COTYPE_QZSSORBIT || 265 _clkOrb.messageType == COTYPE_SBASORBIT || 266 _clkOrb.messageType == COTYPE_BDSORBIT ) { 236 267 237 268 t_orbCorr orbCorr; … … 241 272 orbCorr._time = _lastTime; 242 273 orbCorr._updateInt = _clkOrb.UpdateInterval; 243 orbCorr._system = 'R';274 orbCorr._system = sysCh; 244 275 orbCorr._xr[0] = _clkOrb.Sat[ii].Orbit.DeltaRadial; 245 276 orbCorr._xr[1] = _clkOrb.Sat[ii].Orbit.DeltaAlongTrack; … … 258 289 if ( _clkOrb.messageType == COTYPE_GPSCOMBINED || 259 290 _clkOrb.messageType == COTYPE_GLONASSCOMBINED || 260 _clkOrb.messageType == COTYPE_GPSCLOCK || 261 _clkOrb.messageType == COTYPE_GLONASSCLOCK ) { 291 _clkOrb.messageType == COTYPE_GALILEOCOMBINED || 292 _clkOrb.messageType == COTYPE_QZSSCOMBINED || 293 _clkOrb.messageType == COTYPE_SBASCOMBINED || 294 _clkOrb.messageType == COTYPE_BDSCOMBINED || 295 _clkOrb.messageType == COTYPE_GPSCLOCK || 296 _clkOrb.messageType == COTYPE_GLONASSCLOCK || 297 _clkOrb.messageType == COTYPE_GALILEOCLOCK || 298 _clkOrb.messageType == COTYPE_QZSSCLOCK || 299 _clkOrb.messageType == COTYPE_SBASCLOCK || 300 _clkOrb.messageType == COTYPE_BDSCLOCK) { 262 301 263 302 t_clkCorr clkCorr; … … 281 320 // ---------------------- 282 321 if ( _clkOrb.messageType == COTYPE_GPSHR || 283 _clkOrb.messageType == COTYPE_GLONASSHR ) { 322 _clkOrb.messageType == COTYPE_GLONASSHR || 323 _clkOrb.messageType == COTYPE_GALILEOHR || 324 _clkOrb.messageType == COTYPE_QZSSHR || 325 _clkOrb.messageType == COTYPE_SBASHR || 326 _clkOrb.messageType == COTYPE_BDSHR) { 284 327 285 328 t_prn prn(sysCh, _clkOrb.Sat[ii].ID); … … 300 343 // Code Biases 301 344 // ----------- 302 for (unsigned ii = 0; ii < CLOCKORBIT_NUMGPS + _codeBias.NumberOfSat[CLOCKORBIT_SATGLONASS]; ii++) { 345 for (unsigned ii = 0; ii < CLOCKORBIT_NUMGPS 346 + CLOCKORBIT_NUMGLONASS 347 + CLOCKORBIT_NUMGALILEO 348 + CLOCKORBIT_NUMQZSS 349 + CLOCKORBIT_NUMSBAS 350 + _codeBias.NumberOfSat[CLOCKORBIT_SATBDS]; 351 ii++) { 303 352 char sysCh = ' '; 304 353 if (ii < _codeBias.NumberOfSat[CLOCKORBIT_SATGPS]) { 305 354 sysCh = 'G'; 306 355 } 307 else if (ii >= CLOCKORBIT_NUMGPS) { 356 else if (ii >= CLOCKORBIT_OFFSETGLONASS && 357 ii < _codeBias.NumberOfSat[CLOCKORBIT_SATGLONASS]) { 308 358 sysCh = 'R'; 359 } 360 else if (ii >= CLOCKORBIT_OFFSETGALILEO && 361 ii < _codeBias.NumberOfSat[CLOCKORBIT_SATGALILEO]) { 362 sysCh = 'E'; 363 } 364 else if (ii >= CLOCKORBIT_OFFSETQZSS && 365 ii < _codeBias.NumberOfSat[CLOCKORBIT_SATQZSS]) { 366 sysCh = 'J'; 367 } 368 else if (ii >= CLOCKORBIT_OFFSETSBAS && 369 ii < _codeBias.NumberOfSat[CLOCKORBIT_SATSBAS]) { 370 sysCh = 'S'; 371 } 372 else if (ii >= CLOCKORBIT_OFFSETBDS && 373 ii < _codeBias.NumberOfSat[CLOCKORBIT_SATBDS]) { 374 sysCh = 'C'; 309 375 } 310 376 else { … … 330 396 // Phase Biases 331 397 // ----------- 332 for (unsigned ii = 0; ii < CLOCKORBIT_NUMGPS + _phaseBias.NumberOfSat[CLOCKORBIT_SATGLONASS]; ii++) { 398 for (unsigned ii = 0; ii < CLOCKORBIT_NUMGPS 399 + CLOCKORBIT_NUMGLONASS 400 + CLOCKORBIT_NUMGALILEO 401 + CLOCKORBIT_NUMQZSS 402 + CLOCKORBIT_NUMSBAS 403 + _phaseBias.NumberOfSat[CLOCKORBIT_SATBDS]; 404 ii++) { 333 405 char sysCh = ' '; 334 406 if (ii < _phaseBias.NumberOfSat[CLOCKORBIT_SATGPS]) { 335 407 sysCh = 'G'; 336 408 } 337 else if (ii >= CLOCKORBIT_NUMGPS) { 409 else if (ii >= CLOCKORBIT_OFFSETGLONASS && 410 ii < _phaseBias.NumberOfSat[CLOCKORBIT_SATGLONASS]) { 338 411 sysCh = 'R'; 412 } 413 else if (ii >= CLOCKORBIT_OFFSETGALILEO && 414 ii < _phaseBias.NumberOfSat[CLOCKORBIT_SATGALILEO]) { 415 sysCh = 'E'; 416 } 417 else if (ii >= CLOCKORBIT_OFFSETQZSS && 418 ii < _phaseBias.NumberOfSat[CLOCKORBIT_SATQZSS]) { 419 sysCh = 'J'; 420 } 421 else if (ii >= CLOCKORBIT_OFFSETSBAS && 422 ii < _phaseBias.NumberOfSat[CLOCKORBIT_SATSBAS]) { 423 sysCh = 'S'; 424 } 425 else if (ii >= CLOCKORBIT_OFFSETBDS && 426 ii < _phaseBias.NumberOfSat[CLOCKORBIT_SATBDS]) { 427 sysCh = 'C'; 339 428 } 340 429 else { … … 472 561 _lastTime.reset(); 473 562 474 double epoSecGPS = -1.0; 475 double epoSecGlo = -1.0; 563 double epoSecGPS = -1.0; 564 double epoSecGlo = -1.0; 565 double epoSecGal = -1.0; 566 double epoSecQzss = -1.0; 567 double epoSecSbas = -1.0; 568 double epoSecBds = -1.0; 476 569 if (_clkOrb.NumberOfSat[CLOCKORBIT_SATGPS] > 0) { 477 570 epoSecGPS = _clkOrb.EpochTime[CLOCKORBIT_SATGPS]; // 0 .. 604799 s … … 494 587 else if (_phaseBias.NumberOfSat[CLOCKORBIT_SATGLONASS] > 0) { 495 588 epoSecGlo = _phaseBias.EpochTime[CLOCKORBIT_SATGLONASS]; // 0 .. 86399 s 589 } 590 else if (_clkOrb.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0) { 591 epoSecGal = _clkOrb.EpochTime[CLOCKORBIT_SATGALILEO]; 592 } 593 else if (_codeBias.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0) { 594 epoSecGal = _codeBias.EpochTime[CLOCKORBIT_SATGALILEO]; 595 } 596 else if (_phaseBias.NumberOfSat[CLOCKORBIT_SATGALILEO] > 0) { 597 epoSecGal = _phaseBias.EpochTime[CLOCKORBIT_SATGALILEO]; 598 } 599 else if (_clkOrb.NumberOfSat[CLOCKORBIT_SATQZSS] > 0) { 600 epoSecQzss = _clkOrb.EpochTime[CLOCKORBIT_SATQZSS]; 601 } 602 else if (_codeBias.NumberOfSat[CLOCKORBIT_SATQZSS] > 0) { 603 epoSecQzss = _codeBias.EpochTime[CLOCKORBIT_SATQZSS]; 604 } 605 else if (_phaseBias.NumberOfSat[CLOCKORBIT_SATQZSS] > 0) { 606 epoSecQzss = _phaseBias.EpochTime[CLOCKORBIT_SATQZSS]; 607 } 608 else if (_clkOrb.NumberOfSat[CLOCKORBIT_SATSBAS] > 0) { 609 epoSecSbas = _clkOrb.EpochTime[CLOCKORBIT_SATSBAS]; 610 } 611 else if (_codeBias.NumberOfSat[CLOCKORBIT_SATSBAS] > 0) { 612 epoSecSbas = _codeBias.EpochTime[CLOCKORBIT_SATSBAS]; 613 } 614 else if (_phaseBias.NumberOfSat[CLOCKORBIT_SATSBAS] > 0) { 615 epoSecSbas = _phaseBias.EpochTime[CLOCKORBIT_SATSBAS]; 616 } 617 else if (_clkOrb.NumberOfSat[CLOCKORBIT_SATBDS] > 0) { 618 epoSecBds = _clkOrb.EpochTime[CLOCKORBIT_SATBDS]; 619 } 620 else if (_codeBias.NumberOfSat[CLOCKORBIT_SATBDS] > 0) { 621 epoSecBds = _codeBias.EpochTime[CLOCKORBIT_SATBDS]; 622 } 623 else if (_phaseBias.NumberOfSat[CLOCKORBIT_SATBDS] > 0) { 624 epoSecBds = _phaseBias.EpochTime[CLOCKORBIT_SATBDS]; 496 625 } 497 626 … … 512 641 epoSecGlo = epoSecGlo - 3 * 3600 + gnumleap(date.year(), date.month(), date.day()); 513 642 _lastTime.set(currentWeek, epoSecGlo); 643 } 644 else if (epoSecGal != -1) { 645 _lastTime.set(currentWeek, epoSecGal); 646 } 647 else if (epoSecQzss != -1) { 648 _lastTime.set(currentWeek, epoSecQzss); 649 } 650 else if (epoSecSbas != -1) { 651 _lastTime.set(currentWeek, epoSecSbas); 652 } 653 else if (epoSecBds != -1) { 654 epoSecBds += 14.0; 655 _lastTime.set(currentWeek, epoSecBds); 514 656 } 515 657
Note:
See TracChangeset
for help on using the changeset viewer.