Changeset 7716 in ntrip for trunk/BNC/src
- Timestamp:
- Feb 2, 2016, 4:40:56 PM (9 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncephuser.cpp
r7208 r7716 34 34 * Created: 27-Jan-2011 35 35 * 36 * Changes: 36 * Changes: 37 37 * 38 38 * -----------------------------------------------------------------------*/ … … 51 51 connect(BNC_CORE, SIGNAL(newGPSEph(t_ephGPS)), 52 52 this, SLOT(slotNewGPSEph(t_ephGPS)), Qt::DirectConnection); 53 53 54 54 connect(BNC_CORE, SIGNAL(newGlonassEph(t_ephGlo)), 55 55 this, SLOT(slotNewGlonassEph(t_ephGlo)), Qt::DirectConnection); 56 56 57 57 connect(BNC_CORE, SIGNAL(newGalileoEph(t_ephGal)), 58 58 this, SLOT(slotNewGalileoEph(t_ephGal)), Qt::DirectConnection); … … 79 79 } 80 80 81 // New GPS Ephemeris 81 // New GPS Ephemeris 82 82 //////////////////////////////////////////////////////////////////////////// 83 83 void bncEphUser::slotNewGPSEph(t_ephGPS eph) { 84 84 putNewEph(&eph, false); 85 85 } 86 86 87 87 // New Glonass Ephemeris 88 88 //////////////////////////////////////////////////////////////////////////// … … 109 109 } 110 110 111 // 111 // 112 112 //////////////////////////////////////////////////////////////////////////// 113 113 t_irc bncEphUser::putNewEph(t_eph* eph, bool check) { … … 159 159 ephOld = 0; 160 160 } 161 161 162 162 if ((ephOld == 0 || newEph->isNewerThan(ephOld)) && 163 163 (eph->checkState() != t_eph::bad || … … 178 178 } 179 179 180 // 180 // 181 181 //////////////////////////////////////////////////////////////////////////// 182 182 void bncEphUser::checkEphemeris(t_eph* eph) { … … 257 257 258 258 // some lines to allow update of ephemeris data sets after outage 259 if ((eph->type() == t_eph::GPS || 260 eph->type() == t_eph::Galileo) && dt > 4*3600) { 261 ephL->setCheckState(t_eph::outdated); 262 return; 263 } 264 else if ((eph->type() == t_eph::GLONASS || 265 eph->type() == t_eph::QZSS) && dt > 2*3600) { 266 ephL->setCheckState(t_eph::outdated); 267 return; 268 } 269 else if (eph->type() == t_eph::SBAS && dt > 1*3600) { 270 ephL->setCheckState(t_eph::outdated); 271 return; 272 } 273 else if (eph->type() == t_eph::BDS && dt > 6*3600) { 259 if (eph->type() == t_eph::GPS && dt > 4*3600) { 260 ephL->setCheckState(t_eph::outdated); 261 return; 262 } 263 else if (eph->type() == t_eph::Galileo && dt > 4*3600) { 264 ephL->setCheckState(t_eph::outdated); 265 return; 266 } 267 else if (eph->type() == t_eph::GLONASS && dt > 1*3600) { 268 ephL->setCheckState(t_eph::outdated); 269 return; 270 } 271 else if (eph->type() == t_eph::QZSS && dt > 1*1800) { 272 ephL->setCheckState(t_eph::outdated); 273 return; 274 } 275 else if (eph->type() == t_eph::SBAS && dt > 600) { 276 ephL->setCheckState(t_eph::outdated); 277 return; 278 } 279 else if (eph->type() == t_eph::BDS && dt > 6*3600) { 274 280 ephL->setCheckState(t_eph::outdated); 275 281 return; -
trunk/BNC/src/upload/bncephuploadcaster.cpp
r6600 r7716 11 11 * Created: 03-Apr-2011 12 12 * 13 * Changes: 13 * Changes: 14 14 * 15 15 * -----------------------------------------------------------------------*/ … … 17 17 #include <iostream> 18 18 #include <math.h> 19 #include "bncephuploadcaster.h" 19 #include "bncephuploadcaster.h" 20 20 #include "bncsettings.h" 21 21 #include "RTCM3/ephEncoder.h" … … 38 38 int sampl = settings.value("uploadEphSample").toInt(); 39 39 40 _ephUploadCaster = new bncUploadCaster(mountpoint, outHost, outPort, 40 _ephUploadCaster = new bncUploadCaster(mountpoint, outHost, outPort, 41 41 password, -1, sampl); 42 42 43 connect(_ephUploadCaster, SIGNAL(newBytes(QByteArray,double)), 43 connect(_ephUploadCaster, SIGNAL(newBytes(QByteArray,double)), 44 44 this, SIGNAL(newBytes(QByteArray,double))); 45 45 … … 62 62 QByteArray outBuffer; 63 63 64 QDateTime now = currentDateAndTimeGPS(); 65 bncTime currentTime(now.toString(Qt::ISODate).toStdString()); 66 64 67 QListIterator<QString> it(prnList()); 65 68 while (it.hasNext()) { 66 69 const t_eph* eph = ephLast(it.next()); 70 71 bncTime toc = eph->TOC(); 72 double timeDiff = fabs(toc - currentTime); 67 73 68 74 const t_ephGPS* ephGPS = dynamic_cast<const t_ephGPS*>(eph); … … 76 82 77 83 if (ephGPS) { 78 size = t_ephEncoder::RTCM3(*ephGPS, Array); 84 if (eph->checkState() == t_eph::ok && timeDiff <= 4*3600) { 85 size = t_ephEncoder::RTCM3(*ephGPS, Array); 86 } 79 87 } 80 88 else if (ephGlo) { 81 size = t_ephEncoder::RTCM3(*ephGlo, Array); 89 if (eph->checkState() == t_eph::ok && timeDiff <= 1*3600) { 90 size = t_ephEncoder::RTCM3(*ephGlo, Array); 91 } 82 92 } 83 93 else if (ephGal) { 84 size = t_ephEncoder::RTCM3(*ephGal, Array); 94 if (eph->checkState() == t_eph::ok && timeDiff <= 4*3600) { 95 size = t_ephEncoder::RTCM3(*ephGal, Array); 96 } 85 97 } 86 98 else if (ephSBAS) { 87 size = t_ephEncoder::RTCM3(*ephSBAS, Array); 99 if (eph->checkState() == t_eph::ok && timeDiff <= 600) { 100 size = t_ephEncoder::RTCM3(*ephSBAS, Array); 101 } 88 102 } 89 103 else if (ephBDS) { 90 size = t_ephEncoder::RTCM3(*ephBDS, Array); 104 if (eph->checkState() == t_eph::ok && timeDiff <= 6*3600) { 105 size = t_ephEncoder::RTCM3(*ephBDS, Array); 106 } 91 107 } 92 108 if (size > 0) {
Note:
See TracChangeset
for help on using the changeset viewer.