Mobil_surveillance_system 1
GPSpacket.h
Go to the documentation of this file.
00001 #ifndef GPSPACKET_H_
00002 #define GPSPACKET_H_
00003 
00004 
00006 
00014 //*****************************************************************************
00015 //
00016 // Types and definitions
00017 //
00018 //*****************************************************************************
00019 
00020 #ifndef DEFINE_TBOOLEAN                 // define unsigned char as tBoolean in only that case when it hasn't been defined yet somewhere else in the scope
00021 
00023 typedef unsigned char tBoolean;         // use as bool
00024 #define DEFINE_TBOOLEAN
00025 
00026 #endif                                  // DEFINE_TBOOLEAN
00027 
00028 
00030 #define GPSINFO_ARRAY_SIZE 16   
00031 
00033 #define GPS_INFO_QUEU_SIZE 100
00034 
00037 #define UTC_TIME_SIZE           5
00038 #define POSITION_LLA_SIZE       11 
00039 #define GPSINFO_SIZE            16
00040 
00041 
00043 typedef struct                          // memory size: 5 bytes
00044 {
00046     unsigned char ucHour;
00048     unsigned char ucMin;            
00050     unsigned char ucSec;        
00052     unsigned int ucMsec;            
00053     
00054 }tUTC_time;                         
00055 
00056 
00058 typedef struct                                  // memory size: 11 bytes
00059 {
00061     float latitude;                             
00062     
00064     float longitude;
00065 
00067     int altitudeIntPart;            
00068 
00072     unsigned char altitudeFractPartAndDir;      
00073                                             
00074 }tPosition_LLA;
00075 
00077 typedef struct                                  // memory size: x byte
00078 {
00080     tUTC_time currentTime;
00082     tPosition_LLA currentPosition;
00083     
00084 }tGPSInfo;
00085 
00086 
00088 typedef struct 
00089 {
00091     unsigned int uiIdx;
00093     unsigned int uiCurrentSize;
00095     tGPSInfo GPSInfoArray[GPSINFO_ARRAY_SIZE];
00096 
00097 }tGPSInfoArray;
00098 
00099 
00100 //*****************************************************************************
00101 //
00102 // Function declarations
00103 //
00104 //*****************************************************************************
00105 
00110 void GPSpacket_initGPSInfoArray(tGPSInfoArray* pGPSInfoArray);
00111 
00112 
00117 void GPSpacket_clearGPSInofArray(tGPSInfoArray* pGPSInfoArray);
00118 
00119 
00125 tGPSInfo* GPSpacket_getGPSInfoArray(tGPSInfoArray* pGPSInfoArray);
00126 
00127 
00133 void GPSpacket_pushGPSInfoArray(tGPSInfoArray* pGPSInfoArray, tGPSInfo* pGPSInfo);
00134 
00135 
00141 tGPSInfo GPSpacket_popGPSInfoArray(tGPSInfoArray* pGPSInfoArray);
00142 
00143 
00144 #endif /*GPSPACKET_H_*/
 All Data Structures Files Functions Variables Typedefs Enumerations Defines