Rev 854 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | ingob | 1 | #ifndef __GPS_H |
2 | #define __GPS_H |
||
3 | |||
556 | holgerb | 4 | #define SIMULATION_ACTIVE 0x01 |
5 | #define SIMULATION_MOTOR_ON 0x02 |
||
6 | #define SIMULATION_MOTOR_START 0x80 |
||
7 | |||
215 | killagreg | 8 | #include "ubx.h" |
41 | ingob | 9 | #include "waypoints.h" |
1 | ingob | 10 | |
41 | ingob | 11 | typedef struct |
1 | ingob | 12 | { |
41 | ingob | 13 | s16 Nick; |
14 | s16 Roll; |
||
419 | holgerb | 15 | // s16 Yaw; |
41 | ingob | 16 | } __attribute__((packed)) GPS_Stick_t; |
810 | holgerb | 17 | extern GPS_Stick_t GPS_Stick; |
1 | ingob | 18 | |
280 | killagreg | 19 | #define CAM_UPDATE_AZIMUTH 0x01 |
20 | #define CAM_UPDATE_ELEVATION 0x02 |
||
588 | holgerb | 21 | #define FORCE_AZIMUTH_ROTATION 0x04 |
22 | |||
278 | killagreg | 23 | typedef struct |
24 | { |
||
499 | killagreg | 25 | s16 Azimuth; // angle in 1 deg measured clockwise from north |
26 | s16 Elevation; // angle in 0.1 deg measured upwards from horizont |
||
280 | killagreg | 27 | u8 UpdateMask; |
278 | killagreg | 28 | } __attribute__((packed)) CAM_Orientation_t; |
29 | |||
799 | holgerb | 30 | typedef struct |
31 | { |
||
32 | s32 x; |
||
33 | s32 y; |
||
34 | } __attribute__((packed)) Vec2D_t; |
||
35 | |||
278 | killagreg | 36 | extern CAM_Orientation_t CAM_Orientation; |
280 | killagreg | 37 | extern Point_t* GPS_pWaypoint; |
355 | holgerb | 38 | extern u8 MaxNumberOfWaypoints; // should be 32 |
532 | holgerb | 39 | extern u16 AbsoluteFlyingRange_m; // Maximum distance that the MK is not allowed to exceed - keep zero if not used |
369 | holgerb | 40 | extern s16 AbsoluteFlyingAltitude; // Maximum altitude that the MK is not allowed to exceed - keep zero if not used |
532 | holgerb | 41 | extern u16 AutoDescendRange_m; |
556 | holgerb | 42 | extern GPS_Pos_t SimulationPosition; // the current GPS position in simulated mode |
604 | holgerb | 43 | extern GPS_Pos_t GPS_FailsafePosition; |
556 | holgerb | 44 | extern u8 SimulationFlags; |
646 | holgerb | 45 | extern u8 MK_FlyingWithGps; |
660 | holgerb | 46 | extern u8 CurrentlyFlyingWaypoints; |
663 | holgerb | 47 | extern void ConfirmGpsUpdateRate(u16); |
799 | holgerb | 48 | extern int PointPolyCheck( Vec2D_t P, Vec2D_t* V, int n ); |
49 | extern u8 UpdateFlyzoneTimer; |
||
854 | holgerb | 50 | extern u16 WP_Yaw_WithoutCF; |
1 | ingob | 51 | |
41 | ingob | 52 | void GPS_Init(void); |
215 | killagreg | 53 | void GPS_Navigation(gps_data_t *pGPS_Data, GPS_Stick_t* pGPS_Stick); |
222 | holgerb | 54 | void CalcHeadFree(void); |
714 | holgerb | 55 | unsigned char UBX_Setup(void); |
1 | ingob | 56 | |
258 | holgerb | 57 | #define EVENTFLAG_1_WP_CHANNEL 1 |
58 | #define EVENTFLAG_2_WP_CHANNEL 2 |
||
59 | |||
41 | ingob | 60 | #endif //__GPS_H |
1 | ingob | 61 |