 |
Paparazzi UAS
v6.1.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
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;
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
void nav_send_waypoint(uint8_t wp_id)
Send a waypoint throught default telemetry channel.
#define CLOUD_SIM_POLYGON
static uint8_t cloud_sim_circle_id
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
#define CLOUD_SIM_SPEED_Y
struct CloudSim cloud_sim
static uint8_t cloud_sim_polygon[CLOUD_SIM_WPS_NB]
struct point waypoints[NB_WAYPOINT]
size == nb_waypoint, waypoint 0 is a dummy waypoint
void cloud_sim_init(void)
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
void cloud_sim_reset(bool reset)
reset handler
static float float_vect2_norm(struct FloatVect2 *v)
const uint8_t nb_waypoint
float radius
radius in WP mode
vector in East North Up coordinates Units: meters
void cloud_sim_detect(void)
periodic call for border detection
void cloud_sim_move(void)
periodic call for moving waypoints
#define CLOUD_SIM_SPEED_X
static float distance_to_wp(struct EnuCoor_f *pos, uint8_t id)
void nav_move_waypoint_point(uint8_t wp_id, struct point *p)
Move a waypoint from point structure (local frame).