Changeset 10599 in ntrip for trunk/BNC/src/RTCM3
- Timestamp:
- Jan 31, 2025, 10:30:08 AM (3 months ago)
- Location:
- trunk/BNC/src/RTCM3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/RTCM3/RTCM3Decoder.cpp
r10587 r10599 71 71 _rawFile = rawFile; 72 72 73 connect(this, SIGNAL(newGPSEph(t_ephGPS)), BNC_CORE, 74 SLOT(slotNewGPSEph(t_ephGPS))); 75 connect(this, SIGNAL(newGlonassEph(t_ephGlo)), BNC_CORE, 76 SLOT(slotNewGlonassEph(t_ephGlo))); 77 connect(this, SIGNAL(newGalileoEph(t_ephGal)), BNC_CORE, 78 SLOT(slotNewGalileoEph(t_ephGal))); 79 connect(this, SIGNAL(newSBASEph(t_ephSBAS)), BNC_CORE, 80 SLOT(slotNewSBASEph(t_ephSBAS))); 81 connect(this, SIGNAL(newBDSEph(t_ephBDS)), BNC_CORE, 82 SLOT(slotNewBDSEph(t_ephBDS))); 73 connect(this, SIGNAL(newGPSEph(t_ephGPS)), BNC_CORE, SLOT(slotNewGPSEph(t_ephGPS))); 74 connect(this, SIGNAL(newGlonassEph(t_ephGlo)), BNC_CORE, SLOT(slotNewGlonassEph(t_ephGlo))); 75 connect(this, SIGNAL(newGalileoEph(t_ephGal)), BNC_CORE, SLOT(slotNewGalileoEph(t_ephGal))); 76 connect(this, SIGNAL(newSBASEph(t_ephSBAS)), BNC_CORE, SLOT(slotNewSBASEph(t_ephSBAS))); 77 connect(this, SIGNAL(newBDSEph(t_ephBDS)), BNC_CORE, SLOT(slotNewBDSEph(t_ephBDS))); 83 78 84 79 _MessageSize = _SkipBytes = _BlockSize = _NeedBytes = 0; … … 134 129 135 130 GETBITS(sv, 6) 136 if (sv < 40) 137 CurrentObs._prn.set('G', sv); 138 else 139 CurrentObs._prn.set('S', sv - 20); 131 char sys; 132 int num, flag; 133 if (sv < 40) { 134 sys = 'G'; 135 num = sv; 136 } 137 else { 138 sys = 'S'; 139 num = sv - 20; 140 } 141 flag = t_corrSSR::getSsrNavTypeFlag(sys, num); 142 CurrentObs._prn.set(sys, num, flag); 140 143 141 144 t_frqObs *frqObs = new t_frqObs; … … 706 709 /* next satellite */ 707 710 ; 708 if (CurrentObs._obs.size() > 0) 711 if (CurrentObs._obs.size() > 0) { 712 char sys = CurrentObs._prn.system(); 713 int num = CurrentObs._prn.number(); 714 int flag = t_corrSSR::getSsrNavTypeFlag(sys, num); 715 CurrentObs._prn.setFlag(flag); 709 716 _CurrentObsList.push_back(CurrentObs); 717 } 710 718 CurrentObs.clear(); 711 719 CurrentObs._time = CurrentObsTime; … … 882 890 } 883 891 if (CurrentObs._obs.size() > 0) { 892 char sys = CurrentObs._prn.system(); 893 int num = CurrentObs._prn.number(); 894 int flag = t_corrSSR::getSsrNavTypeFlag(sys, num); 895 CurrentObs._prn.setFlag(flag); 884 896 _CurrentObsList.push_back(CurrentObs); 885 897 } … … 939 951 940 952 GETBITS(sv, 6) 941 CurrentObs._prn.set('R', sv); 953 char sys = 'R'; 954 int flag = t_corrSSR::getSsrNavTypeFlag(sys, sv); 955 CurrentObs._prn.set(sys, sv, flag); 942 956 GETBITS(code, 1) 943 957 GETBITS(freq, 5) … … 1135 1149 eph._TOT = 0.9999e9; 1136 1150 eph._type = t_eph::LNAV; 1151 eph._prn.setFlag(eph._type); 1137 1152 1138 1153 emit newGPSEph(eph); … … 1313 1328 _gloFrq = QString("%1 %2").arg(eph._prn.toString().c_str()).arg(eph._frq_num, 2, 'f', 0); 1314 1329 1315 eph._type = t_eph::FDMA; 1330 if (eph.validMdata()) { 1331 eph._type = t_eph::FDMA_M; 1332 } 1333 else { 1334 eph._type = t_eph::FDMA; 1335 } 1336 eph._prn.setFlag(eph._type); 1316 1337 eph._healthflags_unknown = false; 1317 1338 eph._statusflags_unknown = false; … … 1568 1589 eph._TOT = 0.9999e9; 1569 1590 eph._type = t_eph::LNAV; 1591 eph._prn.setFlag(eph._type); 1570 1592 1571 1593 emit newGPSEph(eph); … … 1643 1665 eph._health = 0; 1644 1666 eph._type = t_eph::SBASL1; 1667 eph._prn.setFlag(eph._type); 1645 1668 1646 1669 emit newSBASEph(eph); … … 1661 1684 GETBITS(i, 12) 1662 1685 1663 if ((i == 1046 && size == 61) || (i == 1045 && size == 60)) { 1686 if ((i == 1046 && size == 61) || 1687 (i == 1045 && size == 60)) { 1664 1688 t_ephGal eph; 1665 1689 eph._receptDateTime = currentDateAndTimeGPS(); … … 1679 1703 return false; 1680 1704 } 1681 eph._prn.set('E', i, eph._inav ? 1 : 0);1705 eph._prn.set('E', i, eph._inav ? t_eph::INAV : t_eph::FNAV); 1682 1706 1683 1707 GETBITS(week, 12) //FIXME: roll-over after week 4095!! … … 1741 1765 GETFLOATSIGN(eph._BGD_1_5A, 10, 1.0 / (double )(1 << 30) / (double )(1 << 2)) 1742 1766 if (eph._inav) { 1767 eph._type = t_eph::INAV; 1743 1768 /* set unused F/NAV values */ 1744 1769 eph._E5a_HS = 0.0; … … 1767 1792 return false; 1768 1793 } 1769 eph._type = t_eph::INAV;1770 1794 } 1771 1795 else { 1796 eph._type = t_eph::FNAV; 1772 1797 /* set unused I/NAV values */ 1773 1798 eph._BGD_1_5B = 0.0; … … 1779 1804 GETBITS(eph._E5a_HS, 2) 1780 1805 GETBITS(eph._E5a_DataInvalid, 1) 1781 eph._type = t_eph::FNAV;1782 1806 } 1783 1807 eph._TOT = 0.9999e9; … … 1908 1932 eph._type = t_eph::D2; 1909 1933 } 1934 eph._prn.setFlag(eph._type); 1910 1935 1911 1936 emit newBDSEph(eph); -
trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp
r10572 r10599 243 243 continue; 244 244 } 245 char sysCh = ' '; 246 int flag = 0; 245 char sys = ' '; 246 int num = _clkOrb.Sat[ii].ID; 247 int flag = 0; // to force NAV type usage according SSR standard 247 248 if (ii < _clkOrb.NumberOfSat[CLOCKORBIT_SATGPS]) { 248 sysCh = 'G'; 249 sys = 'G'; 250 flag = t_eph::LNAV; 249 251 } 250 252 else if (ii >= CLOCKORBIT_OFFSETGLONASS && 251 253 ii < CLOCKORBIT_OFFSETGLONASS + _clkOrb.NumberOfSat[CLOCKORBIT_SATGLONASS]) { 252 sysCh = 'R'; 254 sys = 'R'; 255 flag = t_eph::FDMA_M; 253 256 } 254 257 else if (ii >= CLOCKORBIT_OFFSETGALILEO && 255 258 ii < CLOCKORBIT_OFFSETGALILEO + _clkOrb.NumberOfSat[CLOCKORBIT_SATGALILEO]) { 256 sys Ch= 'E';257 flag = 1; // I/NAV clock has been chosen as reference clock for Galileo SSR corrections259 sys = 'E'; 260 flag = t_eph::INAV; 258 261 } 259 262 else if (ii >= CLOCKORBIT_OFFSETQZSS && 260 263 ii < CLOCKORBIT_OFFSETQZSS + _clkOrb.NumberOfSat[CLOCKORBIT_SATQZSS]) { 261 sysCh = 'J'; 264 sys = 'J'; 265 flag = t_eph::LNAV; 262 266 } 263 267 else if (ii >= CLOCKORBIT_OFFSETSBAS && 264 268 ii < CLOCKORBIT_OFFSETSBAS + _clkOrb.NumberOfSat[CLOCKORBIT_SATSBAS]) { 265 sysCh = 'S'; 269 sys = 'S'; 270 flag = t_eph::SBASL1; 266 271 } 267 272 else if (ii >= CLOCKORBIT_OFFSETBDS && 268 273 ii < CLOCKORBIT_OFFSETBDS + _clkOrb.NumberOfSat[CLOCKORBIT_SATBDS]) { 269 sysCh = 'C'; 274 sys = 'C'; 275 if (num < 6) {// GEO 276 flag = t_eph::D2; 277 } 278 else if (num > 58 && num < 63) { // GEO 279 flag = t_eph::D2; 280 } 281 else { 282 flag = t_eph::D1; 283 } 270 284 } 271 285 else { … … 289 303 290 304 t_orbCorr orbCorr; 291 orbCorr._prn.set(sys Ch, _clkOrb.Sat[ii].ID, flag);305 orbCorr._prn.set(sys, num, flag); 292 306 orbCorr._staID = _staID.toStdString(); 293 307 orbCorr._iod = _clkOrb.Sat[ii].IOD; 294 308 orbCorr._time = _lastTime; 295 309 orbCorr._updateInt = _clkOrb.UpdateInterval; 296 orbCorr._system = sys Ch;310 orbCorr._system = sys; 297 311 orbCorr._xr[0] = _clkOrb.Sat[ii].Orbit.DeltaRadial; 298 312 orbCorr._xr[1] = _clkOrb.Sat[ii].Orbit.DeltaAlongTrack; … … 323 337 324 338 t_clkCorr clkCorr; 325 clkCorr._prn.set(sys Ch, _clkOrb.Sat[ii].ID, flag);339 clkCorr._prn.set(sys, _clkOrb.Sat[ii].ID, flag); 326 340 clkCorr._staID = _staID.toStdString(); 327 341 clkCorr._time = _lastTime; … … 347 361 _clkOrb.messageType == _ssrCorr->COTYPE_SBASHR || 348 362 _clkOrb.messageType == _ssrCorr->COTYPE_BDSHR) { 349 t_prn prn(sys Ch, _clkOrb.Sat[ii].ID, flag);363 t_prn prn(sys, _clkOrb.Sat[ii].ID, flag); 350 364 if (_lastClkCorrections.contains(prn)) { 351 365 t_clkCorr clkCorr; … … 371 385 + _codeBias.NumberOfSat[CLOCKORBIT_SATBDS]; 372 386 ii++) { 373 char sysCh = ' '; 387 char sys = ' '; 388 int num = _codeBias.Sat[ii].ID; 389 int flag = 0; 374 390 if (ii < _codeBias.NumberOfSat[CLOCKORBIT_SATGPS]) { 375 sysCh = 'G'; 391 sys = 'G'; 392 flag = t_eph::LNAV; 376 393 } 377 394 else if (ii >= CLOCKORBIT_OFFSETGLONASS && 378 395 ii < CLOCKORBIT_OFFSETGLONASS + _codeBias.NumberOfSat[CLOCKORBIT_SATGLONASS]) { 379 sysCh = 'R'; 396 sys = 'R'; 397 flag = t_eph::FDMA_M; 380 398 } 381 399 else if (ii >= CLOCKORBIT_OFFSETGALILEO && 382 400 ii < CLOCKORBIT_OFFSETGALILEO + _codeBias.NumberOfSat[CLOCKORBIT_SATGALILEO]) { 383 sysCh = 'E'; 401 sys = 'E'; 402 flag = t_eph::INAV; 384 403 } 385 404 else if (ii >= CLOCKORBIT_OFFSETQZSS && 386 405 ii < CLOCKORBIT_OFFSETQZSS + _codeBias.NumberOfSat[CLOCKORBIT_SATQZSS]) { 387 sysCh = 'J'; 406 sys = 'J'; 407 flag = t_eph::LNAV; 388 408 } 389 409 else if (ii >= CLOCKORBIT_OFFSETSBAS && 390 410 ii < CLOCKORBIT_OFFSETSBAS + _codeBias.NumberOfSat[CLOCKORBIT_SATSBAS]) { 391 sysCh = 'S'; 411 sys = 'S'; 412 flag = t_eph::SBASL1; 392 413 } 393 414 else if (ii >= CLOCKORBIT_OFFSETBDS && 394 415 ii < CLOCKORBIT_OFFSETBDS + _codeBias.NumberOfSat[CLOCKORBIT_SATBDS]) { 395 sysCh = 'C'; 416 sys = 'C'; 417 if (num < 6) {// GEO 418 flag = t_eph::D2; 419 } 420 else if (num > 58 && num < 63) { // GEO 421 flag = t_eph::D2; 422 } 423 else { 424 flag = t_eph::D1; 425 } 396 426 } 397 427 else { … … 399 429 } 400 430 t_satCodeBias satCodeBias; 401 satCodeBias._prn.set(sys Ch, _codeBias.Sat[ii].ID);431 satCodeBias._prn.set(sys, num, flag); 402 432 satCodeBias._staID = _staID.toStdString(); 403 433 satCodeBias._time = _lastTime; … … 406 436 const SsrCorr::CodeBias::BiasSat::CodeBiasEntry& biasEntry = _codeBias.Sat[ii].Biases[jj]; 407 437 t_frqCodeBias frqCodeBias; 408 frqCodeBias._rnxType2ch.assign(_ssrCorr->codeTypeToRnxType(sys Ch, biasEntry.Type));438 frqCodeBias._rnxType2ch.assign(_ssrCorr->codeTypeToRnxType(sys, biasEntry.Type)); 409 439 frqCodeBias._value = biasEntry.Bias; 410 440 if (!frqCodeBias._rnxType2ch.empty()) { … … 424 454 + _phaseBias.NumberOfSat[CLOCKORBIT_SATBDS]; 425 455 ii++) { 426 char sysCh = ' '; 456 char sys = ' '; 457 int num = _phaseBias.Sat[ii].ID; 458 int flag = 0; 427 459 if (ii < _phaseBias.NumberOfSat[CLOCKORBIT_SATGPS]) { 428 sysCh = 'G'; 460 sys = 'G'; 461 flag = t_eph::LNAV; 429 462 } 430 463 else if (ii >= CLOCKORBIT_OFFSETGLONASS && 431 464 ii < CLOCKORBIT_OFFSETGLONASS + _phaseBias.NumberOfSat[CLOCKORBIT_SATGLONASS]) { 432 sysCh = 'R'; 465 sys = 'R'; 466 flag = t_eph::FDMA_M; 433 467 } 434 468 else if (ii >= CLOCKORBIT_OFFSETGALILEO && 435 469 ii < CLOCKORBIT_OFFSETGALILEO + _phaseBias.NumberOfSat[CLOCKORBIT_SATGALILEO]) { 436 sysCh = 'E'; 470 sys = 'E'; 471 flag = t_eph::INAV; 437 472 } 438 473 else if (ii >= CLOCKORBIT_OFFSETQZSS && 439 474 ii < CLOCKORBIT_OFFSETQZSS + _phaseBias.NumberOfSat[CLOCKORBIT_SATQZSS]) { 440 sysCh = 'J'; 475 sys = 'J'; 476 flag = t_eph::LNAV; 441 477 } 442 478 else if (ii >= CLOCKORBIT_OFFSETSBAS && 443 479 ii < CLOCKORBIT_OFFSETSBAS + _phaseBias.NumberOfSat[CLOCKORBIT_SATSBAS]) { 444 sysCh = 'S'; 480 sys = 'S'; 481 flag = t_eph::SBASL1; 445 482 } 446 483 else if (ii >= CLOCKORBIT_OFFSETBDS && 447 484 ii < CLOCKORBIT_OFFSETBDS + _phaseBias.NumberOfSat[CLOCKORBIT_SATBDS]) { 448 sysCh = 'C'; 485 sys = 'C'; 486 if (num < 6) {// GEO 487 flag = t_eph::D2; 488 } 489 else if (num > 58 && num < 63) { // GEO 490 flag = t_eph::D2; 491 } 492 else { 493 flag = t_eph::D1; 494 } 449 495 } 450 496 else { … … 452 498 } 453 499 t_satPhaseBias satPhaseBias; 454 satPhaseBias._prn.set(sys Ch, _phaseBias.Sat[ii].ID);500 satPhaseBias._prn.set(sys, num, flag); 455 501 satPhaseBias._staID = _staID.toStdString(); 456 502 satPhaseBias._time = _lastTime; … … 463 509 const SsrCorr::PhaseBias::PhaseBiasSat::PhaseBiasEntry& biasEntry = _phaseBias.Sat[ii].Biases[jj]; 464 510 t_frqPhaseBias frqPhaseBias; 465 frqPhaseBias._rnxType2ch.assign(_ssrCorr->codeTypeToRnxType(sys Ch, biasEntry.Type));511 frqPhaseBias._rnxType2ch.assign(_ssrCorr->codeTypeToRnxType(sys, biasEntry.Type)); 466 512 frqPhaseBias._value = biasEntry.Bias; 467 513 frqPhaseBias._fixIndicator = biasEntry.SignalIntegerIndicator; -
trunk/BNC/src/RTCM3/RTCM3coDecoder.h
r10572 r10599 33 33 #include "../RTCM3/clock_and_orbit/clock_orbit_igs.h" 34 34 #include "../RTCM3/clock_and_orbit/clock_orbit_rtcm.h" 35 #include "ephemeris.h" 35 36 36 37 class RTCM3coDecoder : public QObject, public GPSDecoder {
Note:
See TracChangeset
for help on using the changeset viewer.