Changeset 7716 in ntrip for trunk/BNC/src/upload
- Timestamp:
- Feb 2, 2016, 4:40:56 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.