Based on the provided code, I'll break down how the air tasking manager (ATM) builds missions in FreeFalcon. Here's a detailed analysis:
Mission Request Creation:
The process starts with a MissionRequestClass object that contains key parameters:
Target ID and location
Requesting entity ID
Mission type (from MissionTypeEnum - AMIS_BARCAP, AMIS_STRIKE, etc.)
Team/side requesting the mission
Time on Target (TOT)
Priority
Required aircraft capabilities
Context (why the mission is being requested)
Mission Data Configuration:
Each mission type has predefined parameters in the MissionData array that specify:
cpp
struct MissionDataType {
uchar type; // Mission type
uchar target; // Target type (location, unit, objective)
uchar skill; // Required pilot skill
uchar mission_profile; // Allowable profiles (high/low altitude)
uchar target_profile; // Type of target profile
uchar target_desc; // When to use target action
uchar routewp; // Waypoint type along route
uchar targetwp; // Action at target location
short minalt; // Minimum altitude at target
short maxalt; // Maximum altitude at target
short missionalt; // Suggested mission altitude
short separation; // Separation from main flight
short [Redacted Person]; // [Redacted Person] time in minutes
[Redacted Address]; // Typical aircraft strength
uchar min_time; // Minimum planning time
uchar max_time; // Maximum planning time
uchar escorttype; // Type of escort needed
uchar mindistance; // Minimum distance between similar missions
uchar mintime; // Minimum time between missions
uchar caps; // Special capabilities required
ulong flags; // Additional flags
};
Mission Planning Parameters:
The ATM uses several key parameters to control mission planning:
cpp
- IMMEDIATE_MIN_TIME/MAX_TIME: Planning window for immediate missions
- LONGRANGE_MIN_TIME/MAX_TIME: Planning window for long-range missions
- ATM_ASSIGN_RATIO: Aircraft assignment ratio
- MAX_FLYMISSION_THREAT: Maximum acceptable threat levels
- MIN_AP_DISTANCE: Minimum assembly point distance
- BREAKPOINT_DISTANCE: Distance for break points
- SWEEP_DISTANCE: Radius for sweep missions
Mission Building Process:
The ATM:
a) Validates the request against Rules of Engagement (RoE)
b) Checks for available aircraft with required capabilities
c) Plans the mission route including:
Assembly points
Ingress routes
Target approach
Egress routes
Rally points
Support Elements:
The ATM automatically adds support elements based on mission flags:
cpp
AMIS_ADDAWACS : Request AWACS support
AMIS_ADDJSTAR : Request JSTAR support
AMIS_ADDECM : Request ECM support
AMIS_ADDBDA : Request Battle Damage Assessment
AMIS_ADDESCORT : Request fighter escort
AMIS_ADDSEAD : Request SEAD (Suppression of Enemy Air Defenses)
AMIS_ADDTANKER : Add aerial refueling support
Threat Assessment:
The ATM evaluates threats along the route and may:
Adjust mission profiles (high/low altitude)
Add escort missions
Add SEAD missions
Modify ingress/egress routes to avoid threats
Time Planning:
The ATM handles timing aspects:
cpp
- Mission start time
- Time on Target (TOT)
- Package timing and coordination
- Support asset timing
Package Building:
For complex missions, the ATM builds packages that include:
Main strike/mission elements
Escort flights
SEAD elements
Support elements (tankers, AWACS)
All coordinated with proper timing and spacing.
The process is highly configurable through the campaign's .AII (AI Input) files, allowing mission parameters to be tuned for different scenarios and campaigns.
Note: The code shows this is a sophisticated system that tries to realistically model air operations planning, taking into account many real-world factors like threat assessment, support requirements, and mission coordination.