local function F15_aim9_station(number, tp, x, y, z, params, wcs)
	local res = params;
	
	res.Number = number;
	res.Type = tp;
	res.X = x;
	res.Y = y;
	res.Z = z;
	res.Launchers = wcs or {};
	
	res.Launchers[#res.Launchers + 1] = { CLSID = "{6CEB49FC-DED8-4DED-B053-E1F033FF72D3}", arg_increment = -0.1} --AIM-9M
	res.Launchers[#res.Launchers + 1] = { CLSID = "{9BFD8C90-F7AE-4e90-833B-BFD0CED0E536}", arg_increment = -0.1} --AIM-9P
	res.Launchers[#res.Launchers + 1] = { CLSID = "{AIM-9P5}"							  , arg_increment = -0.1} --AIM-9P5
	res.Launchers[#res.Launchers + 1] = { CLSID = "{AIM-9L}"							  , arg_increment = -0.1} --AIM-9L

	return res;
end

return plane( "F-15E", _("F-15E"),
    {
        
        EmptyWeight = "17072",
        MaxFuelWeight = "10246",
        MaxHeight = "19700",
        MaxSpeed = "2650",
        MaxTakeOffWeight = "36741",
        Picture = "F-15E.png",
        Rate = "50",
        Shape = "f-15e",
        WingSpan = "13.05",
        WorldID = 59,
		country_of_origin = "USA",

		-- Countermeasures, 
		passivCounterm = {
			CMDS_Edit = true,
			SingleChargeTotal = 240,
			-- RR-170
			chaff = {default = 120, increment = 30, chargeSz = 1},
			-- MJU-7
			flare = {default = 60, increment = 15, chargeSz = 2}
        },
        
        attribute = {wsType_Air, wsType_Airplane, wsType_Fighter, F_15E,
			"Fighters", "Refuelable", "Datalink", "Link16"
        },
        Categories = {
            pl_cat("{78EFB7A2-FD52-4b57-A6A6-3BF0E1D6555F}", "Interceptor"),
        },
        CanopyGeometry = makeAirplaneCanopyGeometry(LOOK_AVERAGE, LOOK_GOOD, LOOK_GOOD),
        Sensors = {
            RADAR = "AN/APG-63",
            RWR = "Abstract RWR",
            OPTIC = {"Sniper XR FLIR", "Sniper XR CCD TV"},
        },
        Countermeasures = {
            ECM = "AN/ALQ-135"
        },
		EPLRS = true,
		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 },
			{ id = 'radar',  	label = _('RADAR'), 	enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
			--{ id = 'eos',  		label = _('EOS'), 		enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
			--{ id = 'helmet',  	label = _('HELMET'), 	enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
			{ id = 'mlws',  	label = _('MLWS'), 		enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
			{ id = 'rws',  		label = _('RWS'), 		enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
			{ id = 'ecm',   	label = _('ECM'), 		enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
			{ id = 'hud',  		label = _('HUD'), 		enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
			{ id = 'mfd',  		label = _('MFD'), 		enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },		
		},
		HumanRadio = {
			frequency = 124.0,
			modulation = MODULATION_AM
		},
        mapclasskey = "P0091000024",
		pylons_enumeration = {1, 11, 10, 2, 3, 9, 4, 8, 5, 7, 6},
	},
    {
        pylon(1, 0, 0, 0, 0, {use_full_connector_position=true, connector = "Pylon1" },
            {
                { CLSID = "{C8E06185-7CD6-4C90-959F-044679E90751}" },
				{ CLSID = "{5CE2FF2A-645A-4197-B48D-8720AC69394F}" }, --    AIM-9X
                { CLSID = "{40EF17B7-F508-45de-8566-6FFECC0C1AB8}" },
                { CLSID = "{6CEB49FC-DED8-4DED-B053-E1F033FF72D3}" },
                { CLSID = "{9BFD8C90-F7AE-4e90-833B-BFD0CED0E536}" },
                { CLSID = "{A4BCC903-06C8-47bb-9937-A30FEDB4E741}" },
                { CLSID = "{A4BCC903-06C8-47bb-9937-A30FEDB4E742}" },
                { CLSID = "{A4BCC903-06C8-47bb-9937-A30FEDB4E743}" },
                { CLSID = "{A4BCC903-06C8-47bb-9937-A30FEDB4E744}" },
                { CLSID = "{A4BCC903-06C8-47bb-9937-A30FEDB4E745}" },
                { CLSID = "{A4BCC903-06C8-47bb-9937-A30FEDB4E746}" },
				{ CLSID = "{AIS_ASQ_T50}" ,arg_increment = -0.1, attach_point_position = {0.30,  0.0,  0.0}},			-- ACMI pod
            }
        ),
        pylon(2, 0, 0, 0, 0, {use_full_connector_position=true, connector = "Pylon2" },
            {
                { CLSID = "{E1F29B21-F291-4589-9FD8-3272EEC69506}" },
				{ CLSID = "LAU-115_2*LAU-127_AIM-9X"			  }, -- 2xAIM-9X
				{ CLSID = "LAU-115_2*LAU-127_AIM-120C"			  }, -- 2xAIM-120C
            }
        ),
        pylon(3, 0, 0, 0, 0, {use_full_connector_position=true, connector = "Pylon3" },
            {
                { CLSID = "{C8E06185-7CD6-4C90-959F-044679E90751}" },
				{ CLSID = "{5CE2FF2A-645A-4197-B48D-8720AC69394F}" }, --    AIM-9X
                { CLSID = "{40EF17B7-F508-45de-8566-6FFECC0C1AB8}" },
                { CLSID = "{6CEB49FC-DED8-4DED-B053-E1F033FF72D3}" },
                { CLSID = "{9BFD8C90-F7AE-4e90-833B-BFD0CED0E536}" },
            }
        ),
        pylon(4, 0, 0, 0, 0, {use_full_connector_position=true, connector = "Pylon7" },
            {
             	{ CLSID = "{C8E06185-7CD6-4C90-959F-044679E90751}" },
                { CLSID = "{40EF17B7-F508-45de-8566-6FFECC0C1AB8}" },
                { CLSID = "{8D399DDA-FF81-4F14-904D-099B34FE7918}" },
            }
        ),
		pylon(5, 0, 0, 0, 0, {use_full_connector_position=true, connector = "Pylon9" },
            {
				{ CLSID = "{C8E06185-7CD6-4C90-959F-044679E90751}" },
                { CLSID = "{40EF17B7-F508-45de-8566-6FFECC0C1AB8}" },
                { CLSID = "{8D399DDA-FF81-4F14-904D-099B34FE7918}" },
            }
		),
        pylon(6, 0, 0, 0, 0, {use_full_connector_position=true, connector = "Pylon10" },
            {
                { CLSID = "{E1F29B21-F291-4589-9FD8-3272EEC69506}" },
            }
        ),
        pylon(7, 0, 0, 0, 0, {use_full_connector_position=true, connector = "Pylon11" },
            {
               	{ CLSID = "{C8E06185-7CD6-4C90-959F-044679E90751}" },
                { CLSID = "{40EF17B7-F508-45de-8566-6FFECC0C1AB8}" },
                { CLSID = "{8D399DDA-FF81-4F14-904D-099B34FE7918}" },
            }
        ),
		---------
		pylon(8, 0, 0, 0, 0, {use_full_connector_position=true, connector = "Pylon13" },
            {
				{ CLSID = "{C8E06185-7CD6-4C90-959F-044679E90751}" },
                { CLSID = "{40EF17B7-F508-45de-8566-6FFECC0C1AB8}" },
                { CLSID = "{8D399DDA-FF81-4F14-904D-099B34FE7918}" },
            }
		),
        pylon(9, 0, 0, 0, 0, {use_full_connector_position=true, connector = "Pylon17" },
            {
                { CLSID = "{C8E06185-7CD6-4C90-959F-044679E90751}" },
                { CLSID = "{40EF17B7-F508-45de-8566-6FFECC0C1AB8}" },
                { CLSID = "{6CEB49FC-DED8-4DED-B053-E1F033FF72D3}" },
                { CLSID = "{9BFD8C90-F7AE-4e90-833B-BFD0CED0E536}" },
				{ CLSID = "{5CE2FF2A-645A-4197-B48D-8720AC69394F}" }, --    AIM-9X
            }
        ),
        pylon(10, 0, 0, 0, 0, {use_full_connector_position=true, connector = "Pylon18" },
            {
			    { CLSID = "{E1F29B21-F291-4589-9FD8-3272EEC69506}" },
				{ CLSID = "LAU-115_2*LAU-127_AIM-9X"			  }, -- 2xAIM-9X
				{ CLSID = "LAU-115_2*LAU-127_AIM-120C"			  }, -- 2xAIM-120C
            }
        ),
        pylon(11, 0, 0, 0, 0, {use_full_connector_position=true, connector = "Pylon19" },
            {
                { CLSID = "{C8E06185-7CD6-4C90-959F-044679E90751}" },
                { CLSID = "{40EF17B7-F508-45de-8566-6FFECC0C1AB8}" },
                { CLSID = "{6CEB49FC-DED8-4DED-B053-E1F033FF72D3}" },
                { CLSID = "{9BFD8C90-F7AE-4e90-833B-BFD0CED0E536}" },
                { CLSID = "{A4BCC903-06C8-47bb-9937-A30FEDB4E741}" },
                { CLSID = "{A4BCC903-06C8-47bb-9937-A30FEDB4E742}" },
                { CLSID = "{A4BCC903-06C8-47bb-9937-A30FEDB4E743}" },
                { CLSID = "{A4BCC903-06C8-47bb-9937-A30FEDB4E744}" },
                { CLSID = "{A4BCC903-06C8-47bb-9937-A30FEDB4E745}" },
                { CLSID = "{A4BCC903-06C8-47bb-9937-A30FEDB4E746}" },
				{ CLSID = "{5CE2FF2A-645A-4197-B48D-8720AC69394F}" }, --    AIM-9X
				{ CLSID = "{AIS_ASQ_T50}" ,arg_increment = -0.1, attach_point_position = {0.30,  0.0,  0.0}},--ACMI pod
            }
		),
    },  
    {
        aircraft_task(CAP),
        aircraft_task(Escort),
        aircraft_task(FighterSweep),
        aircraft_task(Intercept),
        --aircraft_task(GAI),
        aircraft_task(PinpointStrike),
        aircraft_task(CAS),
        aircraft_task(GroundAttack),
        aircraft_task(RunwayAttack),
        aircraft_task(AFAC),
        aircraft_task(Reconnaissance),
    },
	aircraft_task(GroundAttack)
);
