source: ntrip/trunk/rtcm3torinex/lib/rtcm3torinexsupport.c@ 5324

Last change on this file since 5324 was 5324, checked in by weber, 11 years ago

Corrected that Galileo E1 observations were missing

  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1/*
2 Converter for RTCM3 data to RINEX.
3 $Id: rtcm3torinexsupport.c 5324 2013-07-17 17:07:36Z weber $
4 Copyright (C) 2005-2012 by Dirk Stöcker <stoecker@alberding.eu>
5
6 This software is a complete NTRIP-RTCM3 to RINEX converter as well as
7 a module of the BNC tool for multiformat conversion. Contact Dirk
8 Stöcker for suggestions and bug reports related to the RTCM3 to RINEX
9 conversion problems and the author of BNC for all the other problems.
10
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 or read http://www.gnu.org/licenses/gpl.txt
25*/
26
27#include "rtcm3torinex.h"
28
29int rrinex3codetoentry(const char *code)
30{
31 int res = 0;
32 switch(code[0])
33 {
34 case 'C': res += GNSSENTRY_CODE; break;
35 case 'L': res += GNSSENTRY_PHASE; break;
36 case 'D': res += GNSSENTRY_DOPPLER; break;
37 case 'S': res += GNSSENTRY_SNR; break;
38 default:
39 return -1;
40 }
41 switch(code[1])
42 {
43 case '1':
44 switch(code[2])
45 {
46 default:
47 case 'C': res += GNSSENTRY_TYPEC1; break;
48 case 'P': case'W': case 'Y': res += GNSSENTRY_TYPEP1; break;
49 case 'A': case'B':
50 case 'S': case'L': case 'X': res += GNSSENTRY_TYPEC1; break;
51 case 'Z': res += GNSSENTRY_TYPECSAIF; break;
52 }
53 break;
54 case '2':
55 switch(code[2])
56 {
57 default:
58 case 'P': case 'W': case 'Y': res += GNSSENTRY_TYPEP2; break;
59 case 'C': case 'S': case 'L': case 'X': res += GNSSENTRY_TYPEC2; break;
60 }
61 break;
62 case '5':
63 res += GNSSENTRY_TYPEC5;
64 break;
65 case '6':
66 res += GNSSENTRY_TYPEC6;
67 break;
68 case '7':
69 res += GNSSENTRY_TYPEC5B;
70 break;
71 case '8':
72 res += GNSSENTRY_TYPEC5AB;
73 break;
74 }
75 return res;
76}
Note: See TracBrowser for help on using the repository browser.