Changeset 4371 in ntrip for trunk/rtcm3torinex/lib/rtcm3torinex.c
- Timestamp:
- Jul 3, 2012, 2:10:38 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/rtcm3torinex/lib/rtcm3torinex.c
r4370 r4371 1156 1156 }; 1157 1157 1158 int sys = RTCM3_MSM_GPS, i=0, count, j, old = 0, wasnoamb = 0; 1158 int sys = RTCM3_MSM_GPS, i=0, count, j, old = 0, wasnoamb = 0, 1159 start=PRN_GPS_START; 1159 1160 int syncf, sigmask, numsat = 0, numsig = 0, numcells; 1160 1161 uint64_t satmask, cellmask, ui; … … 1170 1171 SKIPBITS(12) 1171 1172 if(type >= 1121) 1173 { 1172 1174 sys = RTCM3_MSM_COMPASS; 1175 start = PRN_COMPASS_START; 1176 } 1173 1177 else if(type >= 1111) 1178 { 1174 1179 sys = RTCM3_MSM_QZSS; 1180 start = PRN_QZSS_START; 1181 } 1175 1182 else if(type >= 1101) 1183 { 1176 1184 sys = RTCM3_MSM_SBAS; 1185 start = PRN_SBAS_START; 1186 } 1177 1187 else if(type >= 1091) 1188 { 1178 1189 sys = RTCM3_MSM_GALILEO; 1190 start = PRN_GALILEO_START; 1191 } 1179 1192 else if(type >= 1081) 1193 { 1180 1194 sys = RTCM3_MSM_GLONASS; 1195 start = PRN_GLONASS_START; 1196 } 1181 1197 1182 1198 switch(sys) … … 1420 1436 fullsat += PRN_GIOVE_START-50; 1421 1437 else 1422 fullsat += s ys;1438 fullsat += start; 1423 1439 1424 1440 for(num = 0; num < gnss->numsats … … 1430 1446 1431 1447 gnss->codetype[num] = cd.code; 1448 if(!handle->info[sys].type[cd.typeR]) 1449 { 1450 handle->info[sys].type[cd.typeR] = 1451 handle->info[sys].type[cd.typeP] = 1452 handle->info[sys].type[cd.typeD] = 1453 handle->info[sys].type[cd.typeS] = cd.code[1]; 1454 } 1432 1455 1433 1456 switch(type % 10) … … 1711 1734 return 1+snprintf(buffer, buffersize, 1712 1735 rinex3 ? 1713 "RTCM3TOR . %-10.10s%-20.20s%04d%02d%02d %02d%02d%02d UTC "1736 "RTCM3TORINEX %-7.7s%-20.20s%04d%02d%02d %02d%02d%02d UTC " 1714 1737 "PGM / RUN BY / DATE" : 1715 "RTCM3TOR . %-10.10s%-20.20s%04d-%02d-%02d %02d:%02d "1738 "RTCM3TORINEX %-7.7s%-20.20s%04d-%02d-%02d %02d:%02d " 1716 1739 "PGM / RUN BY / DATE", revisionstr, user, 1900+t2->tm_year, 1717 1740 t2->tm_mon+1, t2->tm_mday, t2->tm_hour, t2->tm_min, t2->tm_sec); … … 1735 1758 if(Parser->allflags & GNSSDF_##b##DATA) \ 1736 1759 { \ 1737 Parser-> dataflag##a[Parser->numdatatypes##a] = GNSSDF_##b##DATA; \1738 Parser-> datapos##a[Parser->numdatatypes##a] = GNSSENTRY_##b##DATA; \1739 ++Parser-> numdatatypes##a; \1760 Parser->info[RTCM3_MSM_##a].flags[Parser->numdatatypes##a] = GNSSDF_##b##DATA; \ 1761 Parser->info[RTCM3_MSM_##a].pos[Parser->numdatatypes##a] = GNSSENTRY_##b##DATA; \ 1762 ++Parser->info[RTCM3_MSM_##a].numdtypes; \ 1740 1763 } 1741 1764 … … 1780 1803 if(data[RINEXENTRY_##b##DATA]) \ 1781 1804 { \ 1782 Parser-> dataflagGPS[data[RINEXENTRY_##b##DATA]-1] = GNSSDF_##a##DATA; \1783 Parser-> dataposGPS[data[RINEXENTRY_##b##DATA]-1] = GNSSENTRY_##a##DATA; \1805 Parser->info[RTCM3_MSM_GPS].flags[data[RINEXENTRY_##b##DATA]-1] = GNSSDF_##a##DATA; \ 1806 Parser->info[RTCM3_MSM_GPS].pos[data[RINEXENTRY_##b##DATA]-1] = GNSSENTRY_##a##DATA; \ 1784 1807 } \ 1785 1808 else \ 1786 1809 { \ 1787 Parser->dataflag[Parser-> numdatatypesGPS] = GNSSDF_##a##DATA; \1788 Parser->datapos[Parser-> numdatatypesGPS] = GNSSENTRY_##a##DATA; \1789 data[RINEXENTRY_##b##DATA] = ++Parser-> numdatatypesGPS; \1810 Parser->dataflag[Parser->info[RTCM3_MSM_GPS].numtypes] = GNSSDF_##a##DATA; \ 1811 Parser->datapos[Parser->info[RTCM3_MSM_GPS].numtypes] = GNSSENTRY_##a##DATA; \ 1812 data[RINEXENTRY_##b##DATA] = ++Parser->info[RTCM3_MSM_GPS].numtypes; \ 1790 1813 } \ 1791 1814 } … … 1889 1912 if(flags & GNSSDF_##b##DATA) \ 1890 1913 { \ 1891 Parser->dataflag##a[Parser->numdatatypes##a] = GNSSDF_##b##DATA; \ 1892 Parser->datapos##a[Parser->numdatatypes##a] = GNSSENTRY_##b##DATA; \ 1893 ++Parser->numdatatypes##a; \ 1894 snprintf(tbuffer+tbufferpos, sizeof(tbuffer)-tbufferpos, " %-3s", #c); \ 1914 Parser->info[RTCM3_MSM_##a].flags[Parser->info[RTCM3_MSM_##a].numtypes] \ 1915 = GNSSDF_##b##DATA; \ 1916 Parser->info[RTCM3_MSM_##a].pos[Parser->info[RTCM3_MSM_##a].numtypes] \ 1917 = GNSSENTRY_##b##DATA; \ 1918 ++Parser->info[RTCM3_MSM_##a].numtypes; \ 1919 if(Parser->info[RTCM3_MSM_##a].type[GNSSENTRY_##b##DATA]) \ 1920 snprintf(tbuffer+tbufferpos, sizeof(tbuffer)-tbufferpos, " %-2.2s%c", #c,\ 1921 Parser->info[RTCM3_MSM_##a].type[GNSSENTRY_##b##DATA]); \ 1922 else \ 1923 snprintf(tbuffer+tbufferpos, sizeof(tbuffer)-tbufferpos, " %-3s", #c); \ 1895 1924 tbufferpos += 4; \ 1896 1925 } … … 1901 1930 for(i = 0; i < Parser->Data.numsats; ++i) 1902 1931 flags |= Parser->Data.dataflags[i]; 1932 1933 CHECKFLAGSNEW(SBAS, C1, C1C) 1934 CHECKFLAGSNEW(SBAS, L1C, L1C) 1935 CHECKFLAGSNEW(SBAS, D1C, D1C) 1936 CHECKFLAGSNEW(SBAS, S1C, S1C) 1937 CHECKFLAGSNEW(SBAS, P1, C1W) 1938 CHECKFLAGSNEW(SBAS, L1P, L1W) 1939 CHECKFLAGSNEW(SBAS, D1P, D1W) 1940 CHECKFLAGSNEW(SBAS, S1P, S1W) 1941 CHECKFLAGSNEW(SBAS, C5, C5) 1942 CHECKFLAGSNEW(SBAS, L5, L5) 1943 CHECKFLAGSNEW(SBAS, D5, D5) 1944 CHECKFLAGSNEW(SBAS, S5, S5) 1945 1946 hdata.data.named.typesofobsS = buffer; 1947 i = 1+snprintf(buffer, buffersize, 1948 "S %3d%-52.52s SYS / # / OBS TYPES", Parser->info[RTCM3_MSM_SBAS].numtypes, tbuffer); 1949 buffer += i; buffersize -= i; 1903 1950 1904 1951 CHECKFLAGSNEW(GPS, C1, C1C) … … 1914 1961 CHECKFLAGSNEW(GPS, D5, D5) 1915 1962 CHECKFLAGSNEW(GPS, S5, S5) 1916 1917 hdata.data.named.typesofobsS = buffer;1918 i = 1+snprintf(buffer, buffersize,1919 "S %3d%-52.52s SYS / # / OBS TYPES", Parser->numdatatypesGPS, tbuffer);1920 buffer += i; buffersize -= i;1921 1922 1963 CHECKFLAGSNEW(GPS, P2, C2P) 1923 1964 CHECKFLAGSNEW(GPS, L2P, L2P) … … 1928 1969 CHECKFLAGSNEW(GPS, D2C, D2X) 1929 1970 CHECKFLAGSNEW(GPS, S2C, S2X) 1930 CHECKFLAGSNEW(GPS, C1N, C1 X)1931 CHECKFLAGSNEW(GPS, L1N, L1 X)1932 CHECKFLAGSNEW(GPS, D1N, D1 X)1933 CHECKFLAGSNEW(GPS, S1N, S1 X)1971 CHECKFLAGSNEW(GPS, C1N, C1) 1972 CHECKFLAGSNEW(GPS, L1N, L1) 1973 CHECKFLAGSNEW(GPS, D1N, D1) 1974 CHECKFLAGSNEW(GPS, S1N, S1) 1934 1975 1935 1976 hdata.data.named.typesofobsG = buffer; 1936 1977 i = 1+snprintf(buffer, buffersize, 1937 "G %3d%-52.52s SYS / # / OBS TYPES", Parser-> numdatatypesGPS, tbuffer);1938 if(Parser-> numdatatypesGPS>13)1978 "G %3d%-52.52s SYS / # / OBS TYPES", Parser->info[RTCM3_MSM_GPS].numtypes, tbuffer); 1979 if(Parser->info[RTCM3_MSM_GPS].numtypes>13) 1939 1980 { 1940 1981 i += snprintf(buffer+i-1, buffersize, … … 1945 1986 tbufferpos = 0; 1946 1987 1947 CHECKFLAGSNEW(GLO , C1, C1C)1948 CHECKFLAGSNEW(GLO , L1C, L1C)1949 CHECKFLAGSNEW(GLO , D1C, D1C)1950 CHECKFLAGSNEW(GLO , S1C, S1C)1951 CHECKFLAGSNEW(GLO , P1, C1P)1952 CHECKFLAGSNEW(GLO , L1P, L1P)1953 CHECKFLAGSNEW(GLO , D1P, D1P)1954 CHECKFLAGSNEW(GLO , S1P, S1P)1955 CHECKFLAGSNEW(GLO , P2, C2P)1956 CHECKFLAGSNEW(GLO , L2P, L2P)1957 CHECKFLAGSNEW(GLO , D2P, D2P)1958 CHECKFLAGSNEW(GLO , S2P, S2P)1959 CHECKFLAGSNEW(GLO , C2, C2C)1960 CHECKFLAGSNEW(GLO , L2C, L2C)1961 CHECKFLAGSNEW(GLO , D2C, D2C)1962 CHECKFLAGSNEW(GLO , S2C, S2C)1988 CHECKFLAGSNEW(GLONASS, C1, C1C) 1989 CHECKFLAGSNEW(GLONASS, L1C, L1C) 1990 CHECKFLAGSNEW(GLONASS, D1C, D1C) 1991 CHECKFLAGSNEW(GLONASS, S1C, S1C) 1992 CHECKFLAGSNEW(GLONASS, P1, C1P) 1993 CHECKFLAGSNEW(GLONASS, L1P, L1P) 1994 CHECKFLAGSNEW(GLONASS, D1P, D1P) 1995 CHECKFLAGSNEW(GLONASS, S1P, S1P) 1996 CHECKFLAGSNEW(GLONASS, P2, C2P) 1997 CHECKFLAGSNEW(GLONASS, L2P, L2P) 1998 CHECKFLAGSNEW(GLONASS, D2P, D2P) 1999 CHECKFLAGSNEW(GLONASS, S2P, S2P) 2000 CHECKFLAGSNEW(GLONASS, C2, C2C) 2001 CHECKFLAGSNEW(GLONASS, L2C, L2C) 2002 CHECKFLAGSNEW(GLONASS, D2C, D2C) 2003 CHECKFLAGSNEW(GLONASS, S2C, S2C) 1963 2004 1964 2005 hdata.data.named.typesofobsR = buffer; 1965 2006 i = 1+snprintf(buffer, buffersize, 1966 "R %3d%-52.52s SYS / # / OBS TYPES", Parser-> numdatatypesGLO, tbuffer);1967 if(Parser-> numdatatypesGLO>13)2007 "R %3d%-52.52s SYS / # / OBS TYPES", Parser->info[RTCM3_MSM_GLONASS].numtypes, tbuffer); 2008 if(Parser->info[RTCM3_MSM_GLONASS].numtypes>13) 1968 2009 { 1969 2010 i += snprintf(buffer+i-1, buffersize, … … 1974 2015 tbufferpos = 0; 1975 2016 1976 CHECKFLAGSNEW(GAL , C1, C1)1977 CHECKFLAGSNEW(GAL , L1C, L1)1978 CHECKFLAGSNEW(GAL , D1C, D1)1979 CHECKFLAGSNEW(GAL , S1C, S1)1980 CHECKFLAGSNEW(GAL , C6, C6)1981 CHECKFLAGSNEW(GAL , L6, L6)1982 CHECKFLAGSNEW(GAL , D6, D6)1983 CHECKFLAGSNEW(GAL , S6, S6)1984 CHECKFLAGSNEW(GAL , C5, C5)1985 CHECKFLAGSNEW(GAL , L5, L5)1986 CHECKFLAGSNEW(GAL , D5, D5)1987 CHECKFLAGSNEW(GAL , S5, S5)1988 CHECKFLAGSNEW(GAL , C5B, C7)1989 CHECKFLAGSNEW(GAL , L5B, L7)1990 CHECKFLAGSNEW(GAL , D5B, D7)1991 CHECKFLAGSNEW(GAL , S5B, S7)1992 CHECKFLAGSNEW(GAL , C5AB, C8)1993 CHECKFLAGSNEW(GAL , L5AB, L8)1994 CHECKFLAGSNEW(GAL , D5AB, D8)1995 CHECKFLAGSNEW(GAL , S5AB, S8)2017 CHECKFLAGSNEW(GALILEO, C1, C1) 2018 CHECKFLAGSNEW(GALILEO, L1C, L1) 2019 CHECKFLAGSNEW(GALILEO, D1C, D1) 2020 CHECKFLAGSNEW(GALILEO, S1C, S1) 2021 CHECKFLAGSNEW(GALILEO, C6, C6) 2022 CHECKFLAGSNEW(GALILEO, L6, L6) 2023 CHECKFLAGSNEW(GALILEO, D6, D6) 2024 CHECKFLAGSNEW(GALILEO, S6, S6) 2025 CHECKFLAGSNEW(GALILEO, C5, C5) 2026 CHECKFLAGSNEW(GALILEO, L5, L5) 2027 CHECKFLAGSNEW(GALILEO, D5, D5) 2028 CHECKFLAGSNEW(GALILEO, S5, S5) 2029 CHECKFLAGSNEW(GALILEO, C5B, C7) 2030 CHECKFLAGSNEW(GALILEO, L5B, L7) 2031 CHECKFLAGSNEW(GALILEO, D5B, D7) 2032 CHECKFLAGSNEW(GALILEO, S5B, S7) 2033 CHECKFLAGSNEW(GALILEO, C5AB, C8) 2034 CHECKFLAGSNEW(GALILEO, L5AB, L8) 2035 CHECKFLAGSNEW(GALILEO, D5AB, D8) 2036 CHECKFLAGSNEW(GALILEO, S5AB, S8) 1996 2037 1997 2038 hdata.data.named.typesofobsE = buffer; 1998 2039 i = 1+snprintf(buffer, buffersize, 1999 "E %3d%-52.52s SYS / # / OBS TYPES", Parser-> numdatatypesGAL, tbuffer);2000 if(Parser-> numdatatypesGAL>13)2040 "E %3d%-52.52s SYS / # / OBS TYPES", Parser->info[RTCM3_MSM_GALILEO].numtypes, tbuffer); 2041 if(Parser->info[RTCM3_MSM_GALILEO].numtypes>13) 2001 2042 { 2002 2043 i += snprintf(buffer+i-1, buffersize, … … 2007 2048 tbufferpos = 0; 2008 2049 2009 CHECKFLAGSNEW(COM , CB1, C2I)2010 CHECKFLAGSNEW(COM , LB1, L2I)2011 CHECKFLAGSNEW(COM , DB1, D2I)2012 CHECKFLAGSNEW(COM , SB1, S2I)2013 CHECKFLAGSNEW(COM , CB2, C7I)2014 CHECKFLAGSNEW(COM , LB2, L7I)2015 CHECKFLAGSNEW(COM , DB2, D7I)2016 CHECKFLAGSNEW(COM , SB2, S7I)2017 CHECKFLAGSNEW(COM , CB3, C6I)2018 CHECKFLAGSNEW(COM , LB3, L6I)2019 CHECKFLAGSNEW(COM , DB3, D6I)2020 CHECKFLAGSNEW(COM , SB3, S6I)2050 CHECKFLAGSNEW(COMPASS, CB1, C2I) 2051 CHECKFLAGSNEW(COMPASS, LB1, L2I) 2052 CHECKFLAGSNEW(COMPASS, DB1, D2I) 2053 CHECKFLAGSNEW(COMPASS, SB1, S2I) 2054 CHECKFLAGSNEW(COMPASS, CB2, C7I) 2055 CHECKFLAGSNEW(COMPASS, LB2, L7I) 2056 CHECKFLAGSNEW(COMPASS, DB2, D7I) 2057 CHECKFLAGSNEW(COMPASS, SB2, S7I) 2058 CHECKFLAGSNEW(COMPASS, CB3, C6I) 2059 CHECKFLAGSNEW(COMPASS, LB3, L6I) 2060 CHECKFLAGSNEW(COMPASS, DB3, D6I) 2061 CHECKFLAGSNEW(COMPASS, SB3, S6I) 2021 2062 2022 2063 hdata.data.named.typesofobsC = buffer; 2023 2064 i = 1+snprintf(buffer, buffersize, 2024 "C %3d%-52.52s SYS / # / OBS TYPES", Parser-> numdatatypesCOM, tbuffer);2025 if(Parser-> numdatatypesCOM>13)2065 "C %3d%-52.52s SYS / # / OBS TYPES", Parser->info[RTCM3_MSM_COMPASS].numtypes, tbuffer); 2066 if(Parser->info[RTCM3_MSM_COMPASS].numtypes>13) 2026 2067 { 2027 2068 i += snprintf(buffer+i-1, buffersize, … … 2032 2073 tbufferpos = 0; 2033 2074 2034 CHECKFLAGSNEW(QZS , C1, C1C)2035 CHECKFLAGSNEW(QZS , L1C, L1C)2036 CHECKFLAGSNEW(QZS , D1C, D1C)2037 CHECKFLAGSNEW(QZS , S1C, S1C)2038 2039 CHECKFLAGSNEW(QZS , CSAIF, C1Z)2040 CHECKFLAGSNEW(QZS , LSAIF, L1Z)2041 CHECKFLAGSNEW(QZS , DSAIF, D1Z)2042 CHECKFLAGSNEW(QZS , SSAIF, S1Z)2043 2044 CHECKFLAGSNEW(QZS , C1N, C1X)2045 CHECKFLAGSNEW(QZS , L1N, L1X)2046 CHECKFLAGSNEW(QZS , D1N, D1X)2047 CHECKFLAGSNEW(QZS , S1N, S1X)2048 2049 CHECKFLAGSNEW(QZS , C6, C6)2050 CHECKFLAGSNEW(QZS , L6, L6)2051 CHECKFLAGSNEW(QZS , D6, D6)2052 CHECKFLAGSNEW(QZS , S6, S6)2053 2054 CHECKFLAGSNEW(QZS , C2, C2X)2055 CHECKFLAGSNEW(QZS , L2C, L2X)2056 CHECKFLAGSNEW(QZS , D2C, D2X)2057 CHECKFLAGSNEW(QZS , S2C, S2X)2058 2059 CHECKFLAGSNEW(QZS , C5, C5)2060 CHECKFLAGSNEW(QZS , L5, L5)2061 CHECKFLAGSNEW(QZS , D5, D5)2062 CHECKFLAGSNEW(QZS , S5, S5)2075 CHECKFLAGSNEW(QZSS, C1, C1C) 2076 CHECKFLAGSNEW(QZSS, L1C, L1C) 2077 CHECKFLAGSNEW(QZSS, D1C, D1C) 2078 CHECKFLAGSNEW(QZSS, S1C, S1C) 2079 2080 CHECKFLAGSNEW(QZSS, CSAIF, C1Z) 2081 CHECKFLAGSNEW(QZSS, LSAIF, L1Z) 2082 CHECKFLAGSNEW(QZSS, DSAIF, D1Z) 2083 CHECKFLAGSNEW(QZSS, SSAIF, S1Z) 2084 2085 CHECKFLAGSNEW(QZSS, C1N, C1) 2086 CHECKFLAGSNEW(QZSS, L1N, L1) 2087 CHECKFLAGSNEW(QZSS, D1N, D1) 2088 CHECKFLAGSNEW(QZSS, S1N, S1) 2089 2090 CHECKFLAGSNEW(QZSS, C6, C6) 2091 CHECKFLAGSNEW(QZSS, L6, L6) 2092 CHECKFLAGSNEW(QZSS, D6, D6) 2093 CHECKFLAGSNEW(QZSS, S6, S6) 2094 2095 CHECKFLAGSNEW(QZSS, C2, C2) 2096 CHECKFLAGSNEW(QZSS, L2C, L2) 2097 CHECKFLAGSNEW(QZSS, D2C, D2) 2098 CHECKFLAGSNEW(QZSS, S2C, S2) 2099 2100 CHECKFLAGSNEW(QZSS, C5, C5) 2101 CHECKFLAGSNEW(QZSS, L5, L5) 2102 CHECKFLAGSNEW(QZSS, D5, D5) 2103 CHECKFLAGSNEW(QZSS, S5, S5) 2063 2104 2064 2105 hdata.data.named.typesofobsJ = buffer; 2065 2106 i = 1+snprintf(buffer, buffersize, 2066 "J %3d%-52.52s SYS / # / OBS TYPES", Parser-> numdatatypesQZS, tbuffer);2067 if(Parser-> numdatatypesQZS>13)2107 "J %3d%-52.52s SYS / # / OBS TYPES", Parser->info[RTCM3_MSM_QZSS].numtypes, tbuffer); 2108 if(Parser->info[RTCM3_MSM_QZSS].numtypes>13) 2068 2109 { 2069 2110 i += snprintf(buffer+i-1, buffersize, … … 2079 2120 if(data[RINEXENTRY_##b##DATA]) \ 2080 2121 { \ 2081 Parser-> dataflagGPS[data[RINEXENTRY_##b##DATA]-1] = GNSSDF_##a##DATA; \2082 Parser-> dataposGPS[data[RINEXENTRY_##b##DATA]-1] = GNSSENTRY_##a##DATA; \2122 Parser->info[RTCM3_MSM_GPS].flags[data[RINEXENTRY_##b##DATA]-1] = GNSSDF_##a##DATA; \ 2123 Parser->info[RTCM3_MSM_GPS].pos[data[RINEXENTRY_##b##DATA]-1] = GNSSENTRY_##a##DATA; \ 2083 2124 } \ 2084 2125 else \ 2085 2126 { \ 2086 Parser-> dataflag[Parser->numdatatypesGPS] = GNSSDF_##a##DATA; \2087 Parser-> datapos[Parser->numdatatypesGPS] = GNSSENTRY_##a##DATA; \2088 data[RINEXENTRY_##b##DATA] = ++Parser-> numdatatypesGPS; \2127 Parser->flags[Parser->info[RTCM3_MSM_GPS].numtypes] = GNSSDF_##a##DATA; \ 2128 Parser->pos[Parser->info[RTCM3_MSM_GPS].numtypes] = GNSSENTRY_##a##DATA; \ 2129 data[RINEXENTRY_##b##DATA] = ++Parser->info[RTCM3_MSM_GPS].numtypes; \ 2089 2130 snprintf(tbuffer+tbufferpos, sizeof(tbuffer)-tbufferpos, " "#b); \ 2090 2131 tbufferpos += 6; \ … … 2137 2178 hdata.data.named.typesofobs = buffer; 2138 2179 i = 1+snprintf(buffer, buffersize, 2139 "%6d%-54.54s# / TYPES OF OBSERV", Parser-> numdatatypesGPS, tbuffer);2140 if(Parser-> numdatatypesGPS>9)2180 "%6d%-54.54s# / TYPES OF OBSERV", Parser->info[RTCM3_MSM_GPS].numtypes, tbuffer); 2181 if(Parser->info[RTCM3_MSM_GPS].numtypes>9) 2141 2182 { 2142 2183 i += snprintf(buffer+i-1, buffersize, 2143 2184 "\n %-54.54s# / TYPES OF OBSERV", tbuffer+9*6); 2144 2185 } 2145 if(Parser-> numdatatypesGPS>18)2186 if(Parser->info[RTCM3_MSM_GPS].numtypes>18) 2146 2187 { 2147 2188 i += snprintf(buffer+i-1, buffersize, … … 2459 2500 for(i = 0; i < Parser->Data.numsats; ++i) 2460 2501 { 2461 int glo = 0, gal = 0, qzs = 0, com = 0;2502 int sys[RTCM3_MSM_NUMSYS] = {0,0,0,0,0,0}; 2462 2503 if(Parser->Data.satellites[i] <= PRN_GPS_END) 2504 { 2463 2505 RTCM3Text("G%02d", Parser->Data.satellites[i]); 2506 sys[RTCM3_MSM_GPS] = 1; 2507 } 2464 2508 else if(Parser->Data.satellites[i] >= PRN_GLONASS_START 2465 2509 && Parser->Data.satellites[i] <= PRN_GLONASS_END) 2466 2510 { 2467 2511 RTCM3Text("R%02d", Parser->Data.satellites[i] - (PRN_GLONASS_START-1)); 2468 glo= 1;2512 sys[RTCM3_MSM_GLONASS] = 1; 2469 2513 } 2470 2514 else if(Parser->Data.satellites[i] >= PRN_GALILEO_START … … 2472 2516 { 2473 2517 RTCM3Text("E%02d", Parser->Data.satellites[i] - (PRN_GALILEO_START-1)); 2474 gal= 1;2518 sys[RTCM3_MSM_GALILEO] = 1; 2475 2519 } 2476 2520 else if(Parser->Data.satellites[i] >= PRN_GIOVE_START … … 2478 2522 { 2479 2523 RTCM3Text("E%02d", Parser->Data.satellites[i] - (PRN_GIOVE_START-PRN_GIOVE_OFFSET)); 2480 gal= 1;2524 sys[RTCM3_MSM_GALILEO] = 1; 2481 2525 } 2482 2526 else if(Parser->Data.satellites[i] >= PRN_QZSS_START … … 2484 2528 { 2485 2529 RTCM3Text("J%02d", Parser->Data.satellites[i] - (PRN_QZSS_START-1)); 2486 qzs= 1;2530 sys[RTCM3_MSM_QZSS] = 1; 2487 2531 } 2488 2532 else if(Parser->Data.satellites[i] >= PRN_COMPASS_START … … 2490 2534 { 2491 2535 RTCM3Text("C%02d", Parser->Data.satellites[i] - (PRN_COMPASS_START-1)); 2492 com= 1;2536 sys[RTCM3_MSM_COMPASS] = 1; 2493 2537 } 2494 2538 else if(Parser->Data.satellites[i] >= PRN_SBAS_START 2495 2539 && Parser->Data.satellites[i] <= PRN_SBAS_END) 2540 { 2496 2541 RTCM3Text("S%02d", Parser->Data.satellites[i] - PRN_SBAS_START+20); 2542 sys[RTCM3_MSM_SBAS] = 1; 2543 } 2497 2544 else 2545 { 2498 2546 RTCM3Text("%3d", Parser->Data.satellites[i]); 2499 2500 if(glo) 2501 { 2502 for(j = 0; j < Parser->numdatatypesGLO; ++j) 2547 } 2548 2549 if(sys[RTCM3_MSM_GLONASS]) 2550 { 2551 for(j = 0; j < Parser->info[RTCM3_MSM_GLONASS].numtypes; ++j) 2503 2552 { 2504 int df = Parser-> dataflagGLO[j];2505 int pos = Parser-> dataposGLO[j];2553 int df = Parser->info[RTCM3_MSM_GLONASS].flags[j]; 2554 int pos = Parser->info[RTCM3_MSM_GLONASS].pos[j]; 2506 2555 if((Parser->Data.dataflags[i] & df) 2507 2556 && !isnan(Parser->Data.measdata[i][pos]) … … 2531 2580 } 2532 2581 } 2533 else if( gal)2534 { 2535 for(j = 0; j < Parser-> numdatatypesGAL; ++j)2582 else if(sys[RTCM3_MSM_GALILEO]) 2583 { 2584 for(j = 0; j < Parser->info[RTCM3_MSM_GALILEO].numtypes; ++j) 2536 2585 { 2537 int df = Parser-> dataflagGAL[j];2538 int pos = Parser-> dataposGAL[j];2586 int df = Parser->info[RTCM3_MSM_GALILEO].flags[j]; 2587 int pos = Parser->info[RTCM3_MSM_GALILEO].pos[j]; 2539 2588 if((Parser->Data.dataflags[i] & df) 2540 2589 && !isnan(Parser->Data.measdata[i][pos]) … … 2582 2631 } 2583 2632 } 2584 else if( com)2585 { 2586 for(j = 0; j < Parser-> numdatatypesCOM; ++j)2633 else if(sys[RTCM3_MSM_COMPASS]) 2634 { 2635 for(j = 0; j < Parser->info[RTCM3_MSM_COMPASS].numtypes; ++j) 2587 2636 { 2588 int df = Parser-> dataflagCOM[j];2589 int pos = Parser-> dataposCOM[j];2637 int df = Parser->info[RTCM3_MSM_COMPASS].flags[j]; 2638 int pos = Parser->info[RTCM3_MSM_COMPASS].pos[j]; 2590 2639 if((Parser->Data.dataflags[i] & df) 2591 2640 && !isnan(Parser->Data.measdata[i][pos]) … … 2618 2667 } 2619 2668 } 2620 else if( qzs)2621 { 2622 for(j = 0; j < Parser-> numdatatypesQZS; ++j)2669 else if(sys[RTCM3_MSM_QZSS]) 2670 { 2671 for(j = 0; j < Parser->info[RTCM3_MSM_QZSS].numtypes; ++j) 2623 2672 { 2624 int df = Parser-> dataflagQZS[j];2625 int pos = Parser-> dataposQZS[j];2673 int df = Parser->info[RTCM3_MSM_QZSS].flags[j]; 2674 int pos = Parser->info[RTCM3_MSM_QZSS].pos[j]; 2626 2675 if((Parser->Data.dataflags[i] & df) 2627 2676 && !isnan(Parser->Data.measdata[i][pos]) 2628 && !isinf(Parser->Data.measdata[i][pos])) 2677 && !isinf(Parser->Data.measdata[i][pos]) 2678 && (Parser->Data.codetype[i] 2679 && Parser->info[RTCM3_MSM_QZSS].type[pos] 2680 && Parser->info[RTCM3_MSM_QZSS].type[pos] 2681 == Parser->Data.codetype[i][1])) 2629 2682 { 2630 2683 char lli = ' '; … … 2657 2710 } 2658 2711 } 2712 else if(sys[RTCM3_MSM_SBAS]) 2713 { 2714 for(j = 0; j < Parser->info[RTCM3_MSM_SBAS].numtypes; ++j) 2715 { 2716 int df = Parser->info[RTCM3_MSM_SBAS].flags[j]; 2717 int pos = Parser->info[RTCM3_MSM_SBAS].pos[j]; 2718 if((Parser->Data.dataflags[i] & df) 2719 && !isnan(Parser->Data.measdata[i][pos]) 2720 && !isinf(Parser->Data.measdata[i][pos])) 2721 { 2722 char lli = ' '; 2723 char snr = ' '; 2724 if(df & (GNSSDF_L1CDATA|GNSSDF_L1PDATA)) 2725 { 2726 if(Parser->Data.dataflags2[i] & GNSSDF2_LOCKLOSSL1) 2727 lli = '1'; 2728 snr = '0'+Parser->Data.snrL1[i]; 2729 } 2730 if(df & GNSSDF_L5DATA) 2731 { 2732 if(Parser->Data.dataflags2[i] & GNSSDF2_LOCKLOSSL5) 2733 lli = '1'; 2734 snr = ' '; 2735 } 2736 RTCM3Text("%14.3f%c%c", 2737 Parser->Data.measdata[i][pos],lli,snr); 2738 } 2739 else 2740 { /* no or illegal data */ 2741 RTCM3Text(" "); 2742 } 2743 } 2744 } 2659 2745 else 2660 2746 { 2661 for(j = 0; j < Parser-> numdatatypesGPS; ++j)2747 for(j = 0; j < Parser->info[RTCM3_MSM_GPS].numtypes; ++j) 2662 2748 { 2663 int df = Parser-> dataflagGPS[j];2664 int pos = Parser-> dataposGPS[j];2749 int df = Parser->info[RTCM3_MSM_GPS].flags[j]; 2750 int pos = Parser->info[RTCM3_MSM_GPS].pos[j]; 2665 2751 if((Parser->Data.dataflags[i] & df) 2666 2752 && !isnan(Parser->Data.measdata[i][pos]) … … 2778 2864 for(i = 0; i < Parser->Data.numsats; ++i) 2779 2865 { 2780 for(j = 0; j < Parser-> numdatatypesGPS; ++j)2866 for(j = 0; j < Parser->info[RTCM3_MSM_GPS].numtypes; ++j) 2781 2867 { 2782 2868 int v = 0; 2783 int df = Parser-> dataflag[j];2784 int pos = Parser-> datapos[j];2869 int df = Parser->flags[j]; 2870 int pos = Parser->pos[j]; 2785 2871 if((Parser->Data.dataflags[i] & df) 2786 2872 && !isnan(Parser->Data.measdata[i][pos]) … … 2791 2877 else 2792 2878 { 2793 df = Parser-> dataflagGPS[j];2794 pos = Parser-> dataposGPS[j];2879 df = Parser->info[RTCM3_MSM_GPS].flags[j]; 2880 pos = Parser->info[RTCM3_MSM_GPS].pos[j]; 2795 2881 2796 2882 if((Parser->Data.dataflags[i] & df) … … 2835 2921 Parser->Data.measdata[i][pos],lli,snr); 2836 2922 } 2837 if(j%5 == 4 || j == Parser-> numdatatypesGPS-1)2923 if(j%5 == 4 || j == Parser->info[RTCM3_MSM_GPS].numtypes-1) 2838 2924 RTCM3Text("\n"); 2839 2925 }
Note:
See TracChangeset
for help on using the changeset viewer.