Changeset 9272 in ntrip for trunk/BNC/src
- Timestamp:
- Nov 24, 2020, 10:51:09 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncephuser.cpp
r9265 r9272 153 153 if (ephOld && 154 154 (ephOld->checkState() == t_eph::bad || 155 ephOld->checkState() == t_eph::outdated)) { 155 ephOld->checkState() == t_eph::outdated || 156 ephOld->checkState() == t_eph::unhealthy)) { 156 157 ephOld = 0; 157 158 } 158 159 159 160 if (ephOld == 0 || newEph->isNewerThan(ephOld)) { 160 checkEphemeris(eph, realTime); 161 checkEphemeris(newEph, realTime); 162 eph->setCheckState(newEph->checkState()); 161 163 } 162 164 else { … … 165 167 } 166 168 167 if ( eph->checkState() != t_eph::bad &&168 eph->checkState() != t_eph::outdated) {169 if (newEph->checkState() != t_eph::bad && 170 newEph->checkState() != t_eph::outdated) { 169 171 deque<t_eph*>& qq = _eph[prn]; 170 qq.push_back(newEph); 172 if (qq.empty() || newEph->isNewerThan(qq.back())){ 173 qq.push_back(newEph); 174 } 171 175 if (qq.size() > _maxQueueSize) { 172 176 delete qq.front(); … … 261 265 // Check consistency with older ephemeris 262 266 // -------------------------------------- 263 const double MAXDIFF = 10 00.0;264 const double MINDIFF = 1.0;267 const double MAXDIFF = 10.0; 268 const double MINDIFF = 0.005; 265 269 QString prn = QString(eph->prn().toInternalString().c_str()); 266 270 t_eph* ephL = ephLast(prn); … … 277 281 double diffC = fabs(xc(4) - xcL(4)) * t_CST::c; 278 282 279 // some lines to allow update of ephemeris data sets after an outage 280 // update interval: 2h, 281 if (eph->type() == t_eph::GPS && dt > 2*3600.0) { 282 ephL->setCheckState(t_eph::outdated); 283 return; 284 } 285 // update interval: 3h, 286 else if (eph->type() == t_eph::Galileo && dt > 3*3600.0) { 287 ephL->setCheckState(t_eph::outdated); 288 return; 289 } 290 // updated every 30 minutes 291 else if (eph->type() == t_eph::GLONASS && dt > 1800.0) { 292 ephL->setCheckState(t_eph::outdated); 293 return; 294 } 295 // updated every ? 296 else if (eph->type() == t_eph::QZSS && dt > 2*3600.0) { 297 ephL->setCheckState(t_eph::outdated); 298 return; 299 } 300 // maximum update interval: 300 sec 301 else if (eph->type() == t_eph::SBAS && dt > 300.0) { 302 ephL->setCheckState(t_eph::outdated); 303 return; 304 } 305 // updates 1h (GEO) up to 6 hours non-GEO 306 else if (eph->type() == t_eph::BDS && dt > 6*3600.0) { 307 ephL->setCheckState(t_eph::outdated); 308 return; 309 } 310 // update interval: up to 24 hours 311 else if (eph->type() == t_eph::IRNSS && dt > 24*3600.0) { 312 ephL->setCheckState(t_eph::outdated); 313 return; 314 } 315 316 if (diff < MAXDIFF) { 317 if (dt != 0.0) { 318 if (diff < MINDIFF && diffC < MINDIFF && ephL->checkState() == t_eph::ok) { 319 // to prevent the same data sets with different TOC values 320 eph->setCheckState(t_eph::bad); 321 } 322 else { 323 eph->setCheckState(t_eph::ok); 324 ephL->setCheckState(t_eph::ok); 325 } 283 if (diff < MAXDIFF && diffC < MAXDIFF) { 284 if (diff < MINDIFF && diffC < MINDIFF && ephL->checkState() == t_eph::ok) { 285 // to prevent the same data sets with different TOC values 286 eph->setCheckState(t_eph::bad); 287 } 288 else { 289 eph->setCheckState(t_eph::ok); 290 ephL->setCheckState(t_eph::ok); 326 291 } 327 292 } … … 331 296 } 332 297 } 333 } 334 } 298 // some lines to allow update of ephemeris data sets after an outage 299 // update interval: 2h, 300 if (eph->type() == t_eph::GPS && dt > (2*3600.0 + 60.0)) { 301 ephL->setCheckState(t_eph::outdated); 302 return; 303 } 304 // update interval: 3h, 305 else if (eph->type() == t_eph::Galileo && dt > (3*3600.0 + 60.0)) { 306 ephL->setCheckState(t_eph::outdated); 307 return; 308 } 309 // updated every 30 minutes 310 else if (eph->type() == t_eph::GLONASS && dt > (1800.0 + 60.0)) { 311 ephL->setCheckState(t_eph::outdated); 312 return; 313 } 314 // updated every ? 315 else if (eph->type() == t_eph::QZSS && dt > (2*3600.0 + 60.0)) { 316 ephL->setCheckState(t_eph::outdated); 317 return; 318 } 319 // maximum update interval: 300 sec 320 else if (eph->type() == t_eph::SBAS && dt > ( 300.0)) { 321 ephL->setCheckState(t_eph::outdated); 322 return; 323 } 324 // updates 1h (GEO) up to 6 hours non-GEO 325 else if (eph->type() == t_eph::BDS && dt > 6*3600.0) { 326 ephL->setCheckState(t_eph::outdated); 327 return; 328 } 329 // update interval: up to 24 hours 330 else if (eph->type() == t_eph::IRNSS && dt > 24*3600.0) { 331 ephL->setCheckState(t_eph::outdated); 332 return; 333 } 334 } 335 }
Note:
See TracChangeset
for help on using the changeset viewer.