Skip to content

Commit 6e93c12

Browse files
committed
Update position.py
1 parent c768cb4 commit 6e93c12

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

bluesky/tools/position.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,27 @@ class Position():
3434
# position types: "latlon","nav","apt","rwy"
3535

3636
# Initialize using text
37-
def __init__(self,name,reflat,reflon):
37+
def __init__(self, name, reflat, reflon):
3838

3939
self.name = name # default: copy source name
4040
self.error = False # we're optmistic about our succes
4141
self.refhdg = None
4242

4343
# lat,lon type ?
44-
if name.count(",")>0: #lat,lon or apt,rwy type
45-
txt1,txt2 = name.split(",")
44+
if name.count(",") > 0: #lat,lon or apt,rwy type
45+
txt1, txt2 = name.split(",")
4646
if islat(txt1):
4747
self.lat = txt2lat(txt1)
4848
self.lon = txt2lon(txt2)
4949
self.name = ""
5050
self.type ="latlon"
5151

5252
# runway type ? "EHAM/RW06","EHGG/RWY27"
53-
elif name.count("/RW")>0:
53+
elif name.count("/RW") > 0:
5454
try:
55-
aptname,rwytxt = name.split("/RW")
55+
aptname, rwytxt = name.split("/RW")
5656
rwyname = rwytxt.lstrip("Y").upper() # remove Y and spaces
57-
self.lat,self.lon, self.refhdg = bs.navdb.rwythresholds[aptname][rwyname]
57+
self.lat, self.lon, self.refhdg = bs.navdb.rwythresholds[aptname][rwyname]
5858
except KeyError:
5959
self.error = True
6060
self.type = "rwy"
@@ -68,11 +68,11 @@ def __init__(self,name,reflat,reflon):
6868
self.type ="apt"
6969

7070
# fix or navaid?
71-
elif bs.navdb.wpid.count(name)>0:
72-
idx = bs.navdb.getwpidx(name,reflat,reflon)
71+
elif bs.navdb.wpid.count(name) > 0:
72+
idx = bs.navdb.getwpidx(name, reflat, reflon)
7373
self.lat = bs.navdb.wplat[idx]
7474
self.lon = bs.navdb.wplon[idx]
75-
self.type ="nav"
75+
self.type = "nav"
7676

7777
# aircraft id?
7878
elif name in bs.traf.id:

0 commit comments

Comments
 (0)