Changeset 11047 in ntrip for trunk/BNC/src/PPP/pppEphPool.cpp
- Timestamp:
- Sep 28, 2026, 11:17:34 AM (7 hours ago)
- File:
-
- 1 edited
-
trunk/BNC/src/PPP/pppEphPool.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/pppEphPool.cpp
r10953 r11047 20 20 #include "pppInclude.h" 21 21 #include "pppClient.h" 22 #include "bncephuser.h" 22 23 23 24 using namespace BNC_PPP; … … 26 27 // 27 28 ///////////////////////////////////////////////////////////////////////////// 29 // Bad, outdated and unhealthy ephemerides are never used. Ephemerides from 30 // RINEX navigation files (post-processing) never pass bncEphUser's checks and 31 // stay "unchecked", so the health flag and the plausibility of the satellite 32 // distance are checked here directly as well. 33 ///////////////////////////////////////////////////////////////////////////// 28 34 void t_pppEphPool::putEphemeris(t_eph* eph) { 29 if (eph && (eph->checkState() != t_eph::bad || 30 eph->checkState() != t_eph::unhealthy || 31 eph->checkState() != t_eph::outdated)) { 32 _satEphPool[eph->prn().toInt()].putEphemeris(_maxQueueSize, eph); 35 if (!eph) { 36 return; 37 } 38 int iPrn = eph->prn().toInt(); 39 if (iPrn == 0) { // satellite number out of range 40 delete eph; 41 } 42 else if (eph->checkState() == t_eph::unhealthy || eph->isUnhealthy()) { 43 _satEphPool[iPrn].setUnhealthy(eph); 44 } 45 else if (eph->checkState() == t_eph::unchecked && !bncEphUser::radialDistanceOk(eph)) { 46 LOG << "bad ephemeris " << eph->prn().toString() << ' ' << string(eph->TOC()) 47 << " - implausible satellite distance, ignored" << endl; 48 delete eph; 49 } 50 else if (eph->checkState() != t_eph::bad && 51 eph->checkState() != t_eph::outdated) { 52 _satEphPool[iPrn].putEphemeris(_maxQueueSize, eph); 33 53 } 34 54 else { … … 87 107 delete eph; 88 108 } 109 } 110 111 // A newer ephemeris declaring the satellite unhealthy: rejecting it alone 112 // would leave the older, healthy ephemerides in the pool, and the satellite 113 // would still be used with them - so they are all discarded, and the 114 // satellite stays unused until a newer healthy ephemeris arrives. 115 ///////////////////////////////////////////////////////////////////////////// 116 void t_pppEphPool::t_satEphPool::setUnhealthy(t_eph* eph) { 117 if (_ephs.empty() || eph->isNewerThan(_ephs.front())) { 118 if (!_ephs.empty()) { 119 LOG << "unhealthy ephemeris " << eph->prn().toString() << ' ' << string(eph->TOC()) 120 << " - older ephemerides of this satellite discarded" << endl; 121 } 122 for (unsigned ii = 0; ii < _ephs.size(); ii++) { 123 delete _ephs[ii]; 124 } 125 _ephs.clear(); 126 } 127 delete eph; 89 128 } 90 129
Note:
See TracChangeset
for help on using the changeset viewer.
