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