Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
Common flight_plan functions shared between fixedwing and rotorcraft. More...
#include "std.h"
Go to the source code of this file.
Macros | |
#define | InitStage() nav_init_stage(); |
#define | Block(x) case x: nav_block=x; |
#define | NextBlock() { nav_block++; nav_init_block(); } |
#define | GotoBlock(b) { nav_block=b; nav_init_block(); } |
#define | Stage(s) case s: nav_stage=s; |
#define | NextStage() { nav_stage++; InitStage(); } |
#define | NextStageAndBreak() { nav_stage++; InitStage(); break; } |
#define | NextStageAndBreakFrom(wp) { last_wp = wp; NextStageAndBreak(); } |
#define | Label(x) label_ ## x: |
#define | Goto(x) { goto label_ ## x; } |
#define | Return() { nav_block=last_block; nav_stage=last_stage; block_time=0;} |
#define | And(x, y) ((x) && (y)) |
#define | Or(x, y) ((x) || (y)) |
#define | Min(x, y) (x < y ? x : y) |
#define | Max(x, y) (x > y ? x : y) |
#define | LessThan(_x, _y) ((_x) < (_y)) |
#define | MoreThan(_x, _y) ((_x) > (_y)) |
#define | NavBlockTime() (block_time) |
Time in s since the entrance in the current block. More... | |
Functions | |
void | nav_init_stage (void) |
needs to be implemented by fixedwing and rotorcraft seperately More... | |
void | nav_init_block (void) |
void | nav_goto_block (uint8_t block_id) |
Variables | |
uint16_t | stage_time |
In s. More... | |
uint16_t | block_time |
uint8_t | nav_stage |
uint8_t | nav_block |
uint8_t | last_block |
To save the current block/stage to enable return. More... | |
uint8_t | last_stage |
Common flight_plan functions shared between fixedwing and rotorcraft.
Definition in file common_flight_plan.h.
#define And | ( | x, | |
y | |||
) | ((x) && (y)) |
Definition at line 59 of file common_flight_plan.h.
#define Block | ( | x | ) | case x: nav_block=x; |
Definition at line 46 of file common_flight_plan.h.
#define Goto | ( | x | ) | { goto label_ ## x; } |
Definition at line 56 of file common_flight_plan.h.
#define GotoBlock | ( | b | ) | { nav_block=b; nav_init_block(); } |
Definition at line 48 of file common_flight_plan.h.
Referenced by nav_goto_block().
#define InitStage | ( | ) | nav_init_stage(); |
Definition at line 44 of file common_flight_plan.h.
Referenced by nav_eight(), nav_init_block(), and nav_oval().
#define Label | ( | x | ) | label_ ## x: |
Definition at line 55 of file common_flight_plan.h.
#define LessThan | ( | _x, | |
_y | |||
) | ((_x) < (_y)) |
Definition at line 63 of file common_flight_plan.h.
#define Max | ( | x, | |
y | |||
) | (x > y ? x : y) |
Definition at line 62 of file common_flight_plan.h.
Referenced by airspeed_adc_update(), eas_from_dynamic_pressure(), formation_flight(), gls_run(), h_ctl_course_loop(), h_ctl_pitch_loop(), h_ctl_roll_loop(), ms45xx_i2c_event(), nav_anemotaxis(), nav_approaching_xy(), nav_circle_XY(), nav_eight(), nav_follow(), nav_route(), nav_route_xy(), nav_survey_rectangle(), nav_survey_rectangle_init(), nav_survey_rectangle_rotorcraft_run(), nav_survey_rectangle_rotorcraft_setup(), pbn_read_event(), periodic_report_sysmon(), potential_task(), spi_submit(), SpiTransmit(), and tcas_periodic_task_4Hz().
#define Min | ( | x, | |
y | |||
) | (x < y ? x : y) |
Definition at line 61 of file common_flight_plan.h.
Referenced by gh_set_max_speed(), gps_ubx_read_message(), guidance_h_traj_run(), guidance_v_run(), h_ctl_course_loop(), mavlink_send_gps_status(), nav_circle_XY(), nav_survey_rectangle(), nav_survey_rectangle_init(), nav_survey_rectangle_rotorcraft_run(), nav_survey_rectangle_rotorcraft_setup(), parse_ins_msg(), RadioControlEventImp(), and tcas_periodic_task_4Hz().
#define MoreThan | ( | _x, | |
_y | |||
) | ((_x) > (_y)) |
Definition at line 64 of file common_flight_plan.h.
#define NavBlockTime | ( | ) | (block_time) |
Time in s since the entrance in the current block.
Definition at line 67 of file common_flight_plan.h.
#define NextBlock | ( | ) | { nav_block++; nav_init_block(); } |
Definition at line 47 of file common_flight_plan.h.
Definition at line 51 of file common_flight_plan.h.
Definition at line 52 of file common_flight_plan.h.
#define NextStageAndBreakFrom | ( | wp | ) | { last_wp = wp; NextStageAndBreak(); } |
Definition at line 53 of file common_flight_plan.h.
#define Or | ( | x, | |
y | |||
) | ((x) || (y)) |
Definition at line 60 of file common_flight_plan.h.
#define Return | ( | ) | { nav_block=last_block; nav_stage=last_stage; block_time=0;} |
Definition at line 57 of file common_flight_plan.h.
#define Stage | ( | s | ) | case s: nav_stage=s; |
Definition at line 50 of file common_flight_plan.h.
void nav_goto_block | ( | uint8_t | block_id | ) |
Definition at line 51 of file common_flight_plan.c.
References GotoBlock, last_block, last_stage, nav_block, and nav_stage.
Referenced by dl_parse_msg(), gsm_receive_content(), and mavlink_block_message_handler().
void nav_init_block | ( | void | ) |
Definition at line 41 of file common_flight_plan.c.
References block_time, InitStage, nav_block, and nav_stage.
void nav_init_stage | ( | void | ) |
needs to be implemented by fixedwing and rotorcraft seperately
Definition at line 91 of file nav.c.
References FALSE, horizontal_mode, HORIZONTAL_MODE_WAYPOINT, last_x, last_y, nav_circle_radians, nav_last_point, stage_time, stateGetPositionEnu_f(), stateGetPositionEnu_i(), VECT3_COPY, EnuCoor_f::x, and EnuCoor_f::y.
Referenced by nav_anemotaxis(), nav_bungee_takeoff_run(), nav_flower_run(), nav_line_border_run(), nav_line_osam_run(), nav_line_run(), nav_survey_disc_run(), nav_survey_poly_osam_run(), nav_survey_poly_run(), nav_survey_polygon_run(), nav_survey_zamboni_run(), and nav_vertical_raster_run().
uint16_t block_time |
Definition at line 33 of file common_flight_plan.c.
Referenced by common_nav_periodic_task_4Hz(), nav_init_block(), and nav_periodic_task().
uint8_t last_block |
To save the current block/stage to enable return.
Definition at line 38 of file common_flight_plan.c.
Referenced by nav_goto_block().
uint8_t last_stage |
Definition at line 38 of file common_flight_plan.c.
Referenced by nav_goto_block().
uint8_t nav_block |
Definition at line 35 of file common_flight_plan.c.
Referenced by generic_com_periodic(), mavlink_mission_periodic(), nav_goto_block(), nav_init(), and nav_init_block().
uint8_t nav_stage |
Definition at line 35 of file common_flight_plan.c.
Referenced by nav_goto_block(), nav_init(), and nav_init_block().
uint16_t stage_time |
In s.
Definition at line 33 of file common_flight_plan.c.
Referenced by common_nav_periodic_task_4Hz(), nav_init_stage(), and nav_periodic_task().