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

Last change on this file since 2452 was 511, checked in by mervart, 17 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: /usr/local/cvsroot/BNC/RTIGS/rtstruct.h,v 1.3 2006/11/13 11:42:14 mervart Exp $ */
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#ifndef PI
83#define PI (3.141592653589793) /* value of PI */
84#endif
85#define DTR (0.017453292519943) /* deg to rad conversion con. */
86#define C (299792458.00) /* speed of light in vaccuum */
87#define F1 (1575.42E+06) /* GPS L1 frequency */
88#define F1_SQUARE (F1 * F1) /* GPS L1 frequency squared */
89#define L1 (C / F1) /* GPS L1 wavelength */
90#define F2 (1227.60E+06) /* GPS L2 frequency */
91#define F2_SQUARE (F2 * F2) /* GPS L2 frequency squared */
92#define L2 (C / F2) /* GPS L2 wavelength */
93#define F3 (F1 - F2) /* GPS widelane frequency */
94#define L3 (C / F3) /* GPS widelane wavelength */
95#define F1ION (F2_SQUARE / (F1_SQUARE - F2_SQUARE)) /* L1 iono scale factor */
96#define F2ION (F1_SQUARE / (F1_SQUARE - F2_SQUARE)) /* L2 iono scale factor */
97#define IonoH (350000.0) /* Ionospheric height in metres */
98
99 /*******************************
100 * Content: Broadcast Orbit
101 * Representation
102 ********************************/
103typedef struct broadcast{
104double satellite; /* satellite number */
105double gps_week; /* gps week number from 81/01/06*/
106double user_range_acc; /* user range accuracy in meters */
107double sat_health; /* satellite health (all bits) */
108double fit_interval; /* ephemeris fit interval */
109double l2code; /* Codes on L2 indicator */
110double l2pflag; /* Data flag for L2 P code */
111double issue_of_clock; /* issue of clock */
112double issue_of_eph; /* issue of ephemeris */
113double transmit_time; /* time of transmission */
114double clock_ref_time; /* reference time of the clock */
115double eph_ref_time; /* reference time of the ephem */
116double a0; /* satellite clock coefficient */
117double a1; /* satellite clock coefficient */
118double a2; /* satellite clock coefficient */
119double ref_mean_anmly; /* mean anomoly at reference time */
120double mean_mot_diff; /* mean motion difference */
121double orbit_ecc; /* orbit eccentricity */
122double orbit_semimaj; /* square root of orbit semimajor axis */
123double arg_of_perigee; /* argument of perigee */
124double orbit_incl; /* orbit inclination */
125double incl_rate; /* orbit inclination rate */
126double right_asc; /* right ascension */
127double right_asc_rate; /* rate of right ascension */
128double lat_cos_corr; /* ampl of cos harm corr to arg of lat */
129double lat_sin_corr; /* ampl of sin harm corr to arg of lat */
130double orbit_cos_corr; /* ampl of cos harm corr to orbit */
131double orbit_sin_corr; /* ampl of sin harm corr to orbit */
132double incl_cos_corr; /* ampl of cos harm corr to the incl */
133double incl_sin_corr; /* ampl of sin harm corr to the incl */
134double group_delay; /* estimated group delay differential */
135}BEPH_T;
136
137
138
139 /******************************
140 * Content:Receiver independent
141 * GPS observation data structure
142 * contains all possible obs
143 *******************************/
144typedef struct complete_measurement{
145unsigned long GPSTime; /* broadcast time sec.*/
146unsigned char chn; /* Channel*/
147unsigned char sat_prn; /* satellite ID*/
148unsigned short ntrvl; /* number of seconds */
149unsigned char flag[4]; /*observation quality flags*/
150float l1_sn; /* signal-to-noise CA frequency 1 */
151
152double l1_pseudo_range; /* frequency-1 CA pseudorange */
153double l1_phase; /* frequency-1 CA carrier phase */
154 /*KML for this struct SNR will be DBHz */
155double p1_pseudo_range; /* frequency-1 P1 pseudorange */
156double p1_phase; /* frequency-1 P1 carrier phase */
157float p1_sn; /* signal-to-noise P1 frequency 1 */
158float l2_sn; /* signal-to-noise frequency 2 */
159
160 /*KML for this struct SNR will be DBHz */
161double l2_pseudo_range; /* frequency-2 pseudorange (XCorr) */
162double l2_phase; /* frequency-2 carrier phase (XCorr) */
163 /*KML for this struct SNR will be DBHz */
164double p2_pseudo_range; /* frequency-2 pseudorange */
165double p2_phase; /* frequency-2 carrier phase */
166}CMEAS_T;
167
168
169
170
171 /*******************************
172 * Content:Turbo Rogue Receiver
173 * Raw Turbo Broadcast Message
174 *******************************/
175typedef struct rawtbeph{
176char block_type; /* Turbo record type */
177char block_length; /* Turbo record in bytes */
178char Satellite; /* Sat. PRN */
179char Dummy;
180long GPSEpochTime;
181long GPSCollectedTime;
182unsigned long SubFrame1[6]; /* SubFrame1 hexbits */
183unsigned long SubFrame2[6]; /* SubFrame2 hexbits */
184unsigned long SubFrame3[6]; /* SubFrame3 hexbits */
185}RNAV_T;
186
187 /********************************
188 * Content: Turbo Rogue Receiver
189 * Raw TurboRogue GPS observation
190 ********************************/
191typedef struct rawtbobserv{
192char BlockType;
193char BlockSize;
194char Satellite;
195char Channel;
196long GPSTimeTag;
197char SampleInterval;
198char Flags;
199unsigned short SNR[3];
200double CAfaz;
201double CAtau;
202float faz1;
203float tau1;
204float faz2;
205float tau2;
206}TBIN_T;
207
208 /*******************************
209 * Content:Turbo Rogue Receiver
210 * Turbo Broadcast Message
211 *******************************/
212typedef struct reducedbeph{
213long Satellite;
214long GPSCollectedTime;
215unsigned long SubFrame1[6]; /* SubFrame1 hexbits */
216unsigned long SubFrame2[6]; /* SubFrame2 hexbits */
217unsigned long SubFrame3[6]; /* SubFrame3 hexbits */
218}TNAV_T;
219
220
221 /*************************************
222 * Content: Meteorological Observations
223 * Summarized met data
224 *************************************/
225typedef struct scaledmet{
226long GPSTime; /*GPS Time */
227long Temp; /*scaled temperature */
228long TempStdDev; /*scaled temp. std dev */
229long Pressure; /*scaled pressure */
230long PressureStdDev ; /*scaled press. std dev */
231long RelHum; /*scaled percentage */
232long RelHumStdDev; /*scaled prec. std dev */
233}METS_T;
234
235#endif
Note: See TracBrowser for help on using the repository browser.