Changeset 11123 in ntrip
- Timestamp:
- Oct 23, 2026, 4:52:02 PM (31 hours ago)
- Location:
- trunk/BNC
- Files:
-
- 8 edited
-
CHANGELOG.md (modified) (1 diff)
-
src/PPP/pppClient.cpp (modified) (1 diff)
-
src/PPP/pppClient.h (modified) (2 diffs)
-
src/bncantex.cpp (modified) (1 diff)
-
src/bncantex.h (modified) (2 diffs)
-
src/bnchelp.html (modified) (2 diffs)
-
src/combination/bnccomb.cpp (modified) (1 diff)
-
src/combination/bnccomb.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/CHANGELOG.md
r11122 r11123 19 19 - ADDED: Detection and conversion of outdated or erroneous IGS-SSR epoch time encodings (GLONASS as UTC seconds of day or of week, BDS as BDT) with an hourly warning, and a plausibility check of the orbit/clock epochs of all systems of a stream 20 20 - ADDED: ANTEX file name, number of entries and latest satellite entry are logged; satellites without a valid ANTEX entry are reported (and not combined) 21 - ADDED: Combination and PPP: a changed ANTEX file is read again while BNC is running and used from the GPS week given in it (SINEX code of the entries, e.g. IGS20_2437) on; the attitude model states are taken over 21 22 - ADDED: Regression test suite ('tests'): example configurations and short raw captures replayed through BNC and compared with reference outputs 22 23 - ADDED: macOS packaging script -
trunk/BNC/src/PPP/pppClient.cpp
r11095 r11123 561 561 } 562 562 563 // a changed ANTEX file is read and used from its GPS week on 564 if (_antex) { 565 QString msg = _antexReloader.update(_antex, _epoTimeRover); 566 if (!msg.isEmpty()) { 567 LOG << string(_epoTimeRover) << " " << msg.toStdString() << endl; 568 } 569 } 570 563 571 for (int iter = 1; iter <= 2; iter++) { 564 572 ColumnVector xyzc(4); xyzc = 0.0; -
trunk/BNC/src/PPP/pppClient.h
r11095 r11123 10 10 #include "pppModel.h" 11 11 12 class bncAntex; 12 #include "bncantex.h" 13 13 14 14 namespace BNC_PPP { … … 73 73 t_pppStation* _staRover; 74 74 bncAntex* _antex; 75 bncAntexReloader _antexReloader; // re-reads a changed ANTEX file 75 76 e_ssrFormat _ssrFormat; // of the latest orbit corrections 76 77 t_pppFilter* _filter; -
trunk/BNC/src/bncantex.cpp
r11110 r11123 1110 1110 } 1111 1111 1112 // GPS week of the file from the SINEX code of the satellite entries 1113 // (e.g. IGS20_2437): the week occurring most often 1114 //////////////////////////////////////////////////////////////////////////// 1115 int bncAntex::gpsWeek() const { 1116 static const QRegularExpression re("_(\\d{4})$"); 1117 QMap<int, int> count; 1118 QMapIterator<QString, QVector<t_antMap*> > it(_satMaps); 1119 while (it.hasNext()) { 1120 it.next(); 1121 for (const t_antMap* map : it.value()) { 1122 QRegularExpressionMatch mm = re.match(map->snxCode.trimmed()); 1123 if (mm.hasMatch()) { 1124 count[mm.captured(1).toInt()] += 1; 1125 } 1126 } 1127 } 1128 int week = 0, num = 0; 1129 QMapIterator<int, int> itC(count); 1130 while (itC.hasNext()) { 1131 itC.next(); 1132 if (itC.value() > num) { 1133 week = itC.key(); 1134 num = itC.value(); 1135 } 1136 } 1137 return week; 1138 } 1139 1140 // Take over the attitude model states and warnings of another instance 1141 //////////////////////////////////////////////////////////////////////////// 1142 void bncAntex::takeStates(const bncAntex& other) { 1143 _glonassYaw = other._glonassYaw; 1144 _gpsYaw = other._gpsYaw; 1145 _onYaw = other._onYaw; 1146 _noSatEntryWarned = other._noSatEntryWarned; 1147 } 1148 1149 // Re-read the ANTEX file while running 1150 //////////////////////////////////////////////////////////////////////////// 1151 bncAntexReloader::bncAntexReloader() { 1152 _fileSize = 0; 1153 _init = false; 1154 _pending = 0; 1155 _pendingWeek = 0; 1156 } 1157 1158 bncAntexReloader::~bncAntexReloader() { 1159 delete _pending; 1160 } 1161 1162 QString bncAntexReloader::update(bncAntex*& antex, const bncTime& epoch) { 1163 if (!antex || antex->fileName().isEmpty()) { 1164 return QString(); 1165 } 1166 QString msg; 1167 QDateTime now = QDateTime::currentDateTimeUtc(); 1168 if (!_init) { 1169 QFileInfo fi(antex->fileName()); 1170 _fileTime = fi.lastModified(); 1171 _fileSize = fi.size(); 1172 _lastCheck = now; 1173 _init = true; 1174 } 1175 1176 // file changed? 1177 if (_lastCheck.secsTo(now) >= 60) { 1178 _lastCheck = now; 1179 QFileInfo fi(antex->fileName()); 1180 // read only once the file has not changed for 30 s (copy finished) 1181 if (fi.exists() && (fi.lastModified() != _fileTime || fi.size() != _fileSize) && 1182 fi.lastModified().secsTo(now) >= 30) { 1183 _fileTime = fi.lastModified(); 1184 _fileSize = fi.size(); 1185 bncAntex* newAntex = new bncAntex(); 1186 if (newAntex->readFile(antex->fileName()) != success || newAntex->numSatPrns() == 0) { 1187 delete newAntex; 1188 msg = "ANTEX file " + antex->fileName() + " changed but could not be read - previous file kept"; 1189 } 1190 else { 1191 int week = newAntex->gpsWeek(); 1192 delete _pending; 1193 _pending = newAntex; 1194 _pendingWeek = week; 1195 if (epoch.valid() && week > int(epoch.gpsw())) { 1196 msg = QString("ANTEX file %1 changed (GPS week %2) - used from GPS week %2 on") 1197 .arg(antex->fileName()).arg(week); 1198 } 1199 } 1200 } 1201 } 1202 1203 // pending file due? 1204 if (_pending && (!epoch.valid() || _pendingWeek <= int(epoch.gpsw()))) { 1205 _pending->takeStates(*antex); 1206 delete antex; 1207 antex = _pending; 1208 _pending = 0; 1209 if (!msg.isEmpty()) msg += "; "; 1210 msg += QString("ANTEX file re-read, used from now on (GPS week %1): ").arg(_pendingWeek) + antex->info(); 1211 } 1212 return msg; 1213 } 1214 1112 1215 // True if a missing satellite antenna entry has to be reported (at most once 1113 1216 // per hour and PRN) -
trunk/BNC/src/bncantex.h
r11110 r11123 52 52 QString satBlockType(const QString& prn, const bncTime& epoch) const; 53 53 QString info() const; 54 // GPS week from which the file is to be used: the week of the SINEX code of 55 // the antenna entries (e.g. IGS20_2437), 0 if not available 56 int gpsWeek() const; 57 const QString& fileName() const {return _fileName;} 58 int numSatPrns() const {return _satMaps.size();} 59 // take over the attitude model states and warnings of another (older) 60 // instance, so that a re-read file does not interrupt running turns 61 void takeStates(const bncAntex& other); 54 62 bool hasSatEntry(const QString& prn, const bncTime& epoch) const {return satMap(prn, epoch) != 0;} 55 63 bool warnNoSatEntry(const QString& prn, const bncTime& epoch) const; … … 228 236 }; 229 237 238 // Re-reads an ANTEX file while BNC is running: a changed file (modification 239 // time or size, checked at most once a minute) is read, and used from the 240 // GPS week given in the file (SINEX code of its entries) on; a new file of a 241 // week not yet reached is kept pending until the processed epochs reach it. 242 //////////////////////////////////////////////////////////////////////////// 243 class bncAntexReloader { 244 public: 245 bncAntexReloader(); 246 ~bncAntexReloader(); 247 // to be called per processed epoch; replaces antex if a new file is due 248 // and returns a message for the logfile (empty if nothing happened) 249 QString update(bncAntex*& antex, const bncTime& epoch); 250 private: 251 QDateTime _lastCheck; // wall clock of the last file check 252 QDateTime _fileTime; // modification time of the file read last 253 qint64 _fileSize; 254 bool _init; 255 bncAntex* _pending; // new file of a later GPS week 256 int _pendingWeek; 257 }; 258 230 259 #endif -
trunk/BNC/src/bnchelp.html
r11119 r11123 6399 6399 </p> 6400 6400 <p> 6401 <b>Updated ANTEX file:</b> In real-time PPP, BNC checks once a minute whether the ANTEX file has changed (modification time or size) 6402 and reads it again while running, once it has not changed for 30 seconds (copy finished). The new file is used from 6403 the GPS week given in it on, i.e. the week of the SINEX code of its entries (e.g. 'IGS20_2437' for the file 6404 igs20_2437.atx): if this week has already been reached by the processed epochs, the new file is used from the next 6405 epoch on, otherwise it is kept and used from the first epoch of that week. The running attitude model states (e.g. 6406 a noon turn) are taken over. A file that cannot be read is reported and the previous one kept. To provide a new 6407 ANTEX file, overwrite the file given here (e.g. with a copy of the latest igs20_WWWW.atx), e.g. 6408 </p> 6409 <pre> 6410 ANTEX file /home/user/igs20.atx changed (GPS week 2440) - used from GPS week 2440 on 6411 ANTEX file re-read, used from now on (GPS week 2440): ANTEX file /home/user/igs20.atx: ... 6412 </pre> 6413 <p> 6401 6414 Whether the orbit corrections refer to the satellite's Antenna Phase Center (APC) or to its Center of Mass (CoM) is 6402 6415 derived from the name of the correction stream or file: names beginning with 'SSRA' refer to the APC, the combined … … 9655 9668 logfile, at most once per hour and satellite. 9656 9669 </p> 9670 <p> 9671 <b>Updated ANTEX file:</b> In the combination, BNC checks once a minute whether the ANTEX file has changed (modification time or size) 9672 and reads it again while running, once it has not changed for 30 seconds (copy finished). The new file is used from 9673 the GPS week given in it on, i.e. the week of the SINEX code of its entries (e.g. 'IGS20_2437' for the file 9674 igs20_2437.atx): if this week has already been reached by the processed epochs, the new file is used from the next 9675 epoch on, otherwise it is kept and used from the first epoch of that week. The running attitude model states (e.g. 9676 a noon turn) are taken over. A file that cannot be read is reported and the previous one kept. To provide a new 9677 ANTEX file, overwrite the file given here (e.g. with a copy of the latest igs20_WWWW.atx), e.g. 9678 </p> 9679 <pre> 9680 bncComb: ANTEX file /home/user/igs20.atx changed (GPS week 2440) - used from GPS week 2440 on 9681 bncComb: ANTEX file re-read, used from now on (GPS week 2440): ANTEX file /home/user/igs20.atx: ... 9682 </pre> 9657 9683 <p> 9658 9684 The following screenshot shows the encoding and uploading of several Broadcast Ephemeris correction streams combined -
trunk/BNC/src/combination/bnccomb.cpp
r11113 r11123 792 792 QDateTime now = currentDateAndTimeGPS(); 793 793 bncTime currentTime(now.toString(Qt::ISODate).toStdString()); 794 795 // a changed ANTEX file is read and used from its GPS week on 796 if (_antex) { 797 QString msg = _antexReloader.update(_antex, epoTime); 798 if (!msg.isEmpty()) { 799 emit newMessage(("bncComb: " + msg).toLatin1(), true); 800 } 801 } 794 802 for (unsigned ii = 0; ii < clkCorrVec.size(); ii++) { 795 803 const t_clkCorr& clkCorr = clkCorrVec[ii]; -
trunk/BNC/src/combination/bnccomb.h
r11113 r11123 21 21 22 22 class bncRtnetDecoder; 23 class bncAntex; 23 #include "bncantex.h" 24 24 class bncBiasSnx; 25 25 … … 283 283 QByteArray _log; 284 284 bncAntex* _antex; 285 bncAntexReloader _antexReloader; // re-reads a changed ANTEX file 285 286 bncBiasSnx* _bsx; 286 287 bncoutf* _logFile;
Note:
See TracChangeset
for help on using the changeset viewer.
