/contrib/ntp/include/mbg_gps166.h

https://bitbucket.org/freebsd/freebsd-head/ · C Header · 582 lines · 254 code · 114 blank · 214 comment · 0 complexity · 193dacc07d150c03cfa0f7b0b3cfd648 MD5 · raw file

  1. /*
  2. * /src/NTP/REPOSITORY/ntp4-dev/include/mbg_gps166.h,v 4.7 2006/06/22 18:41:43 kardel RELEASE_20060622_A
  3. *
  4. * mbg_gps166.h,v 4.7 2006/06/22 18:41:43 kardel RELEASE_20060622_A
  5. *
  6. * $Created: Sun Jul 20 09:20:50 1997 $
  7. *
  8. * File GPSSERIO.H Copyright (c) by Meinberg Funkuhren (www.meinberg.de)
  9. *
  10. * Linkage to PARSE:
  11. * Copyright (c) 1997-2005 by Frank Kardel <kardel <AT> ntp.org>
  12. *
  13. * Redistribution and use in source and binary forms, with or without
  14. * modification, are permitted provided that the following conditions
  15. * are met:
  16. * 1. Redistributions of source code must retain the above copyright
  17. * notice, this list of conditions and the following disclaimer.
  18. * 2. Redistributions in binary form must reproduce the above copyright
  19. * notice, this list of conditions and the following disclaimer in the
  20. * documentation and/or other materials provided with the distribution.
  21. * 3. Neither the name of the author nor the names of its contributors
  22. * may be used to endorse or promote products derived from this software
  23. * without specific prior written permission.
  24. *
  25. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  26. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  27. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  28. * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  29. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  30. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  31. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  32. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  33. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  34. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  35. * SUCH DAMAGE.
  36. *
  37. */
  38. #ifndef MBG_GPS166_H
  39. #define MBG_GPS166_H
  40. /***************************************************************************/
  41. /* */
  42. /* File: GPSSERIO.H 4.1 */
  43. /* */
  44. /* Project: Common C Library */
  45. /* */
  46. /* Compiler: Borland C++ */
  47. /* */
  48. /* Author: M. Burnicki, Meinberg Funkuhren */
  49. /* */
  50. /* */
  51. /* Description: */
  52. /* This file defines structures and codes to be used to access GPS166 */
  53. /* via its serial interface COM0. COM0 should be set to a high baud */
  54. /* rate, default is 19200. */
  55. /* */
  56. /* Standard GPS166 serial operation is to send a time string that is */
  57. /* compatible with Meinberg UA31 or PZF535 DCF77 radio remote clocks. */
  58. /* That string can be transmitted automatically once per second, once */
  59. /* per minute or on request per ASCII '?'. */
  60. /* */
  61. /* Parameter setup or parameter readout works using blocks of binary */
  62. /* data which have to be isolated from the standard string. A block of */
  63. /* data starts with a SOH code (ASCII Start Of Header, 0x01) followed */
  64. /* by a message header with constant length and a data portion with */
  65. /* variable length. The first field (cmd) of the message header holds */
  66. /* the command code rsp. the type of data to be transmitted. The next */
  67. /* field (len) gives the number of data bytes that are transmitted */
  68. /* after the header. This number ranges from 0 to sizeof( MSG_DATA ). */
  69. /* The third field (data_csum) holds a checksum of all data bytes and */
  70. /* the last field of the header finally holds the checksum of the. */
  71. /* header. */
  72. /* */
  73. /***************************************************************************/
  74. /* the control codes defined below are to be or'ed with a command/type code */
  75. #define GPS_REQACK 0x8000 /* to GPS166: request acknowledge */
  76. #define GPS_ACK 0x4000 /* from GPS166: acknowledge a command */
  77. #define GPS_NACK 0x2000 /* from GPS166: error receiving command */
  78. #define GPS_CTRL_MSK 0xF000 /* masks control code from command */
  79. /* The codes below specify commands/types of data to be supplied to GPS166: */
  80. /* GPS166 auto-message to host */
  81. /* ţ host request, GPS166 response */
  82. /* ţ ţ host download to GPS166 */
  83. /* ţ ţ ţ */
  84. enum { /* ţ ţ ţ */
  85. /* system data */
  86. GPS_AUTO_ON = 0x000, /* ţ ţ ţ X ţ enable auto-messages from GPS166 */
  87. GPS_AUTO_OFF, /* ţ ţ ţ X ţ disable auto-messages from GPS166 */
  88. GPS_SW_REV, /* ţ ţ X ţ ţ request software revision */
  89. GPS_STAT, /* ţ ţ X ţ ţ request status of buffered variables */
  90. GPS_TIME, /* ţ X ţ ţ X ţ current time or capture or init board time */
  91. GPS_POS_XYZ, /* ţ ţ X ţ X ţ current position in ECEF coords */
  92. GPS_POS_LLA, /* ţ ţ X ţ X ţ current position in geographic coords */
  93. GPS_TZDL, /* ţ ţ X ţ X ţ time zone / daylight saving */
  94. GPS_PORT_PARM, /* ţ ţ X ţ X ţ parameters of the serial ports */
  95. GPS_SYNTH, /* ţ ţ X ţ X ţ synthesizer's frequency and phase */
  96. GPS_ANT_INFO, /* ţ X ţ X ţ ţ time diff after antenna disconnect */
  97. GPS_UCAP, /* ţ X ţ X ţ ţ user capture */
  98. /* GPS data */
  99. GPS_CFGH = 0x100, /* ţ ţ X ţ X ţ SVs' configuration and health codes */
  100. GPS_ALM, /* ţ ţ X ţ X ţ one SV's almanac */
  101. GPS_EPH, /* ţ ţ X ţ X ţ one SV's ephemeris */
  102. GPS_UTC, /* ţ ţ X ţ X ţ UTC correction parameters */
  103. GPS_IONO, /* ţ ţ X ţ X ţ ionospheric correction parameters */
  104. GPS_ASCII_MSG /* ţ ţ X ţ ţ the GPS ASCII message */
  105. };
  106. /*
  107. * modelled after GPSDEFS.H Revision 1.5
  108. */
  109. /***************************************************************************/
  110. /* */
  111. /* File: GPSDEFS.H 4.1 */
  112. /* */
  113. /* Project: Common C Library */
  114. /* */
  115. /* Compiler: Borland C++ */
  116. /* */
  117. /* Author: M. Burnicki, Meinberg Funkuhren */
  118. /* */
  119. /* */
  120. /* Description: */
  121. /* General definitions to be used with GPS166 */
  122. /* GPS166 Rev. 1.23 or above */
  123. /* */
  124. /* Modifications: see file GPSLIB.TXT */
  125. /* */
  126. /***************************************************************************/
  127. #define _GPSDEFS_H
  128. /* the type of various checksums */
  129. #ifndef _CSUM_DEFINED
  130. typedef unsigned short CSUM;
  131. # define _CSUM_DEFINED
  132. #endif
  133. /* the message header */
  134. typedef struct {
  135. unsigned short gps_cmd;
  136. unsigned short gps_len;
  137. unsigned short gps_data_csum;
  138. unsigned short gps_hdr_csum;
  139. } GPS_MSG_HDR;
  140. /* a struct used to hold the software revision information */
  141. typedef struct {
  142. unsigned short code; /* e.g. 0x0120 means rev. 1.20 */
  143. unsigned char name[17]; /* used to identify customized versions */
  144. } SW_REV;
  145. /* GPS ASCII message */
  146. typedef struct {
  147. CSUM csum; /* checksum of the remaining bytes */
  148. short valid; /* flag data are valid */
  149. char s[23]; /* 22 chars GPS ASCII message plus trailing zero */
  150. } ASCII_MSG;
  151. #define MIN_SVNO 1 /* min. SV number */
  152. #define MAX_SVNO 32 /* max. SV number */
  153. #define N_SVNO ( MAX_SVNO - MIN_SVNO + 1) /* number of possibly active SVs */
  154. typedef short SVNO; /* the number of a SV */
  155. typedef unsigned short HEALTH; /* a SV's health code */
  156. typedef unsigned short CFG; /* a SV's configuration code */
  157. typedef unsigned short IOD; /* Issue-Of-Data code */
  158. /* Date and time referred to the linear time scale defined by GPS. */
  159. /* GPS time is defined by the number of weeks since midnight from */
  160. /* January 5, 1980 to January 6, 1980 plus the number of seconds of */
  161. /* the current week plus fractions of a second. GPS time differs from */
  162. /* UTC because UTC is corrected with leap seconds while GPS time scale */
  163. /* is continuous. */
  164. typedef struct {
  165. unsigned short wn; /* the week number since GPS has been installed */
  166. unsigned long sec; /* the second of that week */
  167. unsigned long tick; /* fractions of a second; scale: 1E-7 */
  168. } T_GPS;
  169. /* Local date and time computed from GPS time. The current number */
  170. /* of leap seconds have to be added to get UTC from GPS time. */
  171. /* Additional corrections could have been made according to the */
  172. /* time zone/daylight saving parameters (TZDL, see below) defined */
  173. /* by the user. The status field can be checked to see which corrections */
  174. /* have been applied. */
  175. #ifndef _TM_DEFINED
  176. typedef struct {
  177. short year; /* 0..9999 */
  178. char month; /* 1..12 */
  179. char mday; /* 1..31 */
  180. short yday; /* 1..366 */
  181. char wday; /* 0..6 == Sun..Sat */
  182. char hour; /* 0..23 */
  183. char minute; /* 0..59 */
  184. char second; /* 0..59 */
  185. long frac; /* fractions of a second, scale 1E-7 */
  186. long offs_from_utc; /* local time's offset from UTC */
  187. unsigned short status; /* flags */
  188. } TM;
  189. /* status flags used with conversion from GPS time to local time */
  190. # define TM_UTC 0x01 /* UTC correction has been made */
  191. # define TM_LOCAL 0x02 /* UTC has been converted to local time */
  192. # define TM_DL_ANN 0x04 /* state of daylight saving is going to change */
  193. # define TM_DL_ENB 0x08 /* daylight saving is enabled */
  194. # define TM_LS_ANN 0x10 /* leap second will be inserted */
  195. # define TM_LS_ENB 0x20 /* current second is leap second */
  196. # define _TM_DEFINED
  197. #endif
  198. /* the status flags below are defined starting with rev. 1.32 */
  199. #define TM_ANT_DISCONN 0x1000 /* antenna currently disconnected */
  200. #define TM_SYN_FLAG 0x2000 /* TIME_SYN output is low */
  201. #define TM_NO_SYNC 0x4000 /* not sync'ed after reset */
  202. #define TM_NO_POS 0x8000 /* position not computed after reset, */
  203. /* LOCK LED off */
  204. /* a struct used to transmit information on date and time */
  205. typedef struct {
  206. short channel; /* -1: the current time; 0, 1: capture 0, 1 */
  207. T_GPS t; /* time in GPS format */
  208. TM tm; /* that time converted to local time */
  209. } TTM;
  210. /* Two types of variables used to store a position. Type XYZ is */
  211. /* used with a position in earth centered, earth fixed (ECEF) */
  212. /* coordinates whereas type LLA holds such a position converted */
  213. /* to geographic coordinates as defined by WGS84 (World Geodetic */
  214. /* System from 1984). */
  215. #ifndef _XYZ_DEFINED
  216. /* sequence and number of components of a cartesian position */
  217. enum { XP, YP, ZP, N_XYZ };
  218. /* a type of array holding a cartesian position */
  219. typedef l_fp XYZ[N_XYZ]; /* values are in [m] */
  220. # define _XYZ_DEFINED
  221. #endif
  222. #ifndef _LLA_DEFINED
  223. /* sequence and number of components of a geographic position */
  224. enum { LAT, LON, ALT, N_LLA }; /* latitude, longitude, altitude */
  225. /* a type of array holding a geographic position */
  226. typedef l_fp LLA[N_LLA]; /* lon, lat in [rad], alt in [m] */
  227. # define _LLA_DEFINED
  228. #endif
  229. /* Synthesizer parameters. Synthesizer frequency is expressed as a */
  230. /* four digit decimal number (freq) to be multiplied by 0.1 Hz and an */
  231. /* base 10 exponent (range). If the effective frequency is less than */
  232. /* 10 kHz its phase is synchronized corresponding to the variable phase. */
  233. /* Phase may be in a range from -360° to +360° with a resolution of 0.1°, */
  234. /* so the resulting numbers to be stored are in a range of -3600 to +3600. */
  235. /* Example: */
  236. /* Assume the value of freq is 2345 (decimal) and the value of phase is 900. */
  237. /* If range == 0 the effective frequency is 234.5 Hz with a phase of +90°. */
  238. /* If range == 1 the synthesizer will generate a 2345 Hz output frequency */
  239. /* and so on. */
  240. /* Limitations: */
  241. /* If freq == 0 the synthesizer is disabled. If range == 0 the least */
  242. /* significant digit of freq is limited to 0, 3, 5 or 6. The resulting */
  243. /* frequency is shown in the examples below: */
  244. /* freq == 1230 --> 123.0 Hz */
  245. /* freq == 1233 --> 123 1/3 Hz (real 1/3 Hz, NOT 123.3 Hz) */
  246. /* freq == 1235 --> 123.5 Hz */
  247. /* freq == 1236 --> 123 2/3 Hz (real 2/3 Hz, NOT 123.6 Hz) */
  248. /* If range == MAX_RANGE the value of freq must not exceed 1200, so the */
  249. /* output frequency is limited to 12 MHz. */
  250. /* Phase will be ignored if the resulting frequency is greater or equal */
  251. /* to 10 kHz. */
  252. #define MAX_SYNTH_FREQ 1200 /* if range == MAX_SYNTH_RANGE */
  253. #define MIN_SYNTH_RANGE 0
  254. #define MAX_SYNTH_RANGE 5
  255. #define MAX_SYNTH_PHASE 3600
  256. typedef struct {
  257. short freq; /* four digits used; scale: 0.1; e.g. 1234 -> 123.4 Hz */
  258. short range; /* scale factor for freq; 0..MAX_SYNTH_RANGE */
  259. short phase; /* -MAX_SYNTH_PHASE..+MAX_SYNTH_PHASE; >0 -> pulses later */
  260. } SYNTH;
  261. /* Time zone/daylight saving parameters. */
  262. /* the name of a time zone, 5 characters plus trailing zero */
  263. typedef char TZ_NAME[6];
  264. typedef struct {
  265. long offs; /* offset from UTC to local time [sec] */
  266. long offs_dl; /* additional offset if daylight saving enabled [sec] */
  267. TM tm_on; /* date/time when daylight saving starts */
  268. TM tm_off; /* date/time when daylight saving ends */
  269. TZ_NAME name[2]; /* names without and with daylight saving enabled */
  270. } TZDL;
  271. /* The constant below is defined beginning with software rev. 1.29. */
  272. /* If the year in tzdl.tmon and tzdl.tm_off is or'ed with that constant, */
  273. /* the receiver automatically generates daylight saving year by year. */
  274. /* See GPSLIB.TXT for more information. */
  275. #define DL_AUTO_FLAG 0x8000
  276. /* Example: */
  277. /* for automatic daylight saving enable/disable in Central Europe, */
  278. /* the variables are to be set as shown below: */
  279. /* offs = 3600L one hour from UTC */
  280. /* offs_dl = 3600L one additional hour if daylight saving enabled */
  281. /* tm_on = first Sunday from March 25, 02:00:00h ( year |= DL_AUTO_FLAG ) */
  282. /* tm_off = first Sunday from Sept 24, 03:00:00h ( year |= DL_AUTO_FLAG ) */
  283. /* name[0] == "MEZ " name if daylight saving not enabled */
  284. /* name[1] == "MESZ " name if daylight saving is enabled */
  285. /* the structure below was defined in rev. 1.31. It reflects the status */
  286. /* of the antenna, the times of last disconnect/reconnect and the boards */
  287. /* clock offset after the phase of disconnection. */
  288. typedef struct {
  289. short status; /* current status of antenna */
  290. TM tm_disconn; /* time of antenna disconnect */
  291. TM tm_reconn; /* time of antenna reconnect */
  292. long delta_t; /* clock offset at reconnect time, units: TICKS_PER_SEC */
  293. } ANT_INFO;
  294. /* the status field may be set to one of the values below: */
  295. enum {
  296. ANT_INVALID, /* struct not set yet because ant. has not been disconn. */
  297. ANT_DISCONN, /* ant. now disconn., tm_reconn and delta_t not set */
  298. ANT_RECONN /* ant. has been disconn. and reconn., all fields valid */
  299. };
  300. /* Summary of configuration and health data of all SVs. */
  301. typedef struct {
  302. CSUM csum; /* checksum of the remaining bytes */
  303. short valid; /* flag data are valid */
  304. T_GPS tot_51; /* time of transmission, page 51 */
  305. T_GPS tot_63; /* time of transmission, page 63 */
  306. T_GPS t0a; /* complete reference time almanac */
  307. CFG cfg[N_SVNO]; /* SV configuration from page 63 */
  308. HEALTH health[N_SVNO]; /* SV health from pages 51, 63 */
  309. } CFGH;
  310. /* UTC correction parameters */
  311. typedef struct {
  312. CSUM csum; /* checksum of the remaining bytes */
  313. short valid; /* flag data are valid */
  314. T_GPS t0t; /* Reference Time UTC Parameters [sec] */
  315. l_fp A0; /* ą Clock Correction Coefficient 0 [sec] */
  316. l_fp A1; /* ą Clock Correction Coefficient 1 [sec/sec] */
  317. ushort WNlsf; /* week number of nearest leap second */
  318. short DNt; /* the day number at the end of which LS is inserted */
  319. char delta_tls; /* */
  320. char delta_tlsf; /* */
  321. } UTC;
  322. /* a struct used to hold the settings of a serial port */
  323. #ifndef _COM_PARM_DEFINED
  324. typedef long BAUD_RATE;
  325. /* indices used to identify a parameter in the framing string */
  326. enum { F_DBITS, F_PRTY, F_STBITS };
  327. /* types of handshake */
  328. enum { HS_NONE, HS_XONXOFF, HS_RTSCTS };
  329. typedef struct {
  330. BAUD_RATE baud_rate; /* e.g. 19200L */
  331. char framing[4]; /* e.g. "8N1" */
  332. short handshake; /* a numeric value, only HS_NONE supported yet */
  333. } COM_PARM;
  334. #define _COM_PARM_DEFINED
  335. #endif
  336. /* the codes below define what has to comes out of the serial ports */
  337. enum { STR_ON_REQ, STR_PER_SEC,
  338. STR_PER_MIN, N_STR_MODE_0, /* COM0 and COM1 */
  339. STR_UCAP = N_STR_MODE_0,
  340. STR_UCAP_REQ, N_STR_MODE_1 /* COM1 only */
  341. };
  342. #define N_COM 2 /* the number of serial ports */
  343. /* the structure used to store the modes of both serial ports */
  344. typedef struct {
  345. COM_PARM com[N_COM]; /* COM0 and COM1 settings */
  346. u_char mode[N_COM]; /* COM0 and COM1 output mode */
  347. } PORT_PARM;
  348. /* Ephemeris parameters of one specific SV. Needed to compute the position */
  349. /* of a satellite at a given time with high precision. Valid for an */
  350. /* interval of 4 to 6 hours from start of transmission. */
  351. typedef struct {
  352. CSUM csum; /* checksum of the remaining bytes */
  353. short valid; /* flag data are valid */
  354. HEALTH health; /* health indication of transmitting SV [---] */
  355. IOD IODC; /* Issue Of Data, Clock */
  356. IOD IODE2; /* Issue of Data, Ephemeris (Subframe 2) */
  357. IOD IODE3; /* Issue of Data, Ephemeris (Subframe 3) */
  358. T_GPS tt; /* time of transmission */
  359. T_GPS t0c; /* Reference Time Clock [---] */
  360. T_GPS t0e; /* Reference Time Ephemeris [---] */
  361. l_fp sqrt_A; /* Square Root of semi-major Axis [sqrt(m)] */
  362. l_fp e; /* Eccentricity [---] */
  363. l_fp M0; /* ą Mean Anomaly at Ref. Time [rad] */
  364. l_fp omega; /* ą Argument of Perigee [rad] */
  365. l_fp OMEGA0; /* ą Longit. of Asc. Node of orbit plane [rad] */
  366. l_fp OMEGADOT; /* ą Rate of Right Ascension [rad/sec] */
  367. l_fp deltan; /* ą Mean Motion Diff. from computed value [rad/sec] */
  368. l_fp i0; /* ą Inclination Angle [rad] */
  369. l_fp idot; /* ą Rate of Inclination Angle [rad/sec] */
  370. l_fp crc; /* ą Cosine Corr. Term to Orbit Radius [m] */
  371. l_fp crs; /* ą Sine Corr. Term to Orbit Radius [m] */
  372. l_fp cuc; /* ą Cosine Corr. Term to Arg. of Latitude [rad] */
  373. l_fp cus; /* ą Sine Corr. Term to Arg. of Latitude [rad] */
  374. l_fp cic; /* ą Cosine Corr. Term to Inclination Angle [rad] */
  375. l_fp cis; /* ą Sine Corr. Term to Inclination Angle [rad] */
  376. l_fp af0; /* ą Clock Correction Coefficient 0 [sec] */
  377. l_fp af1; /* ą Clock Correction Coefficient 1 [sec/sec] */
  378. l_fp af2; /* ą Clock Correction Coefficient 2 [sec/sec˛] */
  379. l_fp tgd; /* ą estimated group delay differential [sec] */
  380. u_short URA; /* predicted User Range Accuracy */
  381. u_char L2code; /* code on L2 channel [---] */
  382. u_char L2flag; /* L2 P data flag [---] */
  383. } EPH;
  384. /* Almanac parameters of one specific SV. A reduced precision set of */
  385. /* parameters used to check if a satellite is in view at a given time. */
  386. /* Valid for an interval of more than 7 days from start of transmission. */
  387. typedef struct {
  388. CSUM csum; /* checksum of the remaining bytes */
  389. short valid; /* flag data are valid */
  390. HEALTH health; /* [---] */
  391. T_GPS t0a; /* Reference Time Almanac [sec] */
  392. l_fp sqrt_A; /* Square Root of semi-major Axis [sqrt(m)] */
  393. l_fp e; /* Eccentricity [---] */
  394. l_fp M0; /* ą Mean Anomaly at Ref. Time [rad] */
  395. l_fp omega; /* ą Argument of Perigee [rad] */
  396. l_fp OMEGA0; /* ą Longit. of Asc. Node of orbit plane [rad] */
  397. l_fp OMEGADOT; /* ą Rate of Right Ascension [rad/sec] */
  398. l_fp deltai; /* ą [rad] */
  399. l_fp af0; /* ą Clock Correction Coefficient 0 [sec] */
  400. l_fp af1; /* ą Clock Correction Coefficient 1 [sec/sec] */
  401. } ALM;
  402. /* ionospheric correction parameters */
  403. typedef struct {
  404. CSUM csum; /* checksum of the remaining bytes */
  405. short valid; /* flag data are valid */
  406. l_fp alpha_0; /* Ionosph. Corr. Coeff. Alpha 0 [sec] */
  407. l_fp alpha_1; /* Ionosph. Corr. Coeff. Alpha 1 [sec/deg] */
  408. l_fp alpha_2; /* Ionosph. Corr. Coeff. Alpha 2 [sec/deg^2] */
  409. l_fp alpha_3; /* Ionosph. Corr. Coeff. Alpha 3 [sec/deg^3] */
  410. l_fp beta_0; /* Ionosph. Corr. Coeff. Beta 0 [sec] */
  411. l_fp beta_1; /* Ionosph. Corr. Coeff. Beta 1 [sec/deg] */
  412. l_fp beta_2; /* Ionosph. Corr. Coeff. Beta 2 [sec/deg^2] */
  413. l_fp beta_3; /* Ionosph. Corr. Coeff. Beta 3 [sec/deg^3] */
  414. } IONO;
  415. void mbg_tm_str P((char **, TM *, int));
  416. void mbg_tgps_str P((char **, T_GPS *, int));
  417. void get_mbg_header P((unsigned char **, GPS_MSG_HDR *));
  418. void put_mbg_header P((unsigned char **, GPS_MSG_HDR *));
  419. void get_mbg_sw_rev P((unsigned char **, SW_REV *));
  420. void get_mbg_ascii_msg P((unsigned char **, ASCII_MSG *));
  421. void get_mbg_svno P((unsigned char **, SVNO *));
  422. void get_mbg_health P((unsigned char **, HEALTH *));
  423. void get_mbg_cfg P((unsigned char **, CFG *));
  424. void get_mbg_tgps P((unsigned char **, T_GPS *));
  425. void get_mbg_tm P((unsigned char **, TM *));
  426. void get_mbg_ttm P((unsigned char **, TTM *));
  427. void get_mbg_synth P((unsigned char **, SYNTH *));
  428. void get_mbg_tzdl P((unsigned char **, TZDL *));
  429. void get_mbg_antinfo P((unsigned char **, ANT_INFO *));
  430. void get_mbg_cfgh P((unsigned char **, CFGH *));
  431. void get_mbg_utc P((unsigned char **, UTC *));
  432. void get_mbg_lla P((unsigned char **, LLA));
  433. void get_mbg_xyz P((unsigned char **, XYZ));
  434. void get_mbg_portparam P((unsigned char **, PORT_PARM *));
  435. void get_mbg_eph P((unsigned char **, EPH *));
  436. void get_mbg_alm P((unsigned char **, ALM *));
  437. void get_mbg_iono P((unsigned char **, IONO *));
  438. unsigned long mbg_csum P((unsigned char *, unsigned int));
  439. #endif
  440. /*
  441. * History:
  442. *
  443. * mbg_gps166.h,v
  444. * Revision 4.7 2006/06/22 18:41:43 kardel
  445. * clean up signedness (gcc 4)
  446. *
  447. * Revision 4.6 2005/10/07 22:11:56 kardel
  448. * bounded buffer implementation
  449. *
  450. * Revision 4.5.2.1 2005/09/25 10:23:48 kardel
  451. * support bounded buffers
  452. *
  453. * Revision 4.5 2005/06/25 10:58:45 kardel
  454. * add missing log keywords
  455. *
  456. * Revision 4.1 1998/06/12 15:07:30 kardel
  457. * fixed prototyping
  458. *
  459. * Revision 4.0 1998/04/10 19:50:42 kardel
  460. * Start 4.0 release version numbering
  461. *
  462. * Revision 1.1 1998/04/10 19:27:34 kardel
  463. * initial NTP VERSION 4 integration of PARSE with GPS166 binary support
  464. *
  465. * Revision 1.1 1997/10/06 20:55:38 kardel
  466. * new parse structure
  467. *
  468. */