Paparazzi UAS
v7.0_unstable
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: set_nav_block(x); |
#define | NextBlock() nav_goto_next_block() |
#define | GotoBlock(b) nav_goto_block(b) |
#define | Stage(s) case s: set_nav_stage(s); |
#define | NextStage() { nav_goto_next_stage(); } INTENTIONAL_FALLTHRU |
#define | NextStageAndBreak() { nav_goto_next_stage(); break; } |
#define | NextStageAndBreakFrom(wp) { last_wp = wp; NextStageAndBreak(); } |
#define | Label(x) label_ ## x: |
#define | Goto(x) { goto label_ ## x; } |
#define | Return(x) nav_return(x) |
#define | NavBlockTime() (block_time) |
Time in s since the entrance in the current block. More... | |
#define | Ptr(x) (&(x)) |
macro to use pointers in flight plans XML More... | |
Functions | |
void | common_flight_plan_init (void) |
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) |
void | nav_goto_next_block (void) |
void | nav_goto_next_stage (void) |
void | nav_return (uint8_t reset) |
uint8_t | get_nav_block (void) |
uint8_t | get_nav_stage (void) |
uint8_t | get_last_block (void) |
uint8_t | get_last_stage (void) |
void | set_nav_block (uint8_t block_id) |
void | set_nav_stage (uint8_t stage_id) |
void | nav_on_enter_block (uint8_t block_id) |
Functions generated by the flight plan. More... | |
void | nav_on_exit_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 |
uint8_t | last_wp |
Common flight_plan functions shared between fixedwing and rotorcraft.
Definition in file common_flight_plan.h.
#define Block | ( | x | ) | case x: set_nav_block(x); |
Definition at line 70 of file common_flight_plan.h.
#define Goto | ( | x | ) | { goto label_ ## x; } |
Definition at line 80 of file common_flight_plan.h.
#define GotoBlock | ( | b | ) | nav_goto_block(b) |
Definition at line 72 of file common_flight_plan.h.
#define InitStage | ( | ) | nav_init_stage(); |
Definition at line 68 of file common_flight_plan.h.
#define Label | ( | x | ) | label_ ## x: |
Definition at line 79 of file common_flight_plan.h.
#define NavBlockTime | ( | ) | (block_time) |
Time in s since the entrance in the current block.
Definition at line 84 of file common_flight_plan.h.
#define NextBlock | ( | ) | nav_goto_next_block() |
Definition at line 71 of file common_flight_plan.h.
#define NextStage | ( | ) | { nav_goto_next_stage(); } INTENTIONAL_FALLTHRU |
Definition at line 75 of file common_flight_plan.h.
#define NextStageAndBreak | ( | ) | { nav_goto_next_stage(); break; } |
Definition at line 76 of file common_flight_plan.h.
#define NextStageAndBreakFrom | ( | wp | ) | { last_wp = wp; NextStageAndBreak(); } |
Definition at line 77 of file common_flight_plan.h.
#define Ptr | ( | x | ) | (&(x)) |
macro to use pointers in flight plans XML
Definition at line 87 of file common_flight_plan.h.
#define Return | ( | x | ) | nav_return(x) |
Definition at line 81 of file common_flight_plan.h.
#define Stage | ( | s | ) | case s: set_nav_stage(s); |
Definition at line 74 of file common_flight_plan.h.
void common_flight_plan_init | ( | void | ) |
Definition at line 43 of file common_flight_plan.c.
References block_time, last_block, last_stage, nav_block, nav_stage, private_last_block, private_last_stage, private_nav_block, private_nav_stage, and stage_time.
Referenced by nav_init().
uint8_t get_last_block | ( | void | ) |
Definition at line 119 of file common_flight_plan.c.
References private_last_block.
uint8_t get_last_stage | ( | void | ) |
Definition at line 122 of file common_flight_plan.c.
References private_last_stage.
uint8_t get_nav_block | ( | void | ) |
Definition at line 113 of file common_flight_plan.c.
References private_nav_block.
Referenced by generic_com_periodic(), and mavlink_mission_periodic().
uint8_t get_nav_stage | ( | void | ) |
Definition at line 116 of file common_flight_plan.c.
References private_nav_stage.
void nav_goto_block | ( | uint8_t | block_id | ) |
Definition at line 69 of file common_flight_plan.c.
References b, last_block, last_stage, nav_block, nav_init_block(), nav_on_exit_block(), private_last_block, private_last_stage, private_nav_block, and private_nav_stage.
Referenced by gsm_receive_content(), mavlink_block_message_handler(), nav_goto_next_block(), and nav_parse_BLOCK().
void nav_goto_next_block | ( | void | ) |
Definition at line 84 of file common_flight_plan.c.
References nav_goto_block(), and private_nav_block.
void nav_goto_next_stage | ( | void | ) |
Definition at line 92 of file common_flight_plan.c.
References InitStage, nav_stage, and private_nav_stage.
void nav_init_block | ( | void | ) |
Definition at line 56 of file common_flight_plan.c.
References block_time, InitStage, nav_block, nav_on_enter_block(), nav_stage, private_nav_block, and private_nav_stage.
Referenced by nav_goto_block().
void nav_init_stage | ( | void | ) |
needs to be implemented by fixedwing and rotorcraft seperately
Definition at line 92 of file nav.c.
References last_x, last_y, nav, nav_circle_radians, nav_circle_radians_no_rewind, nav_in_circle, nav_in_segment, nav_shift, RotorcraftNavigation::nav_stage_init, stage_time, stateGetPositionEnu_f(), VECT3_COPY, EnuCoor_f::x, and EnuCoor_f::y.
Referenced by gvf_nav_survey_polygon_run(), nav_bungee_takeoff_run(), nav_flower_run(), nav_line_border_run(), nav_line_osam_run(), nav_line_run(), nav_skid_landing_run(), nav_survey_hybrid_run(), nav_survey_poly_osam_run(), nav_survey_poly_run(), nav_survey_polygon_run(), nav_survey_zamboni_run(), and nav_vertical_raster_run().
void nav_on_enter_block | ( | uint8_t | block_id | ) |
Functions generated by the flight plan.
Referenced by nav_init_block(), and nav_return().
void nav_on_exit_block | ( | uint8_t | block_id | ) |
void nav_return | ( | uint8_t | reset | ) |
Definition at line 98 of file common_flight_plan.c.
References block_time, InitStage, nav_block, nav_on_enter_block(), nav_on_exit_block(), nav_stage, private_last_block, private_last_stage, private_nav_block, private_nav_stage, and reset.
void set_nav_block | ( | uint8_t | block_id | ) |
Definition at line 126 of file common_flight_plan.c.
References b, nav_block, and private_nav_block.
void set_nav_stage | ( | uint8_t | stage_id | ) |
Definition at line 136 of file common_flight_plan.c.
References nav_stage, private_nav_stage, and s.
uint16_t block_time |
Definition at line 33 of file common_flight_plan.h.
|
extern |
To save the current block/stage to enable return.
Definition at line 37 of file common_flight_plan.c.
Referenced by common_flight_plan_init(), and nav_goto_block().
uint8_t last_stage |
Definition at line 39 of file common_flight_plan.h.
|
extern |
uint8_t nav_block |
Definition at line 38 of file common_flight_plan.h.
|
extern |
Definition at line 34 of file common_flight_plan.c.
Referenced by common_flight_plan_init(), nav_goto_next_stage(), nav_init_block(), nav_return(), send_nav_status(), and set_nav_stage().
|
extern |
In s.
Definition at line 32 of file common_flight_plan.c.
Referenced by common_flight_plan_init(), common_nav_periodic_task(), nav_heli_spinup_run(), nav_init_stage(), nav_periodic_task(), and send_nav_status().