2.3 User Classes and Characteristics: Class Drone
2.3 User Classes and Characteristics: Class Drone
Class Drone:
Class Members:
➢ Status = Binary variable which tell the status of the drone . If status = 1
then the drone is flying else status=0 drone is at rest.
➢ Trav_dist = The amount of distance the drone can travel with the amount
of battery it is containing now.
➢ Point_dist = The distance between the pickup point and the drone.
➢ Work_done = W = F*d
▪ Where
• W = Work Done
• F = force
• D = distance
F = mgh + 1/2mg^2
▪ Where
• m = mass
• g = gravitational force
• h = height
Here the Work_Done attribute will contain the value of work_done by the
drone to fly or work efficiently without any additional efforts or battery
requirement. Hence this attribute will contain value of work_done at
which the battery consumption will be ideal.
➢ Weather = ****
Member Funtions:
➢ getDistance(): This function will calculate the distance between the pick
up point the drone current location. The value will be stored in Point_dist
attribute. This will done with the help of Location class.
➢ getOrder(): This function will calculate the amount of distance the drone
can travel with the current amount of battery. The value will stored in
Trav_dist attribute.
➢ Capacity(): Will calculate the amount of load the drone can carry . The
value will be stored in Remain_capacity attribute.
Hub/Station:
Class Members:
➢ Source_Name = The name of the hub or station from where the supplies
is to be pick up.
➢ Dest_Name = The name of the hub or station from where the supplies is
to be delivered.
➢ Supplies = The list of supplies along with its amount present at the
station or hub. The name of supply as key and its quantity as value in the
dictionary.
Member Funtions
➢ getDistance(): Distance between the pick up point and the drop point .
This will be done with the help of the Location class .The value is stored
in Order_dist attribute
➢ getOrder(): This function will get the information about the order like
pick up point , drop point , list of supplies , estimated time, etc.
If
Drone.Trav_dist >
Order_dist
Yes
If
Drone.Remain_Capacity >
Order_Mass
Yes
Return Drone id
Finish
➢ setDelivery(): This function will be calling the work done function of the
cost_Calculation class. This function will call the work done function by
passing all the parameters of the order and the object of the selected
drone . The function will then return the cost in return.
Cost_Calculation
Class members:
Member Funtions: