Hi,
This is my first attempt doing this and I have zero python knowledge, but I can follow a manual. I believe I've done this correctly, but the custom stop position doesn't work, no matter the aircraft, they stop at the default position. I've only done one stand to make sure I can make it work before continuing.
Can anyone help with what I've possibly done wrong please? The code is below, the COUATL log states Using airport customization from user Python with the correct file name and shows no errors, so I'm stumped. The manual states you should have a "." between aircraftData and icaoTypeDesignator (aircraftData.icaoTypeDesignator) however doing so creates a read error in the COUATL log, and the file is not loaded, removing it, doesn't create the error and the file is loaded. As I said, zero python knowledge, so I must be making a mistake somewhere.
Any help would be appreciated
# -- coding: utf-8 --
msfs_mode = 1
icao = "kjfk"
@AlternativeStopPositions
def customOffsetB2(aircraftDataicaoTypeDesignator):
TableIcao = {
"A319" : -7.30,
"A320" : -7.30,
"A321" : -7.30,
"A21N" : -7.30,
"A332" : 0.00,
"A333" : 10.30,
"A359" : 10.30,
"A35K" : 16.90,
"B738" : -7.30,
"B38M" : -7.30,
"B772" : 10.30,
"B77W" : 16.90,
"B788" : -2.30,
"B789" : 10.30,
"B78X" : 16.90,
"CRJ2" : -7.30,
"CRJ7" : -7.30,
"CRJ9" : -7.30,
"E170" : -7.30,
"E175" : -7.30,
"E75L" : -7.30,
"E75S" : -7.30,
"E190" : -7.30,
"E195" : -7.30,
}
return Distance.fromMeters(TableIcao.get(aircraftDataicaoTypeDesignator, 0))
def MyTerminalNames(name, letter, priority):
return CustomizedName( "%s | Gate #%s§" % (name, letter), priority )
def MyApronNames(name, letter, priority):
return CustomizedName( "%s | Stand #%s§" % (name, letter), priority )
Terminal8 = MyTerminalNames("Terminal 8", "", 1)
Terminal8ra = MyTerminalNames("Terminal 8 - Remote A", "", 1)
Terminal8rb = MyTerminalNames("Terminal 8 - Remote B", "", 2)
Terminal8rc = MyTerminalNames("Terminal 8 - Remote C", "", 2)
Terminal8rd = MyTerminalNames("Terminal 8 - Remote D", "", 2)
Terminal8ooo = MyTerminalNames("Terminal 8 - No Longer Exist", "", 3)
parkings = {
GATE_B : {
None : (),
1 : (Terminal8, ),
"1A" : (Terminal8ra, ),
"1B" : (Terminal8rb, ),
"1C" : (Terminal8rc, ),
"1D" : (Terminal8rd, ),
2 : (Terminal8, customOffsetB2),
3 : (Terminal8, ),
4 : (Terminal8, ),
5 : (Terminal8, ),
6 : (Terminal8, ),
7 : (Terminal8, ),
8 : (Terminal8, ),
10 : (Terminal8, ),
12 : (Terminal8, ),
14 : (Terminal8, ),
16 : (Terminal8, ),
18 : (Terminal8, ),
20 : (Terminal8, ),
"31A" : (Terminal8ooo, ),
"31B" : (Terminal8ooo, ),
"31C" : (Terminal8ooo, ),
"31D" : (Terminal8ooo, ),
"31E" : (Terminal8ooo, ),
"32F" : (Terminal8ooo, ),
"32G" : (Terminal8ooo, ),
"32H" : (Terminal8ooo, ),
"32I" : (Terminal8ooo, ),
33 : (Terminal8, ),
34 : (Terminal8, ),
35 : (Terminal8, ),
36 : (Terminal8, ),
37 : (Terminal8, ),
38 : (Terminal8, ),
39 : (Terminal8, ),
40 : (Terminal8, ),
41 : (Terminal8, ),
42 : (Terminal8, ),
43 : (Terminal8, ),
44 : (Terminal8, ),
45 : (Terminal8, ),
46 : (Terminal8, ),
47 : (Terminal8, ),
},
}