Changeset 7629 in ntrip for trunk/BNC/src/RTCM/RTCM2_2021.cpp
- Timestamp:
- Dec 10, 2015, 3:35:44 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/RTCM/RTCM2_2021.cpp
r2588 r7629 10 10 const double ZEROVALUE = 1e-100; 11 11 12 RTCM2_2021::RTCM2_2021() { }13 14 12 15 13 void RTCM2_2021::extract(const RTCM2packet& P) { … … 18 16 } 19 17 20 // Error: at least 4 data words 18 // Error: at least 4 data words 21 19 if ( P.nDataWords()<5 ) { 22 20 #if ( DEBUG > 0 ) … … 26 24 return; 27 25 }; 28 26 29 27 // Error: number of data words has to be odd number 30 28 if ( P.nDataWords()%2==0 ){ … … 36 34 }; 37 35 38 // Current epoch (mod 3600 sec) 39 double tt = 0.6*P.modZCount() 36 // Current epoch (mod 3600 sec) 37 double tt = 0.6*P.modZCount() 40 38 + P.getUnsignedBits(4,20)*1.0e-6; 41 39 … … 59 57 double multipleMsgInd = true; 60 58 for (unsigned iSat = 0; iSat < nSat; iSat++) { 61 bool multInd = P.getBits (iSat*48 + 24, 1); 59 bool multInd = P.getBits (iSat*48 + 24, 1); 62 60 bool isGPS = ( P.getUnsignedBits(iSat*48 + 26, 1)==0 ); 63 61 unsigned PRN = P.getUnsignedBits(iSat*48 + 27, 5); … … 71 69 PRN = 32; 72 70 } 73 71 74 72 HiResCorr* corr = 0; 75 73 if ( !(corr = find_i(PRN)) ) { … … 80 78 data[PRN] = corr; 81 79 } 82 80 83 81 corr->PRN = PRN; 84 82 corr->tt = tt_; … … 106 104 // Message number 21 107 105 else if ( P.ID() == 21 ) { 108 bool P_CA_Ind = P.getBits (iSat*48 + 25, 1); 106 bool P_CA_Ind = P.getBits (iSat*48 + 25, 1); 109 107 double dcorrUnit = ( P.getUnsignedBits(iSat*48 + 32, 1) ? 0.032 : 0.002); 110 108 double corrUnit = ( P.getUnsignedBits(iSat*48 + 36, 1) ? 0.320 : 0.020); … … 127 125 } 128 126 } 129 127 130 128 valid_ = !multipleMsgInd; 131 129 } … … 146 144 tt_ = 0; 147 145 valid_ = false; 148 for (map<unsigned, HiResCorr>::iterator 146 for (map<unsigned, HiResCorr>::iterator 149 147 ii = data_i_.begin(); ii != data_i_.end(); ii++) { 150 148 ii->second.reset(); … … 155 153 156 154 RTCM2_2021::HiResCorr::HiResCorr() : 157 PRN(0), tt(0), 155 PRN(0), tt(0), 158 156 phase1 (0), phase2 (2), 159 157 lock1 (0), lock2 (0), … … 163 161 drange1(0), drange2(0), 164 162 Pind1 (false), Pind2 (false), 165 IODr1 (0), IODr2 (0) { 163 IODr1 (0), IODr2 (0) { 166 164 } 167 165
Note:
See TracChangeset
for help on using the changeset viewer.