source: ntrip/trunk/BNC/RTIGS/rtstruct.h@ 221

Last change on this file since 221 was 52, checked in by mervart, 18 years ago

* empty log message *

File size: 9.0 KB
Line 
1/***************************************************************************
2 rtstruct.h - description
3 -------------------
4 begin : Tue Mar 7 2000
5 copyright : (C) 2000 by Ken MacLeod
6 email : macleod@geod.nrcan.gc.ca
7 ***************************************************************************/
8
9/***************************************************************************
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 ***************************************************************************/
17/*-------------------------------------------------------------------------*/
18/* Name : rtstruct.h */
19
20/* Purpose : structure definitions for the wide area prototype */
21
22/* RCS: $Header: rtstruct.h,v 3.10 99/08/18 15:06:33 macleod Released $ */
23
24/* Externals : */
25/*-------------------------------------------------------------------------*/
26#ifndef _RTSTRUCT
27#define _RTSTRUCT
28
29/**************************************************************************/
30/*** ***/
31/*** RTAP Function Prototypes: ***/
32/*** ***/
33/*** 1) typedef defines the RTAP types for non-RTAP ***/
34/*** compiles ***/
35/*** ***/
36/*** 2) To compile within RTAP use -D_RTAP compile option ***/
37/*** ***/
38/*** Note: Most function prototypes are commented out until the ***/
39/*** corresponding functions are changed accordingly ***/
40/*** ***/
41/**************************************************************************/
42
43#ifdef _RTAP
44
45#include <rtap/types.h>
46#include <rtap/database.h>
47
48#else
49
50typedef double rtDouble;
51typedef float rtFloat;
52typedef char rtChar;
53typedef unsigned char rtUInt8;
54typedef unsigned short rtUInt16;
55typedef unsigned int rtUInt32;
56typedef int rtInt32;
57typedef short rtInt16;
58typedef char rtInt8;
59typedef int rtInt;
60typedef struct timeval rtTime;
61
62typedef rtUInt32 rtDbQuality;
63typedef rtUInt8 rtLogical;
64typedef rtUInt8 rtBytes4[4];
65typedef rtUInt8 rtBytes8[8];
66typedef rtUInt8 rtBytes12[12];
67typedef rtUInt8 rtBytes16[16];
68typedef rtUInt8 rtBytes20[20];
69typedef rtUInt8 rtBytes32[32];
70typedef rtUInt8 rtBytes48[48];
71typedef rtUInt8 rtBytes64[64];
72typedef rtUInt8 rtBytes80[80];
73typedef rtUInt8 rtBytes128[128];
74typedef rtUInt8 rtBytes256[256];
75
76#endif
77
78/* Now define our constants */
79/* Our CONS_T structure member names are now lower case to prevent conflict */
80
81#define MAX_STA (24) /* maximum stations */
82#define PI (3.141592653589793) /* value of PI */
83#define DTR (0.017453292519943) /* deg to rad conversion con. */
84#define C (299792458.00) /* speed of light in vaccuum */
85#define F1 (1575.42E+06) /* GPS L1 frequency */
86#define F1_SQUARE (F1 * F1) /* GPS L1 frequency squared */
87#define L1 (C / F1) /* GPS L1 wavelength */
88#define F2 (1227.60E+06) /* GPS L2 frequency */
89#define F2_SQUARE (F2 * F2) /* GPS L2 frequency squared */
90#define L2 (C / F2) /* GPS L2 wavelength */
91#define F3 (F1 - F2) /* GPS widelane frequency */
92#define L3 (C / F3) /* GPS widelane wavelength */
93#define F1ION (F2_SQUARE / (F1_SQUARE - F2_SQUARE)) /* L1 iono scale factor */
94#define F2ION (F1_SQUARE / (F1_SQUARE - F2_SQUARE)) /* L2 iono scale factor */
95#define IonoH (350000.0) /* Ionospheric height in metres */
96
97 /*******************************
98 * Content: Broadcast Orbit
99 * Representation
100 ********************************/
101typedef struct broadcast{
102double satellite; /* satellite number */
103double gps_week; /* gps week number from 81/01/06*/
104double user_range_acc; /* user range accuracy in meters */
105double sat_health; /* satellite health (all bits) */
106double fit_interval; /* ephemeris fit interval */
107double l2code; /* Codes on L2 indicator */
108double l2pflag; /* Data flag for L2 P code */
109double issue_of_clock; /* issue of clock */
110double issue_of_eph; /* issue of ephemeris */
111double transmit_time; /* time of transmission */
112double clock_ref_time; /* reference time of the clock */
113double eph_ref_time; /* reference time of the ephem */
114double a0; /* satellite clock coefficient */
115double a1; /* satellite clock coefficient */
116double a2; /* satellite clock coefficient */
117double ref_mean_anmly; /* mean anomoly at reference time */
118double mean_mot_diff; /* mean motion difference */
119double orbit_ecc; /* orbit eccentricity */
120double orbit_semimaj; /* square root of orbit semimajor axis */
121double arg_of_perigee; /* argument of perigee */
122double orbit_incl; /* orbit inclination */
123double incl_rate; /* orbit inclination rate */
124double right_asc; /* right ascension */
125double right_asc_rate; /* rate of right ascension */
126double lat_cos_corr; /* ampl of cos harm corr to arg of lat */
127double lat_sin_corr; /* ampl of sin harm corr to arg of lat */
128double orbit_cos_corr; /* ampl of cos harm corr to orbit */
129double orbit_sin_corr; /* ampl of sin harm corr to orbit */
130double incl_cos_corr; /* ampl of cos harm corr to the incl */
131double incl_sin_corr; /* ampl of sin harm corr to the incl */
132double group_delay; /* estimated group delay differential */
133}BEPH_T;
134
135
136
137 /******************************
138 * Content:Receiver independent
139 * GPS observation data structure
140 * contains all possible obs
141 *******************************/
142typedef struct complete_measurement{
143unsigned long GPSTime; /* broadcast time sec.*/
144unsigned char chn; /* Channel*/
145unsigned char sat_prn; /* satellite ID*/
146unsigned short ntrvl; /* number of seconds */
147unsigned char flag[4]; /*observation quality flags*/
148float l1_sn; /* signal-to-noise CA frequency 1 */
149
150double l1_pseudo_range; /* frequency-1 CA pseudorange */
151double l1_phase; /* frequency-1 CA carrier phase */
152 /*KML for this struct SNR will be DBHz */
153double p1_pseudo_range; /* frequency-1 P1 pseudorange */
154double p1_phase; /* frequency-1 P1 carrier phase */
155float p1_sn; /* signal-to-noise P1 frequency 1 */
156float l2_sn; /* signal-to-noise frequency 2 */
157
158 /*KML for this struct SNR will be DBHz */
159double l2_pseudo_range; /* frequency-2 pseudorange (XCorr) */
160double l2_phase; /* frequency-2 carrier phase (XCorr) */
161 /*KML for this struct SNR will be DBHz */
162double p2_pseudo_range; /* frequency-2 pseudorange */
163double p2_phase; /* frequency-2 carrier phase */
164}CMEAS_T;
165
166
167
168
169 /*******************************
170 * Content:Turbo Rogue Receiver
171 * Raw Turbo Broadcast Message
172 *******************************/
173typedef struct rawtbeph{
174char block_type; /* Turbo record type */
175char block_length; /* Turbo record in bytes */
176char Satellite; /* Sat. PRN */
177char Dummy;
178long GPSEpochTime;
179long GPSCollectedTime;
180unsigned long SubFrame1[6]; /* SubFrame1 hexbits */
181unsigned long SubFrame2[6]; /* SubFrame2 hexbits */
182unsigned long SubFrame3[6]; /* SubFrame3 hexbits */
183}RNAV_T;
184
185 /********************************
186 * Content: Turbo Rogue Receiver
187 * Raw TurboRogue GPS observation
188 ********************************/
189typedef struct rawtbobserv{
190char BlockType;
191char BlockSize;
192char Satellite;
193char Channel;
194long GPSTimeTag;
195char SampleInterval;
196char Flags;
197unsigned short SNR[3];
198double CAfaz;
199double CAtau;
200float faz1;
201float tau1;
202float faz2;
203float tau2;
204}TBIN_T;
205
206 /*******************************
207 * Content:Turbo Rogue Receiver
208 * Turbo Broadcast Message
209 *******************************/
210typedef struct reducedbeph{
211long Satellite;
212long GPSCollectedTime;
213unsigned long SubFrame1[6]; /* SubFrame1 hexbits */
214unsigned long SubFrame2[6]; /* SubFrame2 hexbits */
215unsigned long SubFrame3[6]; /* SubFrame3 hexbits */
216}TNAV_T;
217
218
219 /*************************************
220 * Content: Meteorological Observations
221 * Summarized met data
222 *************************************/
223typedef struct scaledmet{
224long GPSTime; /*GPS Time */
225long Temp; /*scaled temperature */
226long TempStdDev; /*scaled temp. std dev */
227long Pressure; /*scaled pressure */
228long PressureStdDev ; /*scaled press. std dev */
229long RelHum; /*scaled percentage */
230long RelHumStdDev; /*scaled prec. std dev */
231}METS_T;
232
233#endif
Note: See TracBrowser for help on using the repository browser.