Changeset 8851 in ntrip for trunk/BNC/src
- Timestamp:
- Nov 19, 2019, 2:36:12 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncephuser.cpp
r8847 r8851 221 221 QDateTime now = currentDateAndTimeGPS(); 222 222 bncTime currentTime(now.toString(Qt::ISODate).toStdString()); 223 double timeDiff= currentTime - toc;223 double dt = currentTime - toc; 224 224 225 225 // update interval: 2h, data sets are valid for 4 hours 226 226 if ((eph->type() == t_eph::GPS) && 227 ( timeDiff < -2*3600 || timeDiff> 4*3600)) {227 (dt < -2*3600 || dt > 4*3600)) { 228 228 eph->setCheckState(t_eph::outdated); 229 229 return; … … 231 231 // update interval: 3h, data sets are valid for 4 hours 232 232 else if ((eph->type() == t_eph::Galileo) && 233 ( timeDiff < -3*3600 || timeDiff> 4*3600)) {233 (dt < -3*3600 || dt > 4*3600)) { 234 234 eph->setCheckState(t_eph::outdated); 235 235 return; … … 237 237 // updated every 30 minutes 238 238 else if ((eph->type() == t_eph::GLONASS) && 239 ( timeDiff < -1800 || timeDiff> 2*3600)) {239 (dt < -1800 || dt > 2*3600)) { 240 240 eph->setCheckState(t_eph::outdated); 241 241 return; … … 243 243 // orbit parameters are valid for 7200 seconds (minimum) 244 244 else if ((eph->type() == t_eph::QZSS) && 245 ( timeDiff < -1*3600 || timeDiff> 3*3600)) {245 (dt < -1*3600 || dt > 3*3600)) { 246 246 eph->setCheckState(t_eph::outdated); 247 247 return; … … 249 249 // maximum update interval: 300 sec 250 250 else if ((eph->type() == t_eph::SBAS) && 251 ( timeDiff < -300 || timeDiff> 1*3600)) {251 (dt < -300 || dt > 1*3600)) { 252 252 eph->setCheckState(t_eph::outdated); 253 253 return; … … 255 255 // updates 1h (GEO) up to 6 hours non-GEO 256 256 else if ((eph->type() == t_eph::BDS) && 257 ( timeDiff < -1*3600 || timeDiff> 6*3600)) {257 (dt < -1*3600 || dt > 6*3600)) { 258 258 eph->setCheckState(t_eph::outdated); 259 259 return; … … 261 261 // update interval: up to 24 hours 262 262 else if ((eph->type() == t_eph::IRNSS) && 263 ( timeDiff < -1*3600 || timeDiff> 24*3600)) {263 (dt < -1*3600 || dt > 24*3600)) { 264 264 eph->setCheckState(t_eph::outdated); 265 265 return; … … 277 277 ColumnVector vvL(3); 278 278 ephL->getCrd(eph->TOC(), xcL, vvL, false); 279 280 double dt = fabs(eph->TOC() - ephL->TOC()); 279 double dt = eph->TOC() - ephL->TOC(); 280 if (dt < 0.0) { 281 dt += 604800.0; 282 } 281 283 double diff = (xc.Rows(1,3) - xcL.Rows(1,3)).norm_Frobenius(); 282 284 double diffC = fabs(xc(4) - xcL(4)) * t_CST::c;
Note:
See TracChangeset
for help on using the changeset viewer.