MAV'RIC
|
Classes | |
struct | conf_t |
The landing mission handler configuration structure. More... | |
Public Types | |
enum | auto_landing_behavior_t { DESCENT_TO_SMALL_ALTITUDE, DESCENT_TO_GND } |
The auto-landing enum. More... | |
Public Member Functions | |
Mission_handler_landing (const INS &ins, State &state, conf_t config=default_config()) | |
Initialize the landing mission planner handler. | |
virtual bool | can_handle (const Waypoint &wpt) const |
Checks if the waypoint is a landing waypoint. | |
virtual bool | setup (const Waypoint &wpt) |
Sets up this handler class for a first time initialization. | |
virtual Mission_handler::update_status_t | update () |
Handles the mission every iteration. | |
virtual bool | write_flight_command (Flight_controller &flight_controller) const |
Provides control commands to the flight controller. | |
virtual Mission_planner::internal_state_t | handler_mission_state () const |
Returns that the mission state is in POSTMISSION. | |
Static Public Member Functions | |
static conf_t | default_config () |
default configuration for the landing handler | |
Protected Member Functions | |
virtual bool | write_desc_to_small_alt_flight_command (Flight_controller &flight_controller) const |
Function to set the controller specific command for the descent to small altitude state. | |
virtual bool | write_desc_to_ground_flight_command (Flight_controller &flight_controller) const |
Function to set the controller specific command for the descent to ground state. | |
Protected Attributes | |
Waypoint | waypoint_ |
The waypoint that we are landing under. | |
bool | is_landed_ |
Boolean flag stating that we have finished the landing procedure. | |
auto_landing_behavior_t | auto_landing_behavior_ |
The auto landing behavior. | |
float | alt_lpf_ |
The low-pass filtered altitude for auto-landing. | |
float | LPF_gain_ |
The low-pass filter gain. | |
float | desc_to_ground_altitude_ |
The altitude to switch to the descent to ground state. | |
float | desc_to_ground_range_ |
The range in meters that allows switching from the descent to ground. | |
const INS & | ins_ |
The reference to the ins interface. | |
State & | state_ |
The reference to the state structure. |
Mission_handler_landing::Mission_handler_landing | ( | const INS & | ins, |
State & | state, | ||
conf_t | config = default_config() |
||
) |
Initialize the landing mission planner handler.
ins | The reference to the ins |
state | The reference to the state structure |
config | The landing mission handler config structure |
bool Mission_handler_landing::can_handle | ( | const Waypoint & | wpt | ) | const [virtual] |
Checks if the waypoint is a landing waypoint.
Checks if the inputted waypoint is a: MAV_CMD_NAV_LAND
wpt | The waypoint class |
Implements Mission_handler.
Reimplemented in Mission_handler_critical_landing.
Mission_handler_landing::conf_t Mission_handler_landing::default_config | ( | void | ) | [inline, static] |
default configuration for the landing handler
Mission_planner::internal_state_t Mission_handler_landing::handler_mission_state | ( | ) | const [virtual] |
Returns that the mission state is in POSTMISSION.
Implements Mission_handler.
bool Mission_handler_landing::setup | ( | const Waypoint & | wpt | ) | [virtual] |
Sets up this handler class for a first time initialization.
Records the waypoint reference and sets the mav mode
wpt | The waypoint class |
Implements Mission_handler.
Mission_handler::update_status_t Mission_handler_landing::update | ( | void | ) | [virtual] |
Handles the mission every iteration.
Sets the goal location and determines the status code. The code is MISSION_IN_PROGRESS for landing in progress, MISSION_FINISHED for landing finished and autocontinue on, MISSION_FAILED for control command rejected.
Implements Mission_handler.
bool Mission_handler_landing::write_desc_to_ground_flight_command | ( | Flight_controller & | flight_controller | ) | const [protected, virtual] |
Function to set the controller specific command for the descent to ground state.
bool Mission_handler_landing::write_desc_to_small_alt_flight_command | ( | Flight_controller & | flight_controller | ) | const [protected, virtual] |
Function to set the controller specific command for the descent to small altitude state.
bool Mission_handler_landing::write_flight_command | ( | Flight_controller & | flight_controller | ) | const [virtual] |
Provides control commands to the flight controller.
Implements Flight_command_source.