Default mission#

The Default Drone Flight mission is an Air SDK mission which is installed by default. Like any mission, it contains:

1. State machine Flight Supervisor:#

1.1. States:#

(currently not documented)

1.2. Managers:#

Each manager can be imported and used in a state (for example critical/landing uses AutoLandingAlertsManager) or in another manager (for example RthManager uses AutoLandingAlertsManager) with get_manager() or require_manager() function.

1.2.1. Configuration:#

The manager may have its own configuration like the state In the same way of the state configuration, a configuration file of manager is located at [PRODUCT_ROOT_CFG]/etc/fsup/features/[name_of_manager].cfg Ex: /etc/fsup/features/auto_landing_alerts_manager.cfg for AutoLandingAlertsManager

For now, the automatic reading of manager has not been supported yet. Therefore, to read the configuration, the following code block must be included in the __init__ method:

def __init__(self, supervisor, mission):
    # Get drone general configuration (remove if not necessary)
    self.config = supervisor.config
    # Get mission's manager specific configuration
    mission_cfg = mission.config["name_of_manager"]
    # Concatenate mission config in self.config
    for cfg_key in mission_cfg:
        # Prevent the case if the value of config is a dictionary
        if isinstance(mission_cfg[cfg_key], dict):
            self.config.update(mission_cfg[cfg_key])
        # If the value of config is in a normal type
        else:
            self.config[cfg_key] = mission_cfg[cfg_key]
    ...

auto_landing_alerts_manager#

class AutoLandingAlertsManager#
Auto landing alerts manager.

Used to estimate battery consumption for critical landing, and triggers
events.

Public Functions

set_autolanding_alerts_state(self, enable)#

critical_rth_alerts_manager#

class CriticalRthAlertsManager#
Critical RTH alerts manager.

Used to estimate battery consumption for critical RTH, and triggers events.

Public Functions

get_long_term_wind_alt_ref(self)#
get_settings(self)#
restore_default_settings(self)#
set_specific_settings(self, settings)#

flightplan_availability_manager#

class FlightPlanAvailabilityManager#

Public Functions

query(self)#
set_navigation_required(self, enabled)#

flightplan_manager#

class FlightPlanManager#

Public Functions

clear_resume(self)#
get_current_flightplan(self)#
get_current_index(self)#
is_current_done(self)#
is_resume(self)#
set_current_flightplan(self, fp)#
set_current_index(self, index)#
set_resume(self)#

handland_manager#

class HandLandManager#

Public Functions

is_available(self)#
start_check(self)#
start_perception(self, force=False)#
stop_check(self)#
stop_perception(self)#

handtakeoff_manager#

class HandTakeoffManager#

Public Functions

__init__(self, supervisor, mission)#
start(self)#
stop(self)#

Public Members

log#
mc#
messages_svc#
observer#
started#

home_manager#

class HomePositionManager#

Public Functions

check_first_fix_validity(self)#
check_takeoff_validity(self)#
force_type(self, home_type)#
get(self, home_type)#
get_current_home(self)#
get_current_home_type(self)#
get_home_distance(self, home_type)#
get_is_home_close_2D(self)#
get_is_home_very_close_2D(self)#
is_takeoff_position_valid(self)#
set_custom_position(self, coord_geo)#
set_takeoff_position(self)#

lookat_availability_manager#

class LookAtAvailabilityManager#

Public Functions

query(self, lmode_pbuf)#

lookat_manager#

class LookAtManager#

Public Functions

update_started_status(self, started)#

magneto_calibration_manager#

class MagnetoCalibrationManager#

Public Functions

__init__(self, supervisor, mission)#
start(self)#
stop(self)#

Public Members

mc#
msg#
obs#
started#

move_availability_manager#

class MoveAvailabilityManager#

Public Functions

__init__(self, supervisor, mission)#
start(self)#
stop(self)#

Public Members

log#
mc#
mission#
sender#
started#
statuses#

pilot_trajectory_est_manager#

class PilotTrajectoryEstManager#

Public Functions

get_is_altitude_accurate(self)#
get_is_gps_valid(self)#
get_is_position_accurate(self)#
get_is_position_close(self)#
get_is_position_far(self)#
get_is_position_very_close(self)#
get_is_position_very_far(self)#
set_advertise_gps_validity(self, advertise)#
set_advertise_position_accurate(self, advertise)#

poi_availability_manager#

class PoiAvailabilityManager#

Public Functions

query(self, poi_pbuf)#

poi_manager#

class PoiManager#

Public Functions

send_aborted(self)#
send_running(self, latitude=0.0, longitude=0.0, altitude=0.0, poi_type=autopilot_enums.POI_TYPE_FREE)#
update_state(self, state, latitude=0.0, longitude=0.0, altitude=0.0, poi_type=autopilot_enums.POI_TYPE_FREE)#

precise_home_manager#

class PreciseHomeManager#
After takeoff, start a 30 Hz timer and check for drone coordinates.
If the drone reaches the threshold altitude (.80m) without any horizontal
PCMD, take a precise home reference picture.

Public Functions

check_reset_sensor_timer(self, _)#
check_set_ref_image_condition(self)#
enable_precise_home(self, enable)#
get_drone_geo_position(self)#
get_drone_local_position(self)#
get_precise_home_local_position(self)#
is_move_already_interrupted(self)#
is_target_found(self)#
on_gps_ok(self)#
on_pcmd_horiz(self)#
on_set_mode(self, mode)#
on_state(self, state)#
reset_sensor(self)#
set_heading_is_locked(self)#
set_move_in_progress(self, ok)#
set_ref_image_timer(self, _)#
should_reset_sensor_score(self)#
should_search_phome(self)#
start_process(self)#
stop_process(self)#

Public Members

check_reset_sensor_timer#
set_ref_image_timer#

precise_hovering_manager#

class PreciseHoveringManager#

Public Functions

start_sensor(self)#
stop_sensor(self)#

rth_availability_manager#

class RthAvailabilityManager#

Public Functions

query(self)#

rth_manager#

class RthManager#

Public Functions

generate_flightplan(self, custom_position=None, override_altitude=False)#
get_altitude(self)#
get_last_start_reason(self)#
get_optimal_speed(self, heading, altitude)#
pause(self)#
resume(self)#
send_status_blocked(self)#
send_status_finished(self, stopped=False)#
update_status(self, state, event=None)#

target_trajectory_est_manager#

class TargetTrajectoryEstManager#

Public Functions

reset_sensor(self)#

visual_tracking_manager#

class VisualTrackingManager#

Public Functions

is_activated(self)#
start_visual_tracking_engine(self, with_boxprop=True, locked=False)#
stop_all_target_tracking(self)#
stop_visual_tracking_engine(self)#
update_state(self, state)#