Changeset 8783 in ntrip
 Timestamp:
 Jul 19, 2019, 1:27:47 PM (4 weeks ago)
 Location:
 trunk/BNC/src/RTCM3
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

trunk/BNC/src/RTCM3/RTCM3Decoder.cpp
r8708 r8783 421 421 }; 422 422 423 /** 424 * MSM signal types for IRNSS 425 * 426 * NOTE: Uses 0.0, 1.0 for wavelength as sat index dependence is done later! 427 */ 428 static struct CodeData irn[RTCM3_MSM_NUMSIG] = { 429 {0.0, 0}, 430 {0.0, 0}, 431 {0.0, 0}, 432 {0.0, 0}, 433 {0.0, 0}, 434 {0.0, 0}, 435 {0.0, 0}, 436 {IRNSS_WAVELENGTH_S, "9A"}, 437 {0.0, 0}, 438 {0.0, 0}, 439 {0.0, 0}, 440 {0.0, 0}, 441 {0.0, 0}, 442 {0.0, 0}, 443 {0.0, 0}, 444 {0.0, 0}, 445 {0.0, 0}, 446 {0.0, 0}, 447 {0.0, 0}, 448 {0.0, 0}, 449 {0.0, 0}, 450 {IRNSS_WAVELENGTH_L5, "5A"}, 451 {0.0, 0}, 452 {0.0, 0}, 453 {0.0, 0}, 454 {0.0, 0}, 455 {0.0, 0}, 456 {0.0, 0}, 457 {0.0, 0}, 458 {0.0, 0}, 459 {0.0, 0}, 460 {0.0, 0} 461 }; 462 423 463 #define UINT64(c) c ## ULL 424 464 … … 438 478 /* id */ 439 479 char sys; 440 if (type >= 1121)480 if (type >= 1121) 441 481 sys = 'C'; 442 482 else if (type >= 1111) … … 448 488 else if (type >= 1081) 449 489 sys = 'R'; 450 else 490 else if (type >= 1071) 451 491 sys = 'G'; 492 else if (type >= 21) // test 493 sys = 'I'; 452 494 453 495 bncTime CurrentObsTime; 454 if (sys == 'C') /* BDS */ {496 if (sys == 'C') /* BDS */ { 455 497 GETBITS(i, 30) 456 498 CurrentObsTime.setBDS(i); … … 700 742 cd = gal[RTCM3_MSM_NUMSIG  j  1]; 701 743 break; 744 case 'I': 745 cd = irn[RTCM3_MSM_NUMSIG  j  1]; 746 break; 702 747 } 703 748 if (cd.code) { … … 1002 1047 i <<= 4; 1003 1048 eph._TOC.set(i * 1000); 1004 GETFLOATSIGN(eph._clock_driftrate, 8, 1005 1.0 / (double )(1 << 30) / (double )(1 << 25)) 1006 GETFLOATSIGN(eph._clock_drift, 16, 1007 1.0 / (double )(1 << 30) / (double )(1 << 13)) 1008 GETFLOATSIGN(eph._clock_bias, 22, 1009 1.0 / (double )(1 << 30) / (double )(1 << 1)) 1049 GETFLOATSIGN(eph._clock_driftrate, 8, 1.0 / (double )(1 << 30) / (double )(1 << 25)) 1050 GETFLOATSIGN(eph._clock_drift, 16, 1.0 / (double )(1 << 30) / (double )(1 << 13)) 1051 GETFLOATSIGN(eph._clock_bias, 22, 1.0 / (double )(1 << 30) / (double )(1 << 1)) 1010 1052 GETBITS(eph._IODC, 10) 1011 GETFLOATSIGN(eph._Crs, 16, 1.0 / (double )(1 << 5))1012 GETFLOATSIGN(eph._Delta_n, 16, R2R_PI/(double)(1<<30)/(double)(1<<13))1013 GETFLOATSIGN(eph._M0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1))1014 GETFLOATSIGN(eph._Cuc, 16, 1.0 / (double )(1 << 29))1015 GETFLOAT(eph._e, 32, 1.0 / (double )(1 << 30) / (double )(1 << 3))1016 GETFLOATSIGN(eph._Cus, 16, 1.0 / (double )(1 << 29))1017 GETFLOAT(eph._sqrt_A, 32, 1.0 / (double )(1 << 19))1053 GETFLOATSIGN(eph._Crs, 16, 1.0 / (double )(1 << 5)) 1054 GETFLOATSIGN(eph._Delta_n, 16, R2R_PI/(double)(1<<30)/(double)(1<<13)) 1055 GETFLOATSIGN(eph._M0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1)) 1056 GETFLOATSIGN(eph._Cuc, 16, 1.0 / (double )(1 << 29)) 1057 GETFLOAT(eph._e, 32, 1.0 / (double )(1 << 30) / (double )(1 << 3)) 1058 GETFLOATSIGN(eph._Cus, 16, 1.0 / (double )(1 << 29)) 1059 GETFLOAT(eph._sqrt_A, 32, 1.0 / (double )(1 << 19)) 1018 1060 GETBITS(i, 16) 1019 1061 i <<= 4; … … 1027 1069 if (eph._TOEweek > week + 1  eph._TOEweek < week  1) /* invalid week */ 1028 1070 return false; 1029 GETFLOATSIGN(eph._Cic, 16, 1.0 / (double )(1 << 29))1030 GETFLOATSIGN(eph._OMEGA0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1))1031 GETFLOATSIGN(eph._Cis, 16, 1.0 / (double )(1 << 29))1032 GETFLOATSIGN(eph._i0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1))1033 GETFLOATSIGN(eph._Crc, 16, 1.0 / (double )(1 << 5))1034 GETFLOATSIGN(eph._omega, 32, R2R_PI/(double)(1<<30)/(double)(1<<1))1071 GETFLOATSIGN(eph._Cic, 16, 1.0 / (double )(1 << 29)) 1072 GETFLOATSIGN(eph._OMEGA0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1)) 1073 GETFLOATSIGN(eph._Cis, 16, 1.0 / (double )(1 << 29)) 1074 GETFLOATSIGN(eph._i0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1)) 1075 GETFLOATSIGN(eph._Crc, 16, 1.0 / (double )(1 << 5)) 1076 GETFLOATSIGN(eph._omega, 32, R2R_PI/(double)(1<<30)/(double)(1<<1)) 1035 1077 GETFLOATSIGN(eph._OMEGADOT, 24, R2R_PI/(double)(1<<30)/(double)(1<<13)) 1036 GETFLOATSIGN(eph._TGD, 8, 1.0 / (double )(1 << 30) / (double )(1 << 1))1078 GETFLOATSIGN(eph._TGD, 8, 1.0 / (double )(1 << 30) / (double )(1 << 1)) 1037 1079 GETBITS(eph._health, 6) 1038 1080 GETBITS(eph._L2PFlag, 1) … … 1082 1124 eph._TOC.setTk(i * 15 * 60 * 1000); /* tb */ 1083 1125 1084 GETFLOATSIGNM(eph._x_velocity, 24, 1.0 / (double )(1 << 20))1085 GETFLOATSIGNM(eph._x_pos, 27, 1.0 / (double )(1 << 11))1126 GETFLOATSIGNM(eph._x_velocity, 24, 1.0 / (double )(1 << 20)) 1127 GETFLOATSIGNM(eph._x_pos, 27, 1.0 / (double )(1 << 11)) 1086 1128 GETFLOATSIGNM(eph._x_acceleration, 5, 1.0 / (double )(1 << 30)) 1087 GETFLOATSIGNM(eph._y_velocity, 24, 1.0 / (double )(1 << 20))1088 GETFLOATSIGNM(eph._y_pos, 27, 1.0 / (double )(1 << 11))1129 GETFLOATSIGNM(eph._y_velocity, 24, 1.0 / (double )(1 << 20)) 1130 GETFLOATSIGNM(eph._y_pos, 27, 1.0 / (double )(1 << 11)) 1089 1131 GETFLOATSIGNM(eph._y_acceleration, 5, 1.0 / (double )(1 << 30)) 1090 GETFLOATSIGNM(eph._z_velocity, 24, 1.0 / (double )(1 << 20))1091 GETFLOATSIGNM(eph._z_pos, 27, 1.0 / (double )(1 << 11))1132 GETFLOATSIGNM(eph._z_velocity, 24, 1.0 / (double )(1 << 20)) 1133 GETFLOATSIGNM(eph._z_pos, 27, 1.0 / (double )(1 << 11)) 1092 1134 GETFLOATSIGNM(eph._z_acceleration, 5, 1.0 / (double )(1 << 30)) 1093 1135 1094 1136 GETBITS(eph._P3, 1) /* P3 */ 1095 GETFLOATSIGNM(eph._gamma, 11, 1.0 / (double )(1 << 30) / (double )(1 << 10))1096 GETBITS(eph._M_P, 2) /* GLONASSM P, */1137 GETFLOATSIGNM(eph._gamma, 11, 1.0 / (double )(1 << 30) / (double )(1 << 10)) 1138 GETBITS(eph._M_P, 2) /* GLONASSM P, */ 1097 1139 GETBITS(eph._M_l3, 1) /*GLONASSM ln (third string) */ 1098 GETFLOATSIGNM(eph._tau, 22, 1.0 / (double )(1 << 30)) /* GLONASS tau n(tb) */1140 GETFLOATSIGNM(eph._tau, 22, 1.0 / (double )(1 << 30)) /* GLONASS tau n(tb) */ 1099 1141 GETFLOATSIGNM(eph._M_delta_tau, 5, 1.0 / (double )(1 << 30)) /* GLONASSM delta tau n(tb) */ 1100 1142 GETBITS(eph._E, 5) 1101 GETBITS(eph._M_P4, 1) /* GLONASSM P4 */1102 GETBITS(eph._M_FT, 4) /* GLONASSM Ft */1143 GETBITS(eph._M_P4, 1) /* GLONASSM P4 */ 1144 GETBITS(eph._M_FT, 4) /* GLONASSM Ft */ 1103 1145 GETBITS(eph._M_NT, 11) /* GLONASSM Nt */ 1104 GETBITS(eph._M_M, 2) /* GLONASSM M */1146 GETBITS(eph._M_M, 2) /* GLONASSM M */ 1105 1147 GETBITS(eph._additional_data_availability, 1) /* GLONASSM The Availability of Additional Data */ 1106 GETBITS(eph._NA, 11) /* GLONASSM Na */1107 GETFLOATSIGNM(eph._tauC, 32, 1.0/(double)(1<<30)/(double)(1<<1)) /* GLONASS tau c */1148 GETBITS(eph._NA, 11) /* GLONASSM Na */ 1149 GETFLOATSIGNM(eph._tauC, 32, 1.0/(double)(1<<30)/(double)(1<<1)) /* GLONASS tau c */ 1108 1150 GETBITS(eph._M_N4, 5) /* GLONASSM N4 */ 1109 GETFLOATSIGNM(eph._M_tau_GPS, 22, 1.0/(double)(1<<30)) /* GLONASSM tau GPS */1151 GETFLOATSIGNM(eph._M_tau_GPS, 22, 1.0/(double)(1<<30)) /* GLONASSM tau GPS */ 1110 1152 GETBITS(eph._M_l5, 1) /* GLONASSM ln (fifth string) */ 1111 1153 … … 1114 1156 eph._gps_utc = gnumleap(year, month, day); 1115 1157 eph._tt = eph._TOC; 1116 1158 1117 1159 eph._xv(1) = eph._x_pos * 1.e3; 1118 1160 eph._xv(2) = eph._y_pos * 1.e3; … … 1154 1196 eph._TOC.set(i * 1000); 1155 1197 1156 GETFLOATSIGN(eph._clock_driftrate, 8, 1157 1.0 / (double )(1 << 30) / (double )(1 << 25)) 1158 GETFLOATSIGN(eph._clock_drift, 16, 1159 1.0 / (double )(1 << 30) / (double )(1 << 13)) 1160 GETFLOATSIGN(eph._clock_bias, 22, 1161 1.0 / (double )(1 << 30) / (double )(1 << 1)) 1198 GETFLOATSIGN(eph._clock_driftrate, 8, 1.0 / (double )(1 << 30) / (double )(1 << 25)) 1199 GETFLOATSIGN(eph._clock_drift, 16, 1.0 / (double )(1 << 30) / (double )(1 << 13)) 1200 GETFLOATSIGN(eph._clock_bias, 22, 1.0 / (double )(1 << 30) / (double )(1 << 1)) 1162 1201 GETBITS(eph._IODE, 8) 1163 GETFLOATSIGN(eph._Crs, 16, 1.0 / (double )(1 << 5))1202 GETFLOATSIGN(eph._Crs, 16, 1.0 / (double )(1 << 5)) 1164 1203 GETFLOATSIGN(eph._Delta_n, 16, R2R_PI/(double)(1<<30)/(double)(1<<13)) 1165 GETFLOATSIGN(eph._M0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1))1166 GETFLOATSIGN(eph._Cuc, 16, 1.0 / (double )(1 << 29))1167 GETFLOAT(eph._e, 32, 1.0 / (double )(1 << 30) / (double )(1 << 3))1168 GETFLOATSIGN(eph._Cus, 16, 1.0 / (double )(1 << 29))1169 GETFLOAT(eph._sqrt_A, 32, 1.0 / (double )(1 << 19))1204 GETFLOATSIGN(eph._M0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1)) 1205 GETFLOATSIGN(eph._Cuc, 16, 1.0 / (double )(1 << 29)) 1206 GETFLOAT(eph._e, 32, 1.0 / (double )(1 << 30) / (double )(1 << 3)) 1207 GETFLOATSIGN(eph._Cus, 16, 1.0 / (double )(1 << 29)) 1208 GETFLOAT(eph._sqrt_A, 32, 1.0 / (double )(1 << 19)) 1170 1209 GETBITS(i, 16) 1171 1210 i <<= 4; … … 1174 1213 t.set(i*1000); 1175 1214 eph._TOEweek = t.gpsw(); 1176 GETFLOATSIGN(eph._Cic, 16, 1.0 / (double )(1 << 29))1177 GETFLOATSIGN(eph._OMEGA0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1))1178 GETFLOATSIGN(eph._Cis, 16, 1.0 / (double )(1 << 29))1179 GETFLOATSIGN(eph._i0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1))1180 GETFLOATSIGN(eph._Crc, 16, 1.0 / (double )(1 << 5))1181 GETFLOATSIGN(eph._omega, 32, R2R_PI/(double)(1<<30)/(double)(1<<1))1215 GETFLOATSIGN(eph._Cic, 16, 1.0 / (double )(1 << 29)) 1216 GETFLOATSIGN(eph._OMEGA0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1)) 1217 GETFLOATSIGN(eph._Cis, 16, 1.0 / (double )(1 << 29)) 1218 GETFLOATSIGN(eph._i0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1)) 1219 GETFLOATSIGN(eph._Crc, 16, 1.0 / (double )(1 << 5)) 1220 GETFLOATSIGN(eph._omega, 32, R2R_PI/(double)(1<<30)/(double)(1<<1)) 1182 1221 GETFLOATSIGN(eph._OMEGADOT, 24, R2R_PI/(double)(1<<30)/(double)(1<<13)) 1183 GETFLOATSIGN(eph._IDOT, 14, R2R_PI/(double)(1<<30)/(double)(1<<13))1222 GETFLOATSIGN(eph._IDOT, 14, R2R_PI/(double)(1<<30)/(double)(1<<13)) 1184 1223 GETBITS(eph._L2Codes, 2) 1185 1224 GETBITS(week, 10) … … 1196 1235 eph._ura = ceil(10.0 * pow(2.0, i / 2.0)) / 10.0; 1197 1236 GETBITS(eph._health, 6) 1198 GETFLOATSIGN(eph._TGD, 8, 1.0 / (double )(1 << 30) / (double )(1 << 1))1237 GETFLOATSIGN(eph._TGD, 8, 1.0 / (double )(1 << 30) / (double )(1 << 1)) 1199 1238 GETBITS(eph._IODC, 10) 1200 1239 GETBITS(eph._fitInterval, 1) 1201 1240 eph._TOT = 0.9999e9; 1202 eph._L2PFlag = 0; /* does not exist for QZSS */ 1241 1242 emit newGPSEph(eph); 1243 decoded = true; 1244 } 1245 return decoded; 1246 } 1247 1248 // 1249 //////////////////////////////////////////////////////////////////////////// 1250 bool RTCM3Decoder::DecodeIRNSSEphemeris(unsigned char* data, int size) { 1251 bool decoded = false; 1252 1253 if (size == 67) { 1254 t_ephGPS eph; 1255 int i, week, L5Flag, SFlag; 1256 uint64_t numbits = 0, bitfield = 0; 1257 1258 data += 3; /* header */ 1259 size = 6; /* header + crc */ 1260 SKIPBITS(12) 1261 1262 eph._receptDateTime = currentDateAndTimeGPS(); 1263 1264 GETBITS(i, 6) 1265 eph._prn.set('I', i); 1266 GETBITS(week, 10) 1267 GETFLOATSIGN(eph._clock_bias, 22, 1.0 / (double )(1 << 30) / (double )(1 << 1)) 1268 GETFLOATSIGN(eph._clock_drift, 16, 1.0 / (double )(1 << 30) / (double )(1 << 13)) 1269 GETFLOATSIGN(eph._clock_driftrate, 8, 1.0 / (double )(1 << 30) / (double )(1 << 25)) 1270 GETBITS(i, 4) 1271 eph._ura = accuracyFromIndex(i, eph.type()); 1272 GETBITS(i, 16) 1273 i <<= 4; 1274 eph._TOC.set(i * 1000); 1275 GETFLOATSIGN(eph._TGD, 8, 1.0 / (double )(1 << 30) / (double )(1 << 1)) 1276 GETFLOATSIGN(eph._Delta_n, 22, R2R_PI/(double)(1<<30)/(double)(1 << 11)) 1277 // IODCE 1278 GETBITS(eph._IODE, 8) 1279 eph._IODC = eph._IODE; 1280 SKIPBITS(10) 1281 GETBITS(L5Flag, 1) 1282 GETBITS(SFlag, 1) 1283 if (L5Flag == 0 && SFlag == 0) { 1284 eph._health = 0.0; 1285 } 1286 else if (L5Flag == 0 && SFlag == 1) { 1287 eph._health = 1.0; 1288 } 1289 else if (L5Flag == 1 && SFlag == 0) { 1290 eph._health = 2.0; 1291 } 1292 else if (L5Flag == 1 && SFlag == 1) { 1293 eph._health = 3.0; 1294 } 1295 GETFLOATSIGN(eph._Cuc, 15, 1.0 / (double )(1 << 28)) 1296 GETFLOATSIGN(eph._Cus, 15, 1.0 / (double )(1 << 28)) 1297 GETFLOATSIGN(eph._Cic, 15, 1.0 / (double )(1 << 28)) 1298 GETFLOATSIGN(eph._Cis, 15, 1.0 / (double )(1 << 28)) 1299 GETFLOATSIGN(eph._Crc, 15, 1.0 / (double )(1 << 4)) 1300 GETFLOATSIGN(eph._Crs, 15, 1.0 / (double )(1 << 4)) 1301 GETFLOATSIGN(eph._IDOT, 14, R2R_PI/(double)(1<<30)/(double)(1<<13)) 1302 GETFLOATSIGN(eph._M0, 32, R2R_PI/(double)(1<<30)/(double)(1<< 1)) 1303 GETBITS(i, 16) 1304 i <<= 4; 1305 eph._TOEsec = i; 1306 bncTime t; 1307 t.set(i * 1000); 1308 eph._TOEweek = t.gpsw(); 1309 int numOfRollOvers = int(floor(t.gpsw()/1024.0)); 1310 week += (numOfRollOvers * 1024); 1311 /* week from HOW, differs from TOC, TOE week, we use adapted value instead */ 1312 if (eph._TOEweek > week + 1  eph._TOEweek < week  1) /* invalid week */ 1313 return false; 1314 GETFLOAT(eph._e, 32, 1.0 / (double )(1 << 30) / (double )(1 << 3)) 1315 GETFLOAT(eph._sqrt_A, 32, 1.0 / (double )(1 << 19)) 1316 GETFLOATSIGN(eph._OMEGA0, 32, R2R_PI/(double)(1<<30)/(double)(1<< 1)) 1317 GETFLOATSIGN(eph._omega, 32, R2R_PI/(double)(1<<30)/(double)(1<< 1)) 1318 GETFLOATSIGN(eph._OMEGADOT, 22, R2R_PI/(double)(1<<30)/(double)(1<<11)) 1319 GETFLOATSIGN(eph._i0, 32, R2R_PI/(double)(1<<30)/(double)(1<< 1)) 1320 SKIPBITS(2) 1321 SKIPBITS(2) 1322 eph._TOT = 0.9999e9; 1203 1323 1204 1324 emit newGPSEph(eph); … … 1274 1394 eph._prn.set('E', i, eph._inav ? 1 : 0); 1275 1395 1276 GETBITS(eph._TOEweek, 12) 1396 GETBITS(eph._TOEweek, 12) //FIXME: rollover after week 4095!! 1277 1397 GETBITS(eph._IODnav, 10) 1278 1398 GETBITS(i, 8) … … 1281 1401 GETBITSFACTOR(i, 14, 60) 1282 1402 eph._TOC.set(1024 + eph._TOEweek, i); 1283 GETFLOATSIGN(eph._clock_driftrate, 6, 1284 1.0 / (double )(1 << 30) / (double )(1 << 29)) 1285 GETFLOATSIGN(eph._clock_drift, 21, 1286 1.0 / (double )(1 << 30) / (double )(1 << 16)) 1287 GETFLOATSIGN(eph._clock_bias, 31, 1288 1.0 / (double )(1 << 30) / (double )(1 << 4)) 1289 GETFLOATSIGN(eph._Crs, 16, 1.0 / (double )(1 << 5)) 1290 GETFLOATSIGN(eph._Delta_n, 16, R2R_PI/(double)(1<<30)/(double)(1<<13)) 1291 GETFLOATSIGN(eph._M0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1)) 1292 GETFLOATSIGN(eph._Cuc, 16, 1.0 / (double )(1 << 29)) 1293 GETFLOAT(eph._e, 32, 1.0 / (double )(1 << 30) / (double )(1 << 3)) 1294 GETFLOATSIGN(eph._Cus, 16, 1.0 / (double )(1 << 29)) 1295 GETFLOAT(eph._sqrt_A, 32, 1.0 / (double )(1 << 19)) 1403 GETFLOATSIGN(eph._clock_driftrate, 6, 1.0 / (double )(1 << 30) / (double )(1 << 29)) 1404 GETFLOATSIGN(eph._clock_drift, 21, 1.0 / (double )(1 << 30) / (double )(1 << 16)) 1405 GETFLOATSIGN(eph._clock_bias, 31, 1.0 / (double )(1 << 30) / (double )(1 << 4)) 1406 GETFLOATSIGN(eph._Crs, 16, 1.0 / (double )(1 << 5)) 1407 GETFLOATSIGN(eph._Delta_n, 16, R2R_PI/(double)(1<<30)/(double)(1<<13)) 1408 GETFLOATSIGN(eph._M0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1)) 1409 GETFLOATSIGN(eph._Cuc, 16, 1.0 / (double )(1 << 29)) 1410 GETFLOAT(eph._e, 32, 1.0 / (double )(1 << 30) / (double )(1 << 3)) 1411 GETFLOATSIGN(eph._Cus, 16, 1.0 / (double )(1 << 29)) 1412 GETFLOAT(eph._sqrt_A, 32, 1.0 / (double )(1 << 19)) 1296 1413 GETBITSFACTOR(eph._TOEsec, 14, 60) 1297 1414 /* FIXME: overwrite value, copied from old code */ 1298 1415 eph._TOEsec = eph._TOC.gpssec(); 1299 GETFLOATSIGN(eph._Cic, 16, 1.0 / (double )(1 << 29))1300 GETFLOATSIGN(eph._OMEGA0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1))1301 GETFLOATSIGN(eph._Cis, 16, 1.0 / (double )(1 << 29))1302 GETFLOATSIGN(eph._i0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1))1303 GETFLOATSIGN(eph._Crc, 16, 1.0 / (double )(1 << 5))1304 GETFLOATSIGN(eph._omega, 32, R2R_PI/(double)(1<<30)/(double)(1<<1))1416 GETFLOATSIGN(eph._Cic, 16, 1.0 / (double )(1 << 29)) 1417 GETFLOATSIGN(eph._OMEGA0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1)) 1418 GETFLOATSIGN(eph._Cis, 16, 1.0 / (double )(1 << 29)) 1419 GETFLOATSIGN(eph._i0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1)) 1420 GETFLOATSIGN(eph._Crc, 16, 1.0 / (double )(1 << 5)) 1421 GETFLOATSIGN(eph._omega, 32, R2R_PI/(double)(1<<30)/(double)(1<<1)) 1305 1422 GETFLOATSIGN(eph._OMEGADOT, 24, R2R_PI/(double)(1<<30)/(double)(1<<13)) 1306 1423 GETFLOATSIGN(eph._BGD_1_5A, 10, … … 1311 1428 eph._e5aDataInValid = false; 1312 1429 1313 GETFLOATSIGN(eph._BGD_1_5B, 10, 1314 1.0 / (double )(1 << 30) / (double )(1 << 2)) 1430 GETFLOATSIGN(eph._BGD_1_5B, 10, 1.0 / (double )(1 << 30) / (double )(1 << 2)) 1315 1431 GETBITS(eph._E5bHS, 2) 1316 1432 GETBITS(eph._e5bDataInValid, 1) … … 1365 1481 i <<= 3; 1366 1482 eph._TOC.setBDS(i * 1000); 1367 GETFLOATSIGN(eph._clock_driftrate, 11, 1368 1.0 / (double )(1 << 30) / (double )(1 << 30) / (double )(1 << 6)) 1369 GETFLOATSIGN(eph._clock_drift, 22, 1370 1.0 / (double )(1 << 30) / (double )(1 << 20)) 1371 GETFLOATSIGN(eph._clock_bias, 24, 1372 1.0 / (double )(1 << 30) / (double )(1 << 3)) 1483 GETFLOATSIGN(eph._clock_driftrate, 11, 1.0 / (double )(1 << 30) / (double )(1 << 30) / (double )(1 << 6)) 1484 GETFLOATSIGN(eph._clock_drift, 22, 1.0 / (double )(1 << 30) / (double )(1 << 20)) 1485 GETFLOATSIGN(eph._clock_bias, 24, 1.0 / (double )(1 << 30) / (double )(1 << 3)) 1373 1486 GETBITS(eph._AODC, 5) 1374 GETFLOATSIGN(eph._Crs, 18, 1.0 / (double )(1 << 6))1487 GETFLOATSIGN(eph._Crs, 18, 1.0 / (double )(1 << 6)) 1375 1488 GETFLOATSIGN(eph._Delta_n, 16, R2R_PI/(double)(1<<30)/(double)(1<<13)) 1376 GETFLOATSIGN(eph._M0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1))1377 GETFLOATSIGN(eph._Cuc, 18, 1.0 / (double )(1 << 30) / (double )(1 << 1))1378 GETFLOAT(eph._e, 32, 1.0 / (double )(1 << 30) / (double )(1 << 3))1379 GETFLOATSIGN(eph._Cus, 18, 1.0 / (double )(1 << 30) / (double )(1 << 1))1380 GETFLOAT(eph._sqrt_A, 32, 1.0 / (double )(1 << 19))1489 GETFLOATSIGN(eph._M0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1)) 1490 GETFLOATSIGN(eph._Cuc, 18, 1.0 / (double )(1 << 30) / (double )(1 << 1)) 1491 GETFLOAT(eph._e, 32, 1.0 / (double )(1 << 30) / (double )(1 << 3)) 1492 GETFLOATSIGN(eph._Cus, 18, 1.0 / (double )(1 << 30) / (double )(1 << 1)) 1493 GETFLOAT(eph._sqrt_A, 32, 1.0 / (double )(1 << 19)) 1381 1494 GETBITS(i, 17) 1382 1495 i <<= 3; 1383 1496 eph._TOEsec = i; 1384 1497 eph._TOE.setBDS(i * 1000); 1385 GETFLOATSIGN(eph._Cic, 18, 1.0 / (double )(1 << 30) / (double )(1 << 1))1386 GETFLOATSIGN(eph._OMEGA0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1))1387 GETFLOATSIGN(eph._Cis, 18, 1.0 / (double )(1 << 30) / (double )(1 << 1))1388 GETFLOATSIGN(eph._i0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1))1389 GETFLOATSIGN(eph._Crc, 18, 1.0 / (double )(1 << 6))1390 GETFLOATSIGN(eph._omega, 32, R2R_PI/(double)(1<<30)/(double)(1<<1))1498 GETFLOATSIGN(eph._Cic, 18, 1.0 / (double )(1 << 30) / (double )(1 << 1)) 1499 GETFLOATSIGN(eph._OMEGA0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1)) 1500 GETFLOATSIGN(eph._Cis, 18, 1.0 / (double )(1 << 30) / (double )(1 << 1)) 1501 GETFLOATSIGN(eph._i0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1)) 1502 GETFLOATSIGN(eph._Crc, 18, 1.0 / (double )(1 << 6)) 1503 GETFLOATSIGN(eph._omega, 32, R2R_PI/(double)(1<<30)/(double)(1<<1)) 1391 1504 GETFLOATSIGN(eph._OMEGADOT, 24, R2R_PI/(double)(1<<30)/(double)(1<<13)) 1392 GETFLOATSIGN(eph._TGD1, 10, 0.0000000001)1393 GETFLOATSIGN(eph._TGD2, 10, 0.0000000001)1505 GETFLOATSIGN(eph._TGD1, 10, 0.0000000001) 1506 GETFLOATSIGN(eph._TGD2, 10, 0.0000000001) 1394 1507 GETBITS(eph._SatH1, 1) 1395 1508 … … 1529 1642 } 1530 1643 } 1531 else if (id >= 1070 && id <= 1229) /* MSM */ { 1644 else if ((id >= 1070 && id <= 1229)  1645 (id >= 21 && id <= 27)) /* MSM */ { 1532 1646 if (DecodeRTCM3MSM(_Message, _BlockSize)) 1533 1647 decoded = true; … … 1573 1687 decoded = true; 1574 1688 break; 1689 case 29: 1690 if (DecodeIRNSSEphemeris(_Message, _BlockSize)) 1691 decoded = true; 1692 break; 1575 1693 case 1045: 1576 1694 case 1046: 
trunk/BNC/src/RTCM3/RTCM3Decoder.h
r8197 r8783 132 132 bool DecodeQZSSEphemeris(unsigned char* buffer, int bufLen); 133 133 /** 134 * Extract ephemeris data from 29 (allocated for testing) RTCM3 messages. 135 * @param buffer the buffer containing an 29 RTCM block 136 * @param bufLen the length of the buffer (the message length including header+crc) 137 * @return <code>true</code> when data block was decodable 138 */ 139 bool DecodeIRNSSEphemeris(unsigned char* buffer, int bufLen); 140 /** 134 141 * Extract ephemeris data from 1045 and 1046 RTCM3 messages. 135 142 * @param buffer the buffer containing an 1045 and 1046 RTCM block 
trunk/BNC/src/RTCM3/gnss.h
r8682 r8783 70 70 #define BDS_WAVELENGTH_B3 (LIGHTSPEED / BDS_FREQU_B3) /* m */ 71 71 72 #define IRNSS_FREQU_L5 1176450000.0 /* Hz */ 73 #define IRNSS_FREQU_S 2492028000.0 /* Hz */ 74 #define IRNSS_WAVELENGTH_L5 (LIGHTSPEED / IRNSS_FREQU_L5) /* m */ 75 #define IRNSS_WAVELENGTH_S (LIGHTSPEED / IRNSS_FREQU_S) /* m */ 76 72 77 #define R2R_PI 3.1415926535898 73 78
Note: See TracChangeset
for help on using the changeset viewer.