Changeset 33 in ntrip
- Timestamp:
- May 8, 2006, 11:25:11 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/rtcm3torinex/rtcm3torinex.c
r30 r33 1 1 /* 2 2 Converter for RTCM3 data to RINEX. 3 $Id: rtcm3torinex.c,v 1. 2 2006/01/13 08:25:10stoecker Exp $3 $Id: rtcm3torinex.c,v 1.3 2006/04/20 08:37:23 stoecker Exp $ 4 4 Copyright (C) 2005-2006 by Dirk Stoecker <stoecker@euronav.de> 5 5 … … 42 42 43 43 /* CVS revision and version */ 44 static char revisionstr[] = "$Revision: 1. 2$";45 static char datestr[] = "$Date: 2006/0 1/13 08:25:10$";44 static char revisionstr[] = "$Revision: 1.3 $"; 45 static char datestr[] = "$Date: 2006/04/20 08:37:23 $"; 46 46 static int stop = 0; 47 47 … … 395 395 switch(type) 396 396 { 397 case 100 4:397 case 1001: case 1002: case 1003: case 1004: 398 398 if(handle->GPSWeek) 399 399 { … … 424 424 for(num = 0; num < gnss->numsats; ++num) 425 425 { 426 int sv, code, l1range, c,l,s,ce,le,se,amb ;426 int sv, code, l1range, c,l,s,ce,le,se,amb=0; 427 427 428 428 GETBITS(sv, 6); … … 458 458 if(handle->lastlockl1[sv] > i) 459 459 gnss->dataflags[num] |= GNSSDF_LOCKLOSSL1; 460 GETBITS(amb,8); 461 if(amb && (gnss->dataflags[num] & c)) 460 if(type == 1002 || type == 1004) 462 461 { 463 gnss->measdata[num][ce] += amb*299792.458; 464 gnss->measdata[num][le] += amb*299792.458; 465 ++wasamb; 462 GETBITS(amb,8); 463 if(amb && (gnss->dataflags[num] & c)) 464 { 465 gnss->measdata[num][ce] += amb*299792.458; 466 gnss->measdata[num][le] += amb*299792.458; 467 ++wasamb; 468 } 469 GETBITS(i, 8); 470 if(i) 471 { 472 gnss->dataflags[num] |= s; 473 gnss->measdata[num][se] = i*0.25; 474 i /= 4*4; 475 if(i > 9) i = 9; 476 else if(i < 1) i = 1; 477 gnss->snrL1[num] = i; 478 } 466 479 } 467 GETBITS(i, 8); 468 if(i) 480 if(type == 1003 || type == 1004) 469 481 { 470 gnss->dataflags[num] |= s; 471 gnss->measdata[num][se] = i*0.25; 472 i /= 4*4; 473 if(i > 9) i = 9; 474 else if(i < 1) i = 1; 475 gnss->snrL1[num] = i; 476 } 477 /* L2 */ 478 GETBITS(code,2); 479 if(code) 480 { 481 c = GNSSDF_P2DATA; ce = GNSSENTRY_P2DATA; 482 l = GNSSDF_L2PDATA; le = GNSSENTRY_L2PDATA; 483 s = GNSSDF_S2PDATA; se = GNSSENTRY_S2PDATA; 484 } 485 else 486 { 487 c = GNSSDF_C2DATA; ce = GNSSENTRY_C2DATA; 488 l = GNSSDF_L2CDATA; le = GNSSENTRY_L2CDATA; 489 s = GNSSDF_S2CDATA; se = GNSSENTRY_S2CDATA; 490 } 491 GETBITSSIGN(i,14); 492 if(i != 0x2000) 493 { 494 gnss->dataflags[num] |= c; 495 gnss->measdata[num][ce] = l1range*0.02+i*0.02 496 +amb*299792.458; 497 } 498 GETBITSSIGN(i,20); 499 if(i != 0x80000) 500 { 501 gnss->dataflags[num] |= l; 502 gnss->measdata[num][le] = l1range*0.02+i*0.0005 503 +amb*299792.458; 504 } 505 GETBITS(i,7); 506 lastlockl2[sv] = i; 507 if(handle->lastlockl2[sv] > i) 508 gnss->dataflags[num] |= GNSSDF_LOCKLOSSL2; 509 GETBITS(i, 8); 510 if(i) 511 { 512 gnss->dataflags[num] |= s; 513 gnss->measdata[num][se] = i*0.25; 514 i /= 4*4; 515 if(i > 9) i = 9; 516 else if(i < 1) i = 1; 517 gnss->snrL2[num] = i; 482 /* L2 */ 483 GETBITS(code,2); 484 if(code) 485 { 486 c = GNSSDF_P2DATA; ce = GNSSENTRY_P2DATA; 487 l = GNSSDF_L2PDATA; le = GNSSENTRY_L2PDATA; 488 s = GNSSDF_S2PDATA; se = GNSSENTRY_S2PDATA; 489 } 490 else 491 { 492 c = GNSSDF_C2DATA; ce = GNSSENTRY_C2DATA; 493 l = GNSSDF_L2CDATA; le = GNSSENTRY_L2CDATA; 494 s = GNSSDF_S2CDATA; se = GNSSENTRY_S2CDATA; 495 } 496 GETBITSSIGN(i,14); 497 if(i != 0x2000) 498 { 499 gnss->dataflags[num] |= c; 500 gnss->measdata[num][ce] = l1range*0.02+i*0.02 501 +amb*299792.458; 502 } 503 GETBITSSIGN(i,20); 504 if(i != 0x80000) 505 { 506 gnss->dataflags[num] |= l; 507 gnss->measdata[num][le] = l1range*0.02+i*0.0005 508 +amb*299792.458; 509 } 510 GETBITS(i,7); 511 lastlockl2[sv] = i; 512 if(handle->lastlockl2[sv] > i) 513 gnss->dataflags[num] |= GNSSDF_LOCKLOSSL2; 514 if(type == 1004) 515 { 516 GETBITS(i, 8); 517 if(i) 518 { 519 gnss->dataflags[num] |= s; 520 gnss->measdata[num][se] = i*0.25; 521 i /= 4*4; 522 if(i > 9) i = 9; 523 else if(i < 1) i = 1; 524 gnss->snrL2[num] = i; 525 } 526 } 518 527 } 519 528 }
Note:
See TracChangeset
for help on using the changeset viewer.