Subversion Repositories FlightCtrl

Rev

Rev 935 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 935 Rev 936
Line 1... Line 1...
1
#ifndef _UBX_H
1
#ifndef _UBX_H
2
#define _UBX_H
2
#define _UBX_H
Line 3... Line 3...
3
 
3
 
Line 4... Line -...
4
#include <inttypes.h>
-
 
5
 
-
 
6
#define INVALID    0x00
-
 
Line -... Line 4...
-
 
4
#include <inttypes.h>
-
 
5
 
-
 
6
 
-
 
7
typedef enum
-
 
8
{
-
 
9
        INVALID,
Line -... Line 10...
-
 
10
        NEWDATA,
7
#define VALID      0x01
11
        PROCESSED
8
#define PROCESSED  0x02
12
} Status_t;
9
 
13
 
10
 
14
// Satfix types for GPSData.satfix
11
#define SATFIX_NONE                      0x00
15
#define SATFIX_NONE                      0x00
12
#define SATFIX_DEADRECKOING      0x01
16
#define SATFIX_DEADRECKOING      0x01
-
 
17
#define SATFIX_2D                                0x02
-
 
18
#define SATFIX_3D                                0x03
-
 
19
#define SATFIX_GPS_DEADRECKOING  0x04
-
 
20
#define SATFIX_TIMEONLY                  0x05
-
 
21
// Flags for interpretation of the GPSData.flags
Line 13... Line 22...
13
#define SATFIX_2D                                0x02
22
#define FLAG_GPSFIXOK                   0x01 // (i.e. within DOP & ACC Masks)
14
#define SATFIX_3D                                0x03
23
#define FLAG_DIFFSOLN                   0x02 // (is DGPS used)
15
#define SATFIX_GPS_DEADRECKOING  0x04
24
#define FLAG_WKNSET                             0x04 // (is Week Number valid)
16
#define SATFIX_TIMEONLY                  0x05
25
#define FLAG_TOWSET                             0x08 // (is Time of Week valid)
Line 17... Line 26...
17
 
26
 
18
 
27
 
19
/* enable the UBX protocol at the gps receiver with the following messages enabled
28
/* enable the UBX protocol at the gps receiver with the following messages enabled
20
  01-02 NAV - POSLLH
29
  01-02 NAV - POSLLH
21
  01-06 Nav - SOL
30
  01-06 Nav - SOL
22
  01-12 NAV - VELNED */
31
  01-12 NAV - VELNED */
23
 
32
 
24
typedef struct
33
typedef struct
Line 33... Line 42...
33
        int32_t         velnorth;       // in cm/s
42
        int32_t         velnorth;       // in cm/s
34
        int32_t         veleast;        // in cm/s
43
        int32_t         veleast;        // in cm/s
35
        int32_t         veltop;     // in cm/s
44
        int32_t         veltop;     // in cm/s
36
        uint32_t    velground;  // 2D ground speed in cm/s
45
        uint32_t    velground;  // 2D ground speed in cm/s
37
        uint32_t        VAcc;           // in cm/s 3d velocity accuracy
46
        uint32_t        VAcc;           // in cm/s 3d velocity accuracy
38
        uint32_t    updatetime;  // ms
47
        Status_t        status;     // status of data: invalid | valid
39
} GPS_INFO_t;
48
} GPS_INFO_t;
Line 40... Line 49...
40
 
49
 
41
//here you will find the current gps info
50
//here you will find the current gps info