Changeset 1808 in ntrip for trunk/clock_and_orbit
- Timestamp:
- Apr 24, 2009, 10:36:34 AM (16 years ago)
- Location:
- trunk/clock_and_orbit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/clock_and_orbit/clock_orbit_rtcm.c
r1581 r1808 3 3 Name: clock_orbit_rtcm.c 4 4 Project: RTCM3 5 Version: $Id: clock_orbit_rtcm.c,v 1. 2 2008/11/26 12:05:37 stoecker Exp $5 Version: $Id: clock_orbit_rtcm.c,v 1.9 2009/02/27 08:59:49 weber Exp $ 6 6 Authors: Dirk Stöcker 7 7 Description: state space approach for RTCM3 … … 93 93 94 94 /* defined values */ 95 #define T_DELTA_RADIAL(a) SCALEADDBITS(22, 10000.0, a)96 #define T_DELTA_ALONG_TRACK(a) SCALEADDBITS(2 2, 10000.0, a)97 #define T_DELTA_CROSS_TRACK(a) SCALEADDBITS(2 2, 10000.0, a)98 #define T_DELTA_DOT_RADIAL(a) SCALEADDBITS(21, 1000000.0, a)99 #define T_DELTA_DOT_ALONG_TRACK(a) SCALEADDBITS( 21, 1000000.0, a)100 #define T_DELTA_DOT_CROSS_TRACK(a) SCALEADDBITS( 21, 1000000.0, a)95 #define T_DELTA_RADIAL(a) SCALEADDBITS(22, 10000.0, a) 96 #define T_DELTA_ALONG_TRACK(a) SCALEADDBITS(20, 2500.0, a) 97 #define T_DELTA_CROSS_TRACK(a) SCALEADDBITS(20, 2500.0, a) 98 #define T_DELTA_DOT_RADIAL(a) SCALEADDBITS(21, 1000000.0, a) 99 #define T_DELTA_DOT_ALONG_TRACK(a) SCALEADDBITS(19, 250000.0, a) 100 #define T_DELTA_DOT_CROSS_TRACK(a) SCALEADDBITS(19, 250000.0, a) 101 101 #define T_DELTA_DOT_DOT_RADIAL(a) SCALEADDBITS(27, 50000000.0, a) 102 #define T_DELTA_DOT_DOT_ALONG_TRACK(a) SCALEADDBITS(2 7, 50000000.0, a)103 #define T_DELTA_DOT_DOT_CROSS_TRACK(a) SCALEADDBITS(2 7, 50000000.0, a)102 #define T_DELTA_DOT_DOT_ALONG_TRACK(a) SCALEADDBITS(25, 12500000.0, a) 103 #define T_DELTA_DOT_DOT_CROSS_TRACK(a) SCALEADDBITS(25, 12500000.0, a) 104 104 #define T_SATELLITE_REFERENCE_POINT(a) ADDBITS(1, a) 105 105 106 106 #define T_SATELLITE_REFERENCE_DATUM(a) ADDBITS(1, a) 107 #define T_DELTA_CLOCK_C0(a) SCALEADDBITS(22, 10000.0, a)108 #define T_DELTA_CLOCK_C1(a) SCALEADDBITS(21, 1000000.0, a)107 #define T_DELTA_CLOCK_C0(a) SCALEADDBITS(22, 10000.0, a) 108 #define T_DELTA_CLOCK_C1(a) SCALEADDBITS(21, 1000000.0, a) 109 109 #define T_DELTA_CLOCK_C2(a) SCALEADDBITS(27, 50000000.0, a) 110 110 #define T_NO_OF_CODE_BIASES(a) ADDBITS(5, a) … … 112 112 #define T_GLONASS_SIGNAL_IDENTIFIER(a) ADDBITS(5, a) 113 113 #define T_GALILEO_SIGNAL_IDENTIFIER(a) ADDBITS(5, a) 114 #define T_CODE_BIAS(a) SCALEADDBITS(14, 100.0, a)114 #define T_CODE_BIAS(a) SCALEADDBITS(14, 100.0, a) 115 115 #define T_GLONASS_SATELLITE_ID(a) ADDBITS(5, a) 116 116 … … 120 120 #define T_MULTIPLE_MESSAGE_INDICATOR(a) ADDBITS(1, a) 121 121 #define T_SSR_URA(a) ADDBITS(4, a) 122 #define T_HR_CLOCK_CORRECTION(a) SCALEADDBITS(22, 10000.0, a)122 #define T_HR_CLOCK_CORRECTION(a) SCALEADDBITS(22, 10000.0, a) 123 123 #define T_SSR_UPDATE_INTERVAL(a) ADDBITS(4, a) 124 124 … … 475 475 while((a) > numbits) \ 476 476 { \ 477 if(!size--) return GCOBR_SHORT BUFFER; \477 if(!size--) return GCOBR_SHORTMESSAGE; \ 478 478 bitbuffer = (bitbuffer<<8)|((unsigned char)*(buffer++)); \ 479 479 numbits += 8; \ … … 514 514 /* defined values */ 515 515 #define G_DELTA_RADIAL(a) GETFLOATSIGN(a, 22, 1/10000.0) 516 #define G_DELTA_ALONG_TRACK(a) GETFLOATSIGN(a, 2 2, 1/10000.0)517 #define G_DELTA_CROSS_TRACK(a) GETFLOATSIGN(a, 2 2, 1/10000.0)516 #define G_DELTA_ALONG_TRACK(a) GETFLOATSIGN(a, 20, 1/2500.0) 517 #define G_DELTA_CROSS_TRACK(a) GETFLOATSIGN(a, 20, 1/2500.0) 518 518 #define G_DELTA_DOT_RADIAL(a) GETFLOATSIGN(a, 21, 1/1000000.0) 519 #define G_DELTA_DOT_ALONG_TRACK(a) GETFLOATSIGN(a, 21, 1/1000000.0)520 #define G_DELTA_DOT_CROSS_TRACK(a) GETFLOATSIGN(a, 21, 1/1000000.0)519 #define G_DELTA_DOT_ALONG_TRACK(a) GETFLOATSIGN(a, 19, 1/250000.0) 520 #define G_DELTA_DOT_CROSS_TRACK(a) GETFLOATSIGN(a, 19, 1/250000.0) 521 521 #define G_DELTA_DOT_DOT_RADIAL(a) GETFLOATSIGN(a, 27, 1/50000000.0) 522 #define G_DELTA_DOT_DOT_ALONG_TRACK(a) GETFLOATSIGN(a, 2 7, 1/50000000.0)523 #define G_DELTA_DOT_DOT_CROSS_TRACK(a) GETFLOATSIGN(a, 2 7, 1/50000000.0)522 #define G_DELTA_DOT_DOT_ALONG_TRACK(a) GETFLOATSIGN(a, 25, 1/12500000.0) 523 #define G_DELTA_DOT_DOT_CROSS_TRACK(a) GETFLOATSIGN(a, 25, 1/12500000.0) 524 524 #define G_SATELLITE_REFERENCE_POINT(a) GETBITS(a, 1) 525 525 … … 595 595 (((unsigned char)buffer[sizeofrtcmblock+2])))) 596 596 return GCOBR_CRCMISMATCH; 597 size = sizeofrtcmblock; /* reduce size, so overflows are detected */ 597 598 598 599 G_MESSAGE_NUMBER(type) 600 #ifdef DEBUG 601 fprintf(stderr, "type %d size %d\n",type,sizeofrtcmblock); 602 #endif 599 603 switch(type) 600 604 { … … 611 615 return GCOBR_DATAMISMATCH; 612 616 co->OrbitDataSupplied = 1; 617 #ifdef DEBUG 618 fprintf(stderr, "epochtime %d ui %d mmi %d sats %d\n",co->GPSEpochTime,co->UpdateInterval,mmi,co->NumberOfGPSSat); 619 #endif 613 620 for(i = 0; i < co->NumberOfGPSSat; ++i) 614 621 { … … 626 633 G_SATELLITE_REFERENCE_POINT(co->SatRefPoint) 627 634 G_SATELLITE_REFERENCE_DATUM(co->SatRefDatum) 635 #ifdef DEBUG 636 fprintf(stderr, "id %2d iod %3d dr %8.3f da %8.3f dc %8.3f dr %8.3f da %8.3f dc %8.3f dr %8.3f da %8.3f dc %8.3f rp %d rd %d\n", 637 co->Sat[i].ID,co->Sat[i].IOD,co->Sat[i].Orbit.DeltaRadial, 638 co->Sat[i].Orbit.DeltaAlongTrack,co->Sat[i].Orbit.DeltaCrossTrack, 639 co->Sat[i].Orbit.DotDeltaRadial, 640 co->Sat[i].Orbit.DotDeltaAlongTrack, 641 co->Sat[i].Orbit.DotDeltaCrossTrack, 642 co->Sat[i].Orbit.DotDotDeltaRadial, 643 co->Sat[i].Orbit.DotDotDeltaAlongTrack, 644 co->Sat[i].Orbit.DotDotDeltaCrossTrack, 645 co->SatRefPoint, 646 co->SatRefDatum); 647 #endif 628 648 } 629 649 break; … … 1062 1082 return GCOBR_UNKNOWNTYPE; 1063 1083 } 1084 #ifdef DEBUG 1085 for(type = 0; type < size && (unsigned char)buffer[type] != 0xD3; ++type) 1086 numbits += 8; 1087 fprintf(stderr, "numbits left %d\n",numbits); 1088 #endif 1064 1089 if(bytesused) 1065 1090 *bytesused = sizeofrtcmblock+6; -
trunk/clock_and_orbit/clock_orbit_rtcm.h
r1581 r1808 6 6 Name: clock_orbit_rtcm.h 7 7 Project: RTCM3 8 Version: $Id: clock_orbit_rtcm.h,v 1. 2 2008/11/26 12:05:37 stoecker Exp $8 Version: $Id: clock_orbit_rtcm.h,v 1.8 2009/03/06 15:59:53 weber Exp $ 9 9 Authors: Dirk Stöcker 10 10 Description: state space approach for RTCM3 … … 16 16 enum SatelliteReferencePoint { POINT_IONOFREE=0, POINT_CENTER=1 }; 17 17 enum ClockOrbitType { 18 COTYPE_GPSORBIT= 4060, COTYPE_GPSCLOCK=4061,19 COTYPE_GPSCOMBINED= 4063, COTYPE_GPSURA=4064, COTYPE_GPSHR=4065,18 COTYPE_GPSORBIT=3001, COTYPE_GPSCLOCK=3002, 19 COTYPE_GPSCOMBINED=3004, COTYPE_GPSURA=3005, COTYPE_GPSHR=3006, 20 20 21 COTYPE_GLONASSORBIT= 4066, COTYPE_GLONASSCLOCK=4067,22 COTYPE_GLONASSCOMBINED= 4069, COTYPE_GLONASSURA=4070, COTYPE_GLONASSHR=4071,21 COTYPE_GLONASSORBIT=3007, COTYPE_GLONASSCLOCK=3008, 22 COTYPE_GLONASSCOMBINED=3010, COTYPE_GLONASSURA=3011, COTYPE_GLONASSHR=3012, 23 23 24 24 COTYPE_AUTO=0 }; 25 enum BiasType { BTYPE_GPS= 4062, BTYPE_GLONASS=4068, BTYPE_AUTO = 0 };25 enum BiasType { BTYPE_GPS=3003, BTYPE_GLONASS=3009, BTYPE_AUTO = 0 }; 26 26 27 27 enum COR_CONSTANTS { … … 131 131 GCOBR_SHORTBUFFER = -30, 132 132 GCOBR_MISSINGBITS = -31, 133 GCOBR_MESSAGEEXCEEDSBUFFER = -32 133 GCOBR_MESSAGEEXCEEDSBUFFER = -32, 134 GCOBR_SHORTMESSAGE = -33 134 135 }; 135 136
Note:
See TracChangeset
for help on using the changeset viewer.