28 #include "generated/flight_plan.h"
29 #include "generated/airframe.h"
34 #ifndef CLOUD_SIM_RADIUS
35 #define CLOUD_SIM_RADIUS 150.f
39 #ifndef CLOUD_SIM_MODE
40 #define CLOUD_SIM_MODE CLOUD_SIM_WP
44 #if (defined WP_CLOUD) && !(defined CLOUD_SIM_WP_ID)
45 #define CLOUD_SIM_WP_ID WP_CLOUD
46 #elif !(defined CLOUD_SIM_WP_ID)
47 #define CLOUD_SIM_WP_ID 0
51 #if (defined CLOUD_SIM_WP_POLYGON)
53 #ifndef CLOUD_SIM_WPS_NB
54 #pragma error "CLOUD_SIM: please define CLOUD_SIM_WPS_NB for custom polygon"
56 #elif (defined SECTOR_CLOUD)
58 #define CLOUD_SIM_WPS_NB SECTOR_CLOUD_NB
60 #define CLOUD_SIM_WPS_NB 1
64 #ifndef CLOUD_SIM_SPEED_X
65 #define CLOUD_SIM_SPEED_X 0.f
68 #ifndef CLOUD_SIM_SPEED_Y
69 #define CLOUD_SIM_SPEED_Y 0.f
120 inside = (
uint8_t) InsideCloud(pos->
x, pos->
y);
157 struct point wps[NB_WAYPOINT] = WAYPOINTS_UTM;
Main include for ABI (AirBorneInterface).
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
struct CloudSim cloud_sim
void cloud_sim_detect(void)
periodic call for border detection
#define CLOUD_SIM_SPEED_Y
static uint8_t cloud_sim_circle_id
void cloud_sim_move(void)
periodic call for moving waypoints
void cloud_sim_reset(bool reset)
reset handler
void cloud_sim_init(void)
static uint8_t cloud_sim_polygon[CLOUD_SIM_WPS_NB]
static float distance_to_wp(struct EnuCoor_f *pos, uint8_t id)
#define CLOUD_SIM_SPEED_X
#define CLOUD_SIM_POLYGON
float radius
radius in WP mode
void nav_send_waypoint(uint8_t wp_id)
Send a waypoint throught default telemetry channel.
void nav_move_waypoint_point(uint8_t wp_id, struct point *p)
Move a waypoint from point structure (local frame).
struct point waypoints[NB_WAYPOINT]
size == nb_waypoint, waypoint 0 is a dummy waypoint
const uint8_t nb_waypoint
static float float_vect2_norm(struct FloatVect2 *v)
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
vector in East North Up coordinates Units: meters
API to get/set the generic vehicle states.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.