Changeset 1841 in ntrip for trunk/BNS/RTCM
- Timestamp:
- May 13, 2009, 12:24:37 AM (16 years ago)
- Location:
- trunk/BNS/RTCM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNS/RTCM/clock_orbit_rtcm.c
r1831 r1841 3 3 Name: clock_orbit_rtcm.c 4 4 Project: RTCM3 5 Version: $Id: clock_orbit_rtcm.c,v 1. 13 2009/05/06 14:02:39stoecker Exp $5 Version: $Id: clock_orbit_rtcm.c,v 1.7 2009/05/12 13:19:03 stoecker Exp $ 6 6 Authors: Dirk Stöcker 7 7 Description: state space approach for RTCM3 … … 147 147 if(co->NumberOfGPSSat && co->ClockDataSupplied && co->OrbitDataSupplied 148 148 && (type == COTYPE_AUTO || type == COTYPE_GPSCOMBINED) 149 && co->NumberOfGPSSat < 28)149 /*&& co->NumberOfGPSSat <= 28*/) 150 150 { 151 151 gpsco = 1; gpsor = 0; gpscl = 0; … … 178 178 T_GPS_EPOCH_TIME(co->GPSEpochTime) 179 179 T_SSR_UPDATE_INTERVAL(co->UpdateInterval) 180 T_MULTIPLE_MESSAGE_INDICATOR( mmi ? 1 :0)180 T_MULTIPLE_MESSAGE_INDICATOR(/*mmi ? 1 :*/0) 181 181 --mmi; 182 182 T_RESERVED5 … … 206 206 T_GPS_EPOCH_TIME(co->GPSEpochTime) 207 207 T_SSR_UPDATE_INTERVAL(co->UpdateInterval) 208 T_MULTIPLE_MESSAGE_INDICATOR( mmi ? 1 :0)208 T_MULTIPLE_MESSAGE_INDICATOR(/*mmi ? 1 :*/0) 209 209 --mmi; 210 210 T_RESERVED5 … … 221 221 if(gpsco) 222 222 { 223 INITBLOCK 224 T_MESSAGE_NUMBER(COTYPE_GPSCOMBINED) 225 T_GPS_EPOCH_TIME(co->GPSEpochTime) 226 T_SSR_UPDATE_INTERVAL(co->UpdateInterval) 227 T_MULTIPLE_MESSAGE_INDICATOR(mmi ? 1 :0) 228 --mmi; 229 T_RESERVED5 230 T_NO_OF_SATELLITES(co->NumberOfGPSSat) 231 for(i = 0; i < co->NumberOfGPSSat; ++i) 232 { 233 T_GPS_SATELLITE_ID(co->Sat[i].ID) 234 T_GPS_IODE(co->Sat[i].IOD) 235 T_DELTA_RADIAL(co->Sat[i].Orbit.DeltaRadial) 236 T_DELTA_ALONG_TRACK(co->Sat[i].Orbit.DeltaAlongTrack) 237 T_DELTA_CROSS_TRACK(co->Sat[i].Orbit.DeltaCrossTrack) 238 T_DELTA_DOT_RADIAL(co->Sat[i].Orbit.DotDeltaRadial) 239 T_DELTA_DOT_ALONG_TRACK(co->Sat[i].Orbit.DotDeltaAlongTrack) 240 T_DELTA_DOT_CROSS_TRACK(co->Sat[i].Orbit.DotDeltaCrossTrack) 241 T_DELTA_DOT_DOT_RADIAL(co->Sat[i].Orbit.DotDotDeltaRadial) 242 T_DELTA_DOT_DOT_ALONG_TRACK(co->Sat[i].Orbit.DotDotDeltaAlongTrack) 243 T_DELTA_DOT_DOT_CROSS_TRACK(co->Sat[i].Orbit.DotDotDeltaCrossTrack) 244 T_SATELLITE_REFERENCE_POINT(co->SatRefPoint) 245 T_SATELLITE_REFERENCE_DATUM(co->SatRefDatum) 246 T_DELTA_CLOCK_C0(co->Sat[i].Clock.DeltaA0) 247 T_DELTA_CLOCK_C1(co->Sat[i].Clock.DeltaA1) 248 T_DELTA_CLOCK_C2(co->Sat[i].Clock.DeltaA2) 249 } 250 ENDBLOCK 223 int nums, left, start = 0; 224 nums = co->NumberOfGPSSat; 225 if(nums > 28) /* split block when more than 28 sats */ 226 { 227 left = nums - 28; 228 nums = 28; 229 } 230 while(nums) 231 { 232 INITBLOCK 233 T_MESSAGE_NUMBER(COTYPE_GPSCOMBINED) 234 T_GPS_EPOCH_TIME(co->GPSEpochTime) 235 T_SSR_UPDATE_INTERVAL(co->UpdateInterval) 236 T_MULTIPLE_MESSAGE_INDICATOR(/*mmi || */ left ? 1 : 0) 237 --mmi; 238 T_RESERVED5 239 T_NO_OF_SATELLITES(nums) 240 for(i = start; i < start+nums; ++i) 241 { 242 T_GPS_SATELLITE_ID(co->Sat[i].ID) 243 T_GPS_IODE(co->Sat[i].IOD) 244 T_DELTA_RADIAL(co->Sat[i].Orbit.DeltaRadial) 245 T_DELTA_ALONG_TRACK(co->Sat[i].Orbit.DeltaAlongTrack) 246 T_DELTA_CROSS_TRACK(co->Sat[i].Orbit.DeltaCrossTrack) 247 T_DELTA_DOT_RADIAL(co->Sat[i].Orbit.DotDeltaRadial) 248 T_DELTA_DOT_ALONG_TRACK(co->Sat[i].Orbit.DotDeltaAlongTrack) 249 T_DELTA_DOT_CROSS_TRACK(co->Sat[i].Orbit.DotDeltaCrossTrack) 250 T_DELTA_DOT_DOT_RADIAL(co->Sat[i].Orbit.DotDotDeltaRadial) 251 T_DELTA_DOT_DOT_ALONG_TRACK(co->Sat[i].Orbit.DotDotDeltaAlongTrack) 252 T_DELTA_DOT_DOT_CROSS_TRACK(co->Sat[i].Orbit.DotDotDeltaCrossTrack) 253 T_SATELLITE_REFERENCE_POINT(co->SatRefPoint) 254 T_SATELLITE_REFERENCE_DATUM(co->SatRefDatum) 255 T_DELTA_CLOCK_C0(co->Sat[i].Clock.DeltaA0) 256 T_DELTA_CLOCK_C1(co->Sat[i].Clock.DeltaA1) 257 T_DELTA_CLOCK_C2(co->Sat[i].Clock.DeltaA2) 258 } 259 ENDBLOCK 260 start += nums; 261 nums = left; 262 left = 0; 263 } 251 264 } 252 265 if(gpshr) … … 256 269 T_GPS_EPOCH_TIME(co->GPSEpochTime) 257 270 T_SSR_UPDATE_INTERVAL(co->UpdateInterval) 258 T_MULTIPLE_MESSAGE_INDICATOR( mmi ? 1 :0)271 T_MULTIPLE_MESSAGE_INDICATOR(/*mmi ? 1 :*/0) 259 272 --mmi; 260 273 T_RESERVED5 … … 272 285 T_MESSAGE_NUMBER(COTYPE_GPSURA) 273 286 T_GPS_EPOCH_TIME(co->GPSEpochTime) 274 T_MULTIPLE_MESSAGE_INDICATOR( mmi ? 1 :0)287 T_MULTIPLE_MESSAGE_INDICATOR(/*mmi ? 1 :*/0) 275 288 --mmi; 276 289 T_RESERVED5 … … 289 302 T_GLONASS_EPOCH_TIME(co->GLONASSEpochTime) 290 303 T_SSR_UPDATE_INTERVAL(co->UpdateInterval) 291 T_MULTIPLE_MESSAGE_INDICATOR( mmi ? 1 :0)304 T_MULTIPLE_MESSAGE_INDICATOR(/*mmi ? 1 :*/0) 292 305 --mmi; 293 306 T_RESERVED5 … … 318 331 T_GLONASS_EPOCH_TIME(co->GLONASSEpochTime) 319 332 T_SSR_UPDATE_INTERVAL(co->UpdateInterval) 320 T_MULTIPLE_MESSAGE_INDICATOR( mmi ? 1 :0)333 T_MULTIPLE_MESSAGE_INDICATOR(/*mmi ? 1 :*/0) 321 334 --mmi; 322 335 T_RESERVED5 … … 339 352 T_GLONASS_EPOCH_TIME(co->GLONASSEpochTime) 340 353 T_SSR_UPDATE_INTERVAL(co->UpdateInterval) 341 T_MULTIPLE_MESSAGE_INDICATOR( mmi ? 1 :0)354 T_MULTIPLE_MESSAGE_INDICATOR(/*mmi ? 1 :*/0) 342 355 --mmi; 343 356 T_RESERVED5 … … 371 384 T_GLONASS_EPOCH_TIME(co->GLONASSEpochTime) 372 385 T_SSR_UPDATE_INTERVAL(co->UpdateInterval) 373 T_MULTIPLE_MESSAGE_INDICATOR( mmi ? 1 :0)386 T_MULTIPLE_MESSAGE_INDICATOR(/*mmi ? 1 :*/0) 374 387 --mmi; 375 388 T_RESERVED5 … … 388 401 T_MESSAGE_NUMBER(COTYPE_GLONASSURA) 389 402 T_GLONASS_EPOCH_TIME(co->GLONASSEpochTime) 390 T_MULTIPLE_MESSAGE_INDICATOR( mmi ? 1 :0)403 T_MULTIPLE_MESSAGE_INDICATOR(/*mmi ? 1 :*/0) 391 404 --mmi; 392 405 T_RESERVED5 … … 425 438 T_GPS_EPOCH_TIME(b->GPSEpochTime) 426 439 T_SSR_UPDATE_INTERVAL(b->UpdateInterval) 427 T_MULTIPLE_MESSAGE_INDICATOR( mmi ? 1 :0)440 T_MULTIPLE_MESSAGE_INDICATOR(/*mmi ? 1 :*/0) 428 441 --mmi; 429 442 T_RESERVED5 … … 447 460 T_GPS_EPOCH_TIME(b->GLONASSEpochTime) 448 461 T_SSR_UPDATE_INTERVAL(b->UpdateInterval) 449 T_MULTIPLE_MESSAGE_INDICATOR( mmi ? 1 :0)462 T_MULTIPLE_MESSAGE_INDICATOR(/*mmi ? 1 :*/0) 450 463 --mmi; 451 464 T_RESERVED5 … … 512 525 #define G_MESSAGE_NUMBER(a) GETBITS(a, 12) /* DF002 */ 513 526 #define G_RESERVED5 SKIPBITS(5) /* DF001 */ 514 #define G_GPS_SATELLITE_ID(a) {int temp; GETBITS(temp, 6) \ 515 if(a && a != temp) return GCOBR_DATAMISMATCH; a = temp;} /* DF068 */ 527 #define G_GPS_SATELLITE_ID(a) GETBITS(a, 6) /* DF068 */ 516 528 #define G_GPS_IODE(a) GETBITS(a, 8) /* DF071 */ 517 529 #define G_GLONASS_IOD(a) GETBITS(a, 8) /* DF237 */ … … 538 550 #define G_GALILEO_SIGNAL_IDENTIFIER(a) GETBITS(a, 5) 539 551 #define G_CODE_BIAS(a) GETFLOATSIGN(a, 14, 1/100.0) 540 #define G_GLONASS_SATELLITE_ID(a) {int temp; GETBITS(temp, 5) \ 541 if(a && a != temp) return GCOBR_DATAMISMATCH; a = temp;} 552 #define G_GLONASS_SATELLITE_ID(a) GETBITS(a, 5) 542 553 543 554 #define G_GPS_EPOCH_TIME(a, b) {int temp; GETBITS(temp, 20) \ … … 545 556 #define G_GLONASS_EPOCH_TIME(a, b) {int temp; GETBITS(temp, 17) \ 546 557 if(b && a != temp) return GCOBR_TIMEMISMATCH; a = temp;} 547 #define G_NO_OF_SATELLITES(a) {int temp; GETBITS(temp, 6) \ 548 if(a && a != temp) return GCOBR_DATAMISMATCH; a = temp;} 558 #define G_NO_OF_SATELLITES(a) GETBITS(a, 6) 549 559 #define G_MULTIPLE_MESSAGE_INDICATOR(a) GETBITS(a, 1) 550 560 #define G_SSR_URA(a) GETBITS(a, 4) … … 552 562 #define G_SSR_UPDATE_INTERVAL(a) GETBITS(a, 4) 553 563 554 #ifdef OLD555 enum OldClockOrbitType { OLDCOTYPE_GPSORBIT=4050, OLDCOTYPE_GPSCLOCK=4051,556 OLDCOTYPE_GLONASSORBIT=4053, OLDCOTYPE_GLONASSCLOCK=4054,557 OLDCOTYPE_GPSCOMBINED=4056, OLDCOTYPE_GLONASSCOMBINED=4057};558 enum OldBiasType { OLDBTYPE_GPS=4052, OLDBTYPE_GLONASS=4055};559 #define OLD_G_RESERVED6 SKIPBITS(6) /* DF001 */560 #define OLD_G_GLONASS_SATELLITE_ID(a) {int temp; GETBITS(temp, 6) \561 if(a && a != temp) return GCOBR_DATAMISMATCH; a = temp;}562 #define OLD_G_NO_OF_SATELLITES(a) {int temp; GETBITS(temp, 5) \563 if(a && a != temp) return GCOBR_DATAMISMATCH; a = temp;}564 #define OLD_G_DELTA_RADIAL(a) GETFLOATSIGN(a, 20, 1/1000.0)565 #define OLD_G_DELTA_ALONG_TRACK(a) GETFLOATSIGN(a, 20, 1/1000.0)566 #define OLD_G_DELTA_CROSS_TRACK(a) GETFLOATSIGN(a, 20, 1/1000.0)567 #define OLD_G_DELTA_DOT_RADIAL(a) GETFLOATSIGN(a, 20, 1/100000.0)568 #define OLD_G_DELTA_DOT_ALONG_TRACK(a) GETFLOATSIGN(a, 20, 1/100000.0)569 #define OLD_G_DELTA_DOT_CROSS_TRACK(a) GETFLOATSIGN(a, 20, 1/100000.0)570 #define OLD_G_DELTA_DOT_DOT_RADIAL(a) GETFLOATSIGN(a, 20, 1/5000000.0)571 #define OLD_G_DELTA_DOT_DOT_ALONG_TRACK(a) GETFLOATSIGN(a, 20, 1/5000000.0)572 #define OLD_G_DELTA_DOT_DOT_CROSS_TRACK(a) GETFLOATSIGN(a, 20, 1/5000000.0)573 #define OLD_G_DELTA_A0(a) GETFLOATSIGN(a, 20, 1/1000.0)574 #define OLD_G_DELTA_A1(a) GETFLOATSIGN(a, 20, 1/100000.0)575 #define OLD_G_DELTA_A2(a) GETFLOATSIGN(a, 20, 1/5000000.0)576 #define OLD_G_CODE_BIAS(a) GETFLOATSIGN(a, 20, 1/100.0)577 #endif578 579 564 enum GCOB_RETURN GetClockOrbitBias(struct ClockOrbit *co, struct Bias *b, 580 565 const char *buffer, size_t size, int *bytesused) 581 566 { 582 int type, mmi=0, i, j, h, rs ;567 int type, mmi=0, i, j, h, rs, nums, pos, id; 583 568 size_t sizeofrtcmblock; 584 569 const char *blockstart = buffer; … … 617 602 G_MULTIPLE_MESSAGE_INDICATOR(mmi) 618 603 G_RESERVED5 619 G_NO_OF_SATELLITES(co->NumberOfGPSSat) 620 if(co->OrbitDataSupplied&1) 621 return GCOBR_DATAMISMATCH; 604 G_NO_OF_SATELLITES(nums) 622 605 co->OrbitDataSupplied |= 1; 623 606 #ifdef DEBUG 624 607 fprintf(stderr, "epochtime %d ui %d mmi %d sats %d\n",co->GPSEpochTime,co->UpdateInterval,mmi,co->NumberOfGPSSat); 625 608 #endif 626 for(i = 0; i < co->NumberOfGPSSat; ++i) 627 { 628 G_GPS_SATELLITE_ID(co->Sat[i].ID) 629 G_GPS_IODE(co->Sat[i].IOD) 630 G_DELTA_RADIAL(co->Sat[i].Orbit.DeltaRadial) 631 G_DELTA_ALONG_TRACK(co->Sat[i].Orbit.DeltaAlongTrack) 632 G_DELTA_CROSS_TRACK(co->Sat[i].Orbit.DeltaCrossTrack) 633 G_DELTA_DOT_RADIAL(co->Sat[i].Orbit.DotDeltaRadial) 634 G_DELTA_DOT_ALONG_TRACK(co->Sat[i].Orbit.DotDeltaAlongTrack) 635 G_DELTA_DOT_CROSS_TRACK(co->Sat[i].Orbit.DotDeltaCrossTrack) 636 G_DELTA_DOT_DOT_RADIAL(co->Sat[i].Orbit.DotDotDeltaRadial) 637 G_DELTA_DOT_DOT_ALONG_TRACK(co->Sat[i].Orbit.DotDotDeltaAlongTrack) 638 G_DELTA_DOT_DOT_CROSS_TRACK(co->Sat[i].Orbit.DotDotDeltaCrossTrack) 609 for(i = 0; i < nums; ++i) 610 { 611 G_GPS_SATELLITE_ID(id) 612 for(pos = 0; pos < co->NumberOfGPSSat && co->Sat[pos].ID != id; ++pos) 613 ; 614 if(pos >= CLOCKORBIT_NUMGPS) return GCOBR_DATAMISMATCH; 615 else if(pos == co->NumberOfGPSSat) ++co->NumberOfGPSSat; 616 co->Sat[pos].ID = id; 617 618 G_GPS_IODE(co->Sat[pos].IOD) 619 G_DELTA_RADIAL(co->Sat[pos].Orbit.DeltaRadial) 620 G_DELTA_ALONG_TRACK(co->Sat[pos].Orbit.DeltaAlongTrack) 621 G_DELTA_CROSS_TRACK(co->Sat[pos].Orbit.DeltaCrossTrack) 622 G_DELTA_DOT_RADIAL(co->Sat[pos].Orbit.DotDeltaRadial) 623 G_DELTA_DOT_ALONG_TRACK(co->Sat[pos].Orbit.DotDeltaAlongTrack) 624 G_DELTA_DOT_CROSS_TRACK(co->Sat[pos].Orbit.DotDeltaCrossTrack) 625 G_DELTA_DOT_DOT_RADIAL(co->Sat[pos].Orbit.DotDotDeltaRadial) 626 G_DELTA_DOT_DOT_ALONG_TRACK(co->Sat[pos].Orbit.DotDotDeltaAlongTrack) 627 G_DELTA_DOT_DOT_CROSS_TRACK(co->Sat[pos].Orbit.DotDotDeltaCrossTrack) 639 628 G_SATELLITE_REFERENCE_POINT(co->SatRefPoint) 640 629 G_SATELLITE_REFERENCE_DATUM(co->SatRefDatum) 641 630 #ifdef DEBUG 642 631 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", 643 co->Sat[ i].ID,co->Sat[i].IOD,co->Sat[i].Orbit.DeltaRadial,644 co->Sat[ i].Orbit.DeltaAlongTrack,co->Sat[i].Orbit.DeltaCrossTrack,645 co->Sat[ i].Orbit.DotDeltaRadial,646 co->Sat[ i].Orbit.DotDeltaAlongTrack,647 co->Sat[ i].Orbit.DotDeltaCrossTrack,648 co->Sat[ i].Orbit.DotDotDeltaRadial,649 co->Sat[ i].Orbit.DotDotDeltaAlongTrack,650 co->Sat[ i].Orbit.DotDotDeltaCrossTrack,632 co->Sat[pos].ID,co->Sat[pos].IOD,co->Sat[pos].Orbit.DeltaRadial, 633 co->Sat[pos].Orbit.DeltaAlongTrack,co->Sat[pos].Orbit.DeltaCrossTrack, 634 co->Sat[pos].Orbit.DotDeltaRadial, 635 co->Sat[pos].Orbit.DotDeltaAlongTrack, 636 co->Sat[pos].Orbit.DotDeltaCrossTrack, 637 co->Sat[pos].Orbit.DotDotDeltaRadial, 638 co->Sat[pos].Orbit.DotDotDeltaAlongTrack, 639 co->Sat[pos].Orbit.DotDotDeltaCrossTrack, 651 640 co->SatRefPoint, 652 641 co->SatRefDatum); … … 662 651 G_MULTIPLE_MESSAGE_INDICATOR(mmi) 663 652 G_RESERVED5 664 G_NO_OF_SATELLITES(co->NumberOfGPSSat) 665 if(co->ClockDataSupplied & 1) 666 return GCOBR_DATAMISMATCH; 653 G_NO_OF_SATELLITES(nums) 667 654 co->ClockDataSupplied |= 1; 668 for(i = 0; i < co->NumberOfGPSSat; ++i) 669 { 670 G_GPS_SATELLITE_ID(co->Sat[i].ID) 671 G_DELTA_CLOCK_C0(co->Sat[i].Clock.DeltaA0) 672 G_DELTA_CLOCK_C1(co->Sat[i].Clock.DeltaA1) 673 G_DELTA_CLOCK_C2(co->Sat[i].Clock.DeltaA2) 655 for(i = 0; i < nums; ++i) 656 { 657 G_GPS_SATELLITE_ID(id) 658 for(pos = 0; pos < co->NumberOfGPSSat && co->Sat[pos].ID != id; ++pos) 659 ; 660 if(pos >= CLOCKORBIT_NUMGPS) return GCOBR_DATAMISMATCH; 661 else if(pos == co->NumberOfGPSSat) ++co->NumberOfGPSSat; 662 co->Sat[pos].ID = id; 663 664 G_DELTA_CLOCK_C0(co->Sat[pos].Clock.DeltaA0) 665 G_DELTA_CLOCK_C1(co->Sat[pos].Clock.DeltaA1) 666 G_DELTA_CLOCK_C2(co->Sat[pos].Clock.DeltaA2) 674 667 } 675 668 break; … … 682 675 G_MULTIPLE_MESSAGE_INDICATOR(mmi) 683 676 G_RESERVED5 684 G_NO_OF_SATELLITES(co->NumberOfGPSSat) 685 if((co->ClockDataSupplied&1) || (co->OrbitDataSupplied&1)) 686 return GCOBR_DATAMISMATCH; 677 G_NO_OF_SATELLITES(nums) 687 678 co->OrbitDataSupplied |= 1; 688 679 co->ClockDataSupplied |= 1; 689 for(i = 0; i < co->NumberOfGPSSat; ++i) 690 { 691 G_GPS_SATELLITE_ID(co->Sat[i].ID) 692 G_GPS_IODE(co->Sat[i].IOD) 693 G_DELTA_RADIAL(co->Sat[i].Orbit.DeltaRadial) 694 G_DELTA_ALONG_TRACK(co->Sat[i].Orbit.DeltaAlongTrack) 695 G_DELTA_CROSS_TRACK(co->Sat[i].Orbit.DeltaCrossTrack) 696 G_DELTA_DOT_RADIAL(co->Sat[i].Orbit.DotDeltaRadial) 697 G_DELTA_DOT_ALONG_TRACK(co->Sat[i].Orbit.DotDeltaAlongTrack) 698 G_DELTA_DOT_CROSS_TRACK(co->Sat[i].Orbit.DotDeltaCrossTrack) 699 G_DELTA_DOT_DOT_RADIAL(co->Sat[i].Orbit.DotDotDeltaRadial) 700 G_DELTA_DOT_DOT_ALONG_TRACK(co->Sat[i].Orbit.DotDotDeltaAlongTrack) 701 G_DELTA_DOT_DOT_CROSS_TRACK(co->Sat[i].Orbit.DotDotDeltaCrossTrack) 680 for(i = 0; i < nums; ++i) 681 { 682 G_GPS_SATELLITE_ID(id) 683 for(pos = 0; pos < co->NumberOfGPSSat && co->Sat[pos].ID != id; ++pos) 684 ; 685 if(pos >= CLOCKORBIT_NUMGPS) return GCOBR_DATAMISMATCH; 686 else if(pos == co->NumberOfGPSSat) ++co->NumberOfGPSSat; 687 co->Sat[pos].ID = id; 688 689 G_GPS_IODE(co->Sat[pos].IOD) 690 G_DELTA_RADIAL(co->Sat[pos].Orbit.DeltaRadial) 691 G_DELTA_ALONG_TRACK(co->Sat[pos].Orbit.DeltaAlongTrack) 692 G_DELTA_CROSS_TRACK(co->Sat[pos].Orbit.DeltaCrossTrack) 693 G_DELTA_DOT_RADIAL(co->Sat[pos].Orbit.DotDeltaRadial) 694 G_DELTA_DOT_ALONG_TRACK(co->Sat[pos].Orbit.DotDeltaAlongTrack) 695 G_DELTA_DOT_CROSS_TRACK(co->Sat[pos].Orbit.DotDeltaCrossTrack) 696 G_DELTA_DOT_DOT_RADIAL(co->Sat[pos].Orbit.DotDotDeltaRadial) 697 G_DELTA_DOT_DOT_ALONG_TRACK(co->Sat[pos].Orbit.DotDotDeltaAlongTrack) 698 G_DELTA_DOT_DOT_CROSS_TRACK(co->Sat[pos].Orbit.DotDotDeltaCrossTrack) 702 699 G_SATELLITE_REFERENCE_POINT(co->SatRefPoint) 703 700 G_SATELLITE_REFERENCE_DATUM(co->SatRefDatum) 704 G_DELTA_CLOCK_C0(co->Sat[ i].Clock.DeltaA0)705 G_DELTA_CLOCK_C1(co->Sat[ i].Clock.DeltaA1)706 G_DELTA_CLOCK_C2(co->Sat[ i].Clock.DeltaA2)701 G_DELTA_CLOCK_C0(co->Sat[pos].Clock.DeltaA0) 702 G_DELTA_CLOCK_C1(co->Sat[pos].Clock.DeltaA1) 703 G_DELTA_CLOCK_C2(co->Sat[pos].Clock.DeltaA2) 707 704 } 708 705 break; … … 714 711 G_MULTIPLE_MESSAGE_INDICATOR(mmi) 715 712 G_RESERVED5 716 G_NO_OF_SATELLITES(co->NumberOfGPSSat) 717 if(co->URADataSupplied&1) 718 return GCOBR_DATAMISMATCH; 713 G_NO_OF_SATELLITES(nums) 719 714 co->URADataSupplied |= 1; 720 for(i = 0; i < co->NumberOfGPSSat; ++i) 721 { 722 G_GPS_SATELLITE_ID(co->Sat[i].ID) 723 G_SSR_URA(co->Sat[i].URA) 715 for(i = 0; i < nums; ++i) 716 { 717 G_GPS_SATELLITE_ID(id) 718 for(pos = 0; pos < co->NumberOfGPSSat && co->Sat[pos].ID != id; ++pos) 719 ; 720 if(pos >= CLOCKORBIT_NUMGPS) return GCOBR_DATAMISMATCH; 721 else if(pos == co->NumberOfGPSSat) ++co->NumberOfGPSSat; 722 co->Sat[pos].ID = id; 723 724 G_SSR_URA(co->Sat[pos].URA) 724 725 } 725 726 break; … … 732 733 G_MULTIPLE_MESSAGE_INDICATOR(mmi) 733 734 G_RESERVED5 734 G_NO_OF_SATELLITES(co->NumberOfGPSSat) 735 if(co->HRDataSupplied&1) 736 return GCOBR_DATAMISMATCH; 735 G_NO_OF_SATELLITES(nums) 737 736 co->HRDataSupplied |= 1; 738 for(i = 0; i < co->NumberOfGPSSat; ++i) 739 { 740 G_GPS_SATELLITE_ID(co->Sat[i].ID) 741 G_HR_CLOCK_CORRECTION(co->Sat[i].hrclock) 737 for(i = 0; i < nums; ++i) 738 { 739 G_GPS_SATELLITE_ID(id) 740 for(pos = 0; pos < co->NumberOfGPSSat && co->Sat[pos].ID != id; ++pos) 741 ; 742 if(pos >= CLOCKORBIT_NUMGPS) return GCOBR_DATAMISMATCH; 743 else if(pos == co->NumberOfGPSSat) ++co->NumberOfGPSSat; 744 co->Sat[pos].ID = id; 745 746 G_HR_CLOCK_CORRECTION(co->Sat[pos].hrclock) 742 747 } 743 748 break; … … 748 753 G_MULTIPLE_MESSAGE_INDICATOR(mmi) 749 754 G_RESERVED5 750 G_NO_OF_SATELLITES(co->NumberOfGLONASSSat) 751 if(co->OrbitDataSupplied&2) 752 return GCOBR_DATAMISMATCH; 755 G_NO_OF_SATELLITES(nums) 753 756 co->OrbitDataSupplied |= 2; 754 for(i = CLOCKORBIT_NUMGPS; 755 i < CLOCKORBIT_NUMGPS+co->NumberOfGLONASSSat; ++i) 756 { 757 G_GLONASS_SATELLITE_ID(co->Sat[i].ID) 758 G_GLONASS_IOD(co->Sat[i].IOD) 759 G_DELTA_RADIAL(co->Sat[i].Orbit.DeltaRadial) 760 G_DELTA_ALONG_TRACK(co->Sat[i].Orbit.DeltaAlongTrack) 761 G_DELTA_CROSS_TRACK(co->Sat[i].Orbit.DeltaCrossTrack) 762 G_DELTA_DOT_RADIAL(co->Sat[i].Orbit.DotDeltaRadial) 763 G_DELTA_DOT_ALONG_TRACK(co->Sat[i].Orbit.DotDeltaAlongTrack) 764 G_DELTA_DOT_CROSS_TRACK(co->Sat[i].Orbit.DotDeltaCrossTrack) 765 G_DELTA_DOT_DOT_RADIAL(co->Sat[i].Orbit.DotDotDeltaRadial) 766 G_DELTA_DOT_DOT_ALONG_TRACK(co->Sat[i].Orbit.DotDotDeltaAlongTrack) 767 G_DELTA_DOT_DOT_CROSS_TRACK(co->Sat[i].Orbit.DotDotDeltaCrossTrack) 757 for(i = 0; i < nums; ++i) 758 { 759 G_GLONASS_SATELLITE_ID(id) 760 for(pos = CLOCKORBIT_NUMGPS; pos < co->NumberOfGLONASSSat && co->Sat[pos].ID != id; ++pos) 761 ; 762 if(pos >= CLOCKORBIT_NUMGPS+CLOCKORBIT_NUMGLONASS) return GCOBR_DATAMISMATCH; 763 else if(pos == co->NumberOfGLONASSSat) ++co->NumberOfGLONASSSat; 764 co->Sat[pos].ID = id; 765 766 G_GLONASS_SATELLITE_ID(co->Sat[pos].ID) 767 G_GLONASS_IOD(co->Sat[pos].IOD) 768 G_DELTA_RADIAL(co->Sat[pos].Orbit.DeltaRadial) 769 G_DELTA_ALONG_TRACK(co->Sat[pos].Orbit.DeltaAlongTrack) 770 G_DELTA_CROSS_TRACK(co->Sat[pos].Orbit.DeltaCrossTrack) 771 G_DELTA_DOT_RADIAL(co->Sat[pos].Orbit.DotDeltaRadial) 772 G_DELTA_DOT_ALONG_TRACK(co->Sat[pos].Orbit.DotDeltaAlongTrack) 773 G_DELTA_DOT_CROSS_TRACK(co->Sat[pos].Orbit.DotDeltaCrossTrack) 774 G_DELTA_DOT_DOT_RADIAL(co->Sat[pos].Orbit.DotDotDeltaRadial) 775 G_DELTA_DOT_DOT_ALONG_TRACK(co->Sat[pos].Orbit.DotDotDeltaAlongTrack) 776 G_DELTA_DOT_DOT_CROSS_TRACK(co->Sat[pos].Orbit.DotDotDeltaCrossTrack) 768 777 G_SATELLITE_REFERENCE_POINT(co->SatRefPoint) 769 778 G_SATELLITE_REFERENCE_DATUM(co->SatRefDatum) … … 776 785 G_MULTIPLE_MESSAGE_INDICATOR(mmi) 777 786 G_RESERVED5 778 G_NO_OF_SATELLITES(co->NumberOfGLONASSSat) 779 if(co->ClockDataSupplied&2) 780 return GCOBR_DATAMISMATCH; 787 G_NO_OF_SATELLITES(nums) 781 788 co->ClockDataSupplied |= 2; 782 for(i = CLOCKORBIT_NUMGPS; 783 i < CLOCKORBIT_NUMGPS+co->NumberOfGLONASSSat; ++i) 784 { 785 G_GLONASS_SATELLITE_ID(co->Sat[i].ID) 786 G_DELTA_CLOCK_C0(co->Sat[i].Clock.DeltaA0) 787 G_DELTA_CLOCK_C1(co->Sat[i].Clock.DeltaA1) 788 G_DELTA_CLOCK_C2(co->Sat[i].Clock.DeltaA2) 789 for(i = 0; i < nums; ++i) 790 { 791 G_GLONASS_SATELLITE_ID(id) 792 for(pos = CLOCKORBIT_NUMGPS; pos < co->NumberOfGLONASSSat && co->Sat[pos].ID != id; ++pos) 793 ; 794 if(pos >= CLOCKORBIT_NUMGPS+CLOCKORBIT_NUMGLONASS) return GCOBR_DATAMISMATCH; 795 else if(pos == co->NumberOfGLONASSSat) ++co->NumberOfGLONASSSat; 796 co->Sat[pos].ID = id; 797 798 G_DELTA_CLOCK_C0(co->Sat[pos].Clock.DeltaA0) 799 G_DELTA_CLOCK_C1(co->Sat[pos].Clock.DeltaA1) 800 G_DELTA_CLOCK_C2(co->Sat[pos].Clock.DeltaA2) 789 801 } 790 802 break; … … 795 807 G_MULTIPLE_MESSAGE_INDICATOR(mmi) 796 808 G_RESERVED5 797 G_NO_OF_SATELLITES(co->NumberOfGLONASSSat) 798 if((co->ClockDataSupplied&2) || (co->OrbitDataSupplied&2)) 799 return GCOBR_DATAMISMATCH; 809 G_NO_OF_SATELLITES(nums) 800 810 co->OrbitDataSupplied |= 2; 801 811 co->ClockDataSupplied |= 2; 802 for(i = CLOCKORBIT_NUMGPS; 803 i < CLOCKORBIT_NUMGPS+co->NumberOfGLONASSSat; ++i) 804 { 805 G_GLONASS_SATELLITE_ID(co->Sat[i].ID) 806 G_GLONASS_IOD(co->Sat[i].IOD) 807 G_DELTA_RADIAL(co->Sat[i].Orbit.DeltaRadial) 808 G_DELTA_ALONG_TRACK(co->Sat[i].Orbit.DeltaAlongTrack) 809 G_DELTA_CROSS_TRACK(co->Sat[i].Orbit.DeltaCrossTrack) 810 G_DELTA_DOT_RADIAL(co->Sat[i].Orbit.DotDeltaRadial) 811 G_DELTA_DOT_ALONG_TRACK(co->Sat[i].Orbit.DotDeltaAlongTrack) 812 G_DELTA_DOT_CROSS_TRACK(co->Sat[i].Orbit.DotDeltaCrossTrack) 813 G_DELTA_DOT_DOT_RADIAL(co->Sat[i].Orbit.DotDotDeltaRadial) 814 G_DELTA_DOT_DOT_ALONG_TRACK(co->Sat[i].Orbit.DotDotDeltaAlongTrack) 815 G_DELTA_DOT_DOT_CROSS_TRACK(co->Sat[i].Orbit.DotDotDeltaCrossTrack) 812 for(i = 0; i < nums; ++i) 813 { 814 G_GLONASS_SATELLITE_ID(id) 815 for(pos = CLOCKORBIT_NUMGPS; pos < co->NumberOfGLONASSSat && co->Sat[pos].ID != id; ++pos) 816 ; 817 if(pos >= CLOCKORBIT_NUMGPS+CLOCKORBIT_NUMGLONASS) return GCOBR_DATAMISMATCH; 818 else if(pos == co->NumberOfGLONASSSat) ++co->NumberOfGLONASSSat; 819 co->Sat[pos].ID = id; 820 821 G_GLONASS_IOD(co->Sat[pos].IOD) 822 G_DELTA_RADIAL(co->Sat[pos].Orbit.DeltaRadial) 823 G_DELTA_ALONG_TRACK(co->Sat[pos].Orbit.DeltaAlongTrack) 824 G_DELTA_CROSS_TRACK(co->Sat[pos].Orbit.DeltaCrossTrack) 825 G_DELTA_DOT_RADIAL(co->Sat[pos].Orbit.DotDeltaRadial) 826 G_DELTA_DOT_ALONG_TRACK(co->Sat[pos].Orbit.DotDeltaAlongTrack) 827 G_DELTA_DOT_CROSS_TRACK(co->Sat[pos].Orbit.DotDeltaCrossTrack) 828 G_DELTA_DOT_DOT_RADIAL(co->Sat[pos].Orbit.DotDotDeltaRadial) 829 G_DELTA_DOT_DOT_ALONG_TRACK(co->Sat[pos].Orbit.DotDotDeltaAlongTrack) 830 G_DELTA_DOT_DOT_CROSS_TRACK(co->Sat[pos].Orbit.DotDotDeltaCrossTrack) 816 831 G_SATELLITE_REFERENCE_POINT(co->SatRefPoint) 817 832 G_SATELLITE_REFERENCE_DATUM(co->SatRefDatum) 818 G_DELTA_CLOCK_C0(co->Sat[ i].Clock.DeltaA0)819 G_DELTA_CLOCK_C1(co->Sat[ i].Clock.DeltaA1)820 G_DELTA_CLOCK_C2(co->Sat[ i].Clock.DeltaA2)833 G_DELTA_CLOCK_C0(co->Sat[pos].Clock.DeltaA0) 834 G_DELTA_CLOCK_C1(co->Sat[pos].Clock.DeltaA1) 835 G_DELTA_CLOCK_C2(co->Sat[pos].Clock.DeltaA2) 821 836 } 822 837 break; … … 826 841 G_MULTIPLE_MESSAGE_INDICATOR(mmi) 827 842 G_RESERVED5 828 G_NO_OF_SATELLITES(co->NumberOfGLONASSSat) 829 if(co->URADataSupplied&2) 830 return GCOBR_DATAMISMATCH; 843 G_NO_OF_SATELLITES(nums) 831 844 co->URADataSupplied |= 2; 832 for(i = CLOCKORBIT_NUMGPS; 833 i < CLOCKORBIT_NUMGPS+co->NumberOfGLONASSSat; ++i) 834 { 835 G_GLONASS_SATELLITE_ID(co->Sat[i].ID) 836 G_SSR_URA(co->Sat[i].URA) 845 for(i = 0; i < nums; ++i) 846 { 847 G_GLONASS_SATELLITE_ID(id) 848 for(pos = CLOCKORBIT_NUMGPS; pos < co->NumberOfGLONASSSat && co->Sat[pos].ID != id; ++pos) 849 ; 850 if(pos >= CLOCKORBIT_NUMGPS+CLOCKORBIT_NUMGLONASS) return GCOBR_DATAMISMATCH; 851 else if(pos == co->NumberOfGLONASSSat) ++co->NumberOfGLONASSSat; 852 co->Sat[pos].ID = id; 853 854 G_SSR_URA(co->Sat[pos].URA) 837 855 } 838 856 break; … … 843 861 G_MULTIPLE_MESSAGE_INDICATOR(mmi) 844 862 G_RESERVED5 845 G_NO_OF_SATELLITES(co->NumberOfGLONASSSat) 846 if(co->HRDataSupplied&2) 847 return GCOBR_DATAMISMATCH; 863 G_NO_OF_SATELLITES(nums) 848 864 co->HRDataSupplied |= 2; 849 for(i = CLOCKORBIT_NUMGPS; 850 i < CLOCKORBIT_NUMGPS+co->NumberOfGLONASSSat; ++i) 851 { 852 G_GLONASS_SATELLITE_ID(co->Sat[i].ID) 853 G_HR_CLOCK_CORRECTION(co->Sat[i].hrclock) 865 for(i = 0; i < nums; ++i) 866 { 867 G_GLONASS_SATELLITE_ID(id) 868 for(pos = CLOCKORBIT_NUMGPS; pos < co->NumberOfGLONASSSat && co->Sat[pos].ID != id; ++pos) 869 ; 870 if(pos >= CLOCKORBIT_NUMGPS+CLOCKORBIT_NUMGLONASS) return GCOBR_DATAMISMATCH; 871 else if(pos == co->NumberOfGLONASSSat) ++co->NumberOfGLONASSSat; 872 co->Sat[pos].ID = id; 873 874 G_HR_CLOCK_CORRECTION(co->Sat[pos].hrclock) 854 875 } 855 876 break; … … 860 881 G_MULTIPLE_MESSAGE_INDICATOR(mmi) 861 882 G_RESERVED5 862 G_NO_OF_SATELLITES(b->NumberOfGPSSat) 863 for(i = 0; i < b->NumberOfGPSSat; ++i) 864 { 865 G_GPS_SATELLITE_ID(b->Sat[i].ID) 866 G_NO_OF_CODE_BIASES(b->Sat[i].NumberOfCodeBiases) 867 for(j = 0; j < b->Sat[i].NumberOfCodeBiases; ++j) 883 G_NO_OF_SATELLITES(nums) 884 for(i = 0; i < nums; ++i) 885 { 886 G_GPS_SATELLITE_ID(id) 887 for(pos = 0; pos < co->NumberOfGPSSat && co->Sat[pos].ID != id; ++pos) 888 ; 889 if(pos >= CLOCKORBIT_NUMGPS) return GCOBR_DATAMISMATCH; 890 else if(pos == co->NumberOfGPSSat) ++co->NumberOfGPSSat; 891 co->Sat[pos].ID = id; 892 893 G_NO_OF_CODE_BIASES(b->Sat[pos].NumberOfCodeBiases) 894 for(j = 0; j < b->Sat[pos].NumberOfCodeBiases; ++j) 868 895 { 869 G_GPS_SIGNAL_IDENTIFIER(b->Sat[ i].Biases[j].Type)870 G_CODE_BIAS(b->Sat[ i].Biases[j].Bias)896 G_GPS_SIGNAL_IDENTIFIER(b->Sat[pos].Biases[j].Type) 897 G_CODE_BIAS(b->Sat[pos].Biases[j].Bias) 871 898 } 872 899 } … … 878 905 G_MULTIPLE_MESSAGE_INDICATOR(mmi) 879 906 G_RESERVED5 880 G_NO_OF_SATELLITES(b->NumberOfGLONASSSat) 881 for(i = CLOCKORBIT_NUMGPS; 882 i < CLOCKORBIT_NUMGPS+b->NumberOfGLONASSSat; ++i) 883 { 884 G_GLONASS_SATELLITE_ID(b->Sat[i].ID) 885 G_NO_OF_CODE_BIASES(b->Sat[i].NumberOfCodeBiases) 886 for(j = 0; j < b->Sat[i].NumberOfCodeBiases; ++j) 907 G_NO_OF_SATELLITES(nums) 908 for(i = 0; i < nums; ++i) 909 { 910 G_GLONASS_SATELLITE_ID(id) 911 for(pos = CLOCKORBIT_NUMGPS; pos < co->NumberOfGLONASSSat && co->Sat[pos].ID != id; ++pos) 912 ; 913 if(pos >= CLOCKORBIT_NUMGPS+CLOCKORBIT_NUMGLONASS) return GCOBR_DATAMISMATCH; 914 else if(pos == co->NumberOfGLONASSSat) ++co->NumberOfGLONASSSat; 915 co->Sat[pos].ID = id; 916 917 G_NO_OF_CODE_BIASES(b->Sat[pos].NumberOfCodeBiases) 918 for(j = 0; j < b->Sat[pos].NumberOfCodeBiases; ++j) 887 919 { 888 G_GLONASS_SIGNAL_IDENTIFIER(b->Sat[ i].Biases[j].Type)889 G_CODE_BIAS(b->Sat[ i].Biases[j].Bias)920 G_GLONASS_SIGNAL_IDENTIFIER(b->Sat[pos].Biases[j].Type) 921 G_CODE_BIAS(b->Sat[pos].Biases[j].Bias) 890 922 } 891 923 } 892 924 break; 893 #ifdef OLD894 case OLDCOTYPE_GPSORBIT:895 if(!co) return GCOBR_NOCLOCKORBITPARAMETER;896 G_GPS_EPOCH_TIME(co->GPSEpochTime, co->NumberOfGPSSat)897 co->epochGPS[co->epochSize] = co->GPSEpochTime; /* Weber, for latency */898 if(co->epochSize < 100) {co->epochSize += 1;} /* Weber, for latency */899 G_MULTIPLE_MESSAGE_INDICATOR(mmi)900 OLD_G_RESERVED6901 OLD_G_NO_OF_SATELLITES(co->NumberOfGPSSat)902 if(co->OrbitDataSupplied&1)903 return GCOBR_DATAMISMATCH;904 co->OrbitDataSupplied |= 1;905 for(i = 0; i < co->NumberOfGPSSat; ++i)906 {907 G_GPS_SATELLITE_ID(co->Sat[i].ID)908 G_GPS_IODE(co->Sat[i].IOD)909 OLD_G_DELTA_RADIAL(co->Sat[i].Orbit.DeltaRadial)910 OLD_G_DELTA_ALONG_TRACK(co->Sat[i].Orbit.DeltaAlongTrack)911 OLD_G_DELTA_CROSS_TRACK(co->Sat[i].Orbit.DeltaCrossTrack)912 OLD_G_DELTA_DOT_RADIAL(co->Sat[i].Orbit.DotDeltaRadial)913 OLD_G_DELTA_DOT_ALONG_TRACK(co->Sat[i].Orbit.DotDeltaAlongTrack)914 OLD_G_DELTA_DOT_CROSS_TRACK(co->Sat[i].Orbit.DotDeltaCrossTrack)915 OLD_G_DELTA_DOT_DOT_RADIAL(co->Sat[i].Orbit.DotDotDeltaRadial)916 OLD_G_DELTA_DOT_DOT_ALONG_TRACK(co->Sat[i].Orbit.DotDotDeltaAlongTrack)917 OLD_G_DELTA_DOT_DOT_CROSS_TRACK(co->Sat[i].Orbit.DotDotDeltaCrossTrack)918 G_SATELLITE_REFERENCE_POINT(co->SatRefPoint)919 G_SATELLITE_REFERENCE_DATUM(co->SatRefDatum)920 }921 break;922 case OLDCOTYPE_GPSCLOCK:923 if(!co) return GCOBR_NOCLOCKORBITPARAMETER;924 G_GPS_EPOCH_TIME(co->GPSEpochTime, co->NumberOfGPSSat)925 co->epochGPS[co->epochSize] = co->GPSEpochTime; /* Weber, for latency */926 if(co->epochSize < 100) {co->epochSize += 1;} /* Weber, for latency */927 G_MULTIPLE_MESSAGE_INDICATOR(mmi)928 OLD_G_RESERVED6929 OLD_G_NO_OF_SATELLITES(co->NumberOfGPSSat)930 if(co->ClockDataSupplied&1)931 return GCOBR_DATAMISMATCH;932 co->ClockDataSupplied |= 1;933 for(i = 0; i < co->NumberOfGPSSat; ++i)934 {935 G_GPS_SATELLITE_ID(co->Sat[i].ID)936 G_GPS_IODE(co->Sat[i].IOD)937 OLD_G_DELTA_A0(co->Sat[i].Clock.DeltaA0)938 OLD_G_DELTA_A1(co->Sat[i].Clock.DeltaA1)939 OLD_G_DELTA_A2(co->Sat[i].Clock.DeltaA2)940 }941 break;942 case OLDCOTYPE_GPSCOMBINED:943 if(!co) return -5;944 G_GPS_EPOCH_TIME(co->GPSEpochTime, co->NumberOfGPSSat)945 co->epochGPS[co->epochSize] = co->GPSEpochTime; /* Weber, for latency */946 if(co->epochSize < 100) {co->epochSize += 1;} /* Weber, for latency */947 G_MULTIPLE_MESSAGE_INDICATOR(mmi)948 OLD_G_RESERVED6949 OLD_G_NO_OF_SATELLITES(co->NumberOfGPSSat)950 if((co->ClockDataSupplied&1) || (co->OrbitDataSupplied&1))951 return GCOBR_DATAMISMATCH;952 co->OrbitDataSupplied |= 1;953 co->ClockDataSupplied |= 1;954 for(i = 0; i < co->NumberOfGPSSat; ++i)955 {956 G_GPS_SATELLITE_ID(co->Sat[i].ID)957 G_GPS_IODE(co->Sat[i].IOD)958 OLD_G_DELTA_RADIAL(co->Sat[i].Orbit.DeltaRadial)959 OLD_G_DELTA_ALONG_TRACK(co->Sat[i].Orbit.DeltaAlongTrack)960 OLD_G_DELTA_CROSS_TRACK(co->Sat[i].Orbit.DeltaCrossTrack)961 OLD_G_DELTA_DOT_RADIAL(co->Sat[i].Orbit.DotDeltaRadial)962 OLD_G_DELTA_DOT_ALONG_TRACK(co->Sat[i].Orbit.DotDeltaAlongTrack)963 OLD_G_DELTA_DOT_CROSS_TRACK(co->Sat[i].Orbit.DotDeltaCrossTrack)964 OLD_G_DELTA_DOT_DOT_RADIAL(co->Sat[i].Orbit.DotDotDeltaRadial)965 OLD_G_DELTA_DOT_DOT_ALONG_TRACK(co->Sat[i].Orbit.DotDotDeltaAlongTrack)966 OLD_G_DELTA_DOT_DOT_CROSS_TRACK(co->Sat[i].Orbit.DotDotDeltaCrossTrack)967 G_SATELLITE_REFERENCE_POINT(co->SatRefPoint)968 G_SATELLITE_REFERENCE_DATUM(co->SatRefDatum)969 OLD_G_DELTA_A0(co->Sat[i].Clock.DeltaA0)970 OLD_G_DELTA_A1(co->Sat[i].Clock.DeltaA1)971 OLD_G_DELTA_A2(co->Sat[i].Clock.DeltaA2)972 }973 break;974 case OLDCOTYPE_GLONASSORBIT:975 if(!co) return GCOBR_NOCLOCKORBITPARAMETER;976 G_GLONASS_EPOCH_TIME(co->GLONASSEpochTime, co->NumberOfGLONASSSat)977 G_MULTIPLE_MESSAGE_INDICATOR(mmi)978 OLD_G_RESERVED6979 OLD_G_NO_OF_SATELLITES(co->NumberOfGLONASSSat)980 if(co->OrbitDataSupplied&2)981 return GCOBR_DATAMISMATCH;982 co->OrbitDataSupplied |= 2;983 for(i = CLOCKORBIT_NUMGPS;984 i < CLOCKORBIT_NUMGPS+co->NumberOfGLONASSSat; ++i)985 {986 OLD_G_GLONASS_SATELLITE_ID(co->Sat[i].ID)987 G_GLONASS_IOD(co->Sat[i].IOD)988 OLD_G_DELTA_RADIAL(co->Sat[i].Orbit.DeltaRadial)989 OLD_G_DELTA_ALONG_TRACK(co->Sat[i].Orbit.DeltaAlongTrack)990 OLD_G_DELTA_CROSS_TRACK(co->Sat[i].Orbit.DeltaCrossTrack)991 OLD_G_DELTA_DOT_RADIAL(co->Sat[i].Orbit.DotDeltaRadial)992 OLD_G_DELTA_DOT_ALONG_TRACK(co->Sat[i].Orbit.DotDeltaAlongTrack)993 OLD_G_DELTA_DOT_CROSS_TRACK(co->Sat[i].Orbit.DotDeltaCrossTrack)994 OLD_G_DELTA_DOT_DOT_RADIAL(co->Sat[i].Orbit.DotDotDeltaRadial)995 OLD_G_DELTA_DOT_DOT_ALONG_TRACK(co->Sat[i].Orbit.DotDotDeltaAlongTrack)996 OLD_G_DELTA_DOT_DOT_CROSS_TRACK(co->Sat[i].Orbit.DotDotDeltaCrossTrack)997 G_SATELLITE_REFERENCE_POINT(co->SatRefPoint)998 G_SATELLITE_REFERENCE_DATUM(co->SatRefDatum)999 }1000 break;1001 case OLDCOTYPE_GLONASSCLOCK:1002 if(!co) return GCOBR_NOCLOCKORBITPARAMETER;1003 G_GLONASS_EPOCH_TIME(co->GLONASSEpochTime, co->NumberOfGLONASSSat)1004 G_MULTIPLE_MESSAGE_INDICATOR(mmi)1005 OLD_G_RESERVED61006 OLD_G_NO_OF_SATELLITES(co->NumberOfGLONASSSat)1007 if(co->ClockDataSupplied&2)1008 return GCOBR_DATAMISMATCH;1009 co->ClockDataSupplied |= 2;1010 for(i = CLOCKORBIT_NUMGPS;1011 i < CLOCKORBIT_NUMGPS+co->NumberOfGLONASSSat; ++i)1012 {1013 OLD_G_GLONASS_SATELLITE_ID(co->Sat[i].ID)1014 G_GLONASS_IOD(co->Sat[i].IOD)1015 OLD_G_DELTA_A0(co->Sat[i].Clock.DeltaA0)1016 OLD_G_DELTA_A1(co->Sat[i].Clock.DeltaA1)1017 OLD_G_DELTA_A2(co->Sat[i].Clock.DeltaA2)1018 }1019 break;1020 case OLDCOTYPE_GLONASSCOMBINED:1021 if(!co) return GCOBR_NOCLOCKORBITPARAMETER;1022 G_GLONASS_EPOCH_TIME(co->GLONASSEpochTime, co->NumberOfGLONASSSat)1023 G_MULTIPLE_MESSAGE_INDICATOR(mmi)1024 OLD_G_RESERVED61025 OLD_G_NO_OF_SATELLITES(co->NumberOfGLONASSSat)1026 if((co->ClockDataSupplied&2) || (co->OrbitDataSupplied&2))1027 return GCOBR_DATAMISMATCH;1028 co->OrbitDataSupplied |= 2;1029 co->ClockDataSupplied |= 2;1030 for(i = CLOCKORBIT_NUMGPS;1031 i < CLOCKORBIT_NUMGPS+co->NumberOfGLONASSSat; ++i)1032 {1033 OLD_G_GLONASS_SATELLITE_ID(co->Sat[i].ID)1034 G_GLONASS_IOD(co->Sat[i].IOD)1035 OLD_G_DELTA_RADIAL(co->Sat[i].Orbit.DeltaRadial)1036 OLD_G_DELTA_ALONG_TRACK(co->Sat[i].Orbit.DeltaAlongTrack)1037 OLD_G_DELTA_CROSS_TRACK(co->Sat[i].Orbit.DeltaCrossTrack)1038 OLD_G_DELTA_DOT_RADIAL(co->Sat[i].Orbit.DotDeltaRadial)1039 OLD_G_DELTA_DOT_ALONG_TRACK(co->Sat[i].Orbit.DotDeltaAlongTrack)1040 OLD_G_DELTA_DOT_CROSS_TRACK(co->Sat[i].Orbit.DotDeltaCrossTrack)1041 OLD_G_DELTA_DOT_DOT_RADIAL(co->Sat[i].Orbit.DotDotDeltaRadial)1042 OLD_G_DELTA_DOT_DOT_ALONG_TRACK(co->Sat[i].Orbit.DotDotDeltaAlongTrack)1043 OLD_G_DELTA_DOT_DOT_CROSS_TRACK(co->Sat[i].Orbit.DotDotDeltaCrossTrack)1044 G_SATELLITE_REFERENCE_POINT(co->SatRefPoint)1045 G_SATELLITE_REFERENCE_DATUM(co->SatRefDatum)1046 OLD_G_DELTA_A0(co->Sat[i].Clock.DeltaA0)1047 OLD_G_DELTA_A1(co->Sat[i].Clock.DeltaA1)1048 OLD_G_DELTA_A2(co->Sat[i].Clock.DeltaA2)1049 }1050 break;1051 case OLDBTYPE_GPS:1052 if(!b) return GCOBR_NOBIASPARAMETER;1053 G_GPS_EPOCH_TIME(b->GPSEpochTime, co->NumberOfGPSSat)1054 G_MULTIPLE_MESSAGE_INDICATOR(mmi)1055 OLD_G_RESERVED61056 OLD_G_NO_OF_SATELLITES(b->NumberOfGPSSat)1057 for(i = 0; i < b->NumberOfGPSSat; ++i)1058 {1059 G_GPS_SATELLITE_ID(b->Sat[i].ID)1060 G_NO_OF_CODE_BIASES(b->Sat[i].NumberOfCodeBiases)1061 for(j = 0; j < b->Sat[i].NumberOfCodeBiases; ++j)1062 {1063 G_GPS_SIGNAL_IDENTIFIER(b->Sat[i].Biases[j].Type)1064 OLD_G_CODE_BIAS(b->Sat[i].Biases[j].Bias)1065 }1066 }1067 break;1068 case OLDBTYPE_GLONASS:1069 if(!b) return GCOBR_NOBIASPARAMETER;1070 G_GPS_EPOCH_TIME(b->GLONASSEpochTime, co->NumberOfGLONASSSat)1071 G_MULTIPLE_MESSAGE_INDICATOR(mmi)1072 OLD_G_RESERVED61073 OLD_G_NO_OF_SATELLITES(b->NumberOfGLONASSSat)1074 for(i = CLOCKORBIT_NUMGPS;1075 i < CLOCKORBIT_NUMGPS+b->NumberOfGLONASSSat; ++i)1076 {1077 OLD_G_GLONASS_SATELLITE_ID(b->Sat[i].ID)1078 G_NO_OF_CODE_BIASES(b->Sat[i].NumberOfCodeBiases)1079 for(j = 0; j < b->Sat[i].NumberOfCodeBiases; ++j)1080 {1081 G_GLONASS_SIGNAL_IDENTIFIER(b->Sat[i].Biases[j].Type)1082 OLD_G_CODE_BIAS(b->Sat[i].Biases[j].Bias)1083 }1084 }1085 break;1086 #endif1087 925 default: 1088 926 return GCOBR_UNKNOWNTYPE; -
trunk/BNS/RTCM/clock_orbit_rtcm.h
r1809 r1841 6 6 Name: clock_orbit_rtcm.h 7 7 Project: RTCM3 8 Version: $Id: clock_orbit_rtcm.h,v 1. 4 2009/04/24 08:36:34stoecker Exp $8 Version: $Id: clock_orbit_rtcm.h,v 1.5 2009/05/12 13:19:03 stoecker 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= 3001, COTYPE_GPSCLOCK=3002,19 COTYPE_GPSCOMBINED= 3004, COTYPE_GPSURA=3005, COTYPE_GPSHR=3006,18 COTYPE_GPSORBIT=1057, COTYPE_GPSCLOCK=1058, 19 COTYPE_GPSCOMBINED=1060, COTYPE_GPSURA=1061, COTYPE_GPSHR=1062, 20 20 21 COTYPE_GLONASSORBIT= 3007, COTYPE_GLONASSCLOCK=3008,22 COTYPE_GLONASSCOMBINED= 3010, COTYPE_GLONASSURA=3011, COTYPE_GLONASSHR=3012,21 COTYPE_GLONASSORBIT=1063, COTYPE_GLONASSCLOCK=1064, 22 COTYPE_GLONASSCOMBINED=1066, COTYPE_GLONASSURA=1067, COTYPE_GLONASSHR=1068, 23 23 24 24 COTYPE_AUTO=0 }; 25 enum BiasType { BTYPE_GPS= 3003, BTYPE_GLONASS=3009, BTYPE_AUTO = 0 };25 enum BiasType { BTYPE_GPS=1059, BTYPE_GLONASS=1065, BTYPE_AUTO = 0 }; 26 26 27 27 enum COR_CONSTANTS {
Note:
See TracChangeset
for help on using the changeset viewer.