mirror of
				https://github.com/mewtek/i2ME-Legacy.git
				synced 2025-06-10 05:30:00 -05:00 
			
		
		
		
	Add national airport codes to getAirportCodes()
This commit is contained in:
		@@ -50,9 +50,90 @@ def getTideStations():
 | 
			
		||||
 | 
			
		||||
def getAirportCodes():
 | 
			
		||||
    """ Returns all of the airport identifiers present in the MachineProductCfg """
 | 
			
		||||
    airports = []
 | 
			
		||||
    airports = [
 | 
			
		||||
        'ATL',
 | 
			
		||||
        'LAX',
 | 
			
		||||
        'ORD',
 | 
			
		||||
        'DFW',
 | 
			
		||||
        'JFK',
 | 
			
		||||
        'DEN',
 | 
			
		||||
        'SFO',
 | 
			
		||||
        'CLT',
 | 
			
		||||
        'LAS',
 | 
			
		||||
        'PHX',
 | 
			
		||||
        'IAH',
 | 
			
		||||
        'MIA',
 | 
			
		||||
        'SEA',
 | 
			
		||||
        'EWR',
 | 
			
		||||
        'MCO',
 | 
			
		||||
        'MSP',
 | 
			
		||||
        'DTW',
 | 
			
		||||
        'BOS',
 | 
			
		||||
        'PHL',
 | 
			
		||||
        'LGA',
 | 
			
		||||
        'FLL',
 | 
			
		||||
        'BWI',
 | 
			
		||||
        'IAD',
 | 
			
		||||
        'MDW',
 | 
			
		||||
        'SLC',
 | 
			
		||||
        'DCA',
 | 
			
		||||
        'HNL',
 | 
			
		||||
        'SAN',
 | 
			
		||||
        'TPA',
 | 
			
		||||
        'PDX',
 | 
			
		||||
        'STL',
 | 
			
		||||
        'HOU',
 | 
			
		||||
        'BNA',
 | 
			
		||||
        'AUS',
 | 
			
		||||
        'OAK',
 | 
			
		||||
        'MSY',
 | 
			
		||||
        'RDU',
 | 
			
		||||
        'SJC',
 | 
			
		||||
        'SNA',
 | 
			
		||||
        'DAL',
 | 
			
		||||
        'SMF',
 | 
			
		||||
        'SAT',
 | 
			
		||||
        'RSW',
 | 
			
		||||
        'PIT',
 | 
			
		||||
        'CLE',
 | 
			
		||||
        'IND',
 | 
			
		||||
        'MKE',
 | 
			
		||||
        'CMH',
 | 
			
		||||
        'OGG',
 | 
			
		||||
        'PBI',
 | 
			
		||||
        'BDL',
 | 
			
		||||
        'CVG',
 | 
			
		||||
        'JAX',
 | 
			
		||||
        'ANC',
 | 
			
		||||
        'BUF',
 | 
			
		||||
        'ABQ',
 | 
			
		||||
        'ONT',
 | 
			
		||||
        'OMA',
 | 
			
		||||
        'BUR',
 | 
			
		||||
        'OKC',
 | 
			
		||||
        'MEM',
 | 
			
		||||
        'PVD',
 | 
			
		||||
        'RIC',
 | 
			
		||||
        'SDF',
 | 
			
		||||
        'RNO',
 | 
			
		||||
        'TUS',
 | 
			
		||||
        'CHS',
 | 
			
		||||
        'ORF',
 | 
			
		||||
        'PWM',
 | 
			
		||||
        'GRR',
 | 
			
		||||
        'BHM',
 | 
			
		||||
        'LIT',
 | 
			
		||||
        'DSM',
 | 
			
		||||
        'FAR',
 | 
			
		||||
        'FSD',
 | 
			
		||||
        'ICT',
 | 
			
		||||
        'LBB',
 | 
			
		||||
        'BIL',
 | 
			
		||||
        'BOI',
 | 
			
		||||
        'GEG'
 | 
			
		||||
    ]
 | 
			
		||||
    for i in data['Config']['ConfigDef']['ConfigItems']['ConfigItem']:
 | 
			
		||||
        if "Airport" in i['@key'] and i['@value'] != "":
 | 
			
		||||
        if "Airport" in i['@key'] and i['@value'] != "" and not i['@value'] in airports:
 | 
			
		||||
            # Split the string up
 | 
			
		||||
            airports.append(i['@value'].split("_")[2])
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user