add i2c support
[protos/imu.git] / gps_venus.h
1 #ifndef _GPS_VENUS_H
2 #define _GPS_VENUS_H
3
4 #include <stdint.h>
5
6 /* A GPS position structure. It also contains some information about the number
7  * of seen satellites, the message ID, the date, .. */
8 struct gps_pos {
9         uint8_t msg_id; /* */
10         uint8_t mode;
11         uint8_t sv_num;
12         uint16_t gps_week;
13         uint32_t tow;
14
15         int32_t latitude;
16         int32_t longitude;
17         uint32_t altitude;
18
19         uint32_t sea_altitude;
20
21         uint16_t gdop;
22         uint16_t pdop;
23         uint16_t hdop;
24         uint16_t vdop;
25         uint16_t tdop;
26
27         int32_t ecef_x;
28         int32_t ecef_y;
29         int32_t ecef_z;
30
31         int32_t ecef_vx;
32         int32_t ecef_vy;
33         int32_t ecef_vz;
34
35 } __attribute__ ((packed));
36
37 int gps_venus_init(void);
38 int gps_loop(void);
39
40 /* does not lock intr, must be done by user */
41 void gps_get_pos(struct gps_pos *pos);
42
43 #endif