- Timestamp:
- Mar 4, 2008, 9:44:11 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/RTCM/RTCM2.cpp
r464 r706 40 40 // 2006/11/25 OMO Revised check for presence of GLONASS data 41 41 // 2007/05/25 GW Round time tag to 100 ms 42 // 2007/12/11 AHA Changed handling of C/A- and P-Code on L1 43 // 2007/12/13 AHA Changed epoch comparison in packet extraction 44 // 2008/03/01 OMO Compilation flag for epoch rounding 45 // 2008/03/04 AHA Fixed problems with PRN 32 42 46 // 43 47 // (c) DLR/GSOC … … 59 63 60 64 #define DEBUG 0 65 66 // Activate (1) or deactivate (0) rounding of measurement epochs to 100ms 67 // 68 // Note: A need to round the measurement epoch to integer tenths of a second was 69 // noted by BKG in the processing of RTCM2 data from various receivers in NTRIP 70 // real-time networks. It is unclear at present, whether this is due to an 71 // improper implementation of the RTCM2 standard in the respective receivers 72 // or an unclear formulation of the standard. 73 74 #define ROUND_EPOCH 1 75 61 76 62 77 using namespace std; … … 881 896 t = 0.6*P.modZCount() 882 897 + P.getUnsignedBits(4,20)*1.0e-6; 898 899 #if (ROUND_EPOCH==1) 883 900 // SC-104 V2.3 4-42 Note 1 4. Assume measurements at hard edges 884 901 // of receiver clock with minimum divisions of 10ms 885 902 // and clock error less then recommended 1.1ms 886 903 // Hence, round time tag to 100 ms 887 t = floor(t*100.+0.5)/100.; 888 904 t = floor(t*100.0+0.5)/100.0; 905 #endif 906 889 907 // Frequency (exit if neither L1 nor L2) 890 908 isL1 = ( P.getUnsignedBits(0,1)==0 ); … … 906 924 secs = t; // Store epoch 907 925 } 908 else if (t!=secs) { 926 // else if (t!=secs) { 927 else if (abs(t-secs)>1e-6) { 909 928 clear(); secs = t; // Clear all data, then store epoch 910 929 }; … … 931 950 // Satellite 932 951 sid = P.getUnsignedBits(iSat*48+27,5); 952 if(sid==0) sid=32; 953 933 954 prn = (isGPS? sid : sid+200 ); 934 955 … … 975 996 t = 0.6*P.modZCount() 976 997 + P.getUnsignedBits(4,20)*1.0e-6; 998 999 #if (ROUND_EPOCH==1) 977 1000 // SC-104 V2.3 4-42 Note 1 4. Assume measurements at hard edges 978 1001 // of receiver clock with minimum divisions of 10ms 979 1002 // and clock error less then recommended 1.1ms 980 1003 // Hence, round time tag to 100 ms 981 t = floor(t*100.+0.5)/100.; 982 1004 t = floor(t*100.0+0.5)/100.0; 1005 #endif 1006 983 1007 // Frequency (exit if neither L1 nor L2) 984 1008 isL1 = ( P.getUnsignedBits(0,1)==0 ); … … 1000 1024 secs = t; // Store epoch 1001 1025 } 1002 else if (t!=secs) { 1026 // else if (t!=secs) { 1027 else if (abs(t-secs)>1e-6) { 1003 1028 clear(); secs = t; // Clear all data, then store epoch 1004 1029 }; … … 1024 1049 // Satellite 1025 1050 sid = P.getUnsignedBits(iSat*48+27,5); 1051 if(sid==0) sid=32; 1026 1052 prn = (isGPS? sid : sid+200 ); 1027 1053 … … 1048 1074 if (isL1) { 1049 1075 if (isCAcode) { 1050 rng_C1[idx] = rng; 1051 } else { 1052 rng_P1[idx] = rng; 1053 } } 1076 rng_C1[idx] = rng; 1077 } 1078 else { 1079 rng_P1[idx] = rng; 1080 } 1081 } 1054 1082 else { 1055 1083 rng_P2[idx] = rng; 1056 1084 }; 1057 1085 1058 1086 }; 1059 1087
Note:
See TracChangeset
for help on using the changeset viewer.