Paparazzi UAS  v6.2_unstable
Paparazzi is a free software Unmanned Aircraft System.
cloud_sim.c File Reference
#include "modules/meteo/cloud_sim.h"
#include "modules/nav/common_nav.h"
#include "generated/flight_plan.h"
#include "generated/airframe.h"
#include "modules/core/abi.h"
#include "state.h"
+ Include dependency graph for cloud_sim.c:

Go to the source code of this file.


#define CLOUD_SIM_RADIUS   150.f
#define CLOUD_SIM_WP_ID   0
#define CLOUD_SIM_WPS_NB   1
#define CLOUD_SIM_SPEED_X   0.f
#define CLOUD_SIM_SPEED_Y   0.f


static float distance_to_wp (struct EnuCoor_f *pos, uint8_t id)
void cloud_sim_init (void)
void cloud_sim_detect (void)
 periodic call for border detection More...
void cloud_sim_move (void)
 periodic call for moving waypoints More...
void cloud_sim_reset (bool reset)
 reset handler More...


static uint8_t cloud_sim_circle_id = CLOUD_SIM_WP_ID
static uint8_t cloud_sim_polygon [CLOUD_SIM_WPS_NB] = {0}
struct CloudSim cloud_sim

Detailed Description

Gautier Hattenberger Basic cloud simulation for testing adaptive navigation patterns

Definition in file cloud_sim.c.

Macro Definition Documentation



Definition at line 40 of file cloud_sim.c.


#define CLOUD_SIM_RADIUS   150.f

Definition at line 35 of file cloud_sim.c.


#define CLOUD_SIM_SPEED_X   0.f

Definition at line 65 of file cloud_sim.c.


#define CLOUD_SIM_SPEED_Y   0.f

Definition at line 69 of file cloud_sim.c.


#define CLOUD_SIM_WP_ID   0

Definition at line 47 of file cloud_sim.c.


#define CLOUD_SIM_WPS_NB   1

Definition at line 60 of file cloud_sim.c.

Function Documentation

◆ cloud_sim_detect()

void cloud_sim_detect ( void  )

periodic call for border detection

Definition at line 102 of file cloud_sim.c.

References CLOUD_SENSOR_ID, cloud_sim, cloud_sim_circle_id, CLOUD_SIM_POLYGON, CLOUD_SIM_WP, distance_to_wp(), get_sys_time_usec(), CloudSim::mode, CloudSim::radius, stateGetPositionEnu_f(), EnuCoor_f::x, and EnuCoor_f::y.

+ Here is the call graph for this function:

◆ cloud_sim_init()

◆ cloud_sim_move()

void cloud_sim_move ( void  )

periodic call for moving waypoints

Definition at line 130 of file cloud_sim.c.

References cloud_sim, cloud_sim_circle_id, CLOUD_SIM_POLYGON, cloud_sim_polygon, CLOUD_SIM_WP, CLOUD_SIM_WPS_NB, CloudSim::mode, nav_move_waypoint_point(), nav_send_waypoint(), CloudSim::speed, waypoints, point::x, FloatVect2::x, point::y, and FloatVect2::y.

+ Here is the call graph for this function:

◆ cloud_sim_reset()

void cloud_sim_reset ( bool  reset)

reset handler

Definition at line 154 of file cloud_sim.c.

References cloud_sim, cloud_sim_circle_id, cloud_sim_polygon, CLOUD_SIM_WPS_NB, nav_move_waypoint_point(), nav_send_waypoint(), CloudSim::reset, and reset.

+ Here is the call graph for this function:

◆ distance_to_wp()

static float distance_to_wp ( struct EnuCoor_f pos,
uint8_t  id 

Definition at line 78 of file cloud_sim.c.

References float_vect2_norm(), nb_waypoint, waypoints, point::x, EnuCoor_f::x, point::y, and EnuCoor_f::y.

Referenced by cloud_sim_detect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ cloud_sim

struct CloudSim cloud_sim

Definition at line 72 of file cloud_sim.c.

Referenced by cloud_sim_detect(), cloud_sim_init(), cloud_sim_move(), and cloud_sim_reset().

◆ cloud_sim_circle_id

uint8_t cloud_sim_circle_id = CLOUD_SIM_WP_ID

Definition at line 49 of file cloud_sim.c.

Referenced by cloud_sim_detect(), cloud_sim_move(), and cloud_sim_reset().

◆ cloud_sim_polygon

uint8_t cloud_sim_polygon[CLOUD_SIM_WPS_NB] = {0}

Definition at line 61 of file cloud_sim.c.

Referenced by cloud_sim_move(), and cloud_sim_reset().