diff --git a/plugins/trafgenclasses.py b/plugins/trafgenclasses.py index d621b634cb..292f7834da 100644 --- a/plugins/trafgenclasses.py +++ b/plugins/trafgenclasses.py @@ -260,7 +260,7 @@ def update(self,gain): stack.stack(acid+" ALT FL100") # TBD: Add waypoint for after take-off? - if self.name[:4] != "SEGM": + if self.dest[idest][:4] != "SEGM": stack.stack(acid + " DEST " + self.dest[idest]) else: stack.stack(acid + " DEST " + str(self.destlat[idest]) @@ -337,7 +337,7 @@ def __init__(self,name,cmd,cmdargs): self.segdir = None # Segment direction in degrees # Is location a circle segment? - if swcircle and self.name[:4]=="SEGM": + if self.name[:4]=="SEGM": self.type = "seg" self.lat,self.lon,brg = getseg(self.name) # For SEGMnnn to SEGMnnn for crossing flights optional pass @@ -550,7 +550,7 @@ def update(self,gain): else: stack.stack(acid + " ORIG " + str(self.origlat[iorig]) + " " +\ str(self.origlat[iorig])) - if not self.name[:4]=="SEGM": + if not (self.name[:4]=="SEGM"): stack.stack(acid + " DEST " + self.name) else: stack.stack(acid + " ADDWPT " + str(self.lat) + " " + str(self.lon)) @@ -573,20 +573,20 @@ def randacname(orig,dest): company = chr(ord("A") + int(random.random()*26))+ \ chr(ord("A") + int(random.random()*26)) + if orig=="EHKD" + # Make flight number or Dutch call sign for VFR traffic - if not (company=="PH"): - fltnr = str(int(random.random()*900+100)) - else: - fltnr = "-" + chr(ord("A") + int(random.random()*26))+ \ + firstx = True + while firstx or (acname in traf.id): + if not (company=="PH"): + fltnr = str(int(random.random()*900+100)) + else: + fltnr = "-" + chr(ord("A") + int(random.random()*26))+ \ chr(ord("A") + int(random.random() * 26)) + \ chr(ord("A") + int(random.random() * 26)) - acname = company+fltnr - i = 0 - while (acname in traf.id): - fltnr = fltnr+str(i) - i = i + 1 - acname = company+ fltnr + acname = company+fltnr + firstx = False return company+fltnr diff --git a/run-client-on-windows.bat b/run-client-on-windows.bat new file mode 100644 index 0000000000..72b4512557 --- /dev/null +++ b/run-client-on-windows.bat @@ -0,0 +1,2 @@ +python.exe Bluesky.py --client +pause \ No newline at end of file diff --git a/run-headless-on-windows.bat b/run-headless-on-windows.bat new file mode 100644 index 0000000000..3f734710ce --- /dev/null +++ b/run-headless-on-windows.bat @@ -0,0 +1,2 @@ +python.exe Bluesky.py --headless +pause \ No newline at end of file diff --git a/scenario/trafgen-slr.scn b/scenario/trafgen-slr.scn index d989253f9d..bb4c3558c0 100644 --- a/scenario/trafgen-slr.scn +++ b/scenario/trafgen-slr.scn @@ -5,6 +5,8 @@ 00:00:00.00>plugin load trafgen 00:00:00.00>CALL EHAM/FIR-NL-EHAA 00:00:00.00>TAXI OFF 1800 +00:00:00.00>DTLOOK 20 + # Add more oil rigs 00:00:00.00>DEFWPT EHFE, N54'59'07",E004'54'00"