Changeset 10688 in ntrip
- Timestamp:
- Jul 4, 2025, 12:13:03 PM (4 weeks ago)
- Location:
- trunk/BNC/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/GPSDecoder.h
r10619 r10688 60 60 void setRinexReconnectFlag(bool flag); 61 61 62 struct t_typeInfo { 63 t_typeInfo() { 64 type = 0; 65 size = 0; 66 }; 67 int type; 68 size_t size; 69 }; 70 71 62 72 struct t_antRefPoint { 63 73 enum t_type { ARP, APC }; … … 94 104 }; 95 105 106 class t_GloBiasInfo { 107 public: 108 t_GloBiasInfo() { 109 clear(); 110 }; 111 bool operator==(const t_GloBiasInfo& biasInfo2) const { 112 if (staID == biasInfo2.staID && 113 indicator == biasInfo2.indicator && 114 L1C_value == biasInfo2.L1C_value && 115 L1P_value == biasInfo2.L1P_value && 116 L2C_value == biasInfo2.L2C_value && 117 L2P_value == biasInfo2.L2P_value ) { 118 return true; 119 } 120 else { 121 return false; 122 } 123 } 124 125 void set(const t_GloBiasInfo& biasInfo) { 126 staID = biasInfo.staID; 127 indicator = biasInfo.indicator; 128 L1C_value = biasInfo.L1C_value; 129 L1P_value = biasInfo.L1P_value; 130 L2C_value = biasInfo.L2C_value; 131 L2P_value = biasInfo.L2P_value; 132 changed = true; 133 } 134 135 void clear() {cout << "init" << endl; 136 staID = 0; 137 indicator = 0; 138 L1C_value = 0.0; 139 L1P_value = 0.0; 140 L2C_value = 0.0; 141 L2P_value = 0.0; 142 changed = false; 143 } 144 QString toString() { 145 QString biasIndicator = (indicator == 1) ? QString("aligned") : QString("unaligned"); 146 QString biasesStr = 147 QString(": GLONASS L1/L2 Code-Phase Biases: staID=%1 indicator=%2 L1C=%3 L1P=%4 L2C=%5 L2P=%6") 148 .arg(staID).arg(biasIndicator) 149 .arg(L1C_value, 0, 'f', 2) 150 .arg(L1P_value, 0, 'f', 2) 151 .arg(L2C_value, 0, 'f', 2) 152 .arg(L2P_value, 0, 'f', 2); 153 154 return biasesStr; 155 } 156 int staID; 157 int indicator; 158 double L1C_value; 159 double L1P_value; 160 double L2C_value; 161 double L2P_value; 162 bool changed; 163 164 165 }; 166 96 167 /** List of observations */ 97 168 QList<t_satObs> _obsList; 98 QList< int>_typeList; // RTCM message types169 QList<t_typeInfo> _typeList; // RTCM message type as message size 99 170 QList<t_antInfo> _antType; // RTCM antenna descriptor 100 171 QList<t_recInfo> _recType; // RTCM receiver descriptor … … 104 175 QList<t_rtcmCrs> _rtcmCrs; // RTCM CRS 105 176 QString _gloFrq; // GLONASS slot 177 t_GloBiasInfo _gloBiases; // RTCM GLO bias information message 106 178 bncRinex* _rnx; // RINEX writer 107 179 }; -
trunk/BNC/src/RTCM/RTCM2Decoder.cpp
r10599 r10688 119 119 120 120 // Store message number 121 _typeList.push_back(_PP.ID()); 121 _typeList.push_back(t_typeInfo()); 122 _typeList.back().type = _PP.ID(); 123 //_typeList.back().size = 0; 122 124 123 125 if (_PP.ID() == 18 || _PP.ID() == 19) { -
trunk/BNC/src/RTCM3/RTCM3Decoder.cpp
r10632 r10688 1690 1690 bool decoded = false; 1691 1691 uint64_t numbits = 0, bitfield = 0; 1692 int i, week , mnum;1692 int i, week; 1693 1693 1694 1694 data += 3; /* header */ … … 1704 1704 eph._inav = (i == 1046); 1705 1705 eph._fnav = (i == 1045); 1706 mnum = i; 1706 int mnum = i; 1707 1707 GETBITS(i, 6) 1708 1708 if (i < 1 || i > 36 ) { // max. constellation within I/NAV / F/NAV frames is 36 … … 2046 2046 // 2047 2047 //////////////////////////////////////////////////////////////////////////// 2048 bool RTCM3Decoder::DecodeGLONASSCodePhaseBiases(unsigned char* data, int size) { 2049 t_GloBiasInfo gloBiases; 2050 uint64_t numbits = 0, bitfield = 0; 2051 2052 data += 3; // header 2053 size -= 6; // header + crc 2054 2055 SKIPBITS(12) // Message Number 2056 GETBITS(gloBiases.staID, 12) 2057 GETBITS(gloBiases.indicator, 1) // 0.. not aligned, 1.. aligned 2058 SKIPBITS(3) // reserved bits 2059 unsigned bitmask; 2060 GETBITS(bitmask, 4) 2061 bool L1C_valid = bitExtracted(unsigned(bitmask), 1, 0); 2062 bool L1P_valid = bitExtracted(unsigned(bitmask), 1, 1); 2063 bool L2C_valid = bitExtracted(unsigned(bitmask), 1, 2); 2064 bool L2P_valid = bitExtracted(unsigned(bitmask), 1, 3); 2065 2066 if (L1C_valid) { 2067 GETBITS(gloBiases.L1C_value, 16) 2068 } 2069 if (L1P_valid) { 2070 GETBITS(gloBiases.L1P_value, 16) 2071 } 2072 if (L2C_valid) { 2073 GETBITS(gloBiases.L2C_value, 16) 2074 } 2075 if (L2P_valid) { 2076 GETBITS(gloBiases.L2P_value, 16) 2077 } 2078 2079 if (!(_gloBiases == gloBiases)) { 2080 _gloBiases.set(gloBiases); 2081 } 2082 2083 return true; 2084 } 2085 2086 // 2087 //////////////////////////////////////////////////////////////////////////// 2048 2088 bool RTCM3Decoder::DecodeServiceCRS(unsigned char* data, int size) { 2049 2089 t_serviceCrs serviceCrs; … … 2209 2249 if (_rawFile) 2210 2250 _staID = _rawFile->staID(); 2211 /* store the id into the list of loaded blocks */ 2212 _typeList.push_back(id); 2251 /* store the id and message size into the list of loaded blocks */ 2252 _typeList.push_back(t_typeInfo()); 2253 _typeList.back().type = id; 2254 _typeList.back().size = _BlockSize -6; /* header + crc */ 2213 2255 2214 2256 /* SSR I+II data handled in another function, already pass the … … 2300 2342 DecodeAntennaPosition(_Message, _BlockSize); 2301 2343 break; 2344 case 1230: 2345 DecodeGLONASSCodePhaseBiases(_Message, _BlockSize); 2346 break; 2302 2347 case 1300: 2303 2348 DecodeServiceCRS(_Message, _BlockSize); -
trunk/BNC/src/RTCM3/RTCM3Decoder.h
r10619 r10688 176 176 bool DecodeServiceCRS(unsigned char* buffer, int bufLen); 177 177 /** 178 * Extract GLONASS L1 and L2 Code-Phase bias messages from 1230 RTCM3 messages 179 * @param buffer the buffer containing CLONASS L1 and L2 Code-Phase biases per station 180 * @param bufLen the length of the buffer (the message length including header+crc) 181 * @return <code>true</code> when data block was decodable 182 */ 183 bool DecodeGLONASSCodePhaseBiases(unsigned char* buffer, int bufLen); 184 /** 178 185 * Extract Helmert transformation parameters from 1301 RTCM3 messages 179 186 * @param buffer the buffer containing Helmert transformation parameters RTCM block -
trunk/BNC/src/bncgetthread.cpp
r10664 r10688 531 531 if (_latencyChecker) { 532 532 _latencyChecker->checkOutage(irc); 533 QListIterator< int> it(decoder()->_typeList);533 QListIterator<GPSDecoder::t_typeInfo> it(decoder()->_typeList); 534 534 _ssrEpoch = static_cast<int>(decoder()->corrGPSEpochTime()); 535 535 if (_ssrEpoch != -1) { … … 572 572 } 573 573 while (it.hasNext()) { 574 int rtcmType = it.next(); 574 int rtcmType = it.next().type; 575 575 if ((rtcmType >= 1001 && rtcmType <= 1004) || // legacy RTCM OBS 576 576 (rtcmType >= 1009 && rtcmType <= 1012) || // legacy RTCM OBS … … 818 818 // ------------------ 819 819 for (int ii = 0; ii < decoder()->_typeList.size(); ii++) { 820 QString type = QString("%1 ").arg(decoder()->_typeList[ii]); 821 emit(newMessage(_staID + ": Received message type " + type.toLatin1(), true)); 820 QString type = QString("%1 ").arg(decoder()->_typeList[ii].type); 821 QString size = (decoder()->_typeList[ii].size) ? QString("(size %1)").arg(decoder()->_typeList[ii].size) : ""; 822 emit(newMessage(_staID + ": Received message type " + type.toLatin1() + size.toLatin1(), true)); 822 823 } 823 824 … … 959 960 } 960 961 } 962 963 // RTCM GLONASS Code-Phase biases (MT 1230) 964 // ---------------------------------------- 965 if (decoder()->_gloBiases.changed) { 966 QString gloCodePhaseBiases = decoder()->_gloBiases.toString(); 967 emit(newMessage(_staID + gloCodePhaseBiases.toLatin1(), true)); 968 } 969 970 // Service CRS / RTCM CRS 971 // ------------------------ 961 972 if (fmod(decoder()->corrGPSEpochTime(), 60.0) == 0.0) { 962 973 // Service CRS 963 // -----------964 974 for (int ii = 0; ii < decoder()->_serviceCrs.size(); ii++) { 965 975 QString servicecrsname = QString(": Service CRS Name: %1 ").arg(decoder()->_serviceCrs[ii]._name); … … 970 980 //emit(newMessage(_staID + ce.toLatin1(), true)); 971 981 } 972 973 982 // RTCM CRS 974 // -----------975 983 for (int ii = 0; ii < decoder()->_rtcmCrs.size(); ii++) { 976 984 QString rtcmcrsname = QString(": RTCM CRS Name: %1 ").arg(decoder()->_rtcmCrs[ii]._name); … … 1040 1048 1041 1049 decoder()->_gloFrq.clear(); 1050 // decoder()->_gloBiases.clear(); 1042 1051 decoder()->_typeList.clear(); 1043 1052 decoder()->_antType.clear(); -
trunk/BNC/src/ephemeris.cpp
r10628 r10688 620 620 _flags_unknown = false; 621 621 // Bit 0: 622 _intSF = double(bitExtracted( int(statusflags), 1, 0));622 _intSF = double(bitExtracted(unsigned(statusflags), 1, 0)); 623 623 if (system() == t_eph::QZSS) { 624 624 // Bit 1: 625 _ephSF = double(bitExtracted( int(statusflags), 1, 1));625 _ephSF = double(bitExtracted(unsigned(statusflags), 1, 1)); 626 626 } 627 627 } … … 1269 1269 // ============ 1270 1270 // bit 0-1 1271 _M_P = double(bitExtracted( int(statusflags), 2, 0));1271 _M_P = double(bitExtracted(unsigned(statusflags), 2, 0)); 1272 1272 // bit 2-3 1273 _P1 = double(bitExtracted( int(statusflags), 2, 2));1273 _P1 = double(bitExtracted(unsigned(statusflags), 2, 2)); 1274 1274 // bit 4 1275 _P2 = double(bitExtracted( int(statusflags), 1, 4));1275 _P2 = double(bitExtracted(unsigned(statusflags), 1, 4)); 1276 1276 // bit 5 1277 _P3 = double(bitExtracted( int(statusflags), 1, 5));1277 _P3 = double(bitExtracted(unsigned(statusflags), 1, 5)); 1278 1278 // bit 6 1279 _M_P4 = double(bitExtracted( int(statusflags), 1, 6));1279 _M_P4 = double(bitExtracted(unsigned(statusflags), 1, 6)); 1280 1280 // bit 7-8 1281 _M_M = double(bitExtracted( int(statusflags), 2, 7));1281 _M_M = double(bitExtracted(unsigned(statusflags), 2, 7)); 1282 1282 /// GLO M/K exclusive flags/values only valid if flag M is set to '01' 1283 1283 if (!_M_M) { … … 1312 1312 // ============ 1313 1313 // bit 0 (is to be ignored, if bit 1 is zero) 1314 _almanac_health = double(bitExtracted( int(healthflags), 1, 0));1314 _almanac_health = double(bitExtracted(unsigned(healthflags), 1, 0)); 1315 1315 // bit 1 1316 1316 _almanac_health_availablility_indicator = 1317 double(bitExtracted( int(healthflags), 1, 1));1317 double(bitExtracted(unsigned(healthflags), 1, 1)); 1318 1318 // bit 2; GLO-M/K only, health bit of string 3 1319 _M_l3 = double(bitExtracted( int(healthflags), 1, 2));1319 _M_l3 = double(bitExtracted(unsigned(healthflags), 1, 2)); 1320 1320 } 1321 1321 } … … 1332 1332 // ============ 1333 1333 // bit 0-1 1334 _RT = double(bitExtracted( int(sourceflags), 2, 0));1334 _RT = double(bitExtracted(unsigned(sourceflags), 2, 0)); 1335 1335 // bit 2-3: 1336 _RE = double(bitExtracted( int(sourceflags), 2, 2));1336 _RE = double(bitExtracted(unsigned(sourceflags), 2, 2)); 1337 1337 } 1338 1338 } … … 1904 1904 } else { 1905 1905 // Bit 0 1906 _E1B_DataInvalid = bitExtracted( int(SVhealth), 1, 0);1906 _E1B_DataInvalid = bitExtracted(unsigned(SVhealth), 1, 0); 1907 1907 // Bit 1-2 1908 _E1B_HS = double(bitExtracted( int(SVhealth), 2, 1));1908 _E1B_HS = double(bitExtracted(unsigned(SVhealth), 2, 1)); 1909 1909 // Bit 3 1910 _E5a_DataInvalid = bitExtracted( int(SVhealth), 1, 3);1910 _E5a_DataInvalid = bitExtracted(unsigned(SVhealth), 1, 3); 1911 1911 // Bit 4-5 1912 _E5a_HS = double(bitExtracted( int(SVhealth), 2, 4));1912 _E5a_HS = double(bitExtracted(unsigned(SVhealth), 2, 4)); 1913 1913 // Bit 6 1914 _E5b_DataInvalid = bitExtracted( int(SVhealth), 1, 6);1914 _E5b_DataInvalid = bitExtracted(unsigned(SVhealth), 1, 6); 1915 1915 // Bit 7-8 1916 _E5b_HS = double(bitExtracted( int(SVhealth), 2, 7));1916 _E5b_HS = double(bitExtracted(unsigned(SVhealth), 2, 7)); 1917 1917 if (_fnav) { 1918 1918 _BGD_1_5B = 0.0; … … 2379 2379 2380 2380 // Bit 5 2381 bool URAindexIs15 = bitExtracted( int(_health), 1, 5);2381 bool URAindexIs15 = bitExtracted(unsigned(_health), 1, 5); 2382 2382 if (URAindexIs15) { 2383 2383 // in this case it is recommended … … 2387 2387 2388 2388 // Bit 4 2389 bool MT17HealthIsUnavailable = bitExtracted( int(_health), 1, 4);2389 bool MT17HealthIsUnavailable = bitExtracted(unsigned(_health), 1, 4); 2390 2390 if (MT17HealthIsUnavailable) { 2391 2391 return 0; … … 2393 2393 2394 2394 // Bit 0-3 2395 int MT17health = bitExtracted( int(_health), 4, 0);2395 int MT17health = bitExtracted(unsigned(_health), 4, 0); 2396 2396 if (MT17health) { 2397 2397 return 1; -
trunk/BNC/src/orbComp/sp3Comp.cpp
r10673 r10688 282 282 epo->_dr[sat1->_prn] = sat1->_xyz - sat2->_xyz; 283 283 // temporarily included START 284 if (epo->_dr[sat1->_prn].NormFrobenius() > 1.0) { 284 if (epo->_dr[sat1->_prn].NormFrobenius() > 10.0) { 285 285 epochOK = false; 286 286 out << "! " << epo->_tt.timestr().c_str() << " " << sat1->_prn.toString().c_str() << "excluded \n"
Note:
See TracChangeset
for help on using the changeset viewer.