Subversion Repositories NaviCtrl

Rev

Rev 548 | Rev 588 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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