- Timestamp:
- Sep 22, 2026, 4:08:55 PM (6 hours ago)
- Location:
- trunk/BNC/src
- Files:
-
- 18 edited
-
PPP/pppClient.cpp (modified) (1 diff)
-
PPP/pppClient.h (modified) (1 diff)
-
PPP/pppObsPool.cpp (modified) (3 diffs)
-
PPP/pppObsPool.h (modified) (3 diffs)
-
PPP/pppSatObs.cpp (modified) (5 diffs)
-
PPP/pppSatObs.h (modified) (2 diffs)
-
RTCM3/RTCM3coDecoder.cpp (modified) (1 diff)
-
RTCM3/clock_and_orbit/clock_orbit.h (modified) (1 diff)
-
RTCM3/clock_and_orbit/clock_orbit_igs.cpp (modified) (1 diff)
-
RTCM3/clock_and_orbit/clock_orbit_igs.h (modified) (1 diff)
-
RTCM3/clock_and_orbit/clock_orbit_rtcm.cpp (modified) (1 diff)
-
RTCM3/clock_and_orbit/clock_orbit_rtcm.h (modified) (1 diff)
-
RTCM3/clock_and_orbit/clock_orbit_rtcm_new.cpp (modified) (1 diff)
-
RTCM3/clock_and_orbit/clock_orbit_rtcm_new.h (modified) (1 diff)
-
pppRun.cpp (modified) (3 diffs)
-
pppRun.h (modified) (1 diff)
-
satObs.cpp (modified) (2 diffs)
-
satObs.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppClient.cpp
r11030 r11041 157 157 } 158 158 _obsPool->putCodeBias(newBias); 159 } 160 } 161 162 // 163 ////////////////////////////////////////////////////////////////////////////// 164 void t_pppClient::putSatAntennas(const vector<t_satAntenna*>& satAntennas) { 165 if (OPT->_logMode == t_pppOptions::normal && satAntennas.size() > 0) { 166 LOG << "satAntennas " << string(satAntennas[0]->_time) << ' ' << satAntennas.size() << endl; 167 } 168 for (unsigned ii = 0; ii < satAntennas.size(); ii++) { 169 _obsPool->putSatAntenna(new t_satAntenna(*satAntennas[ii])); 159 170 } 160 171 } -
trunk/BNC/src/PPP/pppClient.h
r11009 r11041 33 33 void putCodeBiases(const std::vector<t_satCodeBias*>& biases); 34 34 void putPhaseBiases(const std::vector<t_satPhaseBias*>& biases); 35 void putSatAntennas(const std::vector<t_satAntenna*>& satAntennas); 35 36 void processEpoch(const std::vector<t_satObs*>& satObs, t_output* output); 36 37 -
trunk/BNC/src/PPP/pppObsPool.cpp
r11009 r11041 51 51 _satPhaseBiases[ii] = 0; 52 52 } 53 for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) { 54 _satAntennas[ii] = 0; 55 } 53 56 _vTec = 0; 54 57 _metaData = 0; … … 63 66 for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) { 64 67 delete _satPhaseBiases[ii]; 68 } 69 for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) { 70 delete _satAntennas[ii]; 65 71 } 66 72 delete _vTec; … … 110 116 LOG << endl; 111 117 } 118 } 119 120 // 121 ///////////////////////////////////////////////////////////////////////////// 122 void t_pppObsPool::putSatAntenna(t_satAntenna* satAntenna) { 123 int iPrn = satAntenna->_prn.toInt(); 124 delete _satAntennas[iPrn]; 125 _satAntennas[iPrn] = satAntenna; 112 126 } 113 127 -
trunk/BNC/src/PPP/pppObsPool.h
r11009 r11041 32 32 void putCodeBias(t_satCodeBias* satCodeBias); 33 33 void putPhaseBias(t_satPhaseBias* satPhaseBias); 34 void putSatAntenna(t_satAntenna* satAntenna); 34 35 void putTec(t_vTec* _vTec); 35 36 void putMetaData(t_metaData* metaData); … … 45 46 const t_satPhaseBias* satPhaseBias(const t_prn& prn) const { 46 47 return _satPhaseBiases[prn.toInt()]; 48 } 49 const t_satAntenna* satAntenna(const t_prn& prn) const { 50 return _satAntennas[prn.toInt()]; 47 51 } 48 52 const t_vTec* vTec() const {return _vTec;} … … 61 65 t_satCodeBias* _satCodeBiases[t_prn::MAXPRN+1]; 62 66 t_satPhaseBias* _satPhaseBiases[t_prn::MAXPRN+1]; 67 t_satAntenna* _satAntennas[t_prn::MAXPRN+1]; 63 68 t_vTec* _vTec; 64 69 t_metaData* _metaData; -
trunk/BNC/src/PPP/pppSatObs.cpp
r10942 r11041 400 400 401 401 402 // A system's Satellite Antenna message is only trustworthy once the 403 // provider has confirmed it via Metadata: SatelliteAntennaIOD (DF+010) must 404 // be non-zero, and must match the Data IOD (DF+069) of a Metadata entry for 405 // model-correction type 1 (satellite antenna PCV) or type 2 (GDV) - either 406 // entry matching is sufficient. Metadata carries this IOD once globally, not 407 // per system (DF+010 is GNSS-specific, DF+069 is not), so the same Metadata 408 // entries are reused as the trust anchor for every system's check - the 409 // provider is relied on to keep DF+010 synchronized with DF+069 across all 410 // systems for this to work. 411 //////////////////////////////////////////////////////////////////////////// 412 static bool ssrSatAntennaTrusted(const t_satAntenna* satAntenna) { 413 if (!satAntenna || satAntenna->_satelliteAntennaIOD == 0) { 414 return false; 415 } 416 const t_metaData* metaData = PPP_CLIENT->obsPool()->metaData(); 417 if (!metaData) { 418 return false; 419 } 420 for (unsigned ii = 0; ii < metaData->_entries.size(); ii++) { 421 const t_metaDataEntry& entry = metaData->_entries[ii]; 422 if ((entry._typeIndicator == 1 || entry._typeIndicator == 2) && // PCV or GDV 423 entry._dataIODIndicator && 424 entry._dataIOD == satAntenna->_satelliteAntennaIOD) { 425 return true; 426 } 427 } 428 return false; 429 } 430 431 // Satellite antenna correction (offset + nadir-angle-dependent PCV) from a 432 // live SSR Satellite Antenna message, in the same additive sense as 433 // bncAntex::satCorr(). Returns false (corr untouched) if no trusted SSR data 434 // is available for this PRN/frequency (see ssrSatAntennaTrusted), so the 435 // caller falls back to the static ANTEX file. 436 //////////////////////////////////////////////////////////////////////////// 437 static bool ssrSatAntennaCorr(const t_satAntenna* satAntenna, const string& frqStr, 438 double elTx, double& corr) { 439 if (!satAntenna) { 440 return false; 441 } 442 for (unsigned ii = 0; ii < satAntenna->_freq.size(); ii++) { 443 const t_frqAntenna& frq = satAntenna->_freq[ii]; 444 if (frq._frqType != frqStr) { 445 continue; 446 } 447 corr = 0.0; 448 if (frq._nadirCorrectionIndicator) { 449 corr += frq._nadirCorrection; 450 } 451 if (!frq._nadirAngleCorrection.empty()) { 452 // 1-degree bins starting at nadir (0 deg), per RTCM-SSR spec 453 double nadirDeg = 90.0 - elTx * 180.0 / M_PI; 454 int idx = int(nadirDeg + 0.5); 455 if (idx < 0) { 456 idx = 0; 457 } 458 else if (idx >= (int)frq._nadirAngleCorrection.size()) { 459 idx = (int)frq._nadirAngleCorrection.size() - 1; 460 } 461 corr += frq._nadirAngleCorrection[idx]; 462 } 463 return true; 464 } 465 return false; 466 } 467 402 468 // 403 469 //////////////////////////////////////////////////////////////////////////// … … 476 542 // ------------------------------------------- 477 543 if (PPP_CLIENT->antex()) { 544 const t_satAntenna* satAntenna = PPP_CLIENT->obsPool()->satAntenna(_prn); 545 if (!ssrSatAntennaTrusted(satAntenna)) { 546 satAntenna = 0; // untrusted (IOD zero, or not confirmed via Metadata) - fall back to ANTEX 547 } 478 548 for (unsigned ii = 0; ii < t_frequency::max; ii++) { 479 549 t_frequency::type frqType = static_cast<t_frequency::type>(ii); … … 482 552 bool found; 483 553 QString prn(_prn.toString().c_str()); 484 _model._antPCO[ii] = PPP_CLIENT->antex()->rcvCorr(station->antName(), frqType, _model._eleSat, _model._azSat, found); 485 _model._antPCO[ii] += PPP_CLIENT->antex()->satCorr(prn, frqType, _model._elTx, _model._azTx, found); 486 if (OPT->_isAPC && found) { 487 // the PCOs as given in the satellite antenna correction for all frequencies 488 // have to be reduced by the PCO of the respective reference frequency 489 if (_prn.system() == 'G') { 490 _model._antPCO[ii] -= PPP_CLIENT->antex()->satCorr(prn, t_frequency::G1, _model._elTx, _model._azTx, found); 554 _model._antPCO[ii] = PPP_CLIENT->antex()->rcvCorr(station->antName(), frqType, _model._eleSat, _model._azSat, found); 555 556 // Prefer a live, trusted SSR Satellite Antenna correction over the 557 // static ANTEX file when available for this satellite/frequency, 558 // mirroring how SSR orbit/clock corrections already take precedence 559 // over broadcast ephemerides elsewhere in this codebase. Unlike 560 // ANTEX's satCorr() (a single geometric PCO/PCV value shared by code 561 // and phase alike), the SSR message's DF+011/DF+012 indicators say 562 // explicitly which observable(s) the correction applies to, so it is 563 // routed into the dedicated phase-only/code-only fields instead of 564 // the shared _antPCO - both may fire for the same ssrCorr value if 565 // both indicators are set. 566 double ssrCorr; 567 if (ssrSatAntennaCorr(satAntenna, frqStr, _model._elTx, ssrCorr)) { 568 if (satAntenna->_phaseCenterInfoInd) { 569 _model._antPCV[ii] += ssrCorr; 491 570 } 492 else if (_prn.system() == 'R') {493 _model._ant PCO[ii] -= PPP_CLIENT->antex()->satCorr(prn, t_frequency::R1, _model._elTx, _model._azTx, found);571 if (satAntenna->_groupDelayInfoInd) { 572 _model._antGDV[ii] += ssrCorr; 494 573 } 495 else if (_prn.system() == 'E') { 496 _model._antPCO[ii] -= PPP_CLIENT->antex()->satCorr(prn, t_frequency::E1, _model._elTx, _model._azTx, found); 497 } 498 else if (_prn.system() == 'C') { 499 _model._antPCO[ii] -= PPP_CLIENT->antex()->satCorr(prn, t_frequency::C2, _model._elTx, _model._azTx, found); 574 } 575 else { 576 _model._antPCO[ii] += PPP_CLIENT->antex()->satCorr(prn, frqType, _model._elTx, _model._azTx, found); 577 if (OPT->_isAPC && found) { 578 // the PCOs as given in the satellite antenna correction for all frequencies 579 // have to be reduced by the PCO of the respective reference frequency 580 if (_prn.system() == 'G') { 581 _model._antPCO[ii] -= PPP_CLIENT->antex()->satCorr(prn, t_frequency::G1, _model._elTx, _model._azTx, found); 582 } 583 else if (_prn.system() == 'R') { 584 _model._antPCO[ii] -= PPP_CLIENT->antex()->satCorr(prn, t_frequency::R1, _model._elTx, _model._azTx, found); 585 } 586 else if (_prn.system() == 'E') { 587 _model._antPCO[ii] -= PPP_CLIENT->antex()->satCorr(prn, t_frequency::E1, _model._elTx, _model._azTx, found); 588 } 589 else if (_prn.system() == 'C') { 590 _model._antPCO[ii] -= PPP_CLIENT->antex()->satCorr(prn, t_frequency::C2, _model._elTx, _model._azTx, found); 591 } 500 592 } 501 593 } … … 645 737 if (_prn.system() == frqStr[0]) { 646 738 LOG << "PCO : " << frqStr << setw(12) << setprecision(3) << _model._antPCO[iFreq] << endl 739 << "SSR PCV : " << frqStr << setw(12) << setprecision(3) << _model._antPCV[iFreq] << endl 740 << "SSR GDV : " << frqStr << setw(12) << setprecision(3) << _model._antGDV[iFreq] << endl 647 741 << "BIAS CODE : " << frqStr << setw(12) << setprecision(3) << _model._codeBias[iFreq] << "\t(" << _obs[iFreq]->trkChar() << ") " << endl 648 742 << "BIAS PHASE : " << frqStr << setw(12) << setprecision(3) << _model._phaseBias[iFreq] << "\t(" << _obs[iFreq]->trkChar() << ") " << endl … … 704 798 for (it = codeCoeff.begin(); it != codeCoeff.end(); it++) { 705 799 t_frequency::type tFreq = it->first; 706 dispPart += it->second * (_model._antPCO[tFreq] - _model._codeBias[tFreq]); 800 dispPart += it->second * (_model._antPCO[tFreq] + _model._antGDV[tFreq] - _model._codeBias[tFreq]); 707 801 } 708 802 for (it = phaseCoeff.begin(); it != phaseCoeff.end(); it++) { 709 803 t_frequency::type tFreq = it->first; 710 dispPart += it->second * (_model._antPCO[tFreq] - _model._phaseBias[tFreq] + 804 dispPart += it->second * (_model._antPCO[tFreq] + _model._antPCV[tFreq] - _model._phaseBias[tFreq] + 711 805 _model._windUp * t_CST::lambda(tFreq, _channel)); 712 806 } -
trunk/BNC/src/PPP/pppSatObs.h
r10938 r11041 109 109 for (unsigned ii = 0; ii < t_frequency::max; ii++) { 110 110 _antPCO[ii] = 0.0; 111 _antPCV[ii] = 0.0; 112 _antGDV[ii] = 0.0; 111 113 _codeBias[ii] = 0.0; 112 114 _phaseBias[ii] = 0.0; … … 130 132 double _windUp; 131 133 double _rel; 132 double _antPCO[t_frequency::max]; 134 double _antPCO[t_frequency::max]; // ANTEX-sourced, shared code+phase (geometric PCO/PCV) 135 double _antPCV[t_frequency::max]; // SSR-sourced, phaserange only (DF+011 Phase Center indicator) 136 double _antGDV[t_frequency::max]; // SSR-sourced, pseudorange only (DF+012 Group Delay indicator) 133 137 double _codeBias[t_frequency::max]; 134 138 double _phaseBias[t_frequency::max]; -
trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp
r11040 r11041 702 702 } 703 703 t_frqAntenna frqAntenna; 704 frqAntenna._freqIndex = f; 704 frqAntenna._frqType = _ssrCorr->antFreqIndexToStr(si.sysChar, f); 705 if (frqAntenna._frqType.empty()) { 706 continue; // reserved/unmapped DF+018 bit position 707 } 705 708 frqAntenna._nadirCorrectionIndicator = satPart.Freq[f].NadirCorrectionIndicator; 706 709 frqAntenna._nadirCorrection = satPart.Freq[f].NadirCorrection; -
trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit.h
r11035 r11041 516 516 virtual std::string codeTypeToRnxType(char system, CodeType type) = 0; 517 517 virtual CodeType rnxTypeToCodeType(char system, std::string type) = 0; 518 /* DF+018 GNSS Frequency Mask bit position (0-based) -> t_frequency::type 519 label (e.g. "G1", "R2", "E7"), per system. Returns "" for a reserved/ 520 unmapped bit position. */ 521 virtual std::string antFreqIndexToStr(char system, unsigned int freqIndex) = 0; 518 522 519 523 -
trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit_igs.cpp
r11031 r11041 937 937 } 938 938 939 // 940 //////////////////////////////////////////////////////////////////////////// 941 std::string SsrCorrIgs::antFreqIndexToStr(char, unsigned int) { 942 // This format does not decode Satellite Antenna message content; only 943 // present to satisfy SsrCorr's interface. 944 return ""; 945 } 946 -
trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit_igs.h
r11031 r11041 219 219 std::string metaTypeToStr(unsigned int ind); 220 220 std::string codeTypeToRnxType(char system, CodeType type); 221 std::string antFreqIndexToStr(char system, unsigned int freqIndex); 221 222 SsrCorr::CodeType rnxTypeToCodeType(char system, std::string type); 222 223 -
trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit_rtcm.cpp
r11031 r11041 1391 1391 } 1392 1392 1393 // 1394 //////////////////////////////////////////////////////////////////////////// 1395 std::string SsrCorrRtcm::antFreqIndexToStr(char, unsigned int) { 1396 // Satellite Antenna messages are not defined in (old) RTCM-SSR; only 1397 // present to satisfy SsrCorr's interface. 1398 return ""; 1399 } 1400 -
trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit_rtcm.h
r11031 r11041 218 218 std::string metaTypeToStr(unsigned int ind); 219 219 std::string codeTypeToRnxType(char system, CodeType type); 220 std::string antFreqIndexToStr(char system, unsigned int freqIndex); 220 221 SsrCorr::CodeType rnxTypeToCodeType(char system, std::string type); 221 222 -
trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit_rtcm_new.cpp
r11036 r11041 1410 1410 return "reserved!"; 1411 1411 } 1412 1413 // 1414 //////////////////////////////////////////////////////////////////////////// 1415 std::string SsrCorrRtcmNew::antFreqIndexToStr(char system, unsigned int freqIndex) { 1416 switch (system) { 1417 case 'G': 1418 if (freqIndex == 0) return "G1"; 1419 if (freqIndex == 1) return "G2"; 1420 if (freqIndex == 2) return "G5"; 1421 break; 1422 case 'R': 1423 if (freqIndex == 0) return "R1"; 1424 if (freqIndex == 1) return "R2"; 1425 break; 1426 case 'E': 1427 if (freqIndex == 0) return "E1"; 1428 if (freqIndex == 1) return "E6"; 1429 if (freqIndex == 2) return "E7"; 1430 if (freqIndex == 3) return "E8"; 1431 if (freqIndex == 4) return "E5"; 1432 break; 1433 case 'J': 1434 if (freqIndex == 0) return "J1"; 1435 if (freqIndex == 1) return "J6"; 1436 if (freqIndex == 2) return "J2"; 1437 if (freqIndex == 3) return "J5"; 1438 break; 1439 case 'C': 1440 if (freqIndex == 0) return "C2"; // B1 1441 if (freqIndex == 1) return "C6"; // B3 1442 if (freqIndex == 2) return "C7"; // B2 1443 if (freqIndex == 3) return "C5"; // B2a 1444 if (freqIndex == 4) return "C7"; // B2b (same t_frequency::type as B2) 1445 if (freqIndex == 5) return "C1"; // B1C 1446 break; 1447 } 1448 return ""; // reserved / unmapped bit position 1449 } -
trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit_rtcm_new.h
r11031 r11041 273 273 std::string codeTypeToRnxType(char system, CodeType type); 274 274 SsrCorr::CodeType rnxTypeToCodeType(char system, std::string type); 275 std::string antFreqIndexToStr(char system, unsigned int freqIndex); 275 276 276 277 size_t MakeClockOrbit(const struct ClockOrbit *co, ClockOrbitType type, int moremessagesfollow, char *buffer, size_t size); -
trunk/BNC/src/pppRun.cpp
r11022 r11041 119 119 connect(BNC_CORE, SIGNAL(newPhaseBiases(QList<t_satPhaseBias>)), 120 120 this, SLOT(slotNewPhaseBiases(QList<t_satPhaseBias>)),conType); 121 122 connect(BNC_CORE, SIGNAL(newSatAntennas(QList<t_satAntenna>)), 123 this, SLOT(slotNewSatAntennas(QList<t_satAntenna>)),conType); 121 124 122 125 connect(BNC_CMB, SIGNAL(newOrbCorrections(QList<t_orbCorr>)), … … 567 570 // 568 571 //////////////////////////////////////////////////////////////////////////// 572 void t_pppRun::slotNewSatAntennas(QList<t_satAntenna> satAntennas) { 573 if (satAntennas.size() == 0) { 574 return; 575 } 576 577 if (_opt->_realTime) { 578 if (_opt->_corrMount.empty() && _opt->_biasMount.empty()) { 579 return; 580 } 581 if (!_opt->_biasMount.empty()) { 582 if (_opt->_biasMount != satAntennas[0]._staID) { 583 return; 584 } 585 } 586 else if (!_opt->_corrMount.empty()) { 587 if (_opt->_corrMount != satAntennas[0]._staID) { 588 return; 589 } 590 } 591 } 592 vector<t_satAntenna*> antennas; 593 for (int ii = 0; ii < satAntennas.size(); ii++) { 594 antennas.push_back(new t_satAntenna(satAntennas[ii])); 595 } 596 597 _pppClient->putSatAntennas(antennas); 598 599 for (unsigned ii = 0; ii < antennas.size(); ii++) { 600 delete antennas[ii]; 601 } 602 } 603 604 // 605 //////////////////////////////////////////////////////////////////////////// 569 606 void t_pppRun::slotNewPhaseBiases(QList<t_satPhaseBias> phaseBiases) { 570 607 if (phaseBiases.size() == 0) { … … 630 667 connect(_corrFile, SIGNAL(newPhaseBiases(QList<t_satPhaseBias>)), this, SLOT(slotNewPhaseBiases(QList<t_satPhaseBias>))); 631 668 } 669 connect(_corrFile, SIGNAL(newSatAntennas(QList<t_satAntenna>)), this, SLOT(slotNewSatAntennas(QList<t_satAntenna>))); 632 670 if (_opt->_ionoFile.empty()) { 633 671 connect(_corrFile, SIGNAL(newTec(t_vTec)), this, SLOT(slotNewTec(t_vTec))); -
trunk/BNC/src/pppRun.h
r11009 r11041 46 46 void slotNewCodeBiases(QList<t_satCodeBias> codeBiases); 47 47 void slotNewPhaseBiases(QList<t_satPhaseBias> phaseBiases); 48 void slotNewSatAntennas(QList<t_satAntenna> satAntennas); 48 49 void slotNewObs(QByteArray staID, QList<t_satObs> obsList); 49 50 void slotSetSpeed(int speed); -
trunk/BNC/src/satObs.cpp
r11037 r11041 521 521 for (unsigned ii = 0; ii < satAntenna._freq.size(); ii++) { 522 522 const t_frqAntenna& frqAntenna = satAntenna._freq[ii]; 523 *out << " " << frqAntenna._fr eqIndex<< ' '523 *out << " " << frqAntenna._frqType << ' ' 524 524 << frqAntenna._nadirCorrectionIndicator << ' ' 525 525 << setw(10) << setprecision(4) << frqAntenna._nadirCorrection; … … 573 573 for (int jj = 0; jj < numFreq; jj++) { 574 574 t_frqAntenna frqAntenna; 575 in >> frqAntenna._fr eqIndex>> frqAntenna._nadirCorrectionIndicator >> frqAntenna._nadirCorrection;575 in >> frqAntenna._frqType >> frqAntenna._nadirCorrectionIndicator >> frqAntenna._nadirCorrection; 576 576 for (unsigned kk = 0; kk < numAngles; kk++) { 577 577 double val; -
trunk/BNC/src/satObs.h
r11037 r11041 283 283 public: 284 284 t_frqAntenna() { 285 _freqIndex = 0;286 285 _nadirCorrectionIndicator = false; 287 286 _nadirCorrection = 0.0; 288 287 } 289 unsigned int_freqIndex; // 0 .. ANT_MAXFREQUENCIES-1, DF+018 bit position288 std::string _frqType; // t_frequency::type label, e.g. "G1", "R2", "E7" 290 289 bool _nadirCorrectionIndicator; 291 290 double _nadirCorrection; // m, only valid if _nadirCorrectionIndicator
Note:
See TracChangeset
for help on using the changeset viewer.
