- Timestamp:
- Sep 2, 2008, 9:45:48 AM (16 years ago)
- Location:
- trunk/rtcm3torinex
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/rtcm3torinex/rtcm3torinex.c
r1091 r1092 1 1 /* 2 2 Converter for RTCM3 data to RINEX. 3 $Id: rtcm3torinex.c,v 1. 30 2008/09/01 07:47:15 stoecker Exp $3 $Id: rtcm3torinex.c,v 1.15 2008/08/15 17:00:03 weber 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. 30$";53 static char revisionstr[] = "$Revision: 1.15 $"; 54 54 55 55 #ifndef COMPILEDATE … … 237 237 } 238 238 239 staticvoid updatetime(int *week, int *tow, int tk, int fixnumleap)239 void updatetime(int *week, int *tow, int tk, int fixnumleap) 240 240 { 241 241 int y,m,d,k,l, nul; … … 283 283 284 284 GETBITS(type,12) 285 #ifndef NO_RTCM3_MAIN 286 handle->typeList[handle->typeSize] = type; /* RTCM message types */ 287 if(handle->typeSize < 100) {handle->typeSize += 1;} /* RTCM message types */ 288 #endif /* NO_RTCM3_MAIN */ 285 289 switch(type) 286 290 { … … 303 307 if(sv & 2) 304 308 ge->flags |= GPSEPHF_L2CACODE; 305 GETFLOATSIGN(ge->IDOT, 14, PI/(double)(1<<30)/(double)(1<<13))309 GETFLOATSIGN(ge->IDOT, 14, R2R_PI/(double)(1<<30)/(double)(1<<13)) 306 310 GETBITS(ge->IODE, 8) 307 311 GETBITS(ge->TOC, 16) … … 312 316 GETBITS(ge->IODC, 10) 313 317 GETFLOATSIGN(ge->Crs, 16, 1.0/(double)(1<<5)) 314 GETFLOATSIGN(ge->Delta_n, 16, PI/(double)(1<<30)/(double)(1<<13))315 GETFLOATSIGN(ge->M0, 32, PI/(double)(1<<30)/(double)(1<<1))318 GETFLOATSIGN(ge->Delta_n, 16, R2R_PI/(double)(1<<30)/(double)(1<<13)) 319 GETFLOATSIGN(ge->M0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1)) 316 320 GETFLOATSIGN(ge->Cuc, 16, 1.0/(double)(1<<29)) 317 321 GETFLOAT(ge->e, 32, 1.0/(double)(1<<30)/(double)(1<<3)) … … 322 326 323 327 GETFLOATSIGN(ge->Cic, 16, 1.0/(double)(1<<29)) 324 GETFLOATSIGN(ge->OMEGA0, 32, PI/(double)(1<<30)/(double)(1<<1))328 GETFLOATSIGN(ge->OMEGA0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1)) 325 329 GETFLOATSIGN(ge->Cis, 16, 1.0/(double)(1<<29)) 326 GETFLOATSIGN(ge->i0, 32, PI/(double)(1<<30)/(double)(1<<1))330 GETFLOATSIGN(ge->i0, 32, R2R_PI/(double)(1<<30)/(double)(1<<1)) 327 331 GETFLOATSIGN(ge->Crc, 16, 1.0/(double)(1<<5)) 328 GETFLOATSIGN(ge->omega, 32, PI/(double)(1<<30)/(double)(1<<1))329 GETFLOATSIGN(ge->OMEGADOT, 24, PI/(double)(1<<30)/(double)(1<<13))332 GETFLOATSIGN(ge->omega, 32, R2R_PI/(double)(1<<30)/(double)(1<<1)) 333 GETFLOATSIGN(ge->OMEGADOT, 24, R2R_PI/(double)(1<<30)/(double)(1<<13)) 330 334 GETFLOATSIGN(ge->TGD, 8, 1.0/(double)(1<<30)/(double)(1<<1)) 331 335 GETBITS(ge->SVhealth, 6) … … 772 776 }; 773 777 774 staticvoid converttime(struct converttimeinfo *c, int week, int tow)778 void converttime(struct converttimeinfo *c, int week, int tow) 775 779 { 776 780 int i, k, doy, j; /* temporary variables */ … … 842 846 } 843 847 848 #ifdef NO_RTCM3_MAIN 849 #define NUMSTARTSKIP 1 850 #else 844 851 #define NUMSTARTSKIP 3 852 #endif 853 845 854 void HandleHeader(struct RTCM3ParserData *Parser) 846 855 { 856 #ifdef NO_RTCM3_MAIN 857 int i; 858 if(Parser->rinex3) 859 { 860 #define CHECKFLAGSNEW(a, b, c) \ 861 { \ 862 Parser->dataflag##a[Parser->numdatatypes##a] = GNSSDF_##b##DATA; \ 863 Parser->datapos##a[Parser->numdatatypes##a] = GNSSENTRY_##b##DATA; \ 864 ++Parser->numdatatypes##a; \ 865 } 866 867 CHECKFLAGSNEW(GPS, C1, C1C) 868 CHECKFLAGSNEW(GPS, L1C, L1C) 869 CHECKFLAGSNEW(GPS, D1C, D1C) 870 CHECKFLAGSNEW(GPS, S1C, S1C) 871 CHECKFLAGSNEW(GPS, P1, C1P) 872 CHECKFLAGSNEW(GPS, L1P, L1P) 873 CHECKFLAGSNEW(GPS, D1P, D1P) 874 CHECKFLAGSNEW(GPS, S1P, S1P) 875 CHECKFLAGSNEW(GPS, P2, C2P) 876 CHECKFLAGSNEW(GPS, L2P, L2P) 877 CHECKFLAGSNEW(GPS, D2P, D2P) 878 CHECKFLAGSNEW(GPS, S2P, S2P) 879 CHECKFLAGSNEW(GPS, C2, C2X) 880 CHECKFLAGSNEW(GPS, L2C, L2X) 881 CHECKFLAGSNEW(GPS, D2C, D2X) 882 CHECKFLAGSNEW(GPS, S2C, S2X) 883 CHECKFLAGSNEW(GLO, C1, C1C) 884 CHECKFLAGSNEW(GLO, L1C, L1C) 885 CHECKFLAGSNEW(GLO, D1C, D1C) 886 CHECKFLAGSNEW(GLO, S1C, S1C) 887 CHECKFLAGSNEW(GLO, P1, C1P) 888 CHECKFLAGSNEW(GLO, L1P, L1P) 889 CHECKFLAGSNEW(GLO, D1P, D1P) 890 CHECKFLAGSNEW(GLO, S1P, S1P) 891 CHECKFLAGSNEW(GLO, P2, C2P) 892 CHECKFLAGSNEW(GLO, L2P, L2P) 893 CHECKFLAGSNEW(GLO, D2P, D2P) 894 CHECKFLAGSNEW(GLO, S2P, S2P) 895 CHECKFLAGSNEW(GLO, C2, C2C) 896 CHECKFLAGSNEW(GLO, L2C, L2C) 897 CHECKFLAGSNEW(GLO, D2C, D2C) 898 CHECKFLAGSNEW(GLO, S2C, S2C) 899 } 900 else 901 { 902 #define CHECKFLAGS(a, b) \ 903 { \ 904 if(data[RINEXENTRY_##b##DATA]) \ 905 { \ 906 Parser->dataflagGPS[data[RINEXENTRY_##b##DATA]-1] = GNSSDF_##a##DATA; \ 907 Parser->dataposGPS[data[RINEXENTRY_##b##DATA]-1] = GNSSENTRY_##a##DATA; \ 908 } \ 909 else \ 910 { \ 911 Parser->dataflag[Parser->numdatatypesGPS] = GNSSDF_##a##DATA; \ 912 Parser->datapos[Parser->numdatatypesGPS] = GNSSENTRY_##a##DATA; \ 913 data[RINEXENTRY_##b##DATA] = ++Parser->numdatatypesGPS; \ 914 } \ 915 } 916 917 int data[RINEXENTRY_NUMBER]; 918 for(i = 0; i < RINEXENTRY_NUMBER; ++i) data[i] = 0; 919 920 CHECKFLAGS(C1,C1) 921 CHECKFLAGS(C2,C2) 922 CHECKFLAGS(P1,P1) 923 CHECKFLAGS(P2,P2) 924 CHECKFLAGS(L1C,L1) 925 CHECKFLAGS(L1P,L1) 926 CHECKFLAGS(L2C,L2) 927 CHECKFLAGS(L2P,L2) 928 CHECKFLAGS(D1C,D1) 929 CHECKFLAGS(D1P,D1) 930 CHECKFLAGS(D2C,D2) 931 CHECKFLAGS(D2P,D2) 932 CHECKFLAGS(S1C,S1) 933 CHECKFLAGS(S1P,S1) 934 CHECKFLAGS(S2C,S2) 935 CHECKFLAGS(S2P,S2) 936 } 937 #else /* NO_RTCM3_MAIN */ 847 938 struct HeaderData hdata; 848 939 char thebuffer[MAXHEADERBUFFERSIZE]; … … 1135 1226 } 1136 1227 1137 #ifndef NO_RTCM3_MAIN1138 1228 for(i = 0; i < hdata.numheaders; ++i) 1139 1229 { … … 1532 1622 1533 1623 #ifndef NO_RTCM3_MAIN 1534 static char datestr[] = "$Date: 2008/0 9/01 07:47:15$";1624 static char datestr[] = "$Date: 2008/08/15 17:00:03 $"; 1535 1625 1536 1626 /* The string, which is send as agent in HTTP request */ -
trunk/rtcm3torinex/rtcm3torinex.h
r502 r1092 4 4 /* 5 5 Converter for RTCM3 data to RINEX. 6 $Id: rtcm3torinex.h,v 1. 6 2007/01/15 13:01:40 stoecker Exp $7 Copyright (C) 2005-2006 by Dirk St oecker <stoecker@alberding.eu>6 $Id: rtcm3torinex.h,v 1.11 2008/08/09 23:58:23 weber Exp $ 7 Copyright (C) 2005-2006 by Dirk Stöcker <stoecker@alberding.eu> 8 8 9 9 This program is free software; you can redistribute it and/or modify … … 115 115 #define GPSEPHF_VALIDATED (1<<3) /* data is completely valid */ 116 116 117 #define PI 3.1415926535898117 #define R2R_PI 3.1415926535898 118 118 119 119 struct gpsephemeris { … … 194 194 int lastlockl1[64]; 195 195 int lastlockl2[64]; 196 #ifndef NO_RTCM3_MAIN 197 int typeSize; /* RTCM message types */ 198 int typeList[101]; /* RTCM message types */ 199 #endif /* NO_RTCM3_MAIN */ 196 200 int datapos[RINEXENTRY_NUMBER]; 197 201 int dataflag[RINEXENTRY_NUMBER];
Note:
See TracChangeset
for help on using the changeset viewer.