Changeset 11041 in ntrip for trunk/BNC/src/PPP
- Timestamp:
- Sep 22, 2026, 4:08:55 PM (3 months ago)
- Location:
- trunk/BNC/src/PPP
- Files:
-
- 6 edited
-
pppClient.cpp (modified) (1 diff)
-
pppClient.h (modified) (1 diff)
-
pppObsPool.cpp (modified) (3 diffs)
-
pppObsPool.h (modified) (3 diffs)
-
pppSatObs.cpp (modified) (5 diffs)
-
pppSatObs.h (modified) (2 diffs)
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];
Note:
See TracChangeset
for help on using the changeset viewer.
