DetectionSetGroup = SET_GROUP:New()
DetectionSetGroup:FilterPrefixes( "BEW" )
DetectionSetGroup:FilterStart()

Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 )

DetectionSetGroup1 = SET_GROUP:New()
DetectionSetGroup1:FilterPrefixes( "JTAC" )
DetectionSetGroup1:FilterStart()

Detection1 = DETECTION_AREAS:New( DetectionSetGroup1, 30000 )

A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
A2GDispatcher = AI_A2G_DISPATCHER:New( Detection1 )

A2ADispatcher:SetDefaultTakeoffFromParkingCold()
A2ADispatcher:SetDefaultLandingAtEngineShutdown()

A2GDispatcher:SetDefaultTakeoffFromParkingCold()
A2GDispatcher:SetDefaultLandingAtEngineShutdown()
A2GDispatcher:SetDefenseReactivityHigh()
A2GDispatcher:SetSquadron( "SQ2", "CV75", { "F18G1", "G1", "G2", "G3", } )
A2GDispatcher:SetSquadron( "SQ3", "CV75", { "F18G1", "G1", "G2", "G3", } )

A2ADispatcher:SetEngageRadius()

A2ADispatcher:SetSquadron( "SQ1", "CV75",  { "F18A1", "F14A1", "A1", "A2", "A3", } )
--A2ADispatcher:SetSquadron( "SQ2", "CV75",  { "F18G1" } )
--A2ADispatcher:SetSquadron( "SQ3", "CV75",  { "F14A1" } )


--A2ADispatcher:SetSquadronGrouping( "SQ3", 2)

A2ADispatcher:SetSquadronGrouping( "SQ1", math.random(2, 4) )
A2GDispatcher:SetSquadronGrouping( "SQ2", math.random(2, 4) )
A2GDispatcher:SetSquadronGrouping( "SQ3", math.random(2, 4) )

TARGETAREA= ZONE:New( "TARGETAREA")

A2ADispatcher:SetSquadronCap( "SQ1", TARGETAREA, 20000, 30000, 600, 800, 1000, 1300, "BARO" )
A2GDispatcher:SetSquadronBaiPatrol( "SQ2", TARGETAREA, 10000, 20000, 250, 300, 250, 300, "BARO" )
A2GDispatcher:SetSquadronBaiPatrol( "SQ3", TARGETAREA, 10000, 20000, 250, 300, 250, 300, "BARO" )

A2ADispatcher:SetSquadronCapInterval( "SQ1", 2, 450, 900, 1 )
A2GDispatcher:SetSquadronBaiPatrolInterval( "SQ2", 2, 450, 900, 1, "BAI" )
A2GDispatcher:SetSquadronBaiPatrolInterval( "SQ3", 2, 450, 900, 1, "BAI" )

A2ADispatcher:SetSquadronFuelThreshold( "SQ1", 0.5 )
A2GDispatcher:SetSquadronFuelThreshold( "SQ2", 0.5 )
A2GDispatcher:SetSquadronFuelThreshold( "SQ3", 0.5 )

A2ADispatcher:SetTacticalDisplay(false)
A2GDispatcher:SetTacticalDisplay(false)

A2ADispatcher:Start()
A2GDispatcher:Start()

--Clean = CLEANUP_AIRBASE:New( "CV75" )
--Clean:SetCleanMissiles( false )
