Changeset 8974 in ntrip for trunk/BNC/src/RTCM3
- Timestamp:
- Jul 17, 2020, 11:26:14 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit_rtcm.c
r8970 r8974 694 694 #define G_RESERVEDH(a) GETBITS(a,6) 695 695 #define G_SIZE(a) GETBITS(a, 10) 696 #define G_ MESSAGE_NUMBER(a)GETBITS(a, 12) /* DF002 */696 #define G_RTCM_MESSAGE_NUMBER(a) GETBITS(a, 12) /* DF002 */ 697 697 #define G_GPS_SATELLITE_ID(a) GETBITS(a, 6) /* DF068 */ 698 698 #define G_QZSS_SATELLITE_ID(a) GETBITS(a, 4) /* DF249 */ … … 766 766 return GCOBR_SHORTBUFFER; 767 767 768 #ifdef DEBUG769 fprintf(stderr, "Get ClockOrbitBias START: size %d, numbits %d\n",size, numbits);768 #ifdef BNC_DEBUG 769 fprintf(stderr, "GetSSR START: size %d, numbits %d\n",(int)size, numbits); 770 770 #endif 771 771 … … 785 785 size = sizeofrtcmblock; /* reduce size, so overflows are detected */ 786 786 787 G_ MESSAGE_NUMBER(type)788 #ifdef DEBUG787 G_RTCM_MESSAGE_NUMBER(type) 788 #ifdef BNC_DEBUG 789 789 fprintf(stderr, "type %d size %d\n",type,sizeofrtcmblock); 790 790 #endif … … 804 804 G_VTEC_QUALITY_INDICATOR(v->Quality) 805 805 G_NO_IONO_LAYERS(v->NumLayers) 806 #ifdef BNC_DEBUG 807 fprintf(stderr, "epochTime %d ui %d mmi %d ssrIod %d providerId %d solId %d vtecQ %8.3f numLay %d \n", 808 v->EpochTime, v->UpdateInterval, mmi, 809 v->SSRIOD, v->SSRProviderID, v->SSRSolutionID, v->Quality, v->NumLayers); 810 #endif 806 811 for (l = 0; l < v->NumLayers; ++l) { 807 812 G_IONO_HEIGHT(v->Layers[l].Height) 808 813 G_IONO_DEGREE(v->Layers[l].Degree) 809 814 G_IONO_ORDER(v->Layers[l].Order) 815 #ifdef BNC_DEBUG 816 fprintf(stderr, "h %8.3f deg %d ord %d \n", 817 v->Layers[l].Height, v->Layers[l].Degree, v->Layers[l].Order); 818 #endif 810 819 for (o = 0; o <= v->Layers[l].Order; ++o) { 811 820 for (d = o; d <= v->Layers[l].Degree; ++d) { 812 821 G_IONO_COEFF(v->Layers[l].Cosinus[d][o]) 822 #ifdef BNC_DEBUG 823 fprintf(stderr, "C[%d][%d] %8.3f \n", 824 d, o, v->Layers[l].Cosinus[d][o]); 825 #endif 813 826 } 814 827 } … … 816 829 for (d = o; d <= v->Layers[l].Degree; ++d) { 817 830 G_IONO_COEFF(v->Layers[l].Sinus[d][o]) 831 #ifdef BNC_DEBUG 832 fprintf(stderr, "S[%d][%d] %8.3f \n", 833 d, o, v->Layers[l].Sinus[d][o]); 834 #endif 818 835 } 819 836 } 820 837 } 821 #ifdef DEBUG838 #ifdef BNC_DEBUG 822 839 for(type = 0; type < (int)size && (unsigned char)buffer[type] != 0xD3; ++type) 823 840 numbits += 8; … … 851 868 G_MW_CONSISTENCY_INDICATOR(pb->MWConsistencyIndicator) 852 869 G_NO_OF_SATELLITES(nums) 870 #ifdef BNC_DEBUG 871 fprintf(stderr, "epochTime %d ui %d mmi %d sats %d/%d ssrIod %d providerId %d solId %d dispInd %d mwInd %d\n", 872 pb->EpochTime[s], pb->UpdateInterval,mmi,pb->NumberOfSat[s],nums, 873 pb->SSRIOD, pb->SSRProviderID, pb->SSRSolutionID, 874 pb->DispersiveBiasConsistencyIndicator, pb->MWConsistencyIndicator); 875 #endif 853 876 for (i = 0; i < nums; ++i) { 854 877 switch (s) { … … 875 898 ++pb->NumberOfSat[s]; 876 899 pb->Sat[pos].ID = id; 877 878 900 G_NO_OF_PHASE_BIASES(pb->Sat[pos].NumberOfPhaseBiases) 879 901 G_YAW_ANGLE(pb->Sat[pos].YawAngle) 880 902 G_YAW_RATE(pb->Sat[pos].YawRate) 903 #ifdef BNC_DEBUG 904 fprintf(stderr, "id %2d #%d y %8.3f yr %8.3f ", 905 pb->Sat[pos].ID, pb->Sat[pos].NumberOfPhaseBiases, 906 pb->Sat[pos].YawAngle, pb->Sat[pos].YawRate); 907 #endif 881 908 for (j = 0; j < pb->Sat[pos].NumberOfPhaseBiases; ++j) { 882 909 G_SIGNAL_IDENTIFIER(pb->Sat[pos].Biases[j].Type) … … 887 914 pb->Sat[pos].Biases[j].SignalDiscontinuityCounter) 888 915 G_PHASE_BIAS(pb->Sat[pos].Biases[j].Bias) 916 #ifdef BNC_DEBUG 917 fprintf(stderr, "t%d int %d wl %d disc %d b %8.4f ", 918 pb->Sat[pos].Biases[j].Type, 919 pb->Sat[pos].Biases[j].SignalIntegerIndicator, 920 pb->Sat[pos].Biases[j].SignalsWideLaneIntegerIndicator, 921 pb->Sat[pos].Biases[j].SignalDiscontinuityCounter, 922 pb->Sat[pos].Biases[j].Bias); 923 #endif 889 924 } 890 } 891 #ifdef DEBUG 925 #ifdef BNC_DEBUG 926 fprintf(stderr, "\n"); 927 #endif 928 } 929 #ifdef BNC_DEBUG 892 930 for(type = 0; type < (int)size && (unsigned char)buffer[type] != 0xD3; ++type) 893 931 numbits += 8; … … 922 960 G_NO_OF_SATELLITES(nums) 923 961 co->Supplied[COBOFS_ORBIT] |= 1; 924 #ifdef DEBUG 925 fprintf(stderr, "epochtime %d ui %d mmi %d sats %d/%d rd %d\n",co->EpochTime[s], 926 co->UpdateInterval,mmi,co->NumberOfSat[s],nums, co->SatRefDatum); 962 #ifdef BNC_DEBUG 963 fprintf(stderr, "epochTime %d ui %d mmi %d sats %d/%d rd %d ssrIod %d providerId %d solId %d\n", 964 co->EpochTime[s], co->UpdateInterval,mmi,co->NumberOfSat[s],nums, 965 co->SatRefDatum, co->SSRIOD, co->SSRProviderID, co->SSRSolutionID); 927 966 #endif 928 967 for (i = 0; i < nums; ++i) { … … 977 1016 G_DELTA_DOT_ALONG_TRACK(co->Sat[pos].Orbit.DotDeltaAlongTrack) 978 1017 G_DELTA_DOT_CROSS_TRACK(co->Sat[pos].Orbit.DotDeltaCrossTrack) 979 #ifdef DEBUG1018 #ifdef BNC_DEBUG 980 1019 fprintf(stderr, "id %2d iod %3d dr %8.3f da %8.3f dc %8.3f dr %8.3f da %8.3f dc %8.3f\n", 981 1020 co->Sat[pos].ID,co->Sat[pos].IOD,co->Sat[pos].Orbit.DeltaRadial, … … 1010 1049 G_NO_OF_SATELLITES(nums) 1011 1050 co->Supplied[COBOFS_CLOCK] |= 1; 1012 #ifdef DEBUG 1013 fprintf(stderr, "epochtime %d ui %d mmi %d sats %d/%d\n",co->EpochTime[s], 1014 co->UpdateInterval,mmi,co->NumberOfSat[s],nums); 1051 #ifdef BNC_DEBUG 1052 fprintf(stderr, "epochTime %d ui %d mmi %d sats %d/%d ssrIod %d providerId %d solId %d\n", 1053 co->EpochTime[s], co->UpdateInterval,mmi,co->NumberOfSat[s],nums, 1054 co->SSRIOD, co->SSRProviderID, co->SSRSolutionID); 1015 1055 #endif 1016 1056 for (i = 0; i < nums; ++i) { … … 1042 1082 G_DELTA_CLOCK_C1(co->Sat[pos].Clock.DeltaA1) 1043 1083 G_DELTA_CLOCK_C2(co->Sat[pos].Clock.DeltaA2) 1044 #ifdef DEBUG1084 #ifdef BNC_DEBUG 1045 1085 fprintf(stderr, "id %2d c0 %8.3f c1 %8.3f c2 %8.3f\n", 1046 1086 co->Sat[pos].ID, co->Sat[pos].Clock.DeltaA0, co->Sat[pos].Clock.DeltaA1, … … 1074 1114 co->Supplied[COBOFS_ORBIT] |= 1; 1075 1115 co->Supplied[COBOFS_CLOCK] |= 1; 1116 #ifdef BNC_DEBUG 1117 fprintf(stderr, "epochTime %d ui %d mmi %d sats %d/%d rd %d ssrIod %d providerId %d solId %d\n", 1118 co->EpochTime[s], co->UpdateInterval,mmi,co->NumberOfSat[s],nums, 1119 co->SatRefDatum, co->SSRIOD, co->SSRProviderID, co->SSRSolutionID); 1120 #endif 1076 1121 for (i = 0; i < nums; ++i) { 1077 1122 switch (s) { … … 1128 1173 G_DELTA_CLOCK_C1(co->Sat[pos].Clock.DeltaA1) 1129 1174 G_DELTA_CLOCK_C2(co->Sat[pos].Clock.DeltaA2) 1175 #ifdef BNC_DEBUG 1176 fprintf(stderr, "id %2d iod %3d dr %8.4f da %8.4f dc %8.4f dr %8.3f da %8.3f dc %8.3f c0 %8.3f c1 %8.3f c2 %8.3f\n", 1177 co->Sat[pos].ID,co->Sat[pos].IOD,co->Sat[pos].Orbit.DeltaRadial, 1178 co->Sat[pos].Orbit.DeltaAlongTrack,co->Sat[pos].Orbit.DeltaCrossTrack, 1179 co->Sat[pos].Orbit.DotDeltaRadial, co->Sat[pos].Orbit.DotDeltaAlongTrack, 1180 co->Sat[pos].Orbit.DotDeltaCrossTrack, 1181 co->Sat[pos].Clock.DeltaA0, co->Sat[pos].Clock.DeltaA1, co->Sat[pos].Clock.DeltaA2); 1182 #endif 1130 1183 } 1131 1184 break; … … 1153 1206 G_NO_OF_SATELLITES(nums) 1154 1207 co->Supplied[COBOFS_URA] |= 1; 1208 #ifdef BNC_DEBUG 1209 fprintf(stderr, "epochTime %d ui %d mmi %d sats %d/%d ssrIod %d providerId %d solId %d\n", 1210 co->EpochTime[s], co->UpdateInterval,mmi,co->NumberOfSat[s],nums, 1211 co->SSRIOD, co->SSRProviderID, co->SSRSolutionID); 1212 #endif 1155 1213 for (i = 0; i < nums; ++i) { 1156 1214 switch (s) { … … 1177 1235 ++co->NumberOfSat[s]; 1178 1236 co->Sat[pos].ID = id; 1179 1180 1237 G_SSR_URA(co->Sat[pos].UserRangeAccuracy) 1238 #ifdef BNC_DEBUG 1239 fprintf(stderr, "id %2d ura %8.3f \n", 1240 co->Sat[pos].ID, co->Sat[pos].UserRangeAccuracy); 1241 #endif 1181 1242 } 1182 1243 break; … … 1204 1265 G_NO_OF_SATELLITES(nums) 1205 1266 co->Supplied[COBOFS_HR] |= 1; 1267 #ifdef BNC_DEBUG 1268 fprintf(stderr, "epochTime %d ui %d mmi %d sats %d/%d ssrIod %d providerId %d solId %d\n", 1269 co->EpochTime[s], co->UpdateInterval,mmi,co->NumberOfSat[s],nums, 1270 co->SSRIOD, co->SSRProviderID, co->SSRSolutionID); 1271 #endif 1206 1272 for (i = 0; i < nums; ++i) { 1207 1273 switch (s) { … … 1229 1295 co->Sat[pos].ID = id; 1230 1296 G_HR_CLOCK_CORRECTION(co->Sat[pos].hrclock) 1297 #ifdef BNC_DEBUG 1298 fprintf(stderr, "id %2d hrClock %8.3f \n", 1299 co->Sat[pos].ID, co->Sat[pos].hrclock); 1300 #endif 1231 1301 } 1232 1302 break; … … 1253 1323 G_SSR_SOLUTION_ID(b->SSRSolutionID) 1254 1324 G_NO_OF_SATELLITES(nums) 1325 #ifdef BNC_DEBUG 1326 fprintf(stderr, "epochTime %d ui %d mmi %d sats %d/%d ssrIod %d providerId %d solId %d\n", 1327 b->EpochTime[s], b->UpdateInterval,mmi,b->NumberOfSat[s],nums, 1328 b->SSRIOD, b->SSRProviderID, b->SSRSolutionID); 1329 #endif 1255 1330 for (i = 0; i < nums; ++i) { 1256 1331 switch (s) { … … 1277 1352 ++b->NumberOfSat[s]; 1278 1353 b->Sat[pos].ID = id; 1279 1280 1354 G_NO_OF_CODE_BIASES(b->Sat[pos].NumberOfCodeBiases) 1355 #ifdef BNC_DEBUG 1356 fprintf(stderr, "id %2d #%d ", 1357 b->Sat[pos].ID, b->Sat[pos].NumberOfCodeBiases); 1358 #endif 1281 1359 for (j = 0; j < b->Sat[pos].NumberOfCodeBiases; ++j) { 1282 1360 G_SIGNAL_IDENTIFIER(b->Sat[pos].Biases[j].Type) 1283 1361 G_CODE_BIAS(b->Sat[pos].Biases[j].Bias) 1362 #ifdef BNC_DEBUG 1363 fprintf(stderr, "t%d b %8.2f ", 1364 b->Sat[pos].Biases[j].Type, b->Sat[pos].Biases[j].Bias); 1365 #endif 1284 1366 } 1367 #ifdef BNC_DEBUG 1368 fprintf(stderr, "\n"); 1369 #endif 1285 1370 } 1286 1371 break; … … 1288 1373 continue; 1289 1374 } 1290 #ifdef DEBUG1375 #ifdef BNC_DEBUG 1291 1376 for(type = 0; type < (int)size && (unsigned char)buffer[type] != 0xD3; ++type) 1292 1377 numbits += 8;
Note:
See TracChangeset
for help on using the changeset viewer.