DroneProject package

Submodules

DroneProject.AbstractDrone module

class DroneProject.AbstractDrone.AbstractDrone[source]

Bases: abc.ABC

Abstract class for drone types

altitude = 0
battery = 100
changealtitude()[source]
createvector()[source]
current_latitude = 0
current_longtitude = 0
destination_latitude = 0
destination_longtitude = 0
drone_id = 0
drone_type = 'virtual'
flying_state = 'Grounded'
getbattery()[source]
getbearing(startlat, startlong, destlat, destlong)[source]
getcurrentlatitude()[source]
getcurrentlongitude()[source]
getdestinationlatitude()[source]
getdestinationlongitude()[source]
getdistancetodestination()[source]
getdistancetoposition()[source]
getdronestate()[source]
getdronetype()[source]
getgpsposition()[source]
gethomelatitude()[source]
getvectorlatitude()[source]
getvectorlongitude()[source]
heading = 0
home_latitude = 0
home_longtitude = 0
hover()[source]
land()[source]
moveto()[source]
setbatterychange(percent)[source]
setbatteryinflight()[source]
setbatterytotal(percent)[source]
setcurrentlatitude(lat)[source]
setcurrentlongitude(lon)[source]
setdestinationlatitude(lat)[source]
setdestinationlongitude(lon)[source]
setdronestate(state)[source]
setdronetype(dronetype)[source]
sethomelatitude(lat)[source]
speed = 0
takeoff()[source]
updatecurrentposition()[source]

DroneProject.BebopDrone module

Bebop Drone class

DroneProject.BebopDrone.changealtitude(drone, alt)[source]
DroneProject.BebopDrone.getgpsposition(drone)[source]
DroneProject.BebopDrone.land(drone)[source]
DroneProject.BebopDrone.moveto(drone, longt, lati, alti)[source]
DroneProject.BebopDrone.takeoff(drone)[source]

DroneProject.DroneController module

Drone Controller

Contains all drone control algorithms

DroneProject.DroneController.ChangeAltitude(drone, newalt)[source]

This function handles changes in altitude

DroneProject.DroneController.CollisionDetection(drone, otherdrone)[source]

Collision detection, detects if other drone is within 30m horizontally or 10m vertically

DroneProject.DroneController.Hover(Drone)[source]

This function may be called to cause the drone to hover in place

DroneProject.DroneController.LandDrone(Drone)[source]

Function to land drone

DroneProject.DroneController.MoveDrone(drone, flight, dronelist, lat, lon, locations)[source]

This function handles the logic for drone in flight. It calls the collision detection function

DroneProject.DroneController.TakeOffFlyLand(drone, flight, dronelist, locationlist)[source]

Function called to execute a full flight

DroneProject.DroneController.findnearestlocation(drone, locations)[source]

Finds nearest location to drone

DroneProject.DroneController.getdistancetodestination(drone, flight)[source]

Get travel distance from point to point Formula adopted from top answer and source of answer: https://stackoverflow.com/questions/27928/calculate-distance-between-two-latitude-longitude-points-haversine-formula http://www.movable-type.co.uk/scripts/latlong.html

DroneProject.DroneController.getdistancetodrone(drone, otherdrone)[source]

Get travel distance from point to point Formula adopted from top answer and source of answer: https://stackoverflow.com/questions/27928/calculate-distance-between-two-latitude-longitude-points-haversine-formula http://www.movable-type.co.uk/scripts/latlong.html

DroneProject.DroneController.getdistancetoposition(drone, poslat, poslon)[source]

Get travel distance from point to point Formula adopted from top answer and source of answer: https://stackoverflow.com/questions/27928/calculate-distance-between-two-latitude-longitude-points-haversine-formula http://www.movable-type.co.uk/scripts/latlong.html

DroneProject.Flight module

class DroneProject.Flight.Flight(name, startlatitude, startlongitude, destlatitude, destlongitude, drone, flightcomplete, flightabort)[source]

Bases: object

Class for flight object

getdestinationlatitude()[source]
getdestinationlongitude()[source]
getdrone()[source]
getflightabort()[source]
getflightcomplete()[source]
getflightid()[source]
getstartlatitude()[source]
getstartlongitude()[source]
setdestinationlatitude(destlatitude)[source]
setdestinationlongitude(destlongitude)[source]
setdrone(drone)[source]
setflightabort(flightabort)[source]
setflightcomplete(flightcomplete)[source]
setflightid(name)[source]
setstartlatitude(startlatitude)[source]
setstartlongitude(startlongitude)[source]

DroneProject.FloatInput module

class DroneProject.FloatInput.FloatInput(*args, **kwargs)[source]

Bases: sphinx.ext.autodoc.importer._MockObject

Class designed to ensure only floats can be used for text input for lat/long values.

Source: https://kivy.org/doc/stable/api_kivy.uix.textinput.html

insert_text(substring, from_undo=False)[source]
pat = re.compile('[^-|0-9]')

DroneProject.Location module

class DroneProject.Location.Location(name, latitude, longitude, altitude)[source]

Bases: object

Class for location object.

getlocationaltitude()[source]
getlocationlatitude()[source]
getlocationlongitude()[source]
getlocationname()[source]
setlocationaltitude(altitude)[source]
setlocationlatitude(latitude)[source]
setlocationlongitude(longitude)[source]
setlocationname(name)[source]

DroneProject.MainMenu2 module

Original command line script #deprecated

DroneProject.MainMenu2.BeginFlight(flightlist, locationlist, dronelist, threads)[source]
DroneProject.MainMenu2.CreateDrone(dronelist, locationlist)[source]
DroneProject.MainMenu2.CreateFlight(flightlist, locationlist, dronelist)[source]
DroneProject.MainMenu2.CreateLocation(locationlist)[source]
DroneProject.MainMenu2.MainMenu()[source]
DroneProject.MainMenu2.RemoveDrone(dronelist)[source]
DroneProject.MainMenu2.RemoveFlight(flightlist)[source]
DroneProject.MainMenu2.RemoveLocation(locationlist)[source]
DroneProject.MainMenu2.ViewActiveDrones(dronelist)[source]
DroneProject.MainMenu2.ViewFlights(flightlist)[source]
DroneProject.MainMenu2.ViewLocations(locationlist)[source]
DroneProject.MainMenu2.ViewSystemDrones(dronelist)[source]

DroneProject.MapViewApp module

MapViewApp.py

This is the core module for the ADTCS project

class DroneProject.MapViewApp.DroneMarkerLayer(**kwargs)[source]

Bases: sphinx.ext.autodoc.importer._MockObject

Class related to CRUD drones operations

add_virtual_drone(name, home)[source]

Adds a virtual drone to the system

add_virtual_drone_popup()[source]

Popup to add virtual drone to the system

draw_drones(dronel, locationl)[source]

Adds drone markers to MapLayer

droneview = None
insert_drone_image(drone, *largs)[source]

Used to choose suitable image for drawing drone marker on screen

remove_drone_popup()[source]

Popup the remove a drone from the system

class DroneProject.MapViewApp.FlightLayer(**kwargs)[source]

Bases: sphinx.ext.autodoc.importer._MockObject

Class related to flight CRUD operations

abort_flight_popup()[source]

Abort flight popup

create_flight_popup()[source]

Popup used to add flights to the system

remove_flight_popup()[source]

Remove flight popup

start_flight_popup()[source]

Begin a flight popup

view_flights_popup()[source]

Displays list of flights on system

class DroneProject.MapViewApp.LineMapLayer(**kwargs)[source]

Bases: sphinx.ext.autodoc.importer._MockObject

Class related to displaying lines between destinations !Currently incomplete

create_corridor_popup()[source]
draw_line(*args)[source]
get_x(lon)[source]

Get the x position on the map using this map source’s projection (0, 0) is located at the top left.

get_y(lat)[source]

Get the y position on the map using this map source’s projection (0, 0) is located at the top left.

reposition()[source]
class DroneProject.MapViewApp.LocationMarkerLayer(**kwargs)[source]

Bases: sphinx.ext.autodoc.importer._MockObject

Class for adding Location and Location Markers

add_point(lat, lon, alt)[source]

Adds a location to system

add_point_popup()[source]

Popup used to set name for new location

draw_locations(*args)[source]

Adds location markers to MapLayer

locationview = None
on_touch_down(touch)[source]

Adds functionality to kivy’s on_touch_down() event, specificly for adding new Locations

remove_location_popup()[source]

Popup used to remove location from system

set_loc_name(nname)[source]

Set name for new location to be added to system

view_locations_popup()[source]

Popup to display a list of locations on system

class DroneProject.MapViewApp.MapViewApp(**kwargs)[source]

Bases: sphinx.ext.autodoc.importer._MockObject

Main App Class

build()[source]
mapview = None
post(*args)[source]

DroneProject.PrintLists module

Used to store functions for printing drone/location/flight lists

DroneProject.PrintLists.drone_list()[source]
DroneProject.PrintLists.flight_list()[source]
DroneProject.PrintLists.location_list()[source]

DroneProject.VirtualDrone module

class DroneProject.VirtualDrone.VirtualDrone(drone_id, dronetype, home_latitude, home_longitude, destination_latitude, destination_longitude, altitude, battery, speed, flying_state, heading)[source]

Bases: AbstractDrone.AbstractDrone

Virtual Drone class

changealtitude(alt)[source]
createvector()[source]
getaltitude()[source]
getbattery()[source]
getbearing(startlat, startlong, destlat, destlong)[source]
getcurrentlatitude()[source]
getcurrentlongitude()[source]
getdestinationlatitude()[source]
getdestinationlongitude()[source]
getdistancetodestination()[source]
getdistancetoposition(poslat, poslon)[source]
getdronestate()[source]
getdronetype()[source]
getgpsposition()[source]
gethomelatitude()[source]
gethomelongitude()[source]
getvectorlatitude()[source]
getvectorlongitude()[source]
hover()[source]
land()[source]
moveto(longitude, latitude, altitude, spe)[source]
setbatterychange(percent)[source]
setbatteryinflight()[source]
setbatterytotal(percent)[source]
setcurrentlatitude(lat)[source]
setcurrentlongitude(lon)[source]
setdestinationlatitude(lat)[source]
setdestinationlongitude(lon)[source]
setdronestate(state)[source]
setdronetype(dronetype)[source]
sethomelatitude(lat)[source]
sethomelongitude(lon)[source]
takeoff()[source]
updatecurrentposition()[source]

DroneProject.save_load module

Used for functions relating to saving and loading Item Lists

DroneProject.save_load.LoadDroneList()[source]

Loads list of drones using pickle

DroneProject.save_load.LoadFlightList()[source]

Loads list of flights using pickle

DroneProject.save_load.LoadLocationList()[source]

Loads list of locations using pickle

DroneProject.save_load.SaveDroneList(dronelist)[source]

Saves List of drones using pickle.

DroneProject.save_load.SaveFlightList(flightlist)[source]

Save List of flights using pickle

DroneProject.save_load.SaveLocationList(locationlist)[source]

Saves List of locations using pickle

Module contents