Changeset 9202 in ntrip
- Timestamp:
- Nov 3, 2020, 12:49:16 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncephuser.cpp
r9199 r9202 206 206 } 207 207 double rr = xc.Rows(1,3).NormFrobenius(); 208 double rv = vv.NormFrobenius(); 208 209 209 const double MINDIST = 2.e7; 210 210 const double MAXDIST = 6.e7; 211 211 if (rr < MINDIST || rr > MAXDIST || std::isnan(rr)) { 212 eph->setCheckState(t_eph::bad);213 return;214 }215 if (eph->type() == t_eph::GLONASS && rv < 1.0) {216 212 eph->setCheckState(t_eph::bad); 217 213 return; … … 224 220 QDateTime now = currentDateAndTimeGPS(); 225 221 bncTime currentTime(now.toString(Qt::ISODate).toStdString()); 226 double dt = fabs(currentTime - toc);222 double dt = currentTime - toc; 227 223 228 224 // update interval: 2h, data sets are valid for 4 hours 229 if (eph->type() == t_eph::GPS && dt > 4*3600) {225 if (eph->type() == t_eph::GPS && (dt > 4*3600.0 || dt < -2*3600.0)) { 230 226 eph->setCheckState(t_eph::outdated); 231 227 return; 232 228 } 233 229 // update interval: 3h, data sets are valid for 4 hours 234 else if (eph->type() == t_eph::Galileo && dt > 4*3600) {230 else if (eph->type() == t_eph::Galileo && (dt > 4*3600.0 || dt < 0.0)) { 235 231 eph->setCheckState(t_eph::outdated); 236 232 return; 237 233 } 238 234 // updated every 30 minutes 239 else if (eph->type() == t_eph::GLONASS && dt > 2*3600) {235 else if (eph->type() == t_eph::GLONASS && (dt > 1*3600.0 || dt < -1800.0)) { 240 236 eph->setCheckState(t_eph::outdated); 241 237 return; 242 238 } 243 239 // orbit parameters are valid for 7200 seconds (minimum) 244 else if (eph->type() == t_eph::QZSS && dt > 3*3600) {240 else if (eph->type() == t_eph::QZSS && (dt > 2*3600.0 || dt < -1*3600.0)) { 245 241 eph->setCheckState(t_eph::outdated); 246 242 return; 247 243 } 248 244 // maximum update interval: 300 sec 249 else if (eph->type() == t_eph::SBAS && dt > 1*3600) {245 else if (eph->type() == t_eph::SBAS && (dt > 600 || dt < -300)) { 250 246 eph->setCheckState(t_eph::outdated); 251 247 return; 252 248 } 253 249 // updates 1h (GEO) up to 6 hours non-GEO 254 else if (eph->type() == t_eph::BDS && dt > 6*3600) {250 else if (eph->type() == t_eph::BDS && (dt > 6*3600 || dt < 0.0)) { 255 251 eph->setCheckState(t_eph::outdated); 256 252 return; 257 253 } 258 254 // update interval: up to 24 hours 259 else if (eph->type() == t_eph::IRNSS && dt > 24*3600) {255 else if (eph->type() == t_eph::IRNSS && fabs(dt > 24*3600)) { 260 256 eph->setCheckState(t_eph::outdated); 261 257 return; … … 281 277 282 278 // some lines to allow update of ephemeris data sets after outage 283 if (eph->type() == t_eph::GPS && dt > 4*3600) { 284 ephL->setCheckState(t_eph::outdated); 285 return; 286 } 287 else if (eph->type() == t_eph::Galileo && dt > 4*3600) { 288 ephL->setCheckState(t_eph::outdated); 289 return; 290 } 291 else if (eph->type() == t_eph::GLONASS && dt > 2*3600) { 292 ephL->setCheckState(t_eph::outdated); 293 return; 294 } 295 else if (eph->type() == t_eph::QZSS && dt > 3*3600) { 296 ephL->setCheckState(t_eph::outdated); 297 return; 298 } 299 else if (eph->type() == t_eph::SBAS && dt > 3600) { 300 ephL->setCheckState(t_eph::outdated); 301 return; 302 } 279 // update interval: 2h, 280 if (eph->type() == t_eph::GPS && dt > 2*3600) { 281 ephL->setCheckState(t_eph::outdated); 282 return; 283 } 284 // update interval: 3h, 285 else if (eph->type() == t_eph::Galileo && dt > 3*3600) { 286 ephL->setCheckState(t_eph::outdated); 287 return; 288 } 289 // updated every 30 minutes 290 else if (eph->type() == t_eph::GLONASS && dt > 1800) { 291 ephL->setCheckState(t_eph::outdated); 292 return; 293 } 294 // updated every ? 295 else if (eph->type() == t_eph::QZSS && dt > 2*3600) { 296 ephL->setCheckState(t_eph::outdated); 297 return; 298 } 299 // maximum update interval: 300 sec 300 else if (eph->type() == t_eph::SBAS && dt > 300) { 301 ephL->setCheckState(t_eph::outdated); 302 return; 303 } 304 // updates 1h (GEO) up to 6 hours non-GEO 303 305 else if (eph->type() == t_eph::BDS && dt > 6*3600) { 304 306 ephL->setCheckState(t_eph::outdated); 305 307 return; 306 308 } 309 // update interval: up to 24 hours 307 310 else if (eph->type() == t_eph::IRNSS && dt > 24*3600) { 308 311 ephL->setCheckState(t_eph::outdated);
Note:
See TracChangeset
for help on using the changeset viewer.