Rev 407 | Rev 676 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 407 | Rev 675 | ||
---|---|---|---|
Line 38... | Line 38... | ||
38 | uint16_t Analog[32]; // Debugvalues |
38 | uint16_t Analog[32]; // Debugvalues |
39 | } __attribute__((packed)) DebugOut_t; |
39 | } __attribute__((packed)) DebugOut_t; |
Line 40... | Line 40... | ||
40 | 40 | ||
41 | /* |
41 | /* |
42 | * NaviCtrl OSD Structs |
42 | * NaviCtrl OSD Structs |
43 | * portions taken and adapted from |
43 | * portions taken and adapted from |
44 | * http://svn.mikrokopter.de/mikrowebsvn/filedetails.php?repname=NaviCtrl&path=%2Ftags%2FV0.15c%2Fuart1.h |
44 | * http://svn.mikrokopter.de/mikrowebsvn/filedetails.php?repname=NaviCtrl&path=%2Ftags%2FV0.17e%2Fuart1.h |
45 | */ |
45 | */ |
46 | typedef struct { |
46 | typedef struct { |
47 | s32 Longitude; // in 1E-7 deg |
47 | s32 Longitude; // in 1E-7 deg |
48 | s32 Latitude; // in 1E-7 deg |
48 | s32 Latitude; // in 1E-7 deg |
49 | s32 Altitude; // in mm |
49 | s32 Altitude; // in mm |
50 | u8 Status; // validity of data |
50 | u8 Status; // validity of data |
- | 51 | } __attribute__((packed)) GPS_Pos_t; |
|
- | 52 | #define INVALID 0x00 |
|
- | 53 | #define NEWDATA 0x01 |
|
- | 54 | #define PROCESSED 0x02 |
|
Line 51... | Line 55... | ||
51 | } __attribute__((packed)) GPS_Pos_t; |
55 | |
- | 56 | ||
52 | 57 | typedef struct { |
|
53 | typedef struct { |
58 | { |
54 | s16 Distance; // distance to target in cm |
59 | u16 Distance; // distance to target in cm |
Line 55... | Line 60... | ||
55 | s16 Bearing; // course to target in deg |
60 | s16 Bearing; // course to target in deg |
56 | } __attribute__((packed)) GPS_PosDev_t; |
61 | } __attribute__((packed)) GPS_PosDev_t; |
57 | 62 | ||
58 | typedef struct { |
63 | typedef struct { |
59 | u8 Version; // version of the data structure |
64 | u8 Version; // version of the data structure |
60 | GPS_Pos_t CurrentPosition; // see ubx.h for details |
65 | GPS_Pos_t CurrentPosition; // see ubx.h for details |
61 | GPS_Pos_t TargetPosition; |
66 | GPS_Pos_t TargetPosition; |
62 | GPS_PosDev_t TargetPositionDeviation; |
67 | GPS_PosDev_t TargetPositionDeviation; |
63 | GPS_Pos_t HomePosition; |
68 | GPS_Pos_t HomePosition; |
64 | GPS_PosDev_t HomePositionDeviation; |
69 | GPS_PosDev_t HomePositionDeviation; |
65 | u8 WaypointIndex; // index of current waypoints running from 0 to WaypointNumber-1 |
70 | u8 WaypointIndex; // index of current waypoints running from 0 to WaypointNumber-1 |
66 | u8 WaypointNumber; // number of stored waypoints |
71 | u8 WaypointNumber; // number of stored waypoints |
67 | u8 SatsInUse; // number of satellites used for position solution |
72 | u8 SatsInUse; // number of satellites used for position solution |
68 | s16 Altimeter; // hight according to air pressure |
73 | s16 Altimeter; // hight according to air pressure |
69 | s16 Variometer; // climb(+) and sink(-) rate |
74 | s16 Variometer; // climb(+) and sink(-) rate |
70 | u16 FlyingTime; // in seconds |
75 | u16 FlyingTime; // in seconds |
71 | u8 UBat; // Battery Voltage in 0.1 Volts |
76 | u8 UBat; // Battery Voltage in 0.1 Volts |
72 | u16 GroundSpeed; // speed over ground in cm/s (2D) |
77 | u16 GroundSpeed; // speed over ground in cm/s (2D) |
73 | s16 Heading; // current flight direction in ° as angle to north |
78 | s16 Heading; // current flight direction in ° as angle to north |
74 | s16 CompassHeading; // current compass value in ° |
79 | s16 CompassHeading; // current compass value in ° |
75 | s8 AngleNick; // current Nick angle in 1° |
80 | s8 AngleNick; // current Nick angle in 1° |
76 | s8 AngleRoll; // current Rick angle in 1° |
81 | s8 AngleRoll; // current Rick angle in 1° |
77 | u8 RC_Quality; // RC_Quality |
82 | u8 RC_Quality; // RC_Quality |
78 | u8 MKFlags; // Flags from FC |
83 | u8 MKFlags; // Flags from FC |
79 | u8 NCFlags; // Flags from NC |
84 | u8 NCFlags; // Flags from NC |
80 | u8 Errorcode; // 0 --> okay |
85 | u8 Errorcode; // 0 --> okay |
- | 86 | u8 OperatingRadius; // current operation radius around the Home Position in m |
|
- | 87 | s16 TopSpeed; // velocity in vertical direction in cm/s |
|
81 | u8 OperatingRadius; // current operation radius around the Home Position in m |
88 | u8 TargetHoldTime; // time in s to stay at the given target, counts down to 0 if target has been reached |
82 | s16 TopSpeed; // velocity in vertical direction in cm/s |
89 | u8 RC_RSSI; // Receiver signal strength (since version 2 added) |
Line 83... | Line 90... | ||
83 | u8 TargetHoldTime; // time in s to stay at the given target, counts down to 0 if target has been reached |
90 | s16 SetpointAltitude; // setpoint for altitude |
84 | u8 Reserve[4]; // for future use |
91 | u8 Gas; // for future use |
85 | } __attribute__((packed)) NaviData_t; |
92 | } __attribute__((packed)) NaviData_t; |
Line 95... | Line 102... | ||
95 | #define FLAG_START 8 |
102 | #define FLAG_START 8 |
Line 96... | Line 103... | ||
96 | 103 | ||
97 | /* |
104 | /* |
98 | * NaviCtrl Flags |
105 | * NaviCtrl Flags |
99 | * taken from |
106 | * taken from |
100 | * http://mikrocontroller.cco-ev.de/mikrowebsvn/filedetails.php?repname=NaviCtrl&path=%2Ftags%2FV0.15c%2Fuart1.h |
107 | * http://mikrocontroller.cco-ev.de/mikrowebsvn/filedetails.php?repname=NaviCtrl&path=%2Ftags%2FV0.17e%2Fuart1.h |
101 | */ |
108 | */ |
102 | #define NC_FLAG_FREE 0x01 |
109 | #define NC_FLAG_FREE 0x01 |
103 | #define NC_FLAG_PH 0x02 |
110 | #define NC_FLAG_PH 0x02 |
104 | #define NC_FLAG_CH 0x04 |
111 | #define NC_FLAG_CH 0x04 |