-- ==============================================================================
-- MCDONNELL DOUGLAS MD-83 SPECIFICATION FILE (DCS WORLD)
-- ==============================================================================
-- MODIFICATION LOG:
-- 1. ENGINE THRUST CORRECTION:
--    - Updated thrust_sum_max from 20,270 N to 186,800 N.
--    - Based on 2x P&W JT8D-219 engines (21,000 lbf / 93.4 kN each).
--
-- 2. FUEL SYSTEM CORRECTION:
--    - Updated M_fuel_max from 15,580 kg to 21,141 kg.
--    - Reflects MD-83 extended range capacity (6,970 US Gal) with aux tanks.
--    - Updated average_fuel_consumption to 0.75 kg/s to match JT8D cruise flow.
--
-- 3. WEIGHT & BALANCE:
--    - Verified MTOW (M_max) at 72,575 kg (160,000 lb).
--    - Verified OEW (M_empty) at 36,145 kg.
--
-- 4. AERODYNAMICS & PERFORMANCE:
--    - Updated Service Ceiling (H_max) to 11,280 m (37,000 ft).
--    - Updated Climb Rate (Vy_max) to 12.7 m/s (2,500 fpm).
--    - Set Mmo (Mach_max) to 0.84.
--    - Adjusted cruise lift/drag parameters in SFM_Data.
-- 5. LIGHTING:
--    - Lights tweaked to remove redundancy and match expectations.
-- ==============================================================================

TTJ_MD_83 = {

	Name 					= 'TTJ_MD_83',
	DisplayName				= _('MD-83 (TTJ)'),
	date_of_introduction	= 1980.09,  -- DC-9 Super81 "HB-INC" by swissair
	country_of_origin		= "USA",
	Picture 				= "TTJ_DC-9.png",
	Rate 					= "40", -- RewardPoint in Multiplayer
	Shape					= "TTJ_MD_83",
	WorldID					= WSTYPE_PLACEHOLDER,
	defFuelRatio    		= 0.8, -- fuel default in fractions of the full (1.0)
	singleInFlight 			= true,

	-- ==============================================================================
	-- 1. DIMENSIONS & SHAPE DATA
	-- ==============================================================================
	-- Accurate MD-80 series dimensions
	length 		= 45.06,  -- Actual: 45.06m
	height 		= 9.05,   -- Actual: 9.05m
	wing_span 	= 32.87,  -- Actual: 32.87m
	wing_area 	= 112.3,  -- Wing area m²
	
	shape_table_data = {
		{
			file  	 	= 'ttj_md_83';
			life  	 	= 20; -- lifebar
			vis   	 	= 3; -- visibility gain
			desrt		= 'kc-135-oblomok'; -- Name of destroyed object file name
			fire		= { 300, 2}; 		-- Fire on ground: 300sec, 2m radius
			username	= 'TTJ_MD_83';
			index		= WSTYPE_PLACEHOLDER;
			classname	= "lLandPlane";
			positioning	= "BYNORMAL";
		},
		{
			name  		= "kc-135-oblomok";
			file  		= "kc-135-oblomok";
			fire  		= { 240, 2};
		},
	},
	
	mapclasskey = "P0091000029",
	attribute	= {
		wsType_Air, wsType_Airplane, wsType_Cruiser, WSTYPE_PLACEHOLDER,
		"Transports",
	},
	Categories = {},

        net_animation = { --TODO full list for animation (model swapping) reflection over multiplay network
            0, 1, 2, 3, 4, 5, 6,  9, 10, 11, 12,  16,  18,  21,  68, 69,  76, 77, 
            190, 191, 192,  208, 209,  408, 
            601, -- 0=rounded tail end / 1=flat tail end
            690  -- 0=MD-83 tailfin / 1=MD-90 tailfin
        },

	-- ==============================================================================
	-- 2. WEIGHTS (Kilograms)
	-- ==============================================================================
	M_empty 	= 36145,  -- Operating Empty Weight (OEW)
	M_nominal 	= 67800,  -- Nominal Takeoff Weight
	M_max 		= 72575,  -- MTOW: 160,000 lbs (MD-83 Standard)
	M_fuel_max 	= 21141,  -- Max Fuel: 6,970 US Gal (Standard + 2 Aux tanks)

	-- ==============================================================================
	-- 3. SPEEDS & PERFORMANCE
	-- ==============================================================================
	V_take_off 		= 74.0,     -- ~144 kts
	V_land 			= 69.0,     -- ~135 kts
	V_opt 			= 242.0,    -- Cruise: Mach 0.76 (~470 kts TAS)
	V_max_sea_level = 190.0, 	-- Structural limit low level (370 kts)
	V_max_h 		= 257.0,    -- Max Cruise High Altitude
	Mach_max 		= 0.84,     -- Mmo (Max Operating Mach)
	CAS_min 		= 60.0,     -- Stall speed approximation
	
	H_max 			= 11280,    -- Service Ceiling: 37,000 ft
	Vy_max 			= 12.7,     -- Max Climb Rate: 2,500 ft/min
	range 			= 4635,     -- Range: ~2,500 nm (4,635 km)

	-- ==============================================================================
	-- 4. ENGINE SPECIFICATIONS (Pratt & Whitney JT8D-219)
	-- ==============================================================================
	-- Single Engine Thrust: 21,000 lbf = 93.4 kN = 93,400 N
	-- Total Thrust: 186,800 N
	thrust_sum_max 	= 19048, 	-- kgf
	thrust_sum_ab 	= 19048,  	-- kgf

	-- Fuel Consumption (kg/s)
	-- Cruise flow ~3,400 kg/hr total = ~0.95 kg/s
	-- Max continuous flow ~1.2 kg/s
	average_fuel_consumption = 0.75,  -- kg/s (reduced for better cruise match)

	engines_count	= 2,
	
	engines_startup_sequence 	= { 1, 0 },	-- Typical for civilian airliners
	engines_nozzles = {
		{
			pos 				= {-14.48, 0.62, -2.7},
			elevation			= 0,
			diameter			= 1.1,
			exhaust_length_ab	= 12.192,
			exhaust_length_ab_K	= 0.76,
			smokiness_level 	= 0.12, -- JT8D is known for being smoky, but -219 is cleaner
			engine_number       = 1,
		}, 	
		{
			pos 				= {-14.48, 0.62, 2.7},
			elevation			= 0,
			diameter			= 1.1,
			exhaust_length_ab	= 12.192,
			exhaust_length_ab_K	= 0.76,
			smokiness_level 	= 0.12,
			engine_number       = 2,
		},
	},

	SFM_Data = {
		aerodynamics = {
			Cy0 	 = 0.06,    -- Lift at 0 AoA (Cambered wing)
			Mzalfa 	 = 4.8,     -- CORRECTED: Increased Pitch stability (Long fuselage arm)
			Mzalfadt = 1.1,     -- Pitch damping
			kjx 	 = 2.5,     -- CORRECTED: Higher Roll Inertia (Heavy wings)
			kjz 	 = 0.0016,  -- Increased Yaw Inertia (Rear Engines)
			Czbe 	 = -0.020,  -- Stronger Yaw stability needed for T-Tail
			
			-- Drag Coefficients
			cx_gear  = 0.035, 	-- Gear drag
			cx_flap  = 0.105,   -- Flap drag (increased for higher lift)
			cy_flap  = 1.4,     -- Flap lift (increased for realistic Clmax)
			cx_brk 	 = 0.08,  	-- Speedbrake drag
			
			table_data = 
			{
				-- 		 M       Cx0     Cya      B        B4    Omxmax   Aldop   Cymax
				-- REVISION: Lowered Cx0/B for better cruise Cd; Cymax to 1.45 clean;
				-- minor B4 increase at transonic
				
				-- Low Speed / Takeoff
				[1]  = {0.0,   0.0210,  0.098,  0.041,   0.001,   0.4,    18.0,   1.45},
				[2]  = {0.1,   0.0210,  0.098,  0.041,   0.001,   0.6,    18.0,   1.45},
				[3]  = {0.2,   0.0215,  0.100,  0.042,   0.002,   0.8,    17.5,   1.42},
				
				-- Climb
				[4]  = {0.3,   0.0220,  0.102,  0.043,   0.004,   1.0,    17.0,   1.39},
				[5]  = {0.4,   0.0230,  0.104,  0.044,   0.008,   1.1,    16.5,   1.35},
				[6]  = {0.5,   0.0245,  0.106,  0.046,   0.015,   1.2,    16.0,   1.30},
				[7]  = {0.6,   0.0265,  0.105,  0.048,   0.025,   1.2,    15.0,   1.20},
				
				-- Cruise (Econ Mach 0.76)
				[8]  = {0.7,   0.0250,  0.104,  0.050,   0.040,   1.2,    14.0,   1.10},
				[9]  = {0.76,  0.0270,  0.102,  0.055,   0.055,   1.1,    13.5,   1.00}, 
				
				-- Transonic Drag Rise (MD-80 wing is less efficient than modern wings)
				[10] = {0.80,  0.0350,  0.098,  0.060,   0.090,   1.0,    13.0,   0.90}, 
				[11] = {0.84,  0.0450,  0.094,  0.100,   0.160,   0.9,    12.0,   0.80}, -- Mmo
				
				-- Overspeed Limits
				[12] = {0.90,  0.0700,  0.085,  0.200,   0.320,   0.7,    10.0,   0.55},
				[13] = {1.0,   0.1200,  0.070,  0.400,   0.500,   0.4,    8.0,    0.35},
				
				
			--[[	
				-- Low Speed / Takeoff
				[1]  = {0.0,   0.0210,  0.098,  0.060,   0.001,   0.4,    18.0,   1.55},
				[2]  = {0.1,   0.0210,  0.098,  0.060,   0.001,   0.6,    18.0,   1.55},
				[3]  = {0.2,   0.0215,  0.100,  0.062,   0.002,   0.8,    17.5,   1.50},
				
				-- Climb
				[4]  = {0.3,   0.0220,  0.102,  0.064,   0.004,   1.0,    17.0,   1.45},
				[5]  = {0.4,   0.0230,  0.104,  0.066,   0.008,   1.1,    16.5,   1.40},
				[6]  = {0.5,   0.0245,  0.106,  0.070,   0.015,   1.2,    16.0,   1.35},
				[7]  = {0.6,   0.0265,  0.105,  0.075,   0.022,   1.2,    15.0,   1.25},
				
				-- Cruise (Econ Mach 0.76)
				[8]  = {0.7,   0.0290,  0.104,  0.082,   0.035,   1.2,    14.0,   1.15},
				[9]  = {0.76,  0.0320,  0.102,  0.095,   0.050,   1.1,    13.5,   1.05}, 
				
				-- Transonic Drag Rise (MD-80 wing is less efficient than modern wings)
				[10] = {0.80,  0.0450,  0.098,  0.140,   0.080,   1.0,    13.0,   0.95}, 
				[11] = {0.84,  0.0600,  0.094,  0.220,   0.150,   0.9,    12.0,   0.85}, -- Mmo
				
				-- Overspeed Limits
				[12] = {0.90,  0.0900,  0.085,  0.350,   0.300,   0.7,    10.0,   0.60},
				[13] = {1.0,   0.1400,  0.070,  0.500,   0.500,   0.4,    8.0,    0.40},
			]]
			}, 
		}, 
		
		engine = {
			Nmg 	= 54.0,  -- Idle RPM %
			Nominal_RPM = 12500.0,
			Nominal_Fan_RPM = 8000.0,
			MinRUD	= 0,
			MaxRUD	= 1,
			MaksRUD	= 1,
			ForsRUD	= 1,
			typeng	= 4,
			
			hMaxEng = 12.5,  -- Service Ceiling ~41,000 ft (Engine limit)
			dcx_eng = 0.011, -- Engine nacelle drag
			
			-- FUEL FLOW (Per Engine)
			-- JT8D-219 TSFC ~0.74 at cruise
			-- Normalized for 21,000 lbf thrust (reduced for better cruise match)
			cemax   = 0.9,  -- kg/s (reduced)
			cefor   = 0.9, 

			-- Thrust Lapse Rates (JT8D specific)
			dpdh_m 	= 5100,	-- [N/km per engine]
			dpdh_f 	= 5100,
			
			table_data = {
				-- Mach    Thrust (N) Total (2x JT8D-219)
				-- CORRECTED THRUST TABLE (Boosted for High Lapse)
                -- Ensures ~40kN Net Thrust at M0.76 / 33k ft
				--    Mach,    Newtons,  Newtons (Afterburner)
                [1] = {0.0,    186800,     186800}, -- Static
                [2] = {0.1,    182000,     182000},
                [3] = {0.2,    175000,     175000},
                [4] = {0.3,    168000,     168000},
                [5] = {0.4,    162000,     162000},
                [6] = {0.5,    158000,     158000},
                [7] = {0.6,    155000,     155000},
                [8] = {0.7,    150000,     150000}, -- Boosted significantly
                [9] = {0.8,    142000,     142000}, -- Cruise Base (Net ~40kN at Alt)
                [10]= {0.9,    110000,     110000},
			}, 
		}, 
	},

	-- ==============================================================================
	-- 5. SYSTEMS & CREW
	-- ==============================================================================
	Ny_min 		= 0.5,
	Ny_max 		= 2.0,   -- Transport category limit
	Ny_max_e 	= 2.5,   -- Emergency limit

	has_afteburner				= false,
	has_speedbrake				= true,
	has_thrustReverser			= true,
	has_differential_stabilizer = false,
	radar_can_see_ground		= false,
	flaps_transmission          = "Hydraulic",
    undercarriage_transmission  = "Hydraulic",
	
	-- Gear Geometry
	
	--[[
		tand_gear_max defines the Maximum Nose Wheel Steering Angle using the formula:
		
			tand_gear_max = math.tan(math.rad(gear_max_yaw_angle_deg))
		
		Desired Steering Angle	tand_gear_max 		Use Case
				25°					0.466			Older fighters, limited ground handling.
				30°					0.577			Standard runway operations.
				45°					1.000			High maneuverability (F-16/F-18 style NWS).
				60°					1.732			Carrier deck handling / Tight turns.
				75°					3.732			Extreme castering (rare).
	]]
	tand_gear_max				=	math.tan(math.rad(82)),
	
	
	nose_gear_pos 	= 	{ 19.994, -2.109, 0}, 			-- Nose gear position (ground under center of the axel: {y,z,x})
		
	main_gear_pos 	= 	{-2.099,  -2.608, 3.012},		-- Main gear position (ground under center of the axel: {y,z,x})
														-- automatically mirrored
	
	nose_gear_amortizer_direct_stroke 		 =  0.0,	-- Full Strut Expansion (no weight on wheels) (arg 2)
	nose_gear_amortizer_reversal_stroke 	 = -0.151,	-- Full Strut Compression (maximum+ weight on wheels)
	nose_gear_amortizer_normal_weight_stroke = -0.032826,-- Strut Weight Compression (normal compression with weight on wheels; number is amount of "chrome showing")
	nose_gear_wheel_diameter				 =  0.6463,	-- Diameter of the nose gear wheel (meters)

	main_gear_amortizer_direct_stroke 		 =  0.0,	-- Full Strut Expansion (no weight on wheels) (args 4 and 6)
	main_gear_amortizer_reversal_stroke 	 = -0.31,	-- Full Strut Compression (maximum+ weight on wheels)
	main_gear_amortizer_normal_weight_stroke = -0.06677,-- Strut Weight Compression (normal compression with weight on wheels; number is amount of "chrome showing")
	main_gear_wheel_diameter 				 =  1.14,	-- Diameter of the main gear wheels (meters)
	
	
	AOA_take_off				= 0.14,
	stores_number				= 0,
	bank_angle_max				= 30,
	tanker_type					= 0,
	flaps_maneuver				= 0.5,
	crew_size					= 2,
	RCS							= 60,
	detection_range_max			= 19,
	IR_emission_coeff			= 4,
	IR_emission_coeff_ab		= 0,
	wing_tip_pos 				= {-6.49, 0.5, 16.23},
	brakeshute_name				= 0,
	is_tanker					= false,

	crew_members = {
		[1] = {
			ejection_seat_name	= 0,
			drop_canopy_name	= 0,
			pos = {19.09, 1.31, -0.7}, -- Pilot
		},
		[2] = {
			ejection_seat_name	= 0,
			drop_canopy_name	= 0,
			pos = {19.09, 1.31, 0.7}, -- Co-Pilot
		},
	},

	CanopyGeometry = {
        azimuth = {-110.0, 110.0},
        elevation = {-30.0, 60.0},
    },

	-- ==============================================================================
	-- 6. AVIONICS & DAMAGE
	-- ==============================================================================
	Failures = {
		{ id = 'asc',		label = _('ASC'),		enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
		{ id = 'autopilot',	label = _('AUTOPILOT'),	enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
		{ id = 'hydro',		label = _('HYDRO'),		enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
		{ id = 'l_engine',	label = _('L-ENGINE'),	enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
		{ id = 'r_engine',	label = _('R-ENGINE'),	enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
	},

	HumanRadio = {
		frequency = 127.5,
		editable = true,
		minFrequency = 118.000,
		maxFrequency = 137.000,
		modulation = MODULATION_AM
	},

	Pylons = {},

	Tasks = {
		aircraft_task(Transport),
	},
	DefaultTask = aircraft_task(Nothing),

	Damage = {
		[1]  = {critical_damage = 5, args = {296}},
		[2]  = {critical_damage = 5, args = {297}},
		[3]  = {critical_damage = 15, args = {65}},
		[9]  = {critical_damage = 6, args = {154}},
		[10] = {critical_damage = 6, args = {153}},
		[11] = {critical_damage = 6, args = {167}},
		[12] = {critical_damage = 6, args = {161}},
		[23] = {critical_damage = 6, args = {223}}, 
		[29] = {critical_damage = 8, args = {224}, deps_cells = {23}},
		[35] = {critical_damage = 20, args = {225}, deps_cells = {23, 29}},
		[24] = {critical_damage = 6, args = {213}},
		[30] = {critical_damage = 8, args = {214}, deps_cells = {24}},
		[36] = {critical_damage = 20, args = {215}, deps_cells = {24, 30}},
		[39] = {critical_damage = 6, args = {244}},
		[40] = {critical_damage = 6, args = {241}},
		[51] = {critical_damage = 6, args = {240}},
		[52] = {critical_damage = 6, args = {238}},
		[53] = {critical_damage = 6, args = {248}},
		[55] = {critical_damage = 20, args = {156, 159}},
		[56] = {critical_damage = 6, args = {158}},
		[57] = {critical_damage = 6, args = {157}},
		[82] = {critical_damage = 6, args = {152}},
	},
	
	DamageParts = {},

	-- ==============================================================================
	-- 7. LIGHTING SYSTEM
	-- ==============================================================================
	--[[
		--------------------------------------------------------------
		------------------  HawaiianRyan overhaul  -------------------
		--------------------------------------------------------------
		DCS World\Scripts\Aircrafts\_Common\Lights.lua
		
		WOLALIGHT_STROBES          = 1		-- White strobe anti-collision lights.
		WOLALIGHT_SPOTS            = 2		-- Take-off and landing high power headlights.
		WOLALIGHT_LANDING_LIGHTS   = 2		-- Take-off and landing high power headlights.
		WOLALIGHT_NAVLIGHTS        = 3		-- P-Z colored navigation (position) wingtip lights..
		WOLALIGHT_FORMATION_LIGHTS = 4		-- Formation / Logo lights.
		WOLALIGHT_TIPS_LIGHTS      = 5		-- Helicopter-specific: rotor anti-collision tips lights.
		WOLALIGHT_TAXI_LIGHTS      = 6		-- Taxi headlights.
		WOLALIGHT_BEACONS          = 7		-- Rotary anti-collision lights.
		WOLALIGHT_CABIN_BOARDING   = 8		-- Cabin incandescence illumination.
		WOLALIGHT_CABIN_NIGHT      = 9		-- Cabin night time (UV) illumination.
		WOLALIGHT_REFUEL_LIGHTS    = 10		-- Refuel apparatus illumination.
		WOLALIGHT_PROJECTORS       = 11		-- Search lights, direction-controlled.
		WOLALIGHT_AUX_LIGHTS       = 12		-- White anti-collision strobes & others
		WOLALIGHT_IR_FORMATION     = 13		-- IR formation strips. Currently not implemented due to engine NVG limitations.
		WOLALIGHT_CABIN_WORK	   = 14		-- Flight instrument illumination of pilots
	]]
	lights_data = { typename = "collection", lights = {
		[WOLALIGHT_STROBES] = { typename = "collection",
			lights = {
				-- {typename  = "strobelight", connector =  "RED_BEACON",   argument = 83, proto = lamp_prototypes.MSL_3_2, emitter_shift_x = -0.25,},
				-- {typename  = "strobelight", connector =  "RED_BEACON_2", argument = 83, proto = lamp_prototypes.MSL_3_2, emitter_shift_x = -0.25,},
				
				{	-- Port wingtip, forward quarter
					typename = "Spot", position = { -6.07, 0.511675, -16.15 }, -- connector = "BANO_1",
					controller = "VariablePatternStrobe", mode = "2 Flash Long",
					proto = lamp_prototypes.MPS_1, intensity_max = 400.0, period = 0.6, phase_shift = 0.0,
					direction = {azimuth = math.rad(-50.0), elevation = math.rad(0)}, angle_max = math.rad(160.0), angle_min = math.rad(0),
				},
				{	-- Port wingtip, aft facing
					typename = "Spot", position = { -6.984, 0.45, -16.16 }, -- connector = "BANO_0",
					controller = "VariablePatternStrobe", mode = "2 Flash Long",
					proto = lamp_prototypes.MPS_1, intensity_max = 400.0, period = 0.6, phase_shift = 0.0,
					direction = {azimuth = math.rad(-180.0), elevation = math.rad(0)}, angle_max = math.rad(160.0), angle_min = math.rad(0),
				},
				{	-- Starboard wingtip, forward quarter
					typename = "Spot", position = { -6.07, 0.511675, 16.15 }, --connector = "BANO_2",
					controller = "VariablePatternStrobe", mode = "2 Flash Long",
					proto = lamp_prototypes.MPS_1, intensity_max = 400.0, period = 0.6, phase_shift = 0.0,
					direction = {azimuth = math.rad(50.0), elevation = math.rad(0)}, angle_max = math.rad(160.0), angle_min = math.rad(0),
				},
				{	-- Starboard wingtip, aft facing
					typename = "Spot", position = { -6.984, 0.45, 16.16 }, --connector = "BANO_00",
					controller = "VariablePatternStrobe", mode = "2 Flash Long",
					proto = lamp_prototypes.MPS_1, intensity_max = 400.0, period = 0.6, phase_shift = 0.0,
					direction = {azimuth = math.rad(180.0), elevation = math.rad(0)}, angle_max = math.rad(160.0), angle_min = math.rad(0),
				},
				{	-- Tip of tailcone (on MD-83, but not DC-9)
					typename = "Spot", position = { -18.984, 1.366, 0 },
					controller = "VariablePatternStrobe", mode = "2 Flash Long",
					proto = lamp_prototypes.MPS_1, intensity_max = 400.0, period = 0.6, phase_shift = 0.0,
					direction = {azimuth = math.rad(180.0), elevation = math.rad(0)}, angle_max = math.rad(160.0), angle_min = math.rad(0),
				},
			},
		},
		[WOLALIGHT_BEACONS] = { typename = "collection",
			lights = {
				{typename  = "strobelight", connector =  "RED_BEACON"  ,argument =  83, 
					proto = lamp_prototypes.MSL_3_2, emitter_shift_x = -0.25, period = 4/3},
				{typename  = "strobelight", connector =  "RED_BEACON_2",argument =  83, 
					proto = lamp_prototypes.MSL_3_2, emitter_shift_x = -0.25, period = 4/3},
			},
		},
		[WOLALIGHT_NAVLIGHTS] = { typename = "collection",
			lights = {
				{
					typename = "Spot", connector = "BANO_0", dir_correction = {azimuth = math.rad(180.0)}, argument = 192,
					proto = lamp_prototypes.HS_2A, angle_max = math.rad(180.0), angle_min = math.rad(170.0),
				},
				{
					typename = "Spot", connector = "BANO_00", dir_correction = {azimuth = math.rad(180.0)},
					proto = lamp_prototypes.HS_2A, angle_max = math.rad(180.0), angle_min = math.rad(170.0),
				},
				{
					typename = "Spot", connector = "BANO_1", dir_correction = {azimuth = math.rad(-45.0), elevation = math.rad(45.0)}, argument = 190,
					proto = lamp_prototypes.BANO_7M_red,
				},
				{
					typename = "Spot", connector = "BANO_2", dir_correction = {azimuth = math.rad(45.0), elevation = math.rad(45.0)}, argument = 191,
					proto = lamp_prototypes.BANO_7M_green,
				},
				{typename = "argumentlight", argument = 68,},		-- Logo Lights ON
			},
		},
		[WOLALIGHT_FORMATION_LIGHTS] = { typename = "collection", 	-- Nav Lights always ON in flights gimick
			lights = {
				{typename = "argumentlight", argument = 192,},
				{typename = "argumentlight", argument = 190,},
				{typename = "argumentlight", argument = 191,},
				{typename  = "strobelight", connector =  "RED_BEACON"  ,argument =  83,
					proto = lamp_prototypes.MSL_3_2, emitter_shift_x = -0.25, period = 4/3},
				{typename  = "strobelight", connector =  "RED_BEACON_2",argument =  83,
					proto = lamp_prototypes.MSL_3_2, emitter_shift_x = -0.25, period = 4/3},
			},
		},
		[WOLALIGHT_SPOTS] = { typename = "collection",	-- Landing Lights
			lights = {
				{
					typename = "Spot", connector = "RESERV2_SPOT_PTR", dir_correction = {azimuth = math.rad(-2.0), elevation = math.rad(4.5)}, argument = 208,
					proto = lamp_prototypes.LFS_P_27_600, angle_max = math.rad(21.0), angle_min = math.rad(0),
					cool_down_t = 0.8, exposure = {{0, 0.9, 1.0}},
				},
				{
					typename = "Omni", connector = "RESERV2_SPOT_PTR", pos_correction = {0.3, 0.0, 0.0},
					proto = lamp_prototypes.LFS_P_27_600, range = 6.0,
				},
				{
					typename = "Spot", connector = "RESERV1_SPOT_PTR", dir_correction = {azimuth = math.rad(2.0), elevation = math.rad(4.5)},
					proto = lamp_prototypes.LFS_P_27_600, angle_max = math.rad(21.0), angle_min = math.rad(0),
					cool_down_t = 0.8, exposure = {{0, 0.9, 1.0}},
				},
				{
					typename = "Omni", connector = "RESERV1_SPOT_PTR", pos_correction = {0.3, 0.0, 0.0},
					proto = lamp_prototypes.LFS_P_27_600, range = 6.0,
				},
				{
					typename = "Spot", connector = "MAIN1_SPOT_PTR", dir_correction = {azimuth = math.rad(0.0), elevation = math.rad(4.0)},
					proto = lamp_prototypes.LFS_P_27_600, angle_max = math.rad(21.0), angle_min = math.rad(0), movable = true,
					cool_down_t = 0.8, exposure = {{0, 0.9, 1.0}},
				},
				{
					typename = "Omni", connector = "MAIN1_SPOT_PTR", pos_correction = {0.3, 0.0, 0.0},
					proto = lamp_prototypes.LFS_R_27_180, range = 6.0,
				},
				-- {
					-- typename = "Spot", connector = "GRD_FLL1_PTR", dir_correction = {azimuth = math.rad(-45.0), elevation = math.rad(6.0)},
					-- proto = lamp_prototypes.LFS_R_27_180, angle_max = math.rad(75), angle_min = math.rad(0),
					-- cool_down_t = 0.8, exposure = {{0, 0.9, 1.0}},
				-- },
				-- {
					-- typename = "Spot", connector = "GRD_FLL2_PTR", dir_correction = {azimuth = math.rad(45.0), elevation = math.rad(6.0)},
					-- proto = lamp_prototypes.LFS_R_27_180, angle_max = math.rad(75), angle_min = math.rad(0),
					-- cool_down_t = 0.8, exposure = {{0, 0.9, 1.0}},
				-- },
			},
		},
		[WOLALIGHT_TAXI_LIGHTS] = { typename = "collection",
			lights = {
				{
					typename = "Spot", connector = "MAIN2_SPOT_PTR", dir_correction = {azimuth = math.rad(0.0), elevation = math.rad(2.0)}, argument = 209,
					proto = lamp_prototypes.LFS_R_27_180, angle_max = math.rad(45), angle_min = math.rad(0), movable = true,
					cool_down_t = 0.8, exposure = {{0, 0.9, 1.0}},
				},
				{
					typename = "Omni", connector = "MAIN2_SPOT_PTR", pos_correction = {0.3, 0.0, 0.0},
					proto = lamp_prototypes.LFS_R_27_180, range = 6.0,
				},
				{
					typename = "Spot", connector = "GRD_FLL1_PTR", dir_correction = {azimuth = math.rad(-45.0), elevation = math.rad(6.0)},
					proto = lamp_prototypes.LFS_R_27_180, angle_max = math.rad(75), angle_min = math.rad(0),
					cool_down_t = 0.8, exposure = {{0, 0.9, 1.0}},
				},
				{
					typename = "Spot", connector = "GRD_FLL2_PTR", dir_correction = {azimuth = math.rad(45.0), elevation = math.rad(6.0)},
					proto = lamp_prototypes.LFS_R_27_180, angle_max = math.rad(75), angle_min = math.rad(0),
					cool_down_t = 0.8, exposure = {{0, 0.9, 1.0}},
				},
			},
		},
		[WOLALIGHT_CABIN_NIGHT] = { typename = "collection",
			lights = {
				{typename = "argumentlight", argument = 69,},
			},
		},
		[WOLALIGHT_AUX_LIGHTS] = { typename = "collection",
			lights = {
				{typename = "argumentlight", argument = 68,},		-- Logo Lights ON
				
				{	-- Port wingtip, forward quarter
					typename = "Spot", position = { -6.07, 0.511675, -16.15 }, -- connector = "BANO_1",
					controller = "VariablePatternStrobe", mode = "2 Flash Long",
					proto = lamp_prototypes.MPS_1, intensity_max = 400.0, period = 0.6, phase_shift = 0.0,
					direction = {azimuth = math.rad(-50.0), elevation = math.rad(0)}, angle_max = math.rad(160.0), angle_min = math.rad(0),
				},
				{	-- Port wingtip, aft facing
					typename = "Spot", position = { -6.984, 0.45, -16.16 }, -- connector = "BANO_0",
					controller = "VariablePatternStrobe", mode = "2 Flash Long",
					proto = lamp_prototypes.MPS_1, intensity_max = 400.0, period = 0.6, phase_shift = 0.0,
					direction = {azimuth = math.rad(-180.0), elevation = math.rad(0)}, angle_max = math.rad(160.0), angle_min = math.rad(0),
				},
				{	-- Starboard wingtip, forward quarter
					typename = "Spot", position = { -6.07, 0.511675, 16.15 }, --connector = "BANO_2",
					controller = "VariablePatternStrobe", mode = "2 Flash Long",
					proto = lamp_prototypes.MPS_1, intensity_max = 400.0, period = 0.6, phase_shift = 0.0,
					direction = {azimuth = math.rad(50.0), elevation = math.rad(0)}, angle_max = math.rad(160.0), angle_min = math.rad(0),
				},
				{	-- Starboard wingtip, aft facing
					typename = "Spot", position = { -6.984, 0.45, 16.16 }, --connector = "BANO_00",
					controller = "VariablePatternStrobe", mode = "2 Flash Long",
					proto = lamp_prototypes.MPS_1, intensity_max = 400.0, period = 0.6, phase_shift = 0.0,
					direction = {azimuth = math.rad(180.0), elevation = math.rad(0)}, angle_max = math.rad(160.0), angle_min = math.rad(0),
				},
				{	-- Tip of tailcone (on MD-83, but not DC-9)
					typename = "Spot", position = { -18.984, 1.366, 0 },
					controller = "VariablePatternStrobe", mode = "2 Flash Long",
					proto = lamp_prototypes.MPS_1, intensity_max = 400.0, period = 0.6, phase_shift = 0.0,
					direction = {azimuth = math.rad(180.0), elevation = math.rad(0)}, angle_max = math.rad(160.0), angle_min = math.rad(0),
				},
			},
		},
	}},
}

add_aircraft(TTJ_MD_83)