Source code for DroneProject.Flight

# -*- coding: UTF-8 -*-


#Name:        James Hall
#Student No.: C00007006
#Institute:   Institute of Technology Carlow
#Project:     Drone Traffic Control System     
#Date:        April 2021 
#License:     GNU Affero General Public License v3.0

#Flight class


[docs]class Flight(): """ Class for flight object """ def __init__(self, name, startlatitude, startlongitude, destlatitude, destlongitude, drone, flightcomplete, flightabort): self.flight_id = name self.start_latitude = startlatitude self.start_longitude = startlongitude self.destination_latitude = destlatitude self.destination_longitude = destlongitude self.flight_drone = drone self.flight_complete = flightcomplete self.flight_abort = flightabort
[docs] def setflightid(self, name): self.flight_id = name
[docs] def getflightid(self): name = self.flight_id return name
[docs] def setstartlatitude(self, startlatitude): self.start_latitude = startlatitude
[docs] def getstartlatitude(self): startlatitude = self.start_latitude return startlatitude
[docs] def setstartlongitude(self, startlongitude): self.start_longitude = startlongitude
[docs] def getstartlongitude(self): startlongitude = self.start_longitude return startlongitude
[docs] def setdestinationlatitude(self, destlatitude): self.destination_latitude = destlatitude
[docs] def getdestinationlatitude(self): destlatitude = self.destination_latitude return destlatitude
[docs] def setdestinationlongitude(self, destlongitude): self.destination_longitude = destlongitude
[docs] def getdestinationlongitude(self): destlongitude = self.destination_longitude return destlongitude
[docs] def setdrone(self, drone): self.flight_drone = drone
[docs] def getdrone(self): drone = self.flight_drone return drone
[docs] def setflightcomplete(self, flightcomplete): self.flight_complete = flightcomplete
[docs] def getflightcomplete(self): flightcomplete = self.flight_complete return flightcomplete
[docs] def setflightabort(self, flightabort): self.flight_abort = flightabort
[docs] def getflightabort(self): flightabort = self.flight_abort return flightabort