Changeset 9407 in ntrip
 Timestamp:
 Apr 19, 2021, 11:08:19 AM (3 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/BNC_2.12/src/upload/bncephuploadcaster.cpp
r7717 r9407 59 59 //////////////////////////////////////////////////////////////////////////// 60 60 void bncEphUploadCaster::ephBufferChanged() { 61 62 61 if (_ephUploadCaster) { 62 QByteArray outBuffer; 63 63 64 65 64 QDateTime now = currentDateAndTimeGPS(); 65 bncTime currentTime(now.toString(Qt::ISODate).toStdString()); 66 66 67 QListIterator<QString> it(prnList());68 69 const t_eph*eph = ephLast(it.next());67 QListIterator < QString > it(prnList()); 68 while (it.hasNext()) { 69 const t_eph *eph = ephLast(it.next()); 70 70 71 72 double timeDiff = fabs(toc  currentTime);71 bncTime toc = eph>TOC(); 72 double dt = currentTime  toc; 73 73 74 const t_ephGPS* ephGPS= dynamic_cast<const t_ephGPS*>(eph);75 const t_ephGlo* ephGlo= dynamic_cast<const t_ephGlo*>(eph);76 const t_ephGal* ephGal= dynamic_cast<const t_ephGal*>(eph);77 const t_ephSBAS*ephSBAS = dynamic_cast<const t_ephSBAS*>(eph);78 const t_ephBDS* ephBDS= dynamic_cast<const t_ephBDS*>(eph);74 const t_ephGPS *ephGPS = dynamic_cast<const t_ephGPS*>(eph); 75 const t_ephGlo *ephGlo = dynamic_cast<const t_ephGlo*>(eph); 76 const t_ephGal *ephGal = dynamic_cast<const t_ephGal*>(eph); 77 const t_ephSBAS *ephSBAS = dynamic_cast<const t_ephSBAS*>(eph); 78 const t_ephBDS *ephBDS = dynamic_cast<const t_ephBDS*>(eph); 79 79 80 81 80 unsigned char Array[80]; 81 int size = 0; 82 82 83 if (ephGPS) { 84 if (timeDiff <= 4*3600) { 85 size = t_ephEncoder::RTCM3(*ephGPS, Array); 86 } 87 } 88 else if (ephGlo) { 89 if (timeDiff <= 1*3600) { 90 size = t_ephEncoder::RTCM3(*ephGlo, Array); 91 } 92 } 93 else if (ephGal) { 94 if (timeDiff <= 4*3600) { 95 size = t_ephEncoder::RTCM3(*ephGal, Array); 96 } 97 } 98 else if (ephSBAS) { 99 if (timeDiff <= 600) { 100 size = t_ephEncoder::RTCM3(*ephSBAS, Array); 101 } 102 } 103 else if (ephBDS) { 104 if (timeDiff <= 6*3600) { 105 size = t_ephEncoder::RTCM3(*ephBDS, Array); 106 } 107 } 108 if (size > 0) { 109 outBuffer += QByteArray((char*) Array, size); 110 } 111 } 112 if (outBuffer.size() > 0) { 113 _ephUploadCaster>setOutBuffer(outBuffer); 114 } 115 } 83 if (ephGPS && ephGPS>type() == t_eph::GPS && (system == "ALL"  system == "GPS")) { 84 if (dt > 14400.0  dt < 7200.0) { 85 size = t_ephEncoder::RTCM3(*ephGPS, Array); 86 } 87 } else if (ephGPS && ephGPS>type() == t_eph::QZSS && (system == "ALL"  system == "QZSS")) { 88 if (dt > 7200.0  dt < 3600.0) { 89 size = t_ephEncoder::RTCM3(*ephGPS, Array); 90 } 91 } else if (ephGlo && (system == "ALL"  system == "GLONASS")) { 92 if (dt > 3900.0  dt < 2100.0) { 93 size = t_ephEncoder::RTCM3(*ephGlo, Array); 94 } 95 } else if (ephGal && (system == "ALL"  system == "Galileo")) { 96 if (dt > 14400.0  dt < 0.0) { 97 size = t_ephEncoder::RTCM3(*ephGal, Array); 98 } 99 } else if (ephSBAS && (system == "ALL"  system == "SBAS")) { 100 if (dt > 600.0  dt < 600.0) { 101 size = t_ephEncoder::RTCM3(*ephSBAS, Array); 102 } 103 } else if (ephBDS && (system == "ALL"  system == "BDS")) { 104 if (dt > 3900.0  dt < 0.0) { 105 size = t_ephEncoder::RTCM3(*ephBDS, Array); 106 } 107 } else if (ephGPS && ephGPS>type() == t_eph::IRNSS && (system == "ALL"  system == "IRNSS")) { 108 if (fabs(dt > 86400.0)) { 109 size = t_ephEncoder::RTCM3(*ephGPS, Array); 110 } 111 } 112 if (size > 0) { 113 outBuffer += QByteArray((char*) Array, size); 114 } 115 } 116 if (outBuffer.size() > 0) { 117 _ephUploadCaster>setOutBuffer(outBuffer); 118 } 119 } 116 120 }
Note:
See TracChangeset
for help on using the changeset viewer.