Rev 499 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 499 | Rev 532 | ||
---|---|---|---|
1 | #ifndef __GPS_H |
1 | #ifndef __GPS_H |
2 | #define __GPS_H |
2 | #define __GPS_H |
3 | 3 | ||
4 | #include "ubx.h" |
4 | #include "ubx.h" |
5 | #include "waypoints.h" |
5 | #include "waypoints.h" |
6 | 6 | ||
7 | typedef struct |
7 | typedef struct |
8 | { |
8 | { |
9 | s16 Nick; |
9 | s16 Nick; |
10 | s16 Roll; |
10 | s16 Roll; |
11 | // s16 Yaw; |
11 | // s16 Yaw; |
12 | } __attribute__((packed)) GPS_Stick_t; |
12 | } __attribute__((packed)) GPS_Stick_t; |
13 | 13 | ||
14 | #define CAM_UPDATE_AZIMUTH 0x01 |
14 | #define CAM_UPDATE_AZIMUTH 0x01 |
15 | #define CAM_UPDATE_ELEVATION 0x02 |
15 | #define CAM_UPDATE_ELEVATION 0x02 |
16 | typedef struct |
16 | typedef struct |
17 | { |
17 | { |
18 | s16 Azimuth; // angle in 1 deg measured clockwise from north |
18 | s16 Azimuth; // angle in 1 deg measured clockwise from north |
19 | s16 Elevation; // angle in 0.1 deg measured upwards from horizont |
19 | s16 Elevation; // angle in 0.1 deg measured upwards from horizont |
20 | u8 UpdateMask; |
20 | u8 UpdateMask; |
21 | } __attribute__((packed)) CAM_Orientation_t; |
21 | } __attribute__((packed)) CAM_Orientation_t; |
22 | 22 | ||
23 | extern CAM_Orientation_t CAM_Orientation; |
23 | extern CAM_Orientation_t CAM_Orientation; |
24 | extern Point_t* GPS_pWaypoint; |
24 | extern Point_t* GPS_pWaypoint; |
25 | extern u8 MaxNumberOfWaypoints; // should be 32 |
25 | extern u8 MaxNumberOfWaypoints; // should be 32 |
26 | extern u16 AbsoluteFlyingRange; // Maximum distance that the MK is not allowed to exceed - keep zero if not used |
26 | extern u16 AbsoluteFlyingRange_m; // Maximum distance that the MK is not allowed to exceed - keep zero if not used |
27 | extern s16 AbsoluteFlyingAltitude; // Maximum altitude that the MK is not allowed to exceed - keep zero if not used |
27 | extern s16 AbsoluteFlyingAltitude; // Maximum altitude that the MK is not allowed to exceed - keep zero if not used |
28 | extern u16 AutoDescendRange; |
28 | extern u16 AutoDescendRange_m; |
29 | 29 | ||
30 | void GPS_Init(void); |
30 | void GPS_Init(void); |
31 | void GPS_Navigation(gps_data_t *pGPS_Data, GPS_Stick_t* pGPS_Stick); |
31 | void GPS_Navigation(gps_data_t *pGPS_Data, GPS_Stick_t* pGPS_Stick); |
32 | void CalcHeadFree(void); |
32 | void CalcHeadFree(void); |
33 | 33 | ||
34 | #define EVENTFLAG_1_WP_CHANNEL 1 |
34 | #define EVENTFLAG_1_WP_CHANNEL 1 |
35 | #define EVENTFLAG_2_WP_CHANNEL 2 |
35 | #define EVENTFLAG_2_WP_CHANNEL 2 |
36 | 36 | ||
37 | #endif //__GPS_H |
37 | #endif //__GPS_H |
38 | 38 | ||
39 | 39 |