Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Scratchcat1 authored Mar 29, 2018
1 parent 7ceac15 commit 37d8a6b
Show file tree
Hide file tree
Showing 18 changed files with 637 additions and 851 deletions.
137 changes: 79 additions & 58 deletions AATC_AStar.py

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions AATC_Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#Create Socket
#Create Connection

def Connect(remote_ip,PORT):
def Connect(remote_ip,PORT): #Connects to the server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.connect((remote_ip, PORT))
Expand All @@ -51,7 +51,7 @@ def Connect(remote_ip,PORT):
## return Sucess,Message


class UserInterface:
class UserInterface: #Used to interface with the server
def __init__(self,Connection):
self._con = Connection
self._Crypto = AATC_Crypto.Crypter(self._con)
Expand Down Expand Up @@ -237,11 +237,11 @@ def Exit(self):

##############################################
##############################################
def Send(self,Code,data):
def Send(self,Code,data): #encrypt and send data to server
Info = self._Crypto.Encrypt(codecs.encode(str((Code,data))))
self._con.sendall(Info)

def Recv(self): #Returns tuple of Sucess,Message,Data of which data may just be useless for that function
def Recv(self): #receive and decrypt data from server
try:
data = self._Crypto.Decrypt(recvall.recvall(self._con))
data = ast.literal_eval(codecs.decode(data))
Expand All @@ -253,7 +253,7 @@ def Recv(self): #Returns tuple of Sucess,Message,Data of which data may just
return (False,"Conversion/Transfer Error"+str(e),[])


def CreateUserInterface(IP = "192.168.0.19",Port = 8000):
def CreateUserInterface(IP = "192.168.0.19",Port = 8000): #Create user interface to server
soc = Connect(IP,Port)
U = UserInterface(soc)
return U
Expand Down
139 changes: 50 additions & 89 deletions AATC_Client_Text_UI.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,49 @@


-1:"Exit"
}
} #Maps command numbers onto the strings of permissions


class UserTextUI:
class UserTextUI: #Interface with server via text interface
def __init__(self,UserInterface,MenuOptions):
self._UserInterface = UserInterface
self._MenuOptions = MenuOptions

def Main_Loop(self):
self._Commands = {
"Login" : self.Login,
"GetNoFlyZones" : self.GetNoFlyZones,
"AddNoFlyZone" : self.AddNoFlyZone,
"RemoveNoFlyZone" : self.RemoveNoFlyZone,
"ModifyNoFlyZoneLevel" : self.ModifyNoFlyZoneLevel,
"AddDrone" : self.AddDrone,
"RemoveDrone" : self.RemoveDrone,
"GetDroneID" : self.GetDroneID,
"GetDroneCredentials" : self.GetDroneCredentials,
"SetDroneCredentials" : self.SetDroneCredentials,
"CheckDroneOwnership" : self.CheckDroneOwnership,
"GetDroneInfo" : self.GetDroneInfo,
"GetDronesUser" : self.GetDronesUser,
"GetDronesAll" : self.GetDronesAll,
"GetUserID" : self.GetUserID,
"GetUsername" : self.GetUsername,
"AddUser" : self.AddUser,
"SetFlightVisibility" : self.SetFlightVisibility,
"SetAccountType" : self.SetAccountType,
"UserChangePassword" : self.UserChangePassword,
"GetFlightsUser" : self.GetFlightsUser,
"GetFlightsAll" : self.GetFlightsAll,
"AddFlight" : self.AddFlight,
"RemoveFlight" : self.RemoveFlight,
"GetFlightWaypointsUser" : self.GetFlightWaypointsUser,
"GetFlightWaypointsAll" : self.GetFlightWaypointsAll,
"GetMonitorID" : self.GetMonitorID,
"GetMonitorName" : self.GetMonitorName,
"AddMonitorPermission" : self.AddMonitorPermission,
"RemoveMonitorPermission" : self.RemoveMonitorPermission,
"ModifyMonitorPermissionDate" : self.ModifyMonitorPermissionDate,
"GetMonitorPermissionUser" : self.GetMonitorPermissionUser,
"Exit" : self.Call_Exit}

def Main_Loop(self): #Loop until exit
self._Exit = False
while not self._Exit:
try:
Expand All @@ -61,13 +95,13 @@ def Main_Loop(self):
except Exception as e:
print("Error occured in Client Text UI",e)

def PrintMainMenu(self):
def PrintMainMenu(self): #Display the menu neatly
print("\n"*2)
print("AATC Client Main Menu")
for x in self._MenuOptions.items():
print("{0:>3} : {1}".format(str(x[0]),x[1]))

def GetMenuChoice(self):
def GetMenuChoice(self):
MenuChoice = -99
while MenuChoice not in self._MenuOptions: #will exit once valid menu option is chosen
try:
Expand All @@ -76,89 +110,16 @@ def GetMenuChoice(self):
print("Integers only")
return MenuChoice

def EvaluateChoice(self,MenuChoice):
Command = self._MenuOptions[MenuChoice] #Gets full, easier to work with string

if Command == "Login":
self.Login()

elif Command == "GetNoFlyZones":
self.GetNoFlyZones()
elif Command == "AddNoFlyZone":
self.AddNoFlyZone()
elif Command == "RemoveNoFlyZone":
self.RemoveNoFlyZone()
elif Command == "ModifyNoFlyZoneLevel":
self.ModifyNoFlyZoneLevel()

elif Command == "AddDrone":
self.AddDrone()
elif Command == "RemoveDrone":
self.RemoveDrone()
elif Command == "GetDroneID":
self.GetDroneID()
elif Command == "GetDroneCredentials":
self.GetDroneCredentials()
elif Command == "SetDroneCredentials":
self.SetDroneCredentials()
elif Command == "CheckDroneOwnership":
self.CheckDroneOwnership()
elif Command == "GetDroneInfo":
self.GetDroneInfo()
elif Command == "GetDronesUser":
self.GetDronesUser()
elif Command == "GetDronesAll":
self.GetDronesAll()

elif Command == "GetUserID":
self.GetUserID()
elif Command == "GetUsername":
self.GetUsername()
elif Command == "AddUser":
self.AddUser()
elif Command == "SetFlightVisibility":
self.SetFlightVisibility()
elif Command == "SetAccountType":
self.SetAccountType()
elif Command == "UserChangePassword":
self.UserChangePassword()

elif Command == "GetFlightsUser":
self.GetFlightsUser()
elif Command == "GetFlightsAll":
self.GetFlightsAll()
elif Command == "AddFlight":
self.AddFlight()
elif Command == "RemoveFlight":
self.RemoveFlight()

elif Command == "GetFlightWaypointsUser":
self.GetFlightWaypointsUser()
elif Command == "GetFlightWaypointsAll":
self.GetFlightWaypointsAll()
def EvaluateChoice(self,MenuChoice): #Execute the correct command.
Command = self._Commands.get(self._MenuOptions[MenuChoice],None) #Gets full, easier to work with string

elif Command == "GetMonitorID":
self.GetMonitorID()
elif Command == "GetMonitorName":
self.GetMonitorName()

elif Command == "AddMonitorPermission":
self.AddMonitorPermission()
elif Command == "RemoveMonitorPermission":
self.RemoveMonitorPermission()
elif Command == "ModifyMonitorPermissionDate":
self.ModifyMonitorPermissionDate()
elif Command == "GetMonitorPermissionUser":
self.GetMonitorPermissionUser()



elif Command == "Exit":
self.Call_Exit()
if Command != None:
Command()
else:
print("Please correctly register method to EvaluateChoice method")


def DisplayResults(self,Sucess,Message,Data = None):
def DisplayResults(self,Sucess,Message,Data = None): #Neatly display the results
print("Sucess >>",Sucess)
print("Message >>",Message)
if Data not in [None,[]]:
Expand Down Expand Up @@ -308,7 +269,7 @@ def AddFlight(self):
HighPoints = []
point = ""
print("Enter Coordinates one by one, enter 'Done' once complete")
while point != "Done":
while point != "Done": #Obtain all the main points on the flight till the user enters done
point = input("Enter Coordinate in form (x,y,z) >>")
if point != "Done":
HighPoints.append(point)
Expand Down Expand Up @@ -369,7 +330,7 @@ def GetMonitorPermissionUser(self):

#################################################

def Call_Exit(self):
def Call_Exit(self): #Exit communication from the server and exit
print("Exiting..")
try:
Sucess,Message = self._UserInterface.Exit()
Expand All @@ -388,10 +349,10 @@ def Call_Exit(self):
while not Exit:
try:
print("Connecting to server...")
U = AATC_Client.CreateUserInterface(IP = "127.0.0.1")
U = AATC_Client.CreateUserInterface(IP = "127.0.0.1") #Connect to server

TextUI = UserTextUI(U,MenuOptions)
TextUI.Main_Loop()
TextUI.Main_Loop() #Run main loop

Choice = input("Exit? (Y/N) >>").upper()
if Choice == "Y":
Expand Down
7 changes: 6 additions & 1 deletion AATC_Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
SERVER_PRIVATE_KEY = b"0\x82\x02]\x02\x01\x00\x02\x81\x81\x00\xb4N\xe2,D\x10\t.\x07UkD\x0b\x05u\x95n\r4\xcd\xa0A\x07\x8e\x93\xc3$ZP\x1e\x82\xce\x908a\x88A[\x84L\xcbk\xf9\xf1\xd5\xb6\x18\xcf\x11\x0eo\x9e\x9b\x83\xff\x87z\xd0\xa5\xf5gDR\xd7\xb9\x13\xc7\xb3\xedAV\x96\x15\x0e\xe9i\xf7\n\x93\n\xf2-\xd4\xe9\x90\x8f\xaa\xa4y\x9b\x91\x1f\x0c\x93\xc6\xf3\xc0\x1e\xfd\xccl\xa32\xde`\xa9\x9bH$Q\x94.\xf0s\x12\x87\x8bS\x1cs\r\xa1O\xb8\xca\xa46y\x02\x03\x01\x00\x01\x02\x81\x80N,}F\xef\xe3{\xf7f\xda\x93\xfd\x16B1\xae\xad\xde/\xec\x8e\xf4b\xd0`$\x15\x18\xca\xef\xcf\x8a\xbb`\x96x\xba\xcdp\xd8\xd2\xc1g\xc6\x7f\xff\xc9U\xcdqR\xd7\x93YqjM\xc74\x8c\xe7N\xea\x13>14\xfb\xce \xab'\xcdg\x9c\\C(d\x8b\xc9\x7f\xc2\xc9\xd6\x18t\x1cS\xa1\xa6\x82\x94\x80\xce3\xba\x81\x0fU\x043\xf2\xa6\x96}\x98,q\xce\xaeH\x97\xe1\xdd3e~\xa5\xd7\x06Q\xf8\xc0\x92\xb1q\x19\x02A\x00\xc1\xbd\xaa\xa20\xe1W~#\x10r\xeeG\x19\x83@\x94\xe1\x8c\xe1D\xe84f\x00\xee\xc9k/\xec\xa3\x01N\x1e\xd7\x00\xc50\xc3l\xcd\xb5\xbe\xa9\x91&\x05W[(<\t\x9bALL\xf3%\x03<\xd3\x17&\x0f\x02A\x00\xee@'\xcc\xb6C\x1e5f\xda\xb6\xf5\x11\xcci\xc2Xo\xd4\xb1\xd0!\x1b\xb5F]\x83\x10\xa6\xf1d<,\x82\xd8\xce\xaf~1\xb9\x07:\xb9\xc5\x10r\xb7\x1f,\x1c\x11k\xf2\xc1\t\xe2\xb5\xbb\x11{\xf47\xa2\xf7\x02A\x00\x95\xe2\xb4v\x126\xe3\xc7t=/\x8ddx:p\xe6=\xb1\x0e>\x8f\x1e\xaa\xa3\xa2\x195\xd1\xb7\xd3L\x192\x06\xc8S\xc6,\n\xab\x03&dm$\xeb\x10\xf07*k\x8c/rf=\xdd\xae\xa9\x89\xed\xe8\xc5\x02A\x00\xc73\x16\xd3\xbfT0\xce\xbfw\x80\xdf8\x89k\xa7\x95\x9f\xb2\xfb\x14\xa4\x89\xf1/\xab\x01\xe9\x8b[j\xce0\xfd\x19\xde\xfd\xb6\nF\xc4\xb7\xa2\x19\x15\x1e\x84\xe3hR\xf3r\t\x1e\xc3p-8\x02o\\\n\xa4\x93\x02@=\x1cp*k\xbb\x8fL\xc7\xc0\xf4/xY6NJ\x1e/\x04\xb6y\x8e\x13`pL\x8e\xfbl\xads2\x00\x1a\xfb\\n\xda\xe2<f?\xdf$\xdb\x0f\x06y\x87q\x9e=\xdb\xa3\xd5\xc0\xd3C\xd3\x9c\x9e\x82\xa0"
SERVER_CERTIFICATE_CHAIN = [{'NotAfter': 10000000000, 'Signature': b'mY2\x1cSTR\xc4\xbc\x9b\x89\xf6\xb88\x12\xa5Y\'\xbc\xd3\xa4k\xb8\x1b\xf2\xd1\x94\xe0*\x98\xc8"\x98\x82\t\x93\xf9\x9a\x93\xf3\xbe\xff\xa8/\ny\xbd\xc8O\xd9\xd0\x81} <\xd0s\x94<T\xc1w\xab\xf2\xa1L\xb44E((\xcb\x12\x12\xa2\t\xd6\xb4\x8b\x01\xca\xa9\xad\xd6"X\xf2\xa9,\xd6\x19\x1b6*\xb7\x93aG\x92\x87\xe1\xd0n\xbc\x17\xff\xae\x95\x83\xb1\xeb\xfe\xc7K*\x88Nv\xe7\xc6\xc0t\xdd> \xe3\x9a\x18', 'NotBefore': 1, 'Name': '0', 'PublicKey': b'0\x81\x9f0\r\x06\t*\x86H\x86\xf7\r\x01\x01\x01\x05\x00\x03\x81\x8d\x000\x81\x89\x02\x81\x81\x00\xc2\x0cmp\xbaN\x86\xb9\x05!*\x8d\xd2\xa1\x95\x16}\xa9gALok\x9d\xa7\xf6\xa9\r\x80\xae\x82\x90*N\x071}\x0f\xd5\xe7F0\xe4\x03\xaal\xb6b\xdc\xbc\xea\x087\xd3\xce\x92Pl~\x01\x8d\xc2\xb9\tY\x9c\xdf\xa9\xbe\xa7F!\xfdG_Wj\x7f\xf2P\xad\xa9\x87?\xc5\xdd.\x0c\xa0+!\xf4\xdcv\x8d\xe05S\xa3\x15TL\xa7\x10\x888h\x9a\x0f\xebU\n\x8c\xec\xc7\xa3E\x98\xe6h\xc6yM\xe1PGRm\x02\x03\x01\x00\x01', 'Issuer': 'IssuerA'}, {'NotAfter': 10000000000, 'Signature': b"\xba\xe2Q\xf4A\xe1\xdc\xad\xbb\xaf\xcdtvAD\xae\xad\xad\x86\x12\xf5e\xe4\x8d\rT\xce\xf7\xe0R\x0eF\xd58\xa6w\x8c\xd0JL\xde\xa7n\xf1j\xa7H\x96\xba\xa5\x1a\x17H\xe7\x02\x80_6x\x0b\xec]\x80\xde'\xcc\x15\xf6\tF\xab1\xb56ga\xd3\x17*\x0c8\xc9k?\x12\x00%\x1b\x14D~\x89\xf2\xcb\x0cP\xf6\x1dy\xbf\x9e\xbd\x96\n\x8a\xfc\x974z\x1a\xaaV\x0c\x06\x86\xbeNv\xeeYHl\x00\xf6\xc3\xffy\x98", 'NotBefore': 1, 'Name': '1', 'PublicKey': b'0\x81\x9f0\r\x06\t*\x86H\x86\xf7\r\x01\x01\x01\x05\x00\x03\x81\x8d\x000\x81\x89\x02\x81\x81\x00\xb2}\t\xe1\xd3\x95J\x0ba\xc6~K\xbeT\xdcu\xba\x8d\x94\xd1s\xf0\x8bn\xfe*\x9e(B\x9f<3\xdd\xd1\nvz]P\x95\xb9\xf6Oa\xc0\x9e\xfcn\xa8\xa8I\x81Y\xc6k\xbe\xe1\x03L\xae\xec\xe7\xb0e\x90\x9b\xef\xc9-\x92\xce\xce\x06:t\xbc \xa4\x9eEgw\x0c>\x84\xf2i]\x0e\xb2\xb8\x7f\x10\xc8\xed\xcf4\xaa\x0fvD\xd4\x026\xf3\x86Dd\xa5\x11\x897\x9c\x9e/\xe6J\xb1.\x10\xdb\xa9o5R{\xb1\xcb\x02\x03\x01\x00\x01', 'Issuer': '0'}, {'NotAfter': 10000000000, 'Signature': b"+\x8e\xf0\xad\xfe&\x9avY\xaaP\xcdE\x86a\x84\xf8\xd2\x97\xba\xa5}N;\xa0\x14-\x8e\xad\xe2Y\xcf@\xab\x17\xfdO\xca\xe8H:\xfc}I\xfd\xc4\xe1\x95\xd4\x07\xe2\x8c\xb0Z\x10\xa2\xa2\x1b\xb4?\x0c8\xb2\xbd\x92X)\xa2\xdf\x9b\xa8F\x1b\x88|\\\xe6\xa6'7$\xa9\x8b[\xe3\xc3\xbc\xe2j2\x82\x8c:\xf0;\xd8l\xcd*\xd1\x08C\xfe\x1b\xa5\x00\xebW\x9f\xdf\xc4a\xd8\xe3\x01v\xb6a\x14\xd3\n*\xf4)W}7\x0c", 'NotBefore': 1, 'Name': 'localhostsssss', 'PublicKey': b'0\x81\x9f0\r\x06\t*\x86H\x86\xf7\r\x01\x01\x01\x05\x00\x03\x81\x8d\x000\x81\x89\x02\x81\x81\x00\xb4N\xe2,D\x10\t.\x07UkD\x0b\x05u\x95n\r4\xcd\xa0A\x07\x8e\x93\xc3$ZP\x1e\x82\xce\x908a\x88A[\x84L\xcbk\xf9\xf1\xd5\xb6\x18\xcf\x11\x0eo\x9e\x9b\x83\xff\x87z\xd0\xa5\xf5gDR\xd7\xb9\x13\xc7\xb3\xedAV\x96\x15\x0e\xe9i\xf7\n\x93\n\xf2-\xd4\xe9\x90\x8f\xaa\xa4y\x9b\x91\x1f\x0c\x93\xc6\xf3\xc0\x1e\xfd\xccl\xa32\xde`\xa9\x9bH$Q\x94.\xf0s\x12\x87\x8bS\x1cs\r\xa1O\xb8\xca\xa46y\x02\x03\x01\x00\x01', 'Issuer': '1'}]

#Minor setting to use given AES and IV. Will not removed even if it is a security issue, preshared keys is the simple counter against shor's algorithm (cannot have a fibre optic cable to a drone for quantum cryptography).
#Minor setting to use given AES and IV. Will not removed even if it is a security issue, preshared keys could be the simple counter against public key cryptograph being broken though vunrable to threft.
SET_ENCRYPTION_KEYS_ENABLE = False
SET_AES_KEY = b"00000000000000000000000000000000"
SET_IV_KEY = b"00000000000000000000000000000000"
Expand Down Expand Up @@ -46,3 +46,8 @@
ENABLE_FINE_SPEED_ESTIMATION = False #Allows fine grained estimation of drone speed due to wind. Noticable slowdown when creating flight due to many requests which may be limited by OWM depending on contract
OWM_SLEEP_TIME = 1/60*60*4 # How long the add flight program should sleep between requests to reduce the chance of overusing requests. 1/REQUESTS_PER_MINUTE*60*NUMBER_OF_CONCURRENT_SEARCHES should ensure that the program never hits the limit of OWM.
OWM_API_KEY = '5b943c4857a45d75ef7ee9b301666fa8' #Contains the API key for the OWM




BOT_TOKEN = "472230564:AAEHTSJ446LE_BO_hQ8B4PeVmUTrB8gRsEA" #API token for the telegram bot
16 changes: 8 additions & 8 deletions AATC_Coordinate.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import math

class Coordinate:
class Coordinate: #Stores the coordinate data in a simpler to use object format.
def __init__(self,x,y,z=0,xSize=0,ySize=0,zSize=0):
self._x = x
self._y = y
Expand Down Expand Up @@ -38,19 +38,19 @@ def Set_ZSize(self,z):
self._zSize = z


def Print(self):
def Print(self): #neatly display coordinate information
print("Coordinate:")
print("X: {:<8} xSize:{:<8}".format(round(self._x,7),self._xSize))
print("Y: {:<8} ySize:{:<8}".format(round(self._y,7),self._ySize))
print("Z: {:<8} zSize:{:<8}".format(round(self._z,7),self._zSize))

def __str__(self):
def __str__(self): #Dump to string. Size not included as size is not ever needed as a string format.
return str((round(self._x,8),round(self._y,8),round(self._z,8)))

def getTuple(self):
return (self._x,self._y,self._z)

def copy(self):
def copy(self): #duplicates coordinate object.
return Coordinate(self._x,self._y,self._z,self._xSize,self._ySize,self._zSize)


Expand All @@ -63,7 +63,7 @@ def AddCoords(Coord,VectorCoord): #Simulates the drone moving
Coord.Set_Z(z)
return Coord

def CalculateVector(Coords,TargetCoords,Speed):
def CalculateVector(Coords,TargetCoords,Speed): #Calculates speed vector in coordinate format
dx = TargetCoords.Get_X()- Coords.Get_X()
dy = TargetCoords.Get_Y()- Coords.Get_Y()
dz = TargetCoords.Get_Z()- Coords.Get_Z()
Expand All @@ -89,7 +89,7 @@ def toDegree(x):
return 180*x/math.pi


def AtWaypoint(Coords,WaypointCoords,xSize,ySize,zSize):
def AtWaypoint(Coords,WaypointCoords,xSize,ySize,zSize): #Detects if the coordiante is within certain boundaries of a waypoint
x,y,z = False,False,False
if abs(Coords.Get_X()-WaypointCoords.Get_X()) <= xSize:
x = True
Expand All @@ -100,7 +100,7 @@ def AtWaypoint(Coords,WaypointCoords,xSize,ySize,zSize):
return all([x,y,z])


def DeltaCoordToMetres(aCoord,bCoord):
def DeltaCoordToMetres(aCoord,bCoord): #Converts distance between coordinates to metres
#Formula for dx and dy from : https://stackoverflow.com/questions/3024404/transform-longitude-latitude-into-meters
dx = abs(aCoord.Get_X() - bCoord.Get_X())
dy = abs(aCoord.Get_Y() - bCoord.Get_Y()) # in degrees
Expand All @@ -117,7 +117,7 @@ def DeltaCoordToMetres(aCoord,bCoord):
return Distance


def GetBearing(Coord1,Coord2):
def GetBearing(Coord1,Coord2): #Finds bearing between two coordinates
dy = Coord2.Get_Y()-Coord1.Get_Y()
dx = math.cos(math.pi/180 * Coord1.Get_Y())*(Coord2.Get_X()-Coord1.Get_X())
angle = (360+90-(math.atan2(dy,dx)*180/math.pi))%360
Expand Down
8 changes: 4 additions & 4 deletions AATC_Create_Graph.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#Create graph module
import decimal,AATC_AStar,AATC_Coordinate

def drange(start,end,step):
def drange(start,end,step): #Generator function to produce each point for the graph
step = decimal.Decimal(step)
r = decimal.Decimal(start)
while r < end:
Expand All @@ -10,7 +10,7 @@ def drange(start,end,step):



def CreationDialogue():
def CreationDialogue(): #Obtain parameters for graph and generate graph
print("2 million nodes ~ 357MB")
xStart =float(input("Enter start x Coord"))
yStart = float(input("Enter start y Coord"))
Expand All @@ -31,7 +31,7 @@ def CreationDialogue():
for x in drange(xStart,xEnd,xInterval):
for y in drange(yStart,yEnd,yInterval):
for z in drange(zStart,zEnd,zInterval):
Coord = AATC_Coordinate.Coordinate(x,y,z)
Coord = AATC_Coordinate.Coordinate(x,y,z) #Add nodes to graph for each point on the 3D grid
node = AATC_AStar.Node(nodeID,1,Coord)
graph.add_node(node)
nodeID +=1
Expand All @@ -41,7 +41,7 @@ def CreationDialogue():
zRange = zEnd - zStart
graph.Add_Edges(xRange,yRange,zRange)
graph.Build_Node_Cache()
graph.SaveGraph()
graph.SaveGraph() #Create edges and cache and save graph
#return graph


Expand Down
Loading

0 comments on commit 37d8a6b

Please sign in to comment.