Changeset 1239 in ntrip
- Timestamp:
- Nov 26, 2008, 1:18:08 PM (16 years ago)
- Location:
- trunk/BNC
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/RTCM/GPSDecoder.h
r1218 r1239 31 31 #include <QPointer> 32 32 #include <QList> 33 #include <QStringList> 33 34 34 35 #include "bncconst.h" … … 138 139 QList<int> _typeList; // RTCMv3 message types 139 140 QList<int> _epochList; // Broadcast corrections 140 Q List<char*>_antType; // RTCMv3 antenna descriptor141 QStringList _antType; // RTCMv3 antenna descriptor 141 142 QList<double> _antList5; // RTCMv3 antenna XYZ 142 143 QList<double> _antList6; // RTCMv3 antenna XYZ & H -
trunk/BNC/RTCM3/RTCM3Decoder.cpp
r1218 r1239 220 220 if (_Parser.MessageSize >= _Parser.NeedBytes) { 221 221 222 // RTCMv3 message types223 // --------------------224 for (int kk = 0; kk < _Parser.typeSize; kk++) {225 _typeList.push_back(_Parser.typeList[kk]);226 }227 _Parser.typeSize = 0;228 229 // RTCMv3 antenna descriptor230 // -------------------------231 for (int kk = 0; kk < _Parser.antSize; kk++) {232 _antType.push_back(_Parser.antType[kk]);233 }234 _Parser.antSize = 0;235 236 // RTCMv3 antenna XYZ237 // ------------------238 for (int kk = 0; kk < _Parser.antSize5; kk += 3) {239 _antList5.push_back(_Parser.antList5[kk + 0]);240 _antList5.push_back(_Parser.antList5[kk + 1]);241 _antList5.push_back(_Parser.antList5[kk + 2]);242 }243 _Parser.antSize5 = 0;244 245 // RTCMv3 antenna XYZ-H246 // --------------------247 for (int kk = 0; kk < _Parser.antSize6; kk += 4) {248 _antList6.push_back(_Parser.antList6[kk + 0]);249 _antList6.push_back(_Parser.antList6[kk + 1]);250 _antList6.push_back(_Parser.antList6[kk + 2]);251 _antList6.push_back(_Parser.antList6[kk + 3]);252 }253 _Parser.antSize6 = 0;254 255 222 while(int rr = RTCM3Parser(&_Parser)) { 223 224 // RTCMv3 message types 225 // -------------------- 226 _typeList.push_back(_Parser.blocktype); 227 228 // RTCMv3 antenna descriptor 229 // ------------------------- 230 if(rr == 1007 || rr == 1008 || rr == 1033) 231 { 232 _antType.push_back(_Parser.antenna); /* correct ? */ 233 } 234 235 // RTCMv3 antenna XYZ 236 // ------------------ 237 else if(rr == 1005) 238 { 239 _antList5.push_back(_Parser.antX); 240 _antList5.push_back(_Parser.antY); 241 _antList5.push_back(_Parser.antZ); 242 } 243 244 // RTCMv3 antenna XYZ-H 245 // -------------------- 246 else if(rr == 1006) 247 { 248 _antList6.push_back(_Parser.antX); 249 _antList6.push_back(_Parser.antY); 250 _antList6.push_back(_Parser.antZ); 251 _antList6.push_back(_Parser.antH); 252 } 256 253 257 254 // GNSS Observations 258 255 // ----------------- 259 if (rr == 1 || rr == 2) {256 else if (rr == 1 || rr == 2) { 260 257 decoded = true; 261 258 -
trunk/BNC/RTCM3/ephemeris.cpp
r1098 r1239 2 2 #include <sstream> 3 3 #include <iomanip> 4 #include <cstring> 4 5 5 6 #include "ephemeris.h" -
trunk/BNC/RTCM3/rtcm3torinex.c
r1210 r1239 1 1 /* 2 2 Converter for RTCM3 data to RINEX. 3 $Id: rtcm3torinex.c,v 1. 18 2008/11/10 18:01:41 weber Exp $3 $Id: rtcm3torinex.c,v 1.34 2008/11/26 10:14:46 stoecker Exp $ 4 4 Copyright (C) 2005-2008 by Dirk Stöcker <stoecker@alberding.eu> 5 5 … … 51 51 52 52 /* CVS revision and version */ 53 static char revisionstr[] = "$Revision: 1. 18$";53 static char revisionstr[] = "$Revision: 1.34 $"; 54 54 55 55 #ifndef COMPILEDATE … … 176 176 177 177 #define SKIPBITS(b) { LOADBITS(b) numbits -= (b); } 178 179 /* extract byte-aligned byte from data stream, 180 b = variable to store size, s = variable to store string pointer */ 181 #define GETSTRING(b, s) \ 182 { \ 183 b = *(data++); \ 184 s = (char *) data; \ 185 data += b; \ 186 size -= b+1; \ 187 } 178 188 179 189 struct leapseconds { /* specify the day of leap second */ … … 273 283 int ret=0; 274 284 285 #ifdef NO_RTCM3_MAIN 286 if(GetMessage(handle)) /* don't repeat */ 287 #else 275 288 while(!ret && GetMessage(handle)) 289 #endif /* NO_RTCM3_MAIN */ 276 290 { 277 291 /* using 64 bit integer types, as it is much easier than handling … … 284 298 GETBITS(type,12) 285 299 #ifdef NO_RTCM3_MAIN 286 handle->typeList[handle->typeSize] = type; /* RTCM message types */ 287 if(handle->typeSize < 100) {handle->typeSize += 1;} /* RTCM message types */ 300 handle->blocktype = type; 288 301 #endif /* NO_RTCM3_MAIN */ 289 302 switch(type) 290 303 { 291 304 #ifdef NO_RTCM3_MAIN 292 case 1005: 293 { 294 double antX, antY, antZ; /* Antenna XYZ */ 305 default: 306 ret = type; 307 break; 308 case 1005: case 1006: 309 { 295 310 SKIPBITS(22) 296 GETBITSSIGN( antX, 38)311 GETBITSSIGN(handle->antX, 38) 297 312 SKIPBITS(2) 298 GETBITSSIGN( antY, 38)313 GETBITSSIGN(handle->antY, 38) 299 314 SKIPBITS(2) 300 GETBITSSIGN(antZ, 38) 301 handle->antList5[handle->antSize5 + 0] = antX; 302 handle->antList5[handle->antSize5 + 1] = antY; 303 handle->antList5[handle->antSize5 + 2] = antZ; 304 if(handle->antSize5 < 100 - 5 ) {handle->antSize5 += 3;} 305 ret = 1005; 315 GETBITSSIGN(handle->antZ, 38) 316 if(type == 1006) 317 GETBITS(handle->antH, 16) 318 ret = type; 306 319 } 307 320 break; 308 case 1006: 309 { 310 double antX, antY, antZ, antH; /* Antenna XYZ-H */ 311 SKIPBITS(22) 312 GETBITSSIGN(antX, 38) 313 SKIPBITS(2) 314 GETBITSSIGN(antY, 38) 315 SKIPBITS(2) 316 GETBITSSIGN(antZ, 38) 317 GETBITS( antH, 16) 318 handle->antList6[handle->antSize6 + 0] = antX; 319 handle->antList6[handle->antSize6 + 1] = antY; 320 handle->antList6[handle->antSize6 + 2] = antZ; 321 handle->antList6[handle->antSize6 + 3] = antH; 322 if(handle->antSize6 < 100 - 6 ) {handle->antSize6 += 4;} 323 ret = 1006; 324 } 325 break; 326 case 1007: 327 { 328 char *antC = '\0'; /* Antenna Descriptor */ 329 char *antS = '\0'; 330 antC = (char*) malloc(32); 331 antS = (char*) malloc(32); 332 uint32_t antN; 333 uint32_t antD; 334 uint32_t jj; 321 case 1007: case 1008: case 1033: 322 { 323 char *antenna; 324 int antnum; 335 325 336 326 SKIPBITS(12) 337 GETBITS(antN, 8) 338 if ((antN>0) && (antN<32)) { 339 for (jj = 0; jj < antN; jj++) { 340 GETBITS(antD, 8) 341 sprintf(antS,"%c",antD); 342 if (jj<1) { 343 strcpy(antC,antS); 344 } else { 345 strcat(antC,antS); 346 } 347 } 348 handle->antType[handle->antSize] = antC; 349 if(handle->antSize < 100) {handle->antSize += 1;} 350 } 351 free(antC); 352 free(antS); 353 ret = 1007; 354 } 355 break; 356 case 1008: 357 { 358 char *antC = '\0'; /* Antenna Descriptor */ 359 char *antS = '\0'; 360 antC = (char*) malloc(32); 361 antS = (char*) malloc(32); 362 uint32_t antN; 363 uint32_t antD; 364 uint32_t jj; 365 366 SKIPBITS(12) 367 GETBITS(antN, 8) 368 if ((antN>0) && (antN<32)) { 369 for (jj = 0; jj < antN; jj++) { 370 GETBITS(antD, 8) 371 sprintf(antS,"%c",antD); 372 if (jj<1) { 373 strcpy(antC,antS); 374 } else { 375 strcat(antC,antS); 376 } 377 } 378 handle->antType[handle->antSize] = antC; 379 if(handle->antSize < 100) {handle->antSize += 1;} 380 } 381 free(antC); 382 free(antS); 383 ret = 1008; 327 GETSTRING(antnum,antenna) 328 memcpy(handle->antenna, antenna, antnum); 329 handle->antenna[antnum] = 0; 330 ret = type; 384 331 } 385 332 break; … … 1718 1665 1719 1666 #ifndef NO_RTCM3_MAIN 1720 static char datestr[] = "$Date: 2008/11/ 10 18:01:41$";1667 static char datestr[] = "$Date: 2008/11/26 10:14:46 $"; 1721 1668 1722 1669 /* The string, which is send as agent in HTTP request */ -
trunk/BNC/RTCM3/rtcm3torinex.h
r1185 r1239 4 4 /* 5 5 Converter for RTCM3 data to RINEX. 6 $Id: rtcm3torinex.h,v 1.1 3 2008/09/22 09:39:58 weber Exp $6 $Id: rtcm3torinex.h,v 1.10 2008/11/26 10:14:46 stoecker Exp $ 7 7 Copyright (C) 2005-2006 by Dirk Stöcker <stoecker@alberding.eu> 8 8 … … 195 195 int lastlockl2[64]; 196 196 #ifdef NO_RTCM3_MAIN 197 int typeSize; /* Message types */ 198 int typeList[101]; /* Message types */ 199 int antSize; /* Antenna descriptor */ 200 char *antType[101]; /* Antenna descriptor */ 201 int antSize5; /* Antenna XYZ */ 202 double antList5[101]; /* Antenna XYZ */ 203 int antSize6; /* Antenna XYZ-H */ 204 double antList6[101]; /* Antenna XYZ-H */ 197 double antX; 198 double antY; 199 double antZ; 200 double antH; 201 char antenna[256+1]; 202 int blocktype; 205 203 #endif /* NO_RTCM3_MAIN */ 206 204 int datapos[RINEXENTRY_NUMBER]; -
trunk/BNC/bncgetthread.cpp
r1235 r1239 819 819 } 820 820 } 821 _decoder->_typeList.clear();822 821 823 822 // RTCMv3 antenna descriptor … … 830 829 } 831 830 } 832 _decoder->_antType.clear();833 831 834 832 // RTCMv3 antenna XYZ … … 845 843 } 846 844 } 847 _decoder->_antList5.clear();848 845 849 846 // RTCMv3 antenna XYZ-H … … 862 859 } 863 860 } 864 _decoder->_antList6.clear(); 865 } 861 } 862 _decoder->_typeList.clear(); 863 _decoder->_antType.clear(); 864 _decoder->_antList5.clear(); 865 _decoder->_antList6.clear(); 866 866 } 867 867
Note:
See TracChangeset
for help on using the changeset viewer.