Main Page   Modules   Data Structures   File List   Data Fields   Globals  

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 // This code is distributed under the GNU Public License
00018 //      which can be found at http://www.gnu.org/licenses/gpl.txt
00019 //
00020 //*****************************************************************************
00021 
00022 #ifndef TSIP_H
00023 #define TSIP_H
00024 
00025 #include "global.h"
00026 
00027 // constants/macros/typdefs
00028 // packet delimiters
00029 #define DLE                 0x10
00030 #define ETX                 0x03
00031 // packet types
00032 // command packets
00033 #define TSIPTYPE_SET_IO_OPTIONS 0x35
00034 // byte 0
00035 #define POS_XYZ_ECEF        0   // outputs 0x42 and 0x83 packets
00036 #define POS_LLA             1   // outputs 0x4A and 0x84 packets
00037 #define POS_ALT             2   // outputs 0x4A/0x84 and 0x8F-17/0x8F-18
00038 #define ALT_REF_MSL         3   // bit cleared = HAE Reference datum
00039 #define POS_DBL_PRECISION   4   // bit cleared = single precision
00040 #define SUPER_PACKETS       5   // 0x8F-17,0x8F-18,0x8F-20
00041 // byte 1
00042 #define VEL_ECEF            0   // outputs 0x43
00043 #define VEL_ENU             1   // outputs 0x56
00044 // byte 2
00045 #define TIME_UTC            0   // 0/1 time format GPS/UTC
00046 // byte 3
00047 #define RAWDATA             0   // outputs 0x5A packets 
00048 #define RAWDATA_FILTER      1   // 0/1 raw data unfiltered/filtered 
00049 #define SIGNAL_DBHZ         3   // 0/1 signal strength in AMU/dBHz
00050 
00051 // report packets
00052 #define TSIPTYPE_GPSTIME        0x41
00053 #define TSIPTYPE_POSFIX_XYZ_SP  0x42
00054 #define TSIPTYPE_VELFIX_XYZ     0x43
00055 #define TSIPTYPE_SATSIGLEVEL    0x47
00056 #define TSIPTYPE_GPSSYSMESSAGE  0x48
00057 #define TSIPTYPE_POSFIX_LLA_SP  0x4A
00058 #define TSIPTYPE_VELFIX_ENU     0x56
00059 #define TSIPTYPE_SATTRACKSTAT   0x5C
00060 #define TSIPTYPE_RAWDATA        0x5A
00061 #define TSIPTYPE_GPSSUBCODE     0x6F
00062 #define TSIPTYPE_POSFIX_XYZ_DP  0x83
00063 #define TSIPTYPE_POSFIX_LLA_DP  0x84
00064 
00065 
00066 // functions
00067 void tsipInit(void (*txbytefunc)(unsigned char c));
00068 void tsipSendPacket(u08 tsipType, u08 dataLength, u08* data);
00069 u08 tsipProcess(cBuffer* rxBuffer);
00070 void tsipGpsDataPrint(void);
00071 
00072 // packet processing functions
00073 void tsipProcessGPSTIME(u08* packet);
00074 void tsipProcessPOSFIX_XYZ_SP(u08* packet);
00075 void tsipProcessVELFIX_XYZ(u08* packet);
00076 void tsipProcessPOSFIX_LLA_SP(u08* packet);
00077 void tsipProcessVELFIX_ENU(u08* packet);
00078 
00079 #endif

Generated on Sun Feb 22 19:12:31 2004 for Procyon AVRlib by doxygen1.3-rc2