@ -11,6 +11,11 @@ var launcher_align_to_target = 1;
var align_speed_dps = 20;
var radar_elevation_above_terrain_m = 25;
var radar_lowest_pitch = -5;# 0.5 degs = roughly 925 feet at 20 nm, 25 feet at half a nm. # 0.35 = roughly 925 feet at 20 nm, 25 feet at half a nm.
var radar_off_time_min = 30;# When turning off to lure enemies into engagement zone, and to not make the SAM too easy to find, minimum turn off this duration.
var radar_off_time_max = 90;# Bigger missile_max_distance give crew incentive to keep this a bit longer
var radar_on_time = 45;# Minimum the time it would take to scan whole sky
var radar_on_after_detect_time = 180;# Crew is alert after spotting an aircraft, how long should they stay that way?
var can_detect_anti_rad = 0.5;# 0.5 very good, 0 not at all.
#reaction tme for s-300p is 28 secs acording to http://www.astronautix.com/s/s-300p.html
# sounds a bit high for pmu, as its 4 secs for s-400
var semi_active_track = nil;# with multiple missiles flying in semi-active-radar mode, this can change rather fast. Which means pilots wont get a steady tone, but disrupted tones. (tradeoff)
var mutexLock = thread.newlock();
var radarStatus = 0;# Current radar status.
var radarOnTimestamp = -500;# Last timestamp of when the radar was online
var radarOffTimestamp = -500;# Last timestamp of when the radar was offline
var radarOffDuration = radar_off_time_min;
var radarTrackTime = 0;# Last time stamp where any enemy aircraft has been spotted.
# is plane in range, do we still have missiles, and is a missile already inbound, and has it been 4 seconds since the last missile launch?
var trigger = mp[1];
#print("dist to target = " ~ dist_to_target);
var lu = lookup(mp[0].getNode("callsign").getValue());
if ( launch_in_progress == 0 and trigger == true and lu != nil and lu.in_air < same_target_max_missiles and !lu.tracking and ACTIVE_MISSILE <= NUM_MISSILES and ( systime() - missile_delay_time > fire_minimum_interval ) ) { #
#### ... FOR THE MISSILE ####
#print("callsign " ~ cs ~ " found at " ~ dist_to_target);
# is plane in range, do we still have missiles, and is a missile already inbound, and has it been 4 seconds since the last missile launch?
var trigger = mp[1];
#print("dist to target = " ~ dist_to_target);
var lu = lookup(mp[0].getNode("callsign").getValue());
if ( launch_in_progress == 0 and trigger == true and lu != nil and lu.in_air < same_target_max_missiles and !lu.tracking and ACTIVE_MISSILE <= NUM_MISSILES and ( systime() - missile_delay_time > fire_minimum_interval ) ) { #
#### ... FOR THE MISSILE ####
#print("callsign " ~ cs ~ " found at " ~ dist_to_target);
@ -11,6 +11,11 @@ var launcher_align_to_target = 1;
var align_speed_dps = 20;
var radar_elevation_above_terrain_m = 25;
var radar_lowest_pitch = 3.5;# 0.5 degs = roughly 925 feet at 20 nm, 25 feet at half a nm. # 0.35 = roughly 925 feet at 20 nm, 25 feet at half a nm.
var radar_off_time_min = 15;# When turning off to lure enemies into engagement zone, and to not make the SAM too easy to find, minimum turn off this duration.
var radar_off_time_max = 45;# Bigger missile_max_distance give crew incentive to keep this a bit longer
var radar_on_time = 90;# Minimum the time it would take to scan whole sky
var radar_on_after_detect_time = 240;# Crew is alert after spotting an aircraft, how long should they stay that way?
var can_detect_anti_rad = 0.05;# 0.5 very good, 0 not at all.
#reaction tme for s-300p is 28 secs acording to http://www.astronautix.com/s/s-300p.html
# sounds a bit high for pmu, as its 4 secs for s-400
var semi_active_track = nil;# with multiple missiles flying in semi-active-radar mode, this can change rather fast. Which means pilots wont get a steady tone, but disrupted tones. (tradeoff)
var mutexLock = thread.newlock();
var radarStatus = 0;# Current radar status.
var radarOnTimestamp = -500;# Last timestamp of when the radar was online
var radarOffTimestamp = -500;# Last timestamp of when the radar was offline
var radarOffDuration = radar_off_time_min;
var radarTrackTime = 0;# Last time stamp where any enemy aircraft has been spotted.
# is plane in range, do we still have missiles, and is a missile already inbound, and has it been 4 seconds since the last missile launch?
var trigger = mp[1];
#print("dist to target = " ~ dist_to_target);
var lu = lookup(mp[0].getNode("callsign").getValue());
if ( launch_in_progress == 0 and trigger == true and lu != nil and lu.in_air < same_target_max_missiles and !lu.tracking and ACTIVE_MISSILE <= NUM_MISSILES and ( systime() - missile_delay_time > fire_minimum_interval ) ) { #
#### ... FOR THE MISSILE ####
#print("callsign " ~ cs ~ " found at " ~ dist_to_target);
# is plane in range, do we still have missiles, and is a missile already inbound, and has it been 4 seconds since the last missile launch?
var trigger = mp[1];
#print("dist to target = " ~ dist_to_target);
var lu = lookup(mp[0].getNode("callsign").getValue());
if ( launch_in_progress == 0 and trigger == true and lu != nil and lu.in_air < same_target_max_missiles and !lu.tracking and ACTIVE_MISSILE <= NUM_MISSILES and ( systime() - missile_delay_time > fire_minimum_interval ) ) { #
#### ... FOR THE MISSILE ####
#print("callsign " ~ cs ~ " found at " ~ dist_to_target);
@ -12,6 +12,11 @@ var launcher_align_to_target = 1;
var align_speed_dps = 20;
var radar_elevation_above_terrain_m = 10;#estimate
var radar_lowest_pitch = 0.1;# 0.5 degs = roughly 925 feet at 20 nm, 25 feet at half a nm. # 0.35 = roughly 925 feet at 20 nm, 25 feet at half a nm.
var radar_off_time_min = 0;# When turning off to lure enemies into engagement zone, and to not make the SAM too easy to find, minimum turn off this duration.
var radar_off_time_max = 0;# Bigger missile_max_distance give crew incentive to keep this a bit longer
var radar_on_time = 45;# Minimum the time it would take to scan whole sky
var radar_on_after_detect_time = 180;# Crew is alert after spotting an aircraft, how long should they stay that way?
var can_detect_anti_rad = 0.05;# 0.5 very good, 0 not at all.
#reaction tme for s-300p is 28 secs acording to http://www.astronautix.com/s/s-300p.html
# sounds a bit high for pmu, as its 4 secs for s-400
var semi_active_track = nil;# with multiple missiles flying in semi-active-radar mode, this can change rather fast. Which means pilots wont get a steady tone, but disrupted tones. (tradeoff)
var mutexLock = thread.newlock();
var radarStatus = 0;# Current radar status.
var radarOnTimestamp = -500;# Last timestamp of when the radar was online
var radarOffTimestamp = -500;# Last timestamp of when the radar was offline
var radarOffDuration = radar_off_time_min;
var radarTrackTime = 0;# Last time stamp where any enemy aircraft has been spotted.
# is plane in range, do we still have missiles, and is a missile already inbound, and has it been 4 seconds since the last missile launch?
var trigger = mp[1];
#print("dist to target = " ~ dist_to_target);
var lu = lookup(mp[0].getNode("callsign").getValue());
if ( launch_in_progress == 0 and trigger == true and lu != nil and lu.in_air < same_target_max_missiles and !lu.tracking and ACTIVE_MISSILE <= NUM_MISSILES and ( systime() - missile_delay_time > fire_minimum_interval ) ) { #
#### ... FOR THE MISSILE ####
#print("callsign " ~ cs ~ " found at " ~ dist_to_target);
# is plane in range, do we still have missiles, and is a missile already inbound, and has it been 4 seconds since the last missile launch?
var trigger = mp[1];
#print("dist to target = " ~ dist_to_target);
var lu = lookup(mp[0].getNode("callsign").getValue());
if ( launch_in_progress == 0 and trigger == true and lu != nil and lu.in_air < same_target_max_missiles and !lu.tracking and ACTIVE_MISSILE <= NUM_MISSILES and ( systime() - missile_delay_time > fire_minimum_interval ) ) { #
#### ... FOR THE MISSILE ####
#print("callsign " ~ cs ~ " found at " ~ dist_to_target);