pymavswarm.mission package#
Submodules#
pymavswarm.mission.swarm_mission module#
- class pymavswarm.mission.swarm_mission.SwarmMission(waypoints: Optional[list[pymavswarm.mission.waypoint.Waypoint]] = None, log_level: int = 20)#
Bases:
object
Set of waypoints that should be executed sequentially by an agent.
- add_waypoint(waypoint: Waypoint, index: Optional[int] = None) bool #
Add a waypoint to the mission.
- Parameters
waypoint (Waypoint) – new waypoint to add
index (int | None, optional) – index that the waypoint should be placed at in the mission sequence, defaults to None
- Returns
whether or not the waypoint was inserted successfully
- Return type
bool
- clear_waypoints() None #
Remove all waypoints from the mission.
- remove_waypoint(waypoint: Waypoint) bool #
Remove the provided waypoint from the list of waypoints.
- Parameters
waypoint (Waypoint) – waypoint to remove
- Returns
flag indicating whether the waypoint was successfully removed
- Return type
bool
- remove_waypoint_by_index(index: int) bool #
Remove the waypoint at the given index.
- Parameters
index (int) – index of the waypoint in the mission that should be removed
- Returns
whether or not the waypoint was removed successfully
- Return type
bool
- remove_waypoint_by_value(latitude: float, longitude: float, altitude: float) bool #
Remove all waypoints that are located at the provided geographic location.
- Parameters
latitude (float) – waypoint’s latitude
longitude (float) – waypoint’s longitude
altitude (float) – waypoint’s altitude
- Returns
whether or not the waypoint was removed properly
- Return type
bool
- property waypoints: list[pymavswarm.mission.waypoint.Waypoint]#
Set of waypoints included in the mission.
- Returns
mission waypoints
- Return type
List[Waypoint]
pymavswarm.mission.waypoint module#
- class pymavswarm.mission.waypoint.Waypoint(latitude: float, longitude: float, altitude: float, airspeed: Optional[float] = None, groundspeed: Optional[float] = None)#
Bases:
object
Waypoint that an agent should fly to.
- property airspeed: float | None#
Airspeed that the agent should have going through the waypoint.
- Returns
agent airspeed at waypoint
- Return type
float | None
- property altitude: float#
Altitude of the waypoint.
- Returns
waypoint altitude
- Return type
float
- property groundspeed: float | None#
Groundspeed that the agent should have when going through the waypoint.
- Returns
agent groundspeed at waypoint
- Return type
float | None
- property latitude: float#
Latitude of the waypoint.
- Returns
waypoint latitude
- Return type
float
- property longitude: float#
Longitude of the waypoint.
- Returns
waypoint longitude
- Return type
float