- Timestamp:
- Dec 6, 2008, 4:30:37 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/RTCM3/rtcm3torinex.c
r1239 r1278 1 1 /* 2 2 Converter for RTCM3 data to RINEX. 3 $Id: rtcm3torinex.c,v 1.3 4 2008/11/26 10:14:46 stoecker Exp $3 $Id: rtcm3torinex.c,v 1.36 2008/12/03 08:33:16 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.3 4$";53 static char revisionstr[] = "$Revision: 1.36 $"; 54 54 55 55 #ifndef COMPILEDATE … … 459 459 int lastlockl2[64]; 460 460 struct gnssdata *gnss; 461 int i, num , wasamb=0;461 int i, numsats, wasamb=0; 462 462 463 463 for(i = 0; i < 64; ++i) … … 482 482 483 483 GETBITS(syncf,1) /* sync */ 484 GETBITS(i,5) 485 gnss->numsats += i; 484 GETBITS(numsats,5) 486 485 SKIPBITS(4) /* smind, smint */ 487 486 488 for(num = gnss->numsats-i; num < gnss->numsats; ++num)487 while(numsats--) 489 488 { 490 489 int sv, code, l1range, c,l,s,ce,le,se,amb=0; 491 492 GETBITS(sv, 6); 493 gnss->satellites[num] = (sv < 40 ? sv : sv+80); 490 int fullsat, num; 491 492 GETBITS(sv, 6) 493 fullsat = sv < 40 ? sv : sv+80; 494 for(num = 0; num < gnss->numsats 495 && fullsat != gnss->satellites[num]; ++num) 496 ; 497 498 if(num == gnss->numsats) 499 gnss->satellites[gnss->numsats++] = fullsat; 500 494 501 /* L1 */ 495 502 GETBITS(code, 1); … … 606 613 ret = 2; 607 614 } 615 #ifdef NO_RTCM3_MAIN 616 else 617 ret = type; 618 #endif /* NO_RTCM3_MAIN */ 608 619 } 609 620 break; … … 613 624 int lastlockl2[64]; 614 625 struct gnssdata *gnss; 615 int i, num ;626 int i, numsats; 616 627 int wasamb=0; 617 628 … … 638 649 639 650 GETBITS(syncf,1) /* sync */ 640 GETBITS(i,5) 641 gnss->numsats += i; 651 GETBITS(numsats,5) 642 652 643 653 SKIPBITS(4) /* smind, smint */ 644 654 645 for(num = gnss->numsats-i; num < gnss->numsats; ++num)655 while(numsats--) 646 656 { 647 657 int sv, code, l1range, c,l,s,ce,le,se,amb=0; 648 658 int freq; 659 int fullsat, num; 649 660 650 661 GETBITS(sv, 6) 651 gnss->satellites[num] = sv-1 + PRN_GLONASS_START; 662 fullsat = sv-1 + PRN_GLONASS_START; 663 for(num = 0; num < gnss->numsats 664 && fullsat != gnss->satellites[num]; ++num) 665 ; 666 667 if(num == gnss->numsats) 668 gnss->satellites[gnss->numsats++] = fullsat; 669 652 670 /* L1 */ 653 671 GETBITS(code, 1) … … 750 768 gnss->measdata[num][le] /= GLO_WAVELENGTH_L2(freq-7); 751 769 } 752 if(!sv || sv > 24) 753 { 754 --num; --gnss->numsats; 755 } 770 if(!sv || sv > 24) /* illegal, remove it again */ 771 --gnss->numsats; 756 772 } 757 773 for(i = 0; i < 64; ++i) … … 772 788 ret = 2; 773 789 } 790 #ifdef NO_RTCM3_MAIN 791 else 792 ret = type; 793 #endif /* NO_RTCM3_MAIN */ 774 794 } 775 795 break; … … 1665 1685 1666 1686 #ifndef NO_RTCM3_MAIN 1667 static char datestr[] = "$Date: 2008/1 1/26 10:14:46 $";1687 static char datestr[] = "$Date: 2008/12/03 08:33:16 $"; 1668 1688 1669 1689 /* The string, which is send as agent in HTTP request */
Note:
See TracChangeset
for help on using the changeset viewer.