Main Page   Data Structures   File List   Data Fields   Globals  

/gps.h

Go to the documentation of this file.
00001 /*! \file gps.h \brief GPS position storage and processing library. */
00002 //*****************************************************************************
00003 //
00004 // File Name    : 'gps.h'
00005 // Title        : GPS position storage and processing function library
00006 // Author       : Pascal Stang - Copyright (C) 2002
00007 // Created      : 2002.08.29
00008 // Revised      : 2002.08.29
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 GPS_H
00023 #define GPS_H
00024 
00025 #include "global.h"
00026 
00027 // constants/macros/typdefs
00028 typedef union union_float_u32
00029 {
00030     float f;
00031     unsigned long i;
00032     unsigned char b[4];
00033 } float_u32;
00034 
00035 typedef union union_double_u64
00036 {
00037     double f;
00038     unsigned long long i;
00039     unsigned char b[8];
00040 } double_u64;
00041 
00042 struct PositionLLA
00043 {
00044     float_u32 lat;
00045     float_u32 lon;
00046     float_u32 alt;
00047     float_u32 TimeOfFix;
00048     u16 updates;
00049 };
00050 
00051 struct VelocityENU
00052 {
00053     float_u32 east;
00054     float_u32 north;
00055     float_u32 up;
00056     float_u32 TimeOfFix;
00057     u16 updates;
00058 };
00059 
00060 struct VelocityHS
00061 {
00062     float_u32 heading;
00063     float_u32 speed;
00064     float_u32 TimeOfFix;
00065     u16 updates;
00066 };
00067 
00068 struct PositionECEF
00069 {
00070     float_u32 x;
00071     float_u32 y;
00072     float_u32 z;
00073     float_u32 TimeOfFix;
00074     u16 updates;
00075 };
00076 
00077 struct VelocityECEF
00078 {
00079     float_u32 x;
00080     float_u32 y;
00081     float_u32 z;
00082     float_u32 TimeOfFix;
00083     u16 updates;
00084 };
00085 
00086 typedef struct struct_GpsInfo
00087 {   
00088     float_u32 TimeOfWeek;
00089     u16 WeekNum;
00090     float_u32 UtcOffset;
00091     u08 numSVs;
00092     
00093     struct PositionLLA PosLLA;
00094     struct PositionECEF PosECEF;
00095     struct VelocityECEF VelECEF;
00096     struct VelocityENU VelENU;
00097     struct VelocityHS VelHS;
00098 
00099 } GpsInfoType;
00100 
00101 // functions
00102 void gpsInit(void);
00103 GpsInfoType* gpsGetInfo(void);
00104 void gpsInfoPrint(void);
00105 
00106 #endif

Generated on Fri Aug 1 10:42:41 2003 for Procyon AVRlib by doxygen1.2.18