Rev 224 | Rev 227 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 224 | Rev 225 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #ifndef _WAYPOINTS_H |
1 | #ifndef _WAYPOINTS_H |
2 | #define _WAYPOINTS_H |
2 | #define _WAYPOINTS_H |
Line 3... | Line 3... | ||
3 | 3 | ||
Line -... | Line 4... | ||
- | 4 | #include "ubx.h" |
|
- | 5 | ||
- | 6 | #define POINT_TYPE_WP 0 |
|
4 | #include "ubx.h" |
7 | #define POINT_TYPE_POI 1 |
5 | 8 | ||
6 | typedef struct |
9 | typedef struct |
7 | { |
10 | { |
8 | GPS_Pos_t Position; // the gps position of the waypoint, see ubx.h for details |
11 | GPS_Pos_t Position; // the gps position of the waypoint, see ubx.h for details |
9 | s16 Heading; // orientation, future implementation |
12 | s16 Heading; // orientation, future implementation |
10 | u8 ToleranceRadius; // in meters, if the MK is within that range around the target, then the next target is triggered |
13 | u8 ToleranceRadius; // in meters, if the MK is within that range around the target, then the next target is triggered |
11 | u8 HoldTime; // in seconds, if the was once in the tolerance area around a WP, this time defines the delay before the next WP is triggered |
14 | u8 HoldTime; // in seconds, if the was once in the tolerance area around a WP, this time defines the delay before the next WP is triggered |
- | 15 | u8 Event_Flag; // future implementation |
|
12 | u8 Event_Flag; // future implementation |
16 | u8 Index; // to indentify different waypoints, workaround for bad communications PC <-> NC |
13 | u8 Index; // to indentify different waypoints, workaround for bad communications PC <-> NC |
17 | u8 Type; // typeof Waypoint |
Line 14... | Line 18... | ||
14 | u8 reserve[11]; // reserve |
18 | u8 reserve[10]; // reserve |
15 | } __attribute__((packed)) Waypoint_t; |
19 | } __attribute__((packed)) Waypoint_t; |
16 | 20 | ||
Line 21... | Line 25... | ||
21 | Waypoint_t* WPList_Begin(void); |
25 | Waypoint_t* WPList_Begin(void); |
22 | Waypoint_t* WPList_End(void); |
26 | Waypoint_t* WPList_End(void); |
23 | Waypoint_t* WPList_Next(void); |
27 | Waypoint_t* WPList_Next(void); |
24 | Waypoint_t* WPList_GetAt(u8 index); |
28 | Waypoint_t* WPList_GetAt(u8 index); |
25 | Waypoint_t* WPList_GetPOI(void); |
29 | Waypoint_t* WPList_GetPOI(void); |
26 | void WPList_SetPOI(Waypoint_t* pwp); |
- | |
Line 27... | Line 30... | ||
27 | 30 |