Changeset 8847 in ntrip
- Timestamp:
- Nov 15, 2019, 3:10:23 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncephuser.cpp
r8709 r8847 218 218 // -------------------------------------------------------- 219 219 if (realTime) { 220 bncTime toc = eph->TOC();220 bncTime toc = eph->TOC(); 221 221 QDateTime now = currentDateAndTimeGPS(); 222 222 bncTime currentTime(now.toString(Qt::ISODate).toStdString()); 223 double timeDiff = fabs(toc - currentTime); 224 225 if (eph->type() == t_eph::GPS && timeDiff > 4 * 3600) { // update interval: 2h, data sets are valid for 4 hours 226 eph->setCheckState(t_eph::outdated); 227 return; 228 } 229 else if (eph->type() == t_eph::Galileo && timeDiff > 4 * 3600) { // update interval: 2h, data sets are valid for 4 hours 230 eph->setCheckState(t_eph::outdated); 231 return; 232 } 233 else if (eph->type() == t_eph::GLONASS && timeDiff > 2 * 3600) { // updated every 30 minutes 234 eph->setCheckState(t_eph::outdated); 235 return; 236 } 237 else if (eph->type() == t_eph::QZSS && timeDiff > 4 * 3600) { // orbit parameters are valid for 7200 seconds (at minimum) 238 eph->setCheckState(t_eph::outdated); 239 return; 240 } 241 else if (eph->type() == t_eph::SBAS && timeDiff > 600) { // maximum update interval: 300 sec 242 eph->setCheckState(t_eph::outdated); 243 return; 244 } 245 else if (eph->type() == t_eph::BDS && timeDiff > 6 * 3600) { // updates (GEO) up to 6 hours 246 eph->setCheckState(t_eph::outdated); 247 return; 248 } 249 else if (eph->type() == t_eph::IRNSS && timeDiff > 24 * 3600) { // update interval: up to 24 hours 223 double timeDiff = currentTime - toc; 224 225 // update interval: 2h, data sets are valid for 4 hours 226 if ((eph->type() == t_eph::GPS) && 227 (timeDiff < -2*3600 || timeDiff > 4*3600)) { 228 eph->setCheckState(t_eph::outdated); 229 return; 230 } 231 // update interval: 3h, data sets are valid for 4 hours 232 else if ((eph->type() == t_eph::Galileo) && 233 (timeDiff < -3*3600 || timeDiff > 4*3600)) { 234 eph->setCheckState(t_eph::outdated); 235 return; 236 } 237 // updated every 30 minutes 238 else if ((eph->type() == t_eph::GLONASS) && 239 (timeDiff < -1800 || timeDiff > 2*3600)) { 240 eph->setCheckState(t_eph::outdated); 241 return; 242 } 243 // orbit parameters are valid for 7200 seconds (minimum) 244 else if ((eph->type() == t_eph::QZSS) && 245 (timeDiff < -1*3600 || timeDiff > 3*3600)) { 246 eph->setCheckState(t_eph::outdated); 247 return; 248 } 249 // maximum update interval: 300 sec 250 else if ((eph->type() == t_eph::SBAS) && 251 (timeDiff < -300 || timeDiff > 1*3600)) { 252 eph->setCheckState(t_eph::outdated); 253 return; 254 } 255 // updates 1h (GEO) up to 6 hours non-GEO 256 else if ((eph->type() == t_eph::BDS) && 257 (timeDiff < -1*3600 || timeDiff > 6*3600)) { 258 eph->setCheckState(t_eph::outdated); 259 return; 260 } 261 // update interval: up to 24 hours 262 else if ((eph->type() == t_eph::IRNSS) && 263 (timeDiff < -1*3600 || timeDiff > 24*3600)) { 250 264 eph->setCheckState(t_eph::outdated); 251 265 return; … … 269 283 270 284 // some lines to allow update of ephemeris data sets after outage 271 if (eph->type() == t_eph::GPS && dt > 4*3600) {272 ephL->setCheckState(t_eph::outdated); 273 return; 274 } 275 else if (eph->type() == t_eph::Galileo && dt > 4*3600) {276 ephL->setCheckState(t_eph::outdated); 277 return; 278 } 279 else if (eph->type() == t_eph::GLONASS && dt > 2*3600) {280 ephL->setCheckState(t_eph::outdated); 281 return; 282 } 283 else if (eph->type() == t_eph::QZSS && dt > 4*3600) {284 ephL->setCheckState(t_eph::outdated); 285 return; 286 } 287 else if (eph->type() == t_eph::SBAS && dt > 600){288 ephL->setCheckState(t_eph::outdated); 289 return; 290 } 291 else if (eph->type() == t_eph::BDS && dt > 6*3600) {285 if (eph->type() == t_eph::GPS && dt > 4*3600) { 286 ephL->setCheckState(t_eph::outdated); 287 return; 288 } 289 else if (eph->type() == t_eph::Galileo && dt > 4*3600) { 290 ephL->setCheckState(t_eph::outdated); 291 return; 292 } 293 else if (eph->type() == t_eph::GLONASS && dt > 2*3600) { 294 ephL->setCheckState(t_eph::outdated); 295 return; 296 } 297 else if (eph->type() == t_eph::QZSS && dt > 3*3600) { 298 ephL->setCheckState(t_eph::outdated); 299 return; 300 } 301 else if (eph->type() == t_eph::SBAS && dt > 3600) { 302 ephL->setCheckState(t_eph::outdated); 303 return; 304 } 305 else if (eph->type() == t_eph::BDS && dt > 6*3600) { 292 306 ephL->setCheckState(t_eph::outdated); 293 307 return; … … 297 311 return; 298 312 } 313 299 314 300 315 if (diff < MAXDIFF && diffC < MAXDIFF) {
Note:
See TracChangeset
for help on using the changeset viewer.