Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

tsip.h

Go to the documentation of this file.
00001 /*! \file tsip.h \brief TSIP (Trimble Standard Interface Protocol) function library. */
00002 //*****************************************************************************
00003 //
00004 // File Name    : 'tsip.h'
00005 // Title        : TSIP (Trimble Standard Interface Protocol) function library
00006 // Author       : Pascal Stang - Copyright (C) 2002
00007 // Created      : 2002.08.27
00008 // Revised      : 2002.08.27
00009 // Version      : 0.1
00010 // Target MCU   : Atmel AVR Series
00011 // Editor Tabs  : 4
00012 //
00013 // NOTE: This code is currently below version 1.0, and therefore is considered
00014 // to be lacking in some functionality or documentation, or may not be fully
00015 // tested.  Nonetheless, you can expect most functions to work.
00016 //
00017 /// \ingroup driver_hw
00018 /// \defgroup tsip TSIP Packet Interface for Trimble GPS Receivers (tsip.c)
00019 /// \code #include "tsip.h" \endcode
00020 /// \par Overview
00021 ///     This library parses and decodes the TSIP data stream from a Trimble GPS
00022 /// and stores the position, velocity, and time solutions in the gps.c library.
00023 /// The library also includes functions to transmit TSIP packets to the GPS for 
00024 /// configuration and data request.
00025 //
00026 // This code is distributed under the GNU Public License
00027 //      which can be found at http://www.gnu.org/licenses/gpl.txt
00028 //
00029 //*****************************************************************************
00030 
00031 #ifndef TSIP_H
00032 #define TSIP_H
00033 
00034 #include "global.h"
00035 
00036 // constants/macros/typdefs
00037 // packet delimiters
00038 #define DLE                 0x10
00039 #define ETX                 0x03
00040 // packet types
00041 // command packets
00042 #define TSIPTYPE_SET_IO_OPTIONS 0x35
00043 // byte 0
00044 #define POS_XYZ_ECEF        0   // outputs 0x42 and 0x83 packets
00045 #define POS_LLA             1   // outputs 0x4A and 0x84 packets
00046 #define POS_ALT             2   // outputs 0x4A/0x84 and 0x8F-17/0x8F-18
00047 #define ALT_REF_MSL         3   // bit cleared = HAE Reference datum
00048 #define POS_DBL_PRECISION   4   // bit cleared = single precision
00049 #define SUPER_PACKETS       5   // 0x8F-17,0x8F-18,0x8F-20
00050 // byte 1
00051 #define VEL_ECEF            0   // outputs 0x43
00052 #define VEL_ENU             1   // outputs 0x56
00053 // byte 2
00054 #define TIME_UTC            0   // 0/1 time format GPS/UTC
00055 // byte 3
00056 #define RAWDATA             0   // outputs 0x5A packets 
00057 #define RAWDATA_FILTER      1   // 0/1 raw data unfiltered/filtered 
00058 #define SIGNAL_DBHZ         3   // 0/1 signal strength in AMU/dBHz
00059 
00060 // report packets
00061 #define TSIPTYPE_GPSTIME        0x41
00062 #define TSIPTYPE_POSFIX_XYZ_SP  0x42
00063 #define TSIPTYPE_VELFIX_XYZ     0x43
00064 #define TSIPTYPE_SATSIGLEVEL    0x47
00065 #define TSIPTYPE_GPSSYSMESSAGE  0x48
00066 #define TSIPTYPE_POSFIX_LLA_SP  0x4A
00067 #define TSIPTYPE_VELFIX_ENU     0x56
00068 #define TSIPTYPE_SATTRACKSTAT   0x5C
00069 #define TSIPTYPE_RAWDATA        0x5A
00070 #define TSIPTYPE_GPSSUBCODE     0x6F
00071 #define TSIPTYPE_POSFIX_XYZ_DP  0x83
00072 #define TSIPTYPE_POSFIX_LLA_DP  0x84
00073 
00074 
00075 // functions
00076 void tsipInit(void (*txbytefunc)(unsigned char c));
00077 void tsipSendPacket(u08 tsipType, u08 dataLength, u08* data);
00078 u08 tsipProcess(cBuffer* rxBuffer);
00079 void tsipGpsDataPrint(void);
00080 
00081 // packet processing functions
00082 void tsipProcessGPSTIME(u08* packet);
00083 void tsipProcessPOSFIX_XYZ_SP(u08* packet);
00084 void tsipProcessVELFIX_XYZ(u08* packet);
00085 void tsipProcessPOSFIX_LLA_SP(u08* packet);
00086 void tsipProcessVELFIX_ENU(u08* packet);
00087 
00088 #endif

Generated on Sun Oct 29 03:41:07 2006 for Procyon AVRlib by  doxygen 1.4.2