Main Page | Data Structures | File List | Data Fields | Globals

gps.h

Go to the documentation of this file.
00001 /* gps.h --- 
00002  * 
00003  * Filename: gps.h
00004  * Description: 
00005  * Author: Bryce Himebaugh
00006  * Maintainer: 
00007  * Created: Mon Oct 23 16:24:25 2006
00008  * Version: 
00009  * Last-Updated: 
00010  *           By: 
00011  *     Update #: 0
00012  * Keywords: 
00013  * Compatibility: 
00014  * 
00015  */
00016 
00017 /* Commentary: 
00018  * 
00019  * 
00020  * 
00021  */
00022 
00023 /* Change log:
00024  * 
00025  * 
00026  */
00027 
00028 /* This program is free software; you can redistribute it and/or modify
00029  * it under the terms of the GNU General Public License as published by
00030  * the Free Software Foundation; either version 2, or (at your option)
00031  * any later version.
00032  * 
00033  * This program is distributed in the hope that it will be useful,
00034  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00035  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00036  * GNU General Public License for more details.
00037  * 
00038  * You should have received a copy of the GNU General Public License
00039  * along with this program; see the file COPYING.  If not, write to the
00040  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00041  * Boston, MA 02111-1307, USA.
00042  */
00043 
00044 /* Code: */
00045 
00046 #define GPS_BUF_SIZE 100
00047 #define GPS_BUF_NUM 3
00048 
00049 #define DATE 3
00050 #define TIME 4
00051 #define LATITUDE 6
00052 #define LONGITUDE 8
00053 #define FIX 11
00054 #define SPEED 12
00055 #define HPE 1     
00056 #define EPE 5     // Note that the EPE field in the PGRME sentence is actually field 5 due to "M" padding. 
00057 #define NVEL 2
00058 #define EVEL 1
00059 
00060 int init_gps(void);
00061 int evaluate_gps(void);
00062 int gps_add_checksum(char *);
00063 int gps_send(const char *, ... );
00064 int gps_show_raw(void);
00065 char *gps_get(void);
00066 int gps_parse(char *);
00067 
00068 void get_field_test(void);
00069 
00070 enum {EMPTY,READY};
00071 
00072 typedef struct gps_buffer {
00073   char status;
00074   char data[GPS_BUF_SIZE];
00075 } gps_buffer_t;
00076 
00077 typedef struct gps {
00078   gps_buffer_t db[GPS_BUF_NUM];
00079 } gps_t;
00080 
00081 extern gps_t buf_struct;
00082 
00083 /* gps.h ends here */

Generated on Fri Nov 3 15:17:24 2006 for VCS Application by  doxygen 1.3.9.1