Subversion Repositories FlightCtrl

Rev

Rev 702 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
684 killagreg 1
#ifndef _UBX_H
2
#define _UBX_H
3
 
4
#define INVALID    0x00
5
#define VALID      0x01
6
#define PROCESSED  0x02
7
 
8
 
9
#define SATFIX_NONE                      0x00
10
#define SATFIX_DEADRECKOING      0x01
11
#define SATFIX_2D                                0x02
12
#define SATFIX_3D                                0x03
13
#define SATFIX_GPS_DEADRECKOING  0x04
14
#define SATFIX_TIMEONLY                  0x05
15
 
16
 
17
/* enable the UBX protocol at the gps receiver with the following messages enabled
18
  01-02 NAV - POSLLH
19
  01-03 NAV - STATUS
20
  01-08 NAV - POSUTM
21
  01-12 NAV - VELNED */
22
 
23
 
24
typedef struct
25
{
26
        uint8_t         satfix;         // type of satfix
27
        int32_t         utmnorth;       // in cm (+ = north)
28
        int32_t         utmeast;        // in cm (+ = east)
29
        int32_t         utmalt;     // in cm (+ = top)
30
        int32_t         velnorth;       // in cm/s
31
        int32_t         veleast;        // in cm/s
32
        int32_t         veltop;     // in cm/s
33
        int32_t         longitude;  // in 1e-07 deg
34
        int32_t         latitude;       // in 1e-07 deg
35
        int32_t         altitude;   // in mm
36
        uint8_t         status;     // status of data: invalid | valid
37
} GPS_INFO_t;
38
 
39
//here you will find the current gps info
40
extern GPS_INFO_t actualPos;    // measured position (last gps record)
41
 
42
// this function should be called within the UART RX ISR
43
extern void ubx_parser(uint8_t c);
44
 
45
#endif //_UBX_H