ublox.h
Go to the documentation of this file.
00001 /*
00002 
00003 Copyright (c) 2011, Ascending Technologies GmbH
00004 All rights reserved.
00005 
00006 Redistribution and use in source and binary forms, with or without
00007 modification, are permitted provided that the following conditions are met:
00008 
00009  * Redistributions of source code must retain the above copyright notice,
00010    this list of conditions and the following disclaimer.
00011  * Redistributions in binary form must reproduce the above copyright
00012    notice, this list of conditions and the following disclaimer in the
00013    documentation and/or other materials provided with the distribution.
00014 
00015 THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
00016 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00017 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00018 DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
00019 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00020 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00021 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00022 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00023 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00024 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00025 DAMAGE.
00026 
00027  */
00028 
00029 
00030 #ifndef UBLOX_H_
00031 #define UBLOX_H_
00032 
00033 #define UR_MAX_RAWDATA_LENGTH 384
00034 
00035 extern void uBloxReceiveHandler(unsigned char recByte);
00036 extern void uBloxReceiveEngine(void); //call with 200ms
00037 extern unsigned char gpsLEDTrigger;
00038 
00039 struct __attribute__((packed)) UBX_NAV_SOL
00040 {
00041         unsigned int iTow;
00042         unsigned int fTow;
00043         short week;
00044         unsigned char gpsFix;
00045         unsigned char flags;
00046         int ecefX;
00047         int ecefY;
00048         int ecefZ;
00049         unsigned int pAcc;
00050         int ecefVX;
00051         int ecefVY;
00052         int ecefVZ;
00053         unsigned int sAcc;
00054         unsigned short pDOP;
00055         unsigned char reserved1;
00056         unsigned char numSV;
00057         unsigned int reserved2;
00058 };
00059 
00060 struct __attribute__((packed)) UBX_NAV_POSLLH
00061 {
00062         unsigned int iTow;
00063         int lon;
00064         int lat;
00065         int height;
00066         int hMSL;
00067         int hAcc;
00068         int vAcc;
00069 };
00070 
00071 struct __attribute__((packed)) UBX_NAV_VELNED
00072 {
00073         unsigned int iTow;
00074         int velN;
00075         int velE;
00076         int velD;
00077         unsigned int speed;
00078         unsigned int gSpeed;
00079         int heading;
00080         unsigned int sAcc;
00081         unsigned int cAcc;
00082 };
00083 
00084 struct __attribute__((packed)) UBX_NAV_STATUS
00085 {
00086         unsigned int iTow;
00087         unsigned char gpsFix;
00088         unsigned char flags;
00089         unsigned char fixStat;
00090         unsigned char flags2;
00091         unsigned int ttff;
00092         unsigned int msss;
00093 };
00094 
00095 struct __attribute__((packed)) UBX_MON_VER_HEADER
00096 {
00097         char swVersion[30];
00098         char hwVersion[10];
00099         char romVersion[30];
00100 };
00101 
00102 struct __attribute__((packed)) UBX_MON_SCHED
00103 {
00104         unsigned char reserved[16];
00105         unsigned short stackUsed;
00106         unsigned short stackAv;
00107         unsigned short cpuLoad;
00108         unsigned char fullSlots;
00109         unsigned char partSlots;
00110 };
00111 
00112 struct __attribute__((packed)) UBX_MON_HW
00113 {
00114         unsigned int pinSel;
00115         unsigned int pinBank;
00116         unsigned int pinDir;
00117         unsigned int pinVal;
00118 
00119         unsigned short noisePerMs;
00120         unsigned short agcCnt;
00121         unsigned char aStatus;
00122         unsigned char aPower;
00123         unsigned char flags;
00124         unsigned char reserved1;
00125         unsigned int usedMast;
00126         unsigned char vp[25];
00127         unsigned char jamInd;
00128         unsigned short reserved3;
00129         unsigned int pinIrq;
00130         unsigned int pullH;
00131         unsigned int pullL;
00132 };
00133 
00134 struct __attribute__((packed)) UBX_NAV_SVINFO_HEADER
00135 {
00136         unsigned int iTow;
00137         unsigned char numCh;
00138         unsigned char globalFlags;
00139         unsigned short reserved2;
00140 };
00141 
00142 struct __attribute__((packed)) UBX_NAV_SVINFO_SAT
00143 {
00144         unsigned char channel;
00145         unsigned char svId;
00146         unsigned char flags;
00147         unsigned char quality;
00148         unsigned char cNo;
00149         char elev; //in deg
00150         short azim; // in deg
00151         int prRes; //pseudo range residual
00152 };
00153 
00154 struct __attribute__((packed)) UBX_CFG_CFG
00155 {
00156         unsigned int clearMask;
00157         unsigned int saveMask;
00158         unsigned int loadMask;
00159         unsigned char deviceMask;
00160 };
00161 
00162 struct __attribute__((packed)) SVINFO_HEADER
00163 {
00164         unsigned char numCh;
00165         unsigned char globalFlags;
00166 };
00167 
00168 struct __attribute__((packed)) SVINFO
00169 {
00170         unsigned char channel;
00171         unsigned char svId;
00172         unsigned char flags;
00173         unsigned char quality;
00174         unsigned char cNo;
00175         char elev; //in deg
00176         short azim; // in deg
00177         int prRes; //pseudo range residual
00178 };
00179 
00180 struct __attribute__((packed)) GPS_HW_STATUS
00181 {
00182          unsigned char antennaStatus;
00183          unsigned char antennaPower;
00184          unsigned short agcMonitor;
00185          unsigned short noiseLevel;
00186 
00187          unsigned short stackUsed;
00188          unsigned short stackAv;
00189          unsigned short cpuLoad;
00190          unsigned char fullSlots;
00191          unsigned char partSlots;
00192 };
00193 
00194 extern struct GPS_HW_STATUS gpsHardwareStatus;
00195 
00196 #endif /* UBLOX_H_ */


asctec_hl_firmware
Author(s): Markus Achtelik, Michael Achtelik, Stephan Weiss, Laurent Kneip
autogenerated on Tue Jan 7 2014 11:05:19