82 float abs_altitude = 0.0f;
84 float min_abs_altitude;
98 if (abs_altitude < min_abs_altitude) {
99 if (abs_altitude < min_abs_altitude - 0.1
f) {
104 abs_altitude = min_abs_altitude;
109 abs_altitude = min_abs_altitude;
115 if (abs_altitude < _navigator->get_global_position()->alt) {
148 memset(rep, 0,
sizeof(*rep));
#define mavlink_log_info(_pub, _text,...)
Send a mavlink info message (not printed to console).
bool home_position_valid()
void on_active() override
This function is called while the mode is active.
#define mavlink_log_critical(_pub, _text,...)
Send a mavlink critical message and print to console.
Helper class to access missions.
void set_loiter_item(struct mission_item_s *item, float min_clearance=-1.0f)
Set a loiter mission item, if possible reuse the position setpoint, otherwise take the current positi...
struct position_setpoint_s next
struct position_setpoint_triplet_s * get_takeoff_triplet()
struct position_setpoint_s previous
void on_activation() override
This function is called one time when mode becomes active, pos_sp_triplet must be initialized here...
struct position_setpoint_s current
void set_takeoff_item(struct mission_item_s *item, float abs_altitude, float min_pitch=0.0f)
Set a takeoff mission item.
struct vehicle_global_position_s * get_global_position()
mission_item_s _mission_item
Vector< float, 6 > f(float t, const Matrix< float, 6, 1 > &, const Matrix< float, 3, 1 > &)
void mission_apply_limitation(mission_item_s &item)
General function used to adjust the mission item based on vehicle specific limitations.
void reset_mission_item_reached()
Reset all reached flags.
void set_takeoff_position()
Helper class to take off.
struct position_setpoint_triplet_s * get_position_setpoint_triplet()
struct mission_result_s * get_mission_result()
bool mission_item_to_position_setpoint(const mission_item_s &item, position_setpoint_s *sp)
Convert a mission item to a position setpoint.
bool is_mission_item_reached()
Check if mission item has been reached.
orb_advert_t * get_mavlink_log_pub()
void set_mission_result_updated()
float get_takeoff_min_alt() const
void set_can_loiter_at_sp(bool can_loiter)
Setters.
void set_position_setpoint_triplet_updated()