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