Home | History | Annotate | Line # | Download | only in include
trimble.h revision 1.3
      1  1.3  christos /*	$NetBSD: trimble.h,v 1.3 2015/07/10 14:20:29 christos Exp $	*/
      2  1.1    kardel 
      3  1.1    kardel /*
      4  1.1    kardel  * /src/NTP/ntp4-dev/include/trimble.h,v 4.6 2005/04/16 17:32:10 kardel RELEASE_20050508_A
      5  1.1    kardel  *
      6  1.1    kardel  * trimble.h,v 4.6 2005/04/16 17:32:10 kardel RELEASE_20050508_A
      7  1.1    kardel  *
      8  1.2  christos  * $Created: Sun Aug  2 16:16:49 1998 $
      9  1.1    kardel  *
     10  1.1    kardel  * Copyright (c) 1998-2005 by Frank Kardel <kardel <AT> ntp.org>
     11  1.1    kardel  *
     12  1.1    kardel  * Redistribution and use in source and binary forms, with or without
     13  1.1    kardel  * modification, are permitted provided that the following conditions
     14  1.1    kardel  * are met:
     15  1.1    kardel  * 1. Redistributions of source code must retain the above copyright
     16  1.1    kardel  *    notice, this list of conditions and the following disclaimer.
     17  1.1    kardel  * 2. Redistributions in binary form must reproduce the above copyright
     18  1.1    kardel  *    notice, this list of conditions and the following disclaimer in the
     19  1.1    kardel  *    documentation and/or other materials provided with the distribution.
     20  1.1    kardel  * 3. Neither the name of the author nor the names of its contributors
     21  1.1    kardel  *    may be used to endorse or promote products derived from this software
     22  1.1    kardel  *    without specific prior written permission.
     23  1.1    kardel  *
     24  1.1    kardel  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
     25  1.1    kardel  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     26  1.1    kardel  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     27  1.1    kardel  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
     28  1.1    kardel  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     29  1.1    kardel  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     30  1.1    kardel  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     31  1.1    kardel  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     32  1.1    kardel  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     33  1.1    kardel  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     34  1.1    kardel  * SUCH DAMAGE.
     35  1.1    kardel  *
     36  1.1    kardel  */
     37  1.1    kardel #ifndef TRIMBLE_H
     38  1.1    kardel #define TRIMBLE_H
     39  1.1    kardel 
     40  1.1    kardel /*
     41  1.1    kardel  * Trimble packet command codes - commands being sent/received
     42  1.1    kardel  * keep comments formatted as shown - they are used to generate
     43  1.1    kardel  * translation tables
     44  1.1    kardel  */
     45  1.1    kardel #define CMD_CCLROSC	0x1D	/* clear oscillator offset */
     46  1.1    kardel #define CMD_CCLRRST	0x1E	/* clear battery backup and RESET */
     47  1.1    kardel #define CMD_CVERSION	0x1F	/* return software version */
     48  1.1    kardel #define CMD_CALMANAC	0x20	/* almanac */
     49  1.1    kardel #define CMD_CCURTIME	0x21	/* current time */
     50  1.1    kardel #define CMD_CMODESEL	0x22	/* mode select (2-d, 3-D, auto) */
     51  1.1    kardel #define CMD_CINITPOS	0x23	/* initial position */
     52  1.1    kardel #define	CMD_CRECVPOS	0x24	/* receiver position fix mode */
     53  1.1    kardel #define CMD_CRESET	0x25	/* soft reset & selftest */
     54  1.1    kardel #define CMD_CRECVHEALTH	0x26	/* receiver health */
     55  1.1    kardel #define CMD_CSIGNALLV	0x27	/* signal levels */
     56  1.1    kardel #define CMD_CMESSAGE	0x28	/* GPS system message */
     57  1.1    kardel #define CMD_CALMAHEALTH	0x29	/* almanac healt page */
     58  1.1    kardel #define CMD_C2DALTITUDE	0x2A	/* altitude for 2-D mode */
     59  1.1    kardel #define CMD_CINITPOSLLA	0x2B	/* initial position LLA */
     60  1.1    kardel #define CMD_COPERPARAM	0x2C	/* operating parameters */
     61  1.1    kardel #define CMD_COSCOFFSET	0x2D	/* oscillator offset */
     62  1.1    kardel #define CMD_CSETGPSTIME	0x2E	/* set GPS time */
     63  1.1    kardel #define CMD_CUTCPARAM	0x2F	/* UTC parameters */
     64  1.1    kardel #define CMD_CACCPOSXYZ	0x31	/* accurate initial position (XYZ/ECEF) */
     65  1.1    kardel #define CMD_CACCPOS	0x32	/* accurate initial position */
     66  1.1    kardel #define CMD_CANALOGDIG	0x33	/* analog to digital */
     67  1.1    kardel #define CMD_CSAT1SAT	0x34	/* satellite for 1-Sat mode */
     68  1.1    kardel #define CMD_CIOOPTIONS	0x35	/* I/O options */
     69  1.1    kardel #define CMD_CVELOCAID	0x36	/* velocity aiding of acquisition */
     70  1.1    kardel #define CMD_CSTATLSTPOS	0x37	/* status and values of last pos. and vel. */
     71  1.1    kardel #define CMD_CLOADSSATDT	0x38	/* load satellite system data */
     72  1.1    kardel #define CMD_CSATDISABLE	0x39	/* satellite disable */
     73  1.1    kardel #define CMD_CLASTRAW	0x3A	/* last raw measurement */
     74  1.1    kardel #define CMD_CSTATSATEPH	0x3B	/* satellite ephemeris status */
     75  1.1    kardel #define CMD_CSTATTRACK	0x3C	/* tracking status */
     76  1.1    kardel #define CMD_CCHANADGPS	0x3D	/* configure channel A for differential GPS */
     77  1.1    kardel #define CMD_CADDITFIX	0x3E	/* additional fix data */
     78  1.1    kardel #define CMD_CDGPSFIXMD	0x62	/* set/request differential GPS position fix mode */
     79  1.1    kardel #define CMD_CDGPSCORR	0x65	/* differential correction status */
     80  1.1    kardel #define CMD_CPOSFILT	0x71	/* position filter parameters */
     81  1.1    kardel #define CMD_CHEIGHTFILT	0x73	/* height filter control */
     82  1.1    kardel #define CMD_CHIGH8CNT	0x75	/* high-8 (best 4) / high-6 (overdetermined) control */
     83  1.1    kardel #define CMD_CMAXDGPSCOR	0x77	/* maximum rate of DGPS corrections */
     84  1.1    kardel #define CMD_CSUPER	0x8E	/* super paket */
     85  1.1    kardel 
     86  1.1    kardel #define CMD_RDATAA	0x3D	/* data channel A configuration:trimble_channelA:RO */
     87  1.1    kardel #define CMD_RALMANAC	0x40	/* almanac data for sat:gps_almanac:RO */
     88  1.1    kardel #define CMD_RCURTIME	0x41	/* GPS time:gps_time:RO */
     89  1.1    kardel #define CMD_RSPOSXYZ	0x42	/* single precision XYZ position:gps_position(XYZ):RO|DEF */
     90  1.1    kardel #define CMD_RVELOXYZ	0x43	/* velocity fix (XYZ ECEF):gps_velocity(XYZ):RO|DEF */
     91  1.1    kardel #define	CMD_RBEST4	0x44	/* best 4 satellite selection:trimble_best4:RO|DEF */
     92  1.1    kardel #define CMD_RVERSION	0x45	/* software version:trimble_version:RO|DEF */
     93  1.1    kardel #define CMD_RRECVHEALTH	0x46	/* receiver health:trimble_receiver_health:RO|DEF */
     94  1.1    kardel #define CMD_RSIGNALLV	0x47	/* signal levels of all satellites:trimble_signal_levels:RO */
     95  1.1    kardel #define CMD_RMESSAGE	0x48	/* GPS system message:gps-message:RO|DEF */
     96  1.1    kardel #define CMD_RALMAHEALTH	0x49	/* almanac health page for all satellites:gps_almanac_health:RO */
     97  1.1    kardel #define CMD_RSLLAPOS	0x4A	/* single LLA position:gps_position(LLA):RO|DEF */
     98  1.1    kardel #define CMD_RMACHSTAT	0x4B	/* machine code / status:trimble_status:RO|DEF */
     99  1.1    kardel #define CMD_ROPERPARAM	0x4C	/* operating parameters:trimble_opparam:RO */
    100  1.1    kardel #define CMD_ROSCOFFSET	0x4D	/* oscillator offset:trimble_oscoffset:RO */
    101  1.1    kardel #define CMD_RSETGPSTIME	0x4E	/* response to set GPS time:trimble_setgpstime:RO */
    102  1.1    kardel #define CMD_RUTCPARAM	0x4F	/* UTC parameters:gps_utc_correction:RO|DEF */
    103  1.1    kardel #define CMD_RANALOGDIG	0x53	/* analog to digital:trimble_analogdigital:RO */
    104  1.1    kardel #define CMD_RSAT1BIAS	0x54	/* one-satellite bias & bias rate:trimble_sat1bias:RO */
    105  1.1    kardel #define CMD_RIOOPTIONS	0x55	/* I/O options:trimble_iooptions:RO */
    106  1.1    kardel #define CMD_RVELOCFIX	0x56	/* velocity fix (ENU):trimble_velocfix */
    107  1.1    kardel #define CMD_RSTATLSTFIX	0x57	/* status and values of last pos. and vel.:trimble_status_lastpos:RO */
    108  1.1    kardel #define CMD_RLOADSSATDT	0x58	/* response to load satellite system data:trimble_loaddata:RO */
    109  1.1    kardel #define CMD_RSATDISABLE	0x59	/* satellite disable:trimble_satdisble:RO */
    110  1.1    kardel #define CMD_RLASTRAW	0x5A	/* last raw measurement:trimble_lastraw:RO */
    111  1.1    kardel #define CMD_RSTATSATEPH	0x5B	/* satellite ephemeris status:trimble_ephstatus:RO */
    112  1.1    kardel #define CMD_RSTATTRACK	0x5C	/* tracking status:trimble_tracking_status:RO|DEF */
    113  1.1    kardel #define CMD_RADDITFIX	0x5E	/* additional fix data:trimble_addfix:RO */
    114  1.1    kardel #define CMD_RALLINVIEW	0x6D	/* all in view satellite selection:trimble_satview:RO|DEF */
    115  1.1    kardel #define CMD_RPOSFILT	0x72	/* position filter parameters:trimble_posfilt:RO */
    116  1.1    kardel #define CMD_RHEIGHTFILT	0x74	/* height filter control:trimble_heightfilt:RO */
    117  1.1    kardel #define CMD_RHIGH8CNT	0x76	/* high-8 (best 4) / high-6 (overdetermined) control:trimble_high8control:RO */
    118  1.1    kardel #define CMD_RMAXAGE	0x78	/* DC MaxAge:trimble_dgpsmaxage:RO */
    119  1.1    kardel #define CMD_RDGPSFIX	0x82	/* differential position fix mode:trimble_dgpsfixmode:RO */
    120  1.1    kardel #define CMD_RDOUBLEXYZ	0x83	/* double precision XYZ:gps_position_ext(XYZ):RO|DEF */
    121  1.1    kardel #define CMD_RDOUBLELLA	0x84	/* double precision LLA:gps_position_ext(LLA):RO|DEF */
    122  1.1    kardel #define CMD_RDGPSSTAT	0x85	/* differential correction status:trimble_dgpsstatus:RO */
    123  1.1    kardel #define CMD_RSUPER	0x8F	/* super paket::0 */
    124  1.1    kardel 
    125  1.1    kardel typedef struct cmd_info
    126  1.1    kardel {
    127  1.1    kardel   unsigned char cmd;		/* command code */
    128  1.1    kardel   const char   *cmdname;	/* command name */
    129  1.1    kardel   const char   *cmddesc;	/* command description */
    130  1.1    kardel   const char   *varname;	/* name of variable */
    131  1.1    kardel   int           varmode;	/* mode of variable */
    132  1.1    kardel } cmd_info_t;
    133  1.1    kardel 
    134  1.1    kardel extern cmd_info_t trimble_rcmds[];
    135  1.1    kardel extern cmd_info_t trimble_scmds[];
    136  1.1    kardel 
    137  1.1    kardel extern cmd_info_t *trimble_convert (unsigned int cmd, cmd_info_t *tbl);
    138  1.1    kardel 
    139  1.1    kardel #endif
    140  1.1    kardel /*
    141  1.1    kardel  * History:
    142  1.1    kardel  *
    143  1.1    kardel  * trimble.h,v
    144  1.1    kardel  * Revision 4.6  2005/04/16 17:32:10  kardel
    145  1.1    kardel  * update copyright
    146  1.1    kardel  *
    147  1.1    kardel  * Revision 4.5  2004/11/14 15:29:41  kardel
    148  1.1    kardel  * support PPSAPI, upgrade Copyright to Berkeley style
    149  1.1    kardel  *
    150  1.1    kardel  * Revision 4.4  1999/02/28 11:41:11  kardel
    151  1.1    kardel  * (CMD_RUTCPARAM): control variable name unification
    152  1.1    kardel  *
    153  1.1    kardel  * Revision 4.3  1998/12/20 23:45:25  kardel
    154  1.1    kardel  * fix types and warnings
    155  1.1    kardel  *
    156  1.1    kardel  * Revision 4.2  1998/08/16 18:45:05  kardel
    157  1.1    kardel  * (CMD_RSTATTRACK): renamed mode 6 variable name
    158  1.1    kardel  *
    159  1.1    kardel  * Revision 4.1  1998/08/09 22:24:35  kardel
    160  1.1    kardel  * Trimble TSIP support
    161  1.1    kardel  *
    162  1.1    kardel  */
    163