Default mission#
The Default Drone Flight mission is an Air SDK mission which is installed by default. Like any mission, it contains:
Modes of Guidance
Services
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#
critical_rth_alerts_manager#
- class CriticalRthAlertsManager#
Critical RTH alerts manager. Used to estimate battery consumption for critical RTH, and triggers events.
flightplan_availability_manager#
- class FlightPlanAvailabilityManager#
flightplan_manager#
- class FlightPlanManager#
handland_manager#
- class HandLandManager#
handtakeoff_manager#
- class HandTakeoffManager#
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#
lookat_manager#
magneto_calibration_manager#
- class MagnetoCalibrationManager#
move_availability_manager#
- class MoveAvailabilityManager#
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#
poi_manager#
- class PoiManager#
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)#
precise_hovering_manager#
- class PreciseHoveringManager#
rth_availability_manager#
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#
visual_tracking_manager#
- class VisualTrackingManager#