I'm not clear on what the benefits of four 3-bit codes are other than ease of programming and processing speed.
It's elegant, but might ultimately be extremely limiting especially for ground vehicles, watercraft, and vertol aircraft where the ability to go backwards, straight up or down, or hold still are all options.
You could also get into trouble if you don't carefully define what you mean by "long, medium, short, and "too close." Those distances vary considerably based on the aircraft and weapon systems involved.
Threat Distance
Better to think in tactical distance "bands" set in meters or kilometers and based on weapons systems parameters:
0 - No Threat Detected/Not applicable
1- Over the Horizon - 100+ km. Ranges: Long-ranged ballistic, cruise, or 5th gen SAM missile, 5th gen AWACs radar, satellite communication, radio, ground-based radar, potential threats.
2- On the Horizon - 50+ km. Ranges: short-ranged cruise or guided missile, 4th gen SAM, 5th gen AA missile, 5th gen airborne radar, extreme high level bombing, potential tactical threats. Maneuver threshold for 5th gen fighters. Initial Point for very high level or standoff bombing/cruise missile attacks.
3 - Far Distant - ~20 km. Ranges: Tactical cruise or guided missile, JDAM/guided bombs, 3rd gen SAM, 4th gen AA missile, 4th gen airborne radar, high level bombing, heavy artillery, very heavy ground-based AAA, extreme visual range to detect aircraft under normal VFR. Maneuver threshold for 4th and later gen fighters. Initial point for high level or standoff bombing/guided bomb/guided AtG missile attacks.
4 - Distant - ~10 km. Ranges: Typical artillery or unguided rocket, 2nd gen SAM, 3rd gen AA missile or airborne radar, heavy ground-based AAA, medium level bombing, typical visual range to detect AC under VFR. Attack/avoid maneuver threshold for 1st-3rd gen jets and WW1 to WW2 era fighters. Initial point for medium level bombing, dive bombing, torpedo, and ground attacks.
5 - Far Tactical - ~5 km. Ranges: light artillery or unguided rocket, mortar, 1st gen SAM, 2nd gen AA missile or airborne radar, medium ground-based AAA, extreme heavy aerial cannon, visually guided bombs, advanced aerial torpedos, dive bombing. Tactical maneuvering threshold for WW2-era aircraft (i.e., where sub-units of a formation usually split off in order to gain advantageous position). Attack run initiation point for most bombing, missile, torpedo, or strafing attacks against ground targets.
6 - Distant Tactical - ~2 km. Ranges: extreme light aerial cannon, aerial torpedos, light AAA, low level bombing, glide bombing, extreme unguided Air-to-ground rockets, 1st gen AA missile or airborne radar. Attack run initiation point for opportunistic or hasty bombing, missile, and strafing attacks against ground targets. Attack initiation point for 1st to 3rd Gen jets vs. heavy aircraft. Tactical maneuvering threshold for WW1-era aircraft.
7 - Medium Tactical - ~1 km. Ranges: extreme unguided AA or AtG missiles, skip bombing, low-level strafing, heavy AAMG, extreme light aerial cannon/heavy MG, radar-guided gunsights. Attack initiation point for aerial attacks by WW2-era fighters vs. heavy aircraft/unmaneuvering enemy formations. 1st to 3rd Gen jets typically dogfight at these ranges.
8 - Close Tactical - ~500 m. Ranges: extreme small arms, light AAMG, extreme light aerial MG, aerial light cannon/heavy MG. Initiation point for aerial attacks by WW2-era fighters vs. light aircraft or WW1-era fighters vs. heavy aircraft. WW2-era aircraft typically dogfight at these ranges.
9 - Very Close Tactical - ~200 m., Ranges: small arms, light aerial MG. Initiation point for aerial attacks by WW1-era fighters vs. light aircraft. Optimum attack range for Air-to-Air gunnery attacks using heavy MG/light cannon. Inter-war aircraft might dogfight at these ranges.
10 - Near Contact Tactical - ~10 m. Ranges: thrown or dropped weapons or objects. Optiumum attack range for Air-to-Air gunnery attacks using light MG. Close formation or "buzzing" distances for fast-moving or heavy aircraft. WW1-era aircraft typically dogfight at these ranges.
11 - Contact - ~2 m. Ranges: Close formation or "buzzing" distances for airshows and slow-moving small aircraft, ramming or flipping attacks.
Note that exact distances for various types of maneuver and attacks are notional and are probably incorrect for some weapons/sensor systems.
0-11 gives you 12 options for range. That could be four 3-valued logic options. Players could tweak exact range band distances.
0- Near, 1 - Medium, 2- Far
Near
0 - Contact, 1 - Near Contact Tactical, 2 - Very Close Tactical
etc.
Threat Assessment
Before you can be on the lookout for threats, you have to anticipate them. Combat pilots typically keep a lookout for hypothetical threats as well as actual ones, such as keeping a wary eye on potential ambush sites and directions from which enemy aircraft are likely to come. This is a huge factor that most flight sims ignore. This gives you four options:
0 - Non-Threat, 1 - Threat
Threat
0 - Possible threat (i.e., hypothetical or imagined threats not yet detected), 1 - Detected or known potential threat (e.g., known flak location, unknown AC on the horizon), 3- Confirmed threat.
Priority
Another place where combat flight sims fail is that they don't give options for prioritizing threats.
For example, if you're flying a F-86 over Korea, the Yak-9 that just passed you but which is just 100 m away to your 6 o'clock is a minor threat. You can use your superior speed to escape before he can turn and shoot. On the other hand, the MiG-15 at your 12 o'clock, but 2 km away and 1 km higher is the real threat. Most combat flight sims make AI respond to the nearest plane, meaning that an AI F-86 pilot will turn to dogfight the Yak-9 while ignoring the MiG-15.
Once a threat is detected, it gets prioritized:
0 - No response, 1 - Response Needed.
Response Needed Threat Level
0 - Minor, 1 - Major, 2 - Critical/Priority.
With modifications, threat response level can also be used to program aircraft behavior during in-flight emergencies or while aircrew are distracted or incapacitated. For example, you could program crew to prioritize fire-fighting vs. defensive responses, or program the pilot of a WW1-era fighter to try to unjam his guns or reload a magazine rather than maneuvering for advantageous position.
Threat Direction and Maneuver
It seems more logical from a game design point of view to use the classic clock system to determine threat Direction and Maneuver response. That makes it easier for players to program various maneuvers. Threat Maneuver response usually depends on whether the threat is to the rear, to the flank, or to the front, and whether it's above, below, very high above or below, or slightly above/below.
Height
0 - Low (-10 to -90*), 1 - Level (+/-10*), 2 - High (+10/+90*)
Low
0 - Low (-10 to -45*) 1 - Below (i.e., -45-80* downward from crew's point of view), 2 - Straight down (-80-90*).
High
0 - High (+10 to +45*), 1 - Above (i.e., +45-80* upwards from crew's PoV), 2 - Straight up (+80-90*).
Direction
0 - Forward (forward 120 degree arc), 1 - Flank (left or right 120-degree arc), 2 - Rear (rear 120 degree arc).
Forward
0 - 11 o'clock/330*, 1 - 12 o'clock/0*, 2 - 1 o'clock/30*
Flank
0 - Left, 1 - Right
Flank Left
0 - 10 o'clock/300*, 1 - 9 o'clock/270*, 2 - 8 o'clock/240*
Flank Right
0 - 2 o'clock/60*, 1 - 3 o'clock/90*, 3 - 4 o'clock/120*
Rear
0 - 7 o'clock/210*, 1 - 6 o'clock/180*, 3 - 5 o'clock/150*
Threat Detection
In some ways, it makes more sense to model threat detection based on an percentage-based algorithm based on distance, modified by aircrew skill, and modifiers to detection based on various factors which depend on the threat detection system. This allows players to model various threat recognition system including their weaknesses and blind spots. It also allows a chance that a machine can be "spoofed" or that a pilot can make an incorrect threat assessment.
In any case, there should be a robust system to customize individual aircrew, giving them levels of ability with various "skills" or areas of expertise. Not only does it lay the foundation for concepts necessary human-factors simulation like morale, fatigue, GLOC, hypoxia, etc., but it also allows players to model the behaviors of historical (or fictional) aircrew. For example, Manfred Von Richtofen should spot the enemy early, maneuver his squadron for advantageous position, and then try to hang out above and on the edges of the ensuing "furball," with a keen assessment of which comrades need help, and which enemies have lost situational awareness and are in an advantageous position to be attacked. By contrast, an ace like Werner Voss might dive right into the furball, use his superior situational awareness to mentally keep track of the aircraft around him, and his fantastic areobatics skills to gain position.
As a very rough guess, % visual detection = (skill + sighting aids - sighting penalties)/range.
Threat/Object Identification
This is another area where most flight sims fail. Just because you detect something doesn't necessarily mean that you know what it is. Adding a separate step to recognize a threat allows for friendly fire incidents. Slightly modified, it also can indicate that a plane gets lost because its crew fails to recognize certain waypoints. It could also be modified slightly to make low-flying aircraft using VFR use the classic "IFR - I Follow Roads" navigation technique, or to have aircraft orient themselves towards ground objects such as lights, cities, or airfields.
For visual ID, set % target identification to (skill + recognition aids/penalties -range)-100%.
Threat Response
This has to somehow follow (or at least allow) the classic OODA loop. Observation is covered by threat detection and identification. Orientation can be programmed into threat response maneuvering. The range at which the AI Decides and Acts could be set at (skill+modifiers)/+/-10% of optimal, where <0% indicates a failure to decide or act due to confusion, fear, surprise, or insufficient ability or skill.