Changeset 9201 in ntrip for trunk/BNC/src/RTCM3
- Timestamp:
- Nov 3, 2020, 10:06:30 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/RTCM3/RTCM3Decoder.cpp
r9192 r9201 1046 1046 GETFLOATSIGN(eph._Cus, 16, 1.0 / (double )(1 << 29)) 1047 1047 GETFLOAT(eph._sqrt_A, 32, 1.0 / (double )(1 << 19)) 1048 if (eph._sqrt_A < 1000.0) {return false;} 1048 if (eph._sqrt_A < 1000.0) { 1049 emit(newMessage(QString("%1: Block %2 (%3) SQRT_A %4 m!") 1050 .arg(_staID).arg(1020,4).arg(eph._prn.toString().c_str()) 1051 .arg(eph._sqrt_A,10,'F',3).toLatin1(), true)); 1052 return false; 1053 } 1049 1054 GETBITS(i, 16) 1050 1055 i <<= 4; … … 1101 1106 GETBITS(eph._almanac_health, 1) /* almanac healthy */ 1102 1107 GETBITS(eph._almanac_health_availablility_indicator, 1) /* almanac health ok */ 1103 if (eph._almanac_health_availablility_indicator == 0.0) {return false;} 1108 if (eph._almanac_health_availablility_indicator == 0.0) { 1109 emit(newMessage(QString("%1: Block %2 (%3): ALM = %4: missing data!") 1110 .arg(_staID).arg(1019,4).arg(eph._prn.toString().c_str()) 1111 .arg(eph._almanac_health_availablility_indicator).toLatin1(), true)); 1112 return false; 1113 } 1104 1114 GETBITS(eph._P1, 2) /* P1 */ 1105 1115 GETBITS(i, 5) … … 1130 1140 GETFLOATSIGNM(eph._gamma, 11, 1.0 / (double )(1 << 30) / (double )(1 << 10)) 1131 1141 GETBITS(eph._M_P, 2) /* GLONASS-M P, */ 1132 GETBITS(eph._M_l3, 1) /* GLONASS-M ln (third string) */1133 GETFLOATSIGNM(eph._tau, 22, 1.0 / (double )(1 << 30)) 1142 GETBITS(eph._M_l3, 1) /* GLONASS-M ln (third string) */ 1143 GETFLOATSIGNM(eph._tau, 22, 1.0 / (double )(1 << 30)) /* GLONASS tau n(tb) */ 1134 1144 GETFLOATSIGNM(eph._M_delta_tau, 5, 1.0 / (double )(1 << 30)) /* GLONASS-M delta tau n(tb) */ 1135 1145 GETBITS(eph._E, 5) … … 1137 1147 GETBITS(eph._M_FT, 4) /* GLONASS-M Ft */ 1138 1148 GETBITS(eph._M_NT, 11) /* GLONASS-M Nt */ 1139 if (eph._M_NT == 0.0) {return false;} 1149 if (eph._M_NT == 0.0) { 1150 emit(newMessage(QString("%1: Block %2 (%3): NT = %4: missing data!") 1151 .arg(_staID).arg(1019,4).arg(eph._prn.toString().c_str()).arg(eph._M_NT,4).toLatin1(), true)); 1152 return false; 1153 } 1140 1154 GETBITS(eph._M_M, 2) /* GLONASS-M M */ 1141 1155 GETBITS(eph._additional_data_availability, 1) /* GLONASS-M The Availability of Additional Data */ 1142 if (eph._additional_data_availability == 0.0) {return false;} 1156 if (eph._additional_data_availability == 0.0) { 1157 emit(newMessage(QString("%1: Block %2 (%3): ADD = %4: missing data!") 1158 .arg(_staID).arg(1019,4).arg(eph._prn.toString().c_str()) 1159 .arg(eph._additional_data_availability).toLatin1(), true)); 1160 return false; 1161 } 1143 1162 GETBITS(eph._NA, 11) /* GLONASS-M Na */ 1144 1163 GETFLOATSIGNM(eph._tauC, 32, 1.0/(double)(1<<30)/(double)(1<<1)) /* GLONASS tau c */ … … 1155 1174 eph._xv(2) = eph._y_pos * 1.e3; 1156 1175 eph._xv(3) = eph._z_pos * 1.e3; 1176 if (eph._xv.Rows(1,3).NormFrobenius() < 1.0) { 1177 emit(newMessage(QString("%1: Block %2 (%3): zero position!") 1178 .arg(_staID).arg(1019,4).arg(eph._prn.toString().c_str()).toLatin1(), true)); 1179 return false; 1180 } 1157 1181 eph._xv(4) = eph._x_velocity * 1.e3; 1158 1182 eph._xv(5) = eph._y_velocity * 1.e3; 1159 1183 eph._xv(6) = eph._z_velocity * 1.e3; 1160 1184 if (eph._xv.Rows(4,6).NormFrobenius() < 1.0) { 1185 emit(newMessage(QString("%1: Block %2 (%3): zero velocity!") 1186 .arg(_staID).arg(1019,4).arg(eph._prn.toString().c_str()).toLatin1(), true)); 1187 return false; 1188 } 1161 1189 GLOFreq[sv - 1] = 100 + eph._frequency_number ; /* store frequency for other users (MSM) */ 1162 1190 _gloFrq = QString("%1 %2").arg(eph._prn.toString().c_str()).arg(eph._frequency_number, 2, 'f', 0); … … 1203 1231 GETFLOATSIGN(eph._Cus, 16, 1.0 / (double )(1 << 29)) 1204 1232 GETFLOAT(eph._sqrt_A, 32, 1.0 / (double )(1 << 19)) 1205 if (eph._sqrt_A < 1000.0) {return false;} 1233 if (eph._sqrt_A < 1000.0) { 1234 emit(newMessage(QString("%1: Block %2 (%3) SQRT_A %4 m!") 1235 .arg(_staID).arg(1044,4).arg(eph._prn.toString().c_str()) 1236 .arg(eph._sqrt_A,10,'F',3).toLatin1(), true)); 1237 return false; 1238 } 1206 1239 GETBITS(i, 16) 1207 1240 i <<= 4; … … 1312 1345 GETFLOAT(eph._e, 32, 1.0 / (double )(1 << 30) / (double )(1 << 3)) 1313 1346 GETFLOAT(eph._sqrt_A, 32, 1.0 / (double )(1 << 19)) 1314 if (eph._sqrt_A < 1000.0) {return false;} 1347 if (eph._sqrt_A < 1000.0) { 1348 emit(newMessage(QString("%1: Block %2 (%3) SQRT_A %4 m!") 1349 .arg(_staID).arg(1041,4).arg(eph._prn.toString().c_str()) 1350 .arg(eph._sqrt_A,10,'F',3).toLatin1(), true)); 1351 return false; 1352 } 1315 1353 GETFLOATSIGN(eph._OMEGA0, 32, R2R_PI/(double)(1<<30)/(double)(1<< 1)) 1316 1354 GETFLOATSIGN(eph._omega, 32, R2R_PI/(double)(1<<30)/(double)(1<< 1)) … … 1354 1392 GETFLOATSIGN(eph._y_pos, 30, 0.08) 1355 1393 GETFLOATSIGN(eph._z_pos, 25, 0.4) 1394 ColumnVector pos(3); 1395 pos(1) = eph._x_pos; pos(2) = eph._y_pos; pos(3) = eph._z_pos; 1396 if (pos.NormFrobenius() < 1.0) { 1397 emit(newMessage(QString("%1: Block %2 (%3): zero position!") 1398 .arg(_staID).arg(1043,4).arg(eph._prn.toString().c_str()).toLatin1(), true)); 1399 return false; 1400 } 1356 1401 GETFLOATSIGN(eph._x_velocity, 17, 0.000625) 1357 1402 GETFLOATSIGN(eph._y_velocity, 17, 0.000625) … … 1410 1455 GETFLOATSIGN(eph._Cus, 16, 1.0 / (double )(1 << 29)) 1411 1456 GETFLOAT(eph._sqrt_A, 32, 1.0 / (double )(1 << 19)) 1412 if (eph._sqrt_A < 1000.0) {return false;}1413 1457 GETBITSFACTOR(eph._TOEsec, 14, 60) 1414 1458 /* FIXME: overwrite value, copied from old code */ … … 1433 1477 GETBITS(eph._e1DataInValid, 1) 1434 1478 if (eph._E5bHS != eph._E1_bHS) { 1479 emit(newMessage(QString("%1: Block %2 (%3) SHS E5b %4 E1B %5: inconsistent health!") 1480 .arg(_staID).arg(1046,4).arg(eph._prn.toString().c_str()) 1481 .arg(eph._E5bHS).arg(eph._E1_bHS).toLatin1(), true)); 1435 1482 return false; 1436 1483 } 1437 1484 if ((eph._BGD_1_5A == 0.0 && fabs(eph._BGD_1_5B) > 1e-9) || 1438 1485 (eph._BGD_1_5B == 0.0 && fabs(eph._BGD_1_5A) > 1e-9)) { 1486 emit(newMessage(QString("%1: Block %2 (%3) BGD_15a = %4 BGD_15b = %5: inconsistent BGD!") 1487 .arg(_staID).arg(1046,4).arg(eph._prn.toString().c_str()) 1488 .arg(eph._BGD_1_5A,10,'E',3).arg(eph._BGD_1_5B,10,'E',3).toLatin1(), true)); 1439 1489 return false; 1440 1490 } … … 1452 1502 } 1453 1503 eph._TOT = 0.9999e9; 1504 1505 if (eph._sqrt_A < 1000.0) { 1506 emit(newMessage(QString("%1: Block %2 (%3) SQRT_A %4 m!") 1507 .arg(_staID).arg(eph._inav? 1046 : 1045,4).arg(eph._prn.toString().c_str()) 1508 .arg(eph._sqrt_A,10,'F',3).toLatin1(), true)); 1509 return false; 1510 } 1454 1511 1455 1512 emit newGalileoEph(eph); … … 1498 1555 GETFLOATSIGN(eph._Cus, 18, 1.0 / (double )(1 << 30) / (double )(1 << 1)) 1499 1556 GETFLOAT(eph._sqrt_A, 32, 1.0 / (double )(1 << 19)) 1500 if (eph._sqrt_A < 1000.0) {return false;} 1557 if (eph._sqrt_A < 1000.0) { 1558 emit(newMessage(QString("%1: Block %2 (%3) SQRT_A %4 m!") 1559 .arg(_staID).arg(1042,4).arg(eph._prn.toString().c_str()) 1560 .arg(eph._sqrt_A,10,'F',3).toLatin1(), true)); 1561 return false; 1562 } 1501 1563 GETBITS(i, 17) 1502 1564 i <<= 3; … … 1708 1770 case 1045: 1709 1771 case 1046: 1710 // reject 1045/1046 from JAXA RTKLIB encoded stations1711 1772 if (_staID.contains("AIRA") || _staID.contains("STK2") || 1712 1773 _staID.contains("CCJ2") || _staID.contains("SYOG")) { 1774 emit(newMessage( 1775 QString("%1: Block temporary %2 from JAXA RTKLIB encoded stations!") 1776 .arg(_staID).arg(id).toLatin1(), true)); 1713 1777 break; 1714 1778 }
Note:
See TracChangeset
for help on using the changeset viewer.