更新攻打航舰,加油任务效果
This commit is contained in:
94
comm/teamdatalink.txt
Normal file
94
comm/teamdatalink.txt
Normal file
@@ -0,0 +1,94 @@
|
||||
# File generated by Wizard 2.9.0 on Feb 8, 2026.
|
||||
# File generated by Wizard 2.9.0 on Jan 25, 2026.
|
||||
# File generated by Wizard 2.9.0 on Dec 23, 2024.
|
||||
# File generated by Wizard 2.9.0 on Jun 6, 2024.
|
||||
# --------------------------------------------------------------
|
||||
# Vehicle Signatures
|
||||
# --------------------------------------------------------------
|
||||
include_once sensors/radar/acq_radar.txt
|
||||
infrared_signature VEHICLE_INFRARED_SIGNATURE
|
||||
constant 10 watts/steradian
|
||||
end_infrared_signature
|
||||
|
||||
optical_signature VEHICLE_OPTICAL_SIGNATURE
|
||||
constant 10 m^2
|
||||
end_optical_signature
|
||||
|
||||
radar_signature VEHICLE_RADAR_SIGNATURE
|
||||
constant 1 m^2
|
||||
end_radar_signature
|
||||
|
||||
# --------------------------------------------------------------
|
||||
# Red datalink
|
||||
# --------------------------------------------------------------
|
||||
|
||||
comm TEAM_DATALINK WSF_COMM_TRANSCEIVER
|
||||
transfer_rate 100 mbits/sec
|
||||
end_comm
|
||||
#
|
||||
comm CC_DATALINK WSF_RADIO_TRANSCEIVER
|
||||
transmitter
|
||||
antenna_pattern ACQ_RADAR_ANTENNA
|
||||
power 1000.0 kw
|
||||
frequency 3000 mhz
|
||||
internal_loss 2 db
|
||||
bandwidth 237 mhz
|
||||
end_transmitter
|
||||
|
||||
receiver
|
||||
antenna_pattern ACQ_RADAR_ANTENNA
|
||||
bandwidth 2.0 mhz
|
||||
noise_power -160 dbw // will be calibrated for 1 m^2
|
||||
internal_loss 7 db
|
||||
bandwidth 237 mhz
|
||||
end_receiver
|
||||
end_comm
|
||||
|
||||
network red_net WSF_COMM_NETWORK_MESH
|
||||
end_network
|
||||
|
||||
# --------------------------------------------------------------
|
||||
# Filter tactics
|
||||
# --------------------------------------------------------------
|
||||
|
||||
filter FILTER_TACTICS WSF_KALMAN_FILTER
|
||||
range_measurement_sigma 50. m
|
||||
bearing_measurement_sigma 0.1 deg
|
||||
elevation_measurement_sigma 0.1 deg
|
||||
|
||||
// values for maneuvering targets (per Erik)
|
||||
process_noise_sigmas_XYZ 50 50 30
|
||||
end_filter
|
||||
|
||||
|
||||
|
||||
//
|
||||
//the new DATALINK
|
||||
//
|
||||
antenna_pattern DATALINK_ANTENNA
|
||||
uniform_pattern
|
||||
peak_gain 10 dB
|
||||
end_uniform_pattern
|
||||
end_antenna_pattern
|
||||
comm DATALINK WSF_RADIO_TRANSCEIVER
|
||||
maximum_range 50 km
|
||||
transfer_rate 100 mbits/sec
|
||||
transmit_mode continuous
|
||||
|
||||
transmitter
|
||||
power 100 w
|
||||
frequency 1.5 GHz //the matter
|
||||
bandwidth 10 MHz
|
||||
antenna_pattern DATALINK_ANTENNA
|
||||
end_transmitter
|
||||
|
||||
receiver
|
||||
frequency 1.5 GHz
|
||||
bandwidth 10 MHz
|
||||
antenna_pattern DATALINK_ANTENNA
|
||||
end_receiver
|
||||
|
||||
jamming_perception_threshold 3 db
|
||||
jamming_perception_timeout 60 sec
|
||||
end_comm
|
||||
|
||||
37
mission.log
37
mission.log
@@ -0,0 +1,37 @@
|
||||
2026-02-09 02:26:37 file setup.txt
|
||||
2026-02-09 02:26:37 file scenarios/red/airDomin.txt
|
||||
2026-02-09 02:26:37 file platforms/F-16.txt
|
||||
2026-02-09 02:26:37 file signatures/F-16_sig.txt
|
||||
2026-02-09 02:26:37 file signatures/F-16_infrared_sig.txt
|
||||
2026-02-09 02:26:37 file signatures/F-16_optical_sig.txt
|
||||
2026-02-09 02:26:37 file signatures/F-16_radar_sig.txt
|
||||
2026-02-09 02:26:37 file processors/scripts/randomPatrol.txt
|
||||
2026-02-09 02:26:37 file processors/airControl.txt
|
||||
2026-02-09 02:26:37 file sensors/radar/generic_file_control_radar.txt
|
||||
2026-02-09 02:26:37 file processors/randomCirclePatrol.txt
|
||||
2026-02-09 02:26:37 file processors/pathPatrol.txt
|
||||
2026-02-09 02:26:37 file processors/flyZone.txt
|
||||
2026-02-09 02:26:37 file processors/boundsAreaPatrol.txt
|
||||
2026-02-09 02:26:37 file scenarios/blue/airDomin.txt
|
||||
2026-02-09 02:26:37 file weapons/aam/aa_mrm.txt
|
||||
2026-02-09 02:26:37 file sensors/radar/aa_mrm_radar.txt
|
||||
2026-02-09 02:26:37 file processors/aa_intercept.txt
|
||||
2026-02-09 02:26:37 file scenarios/blue/bomber_formation_01.txt
|
||||
2026-02-09 02:26:37 file weapons\ssm\blue_cruise_missile.txt
|
||||
2026-02-09 02:26:37 file platforms/B-1B.txt
|
||||
2026-02-09 02:26:37 file processors/addfuelstate.txt
|
||||
2026-02-09 02:26:37 file sensors/geosensor/geo_sensor.txt
|
||||
2026-02-09 02:26:37 file comm/teamdatalink.txt
|
||||
2026-02-09 02:26:37 file sensors/radar/acq_radar.txt
|
||||
2026-02-09 02:26:37 file weapons/ssm/medium_range_radar_missile.txt
|
||||
2026-02-09 02:26:37 file processors/ucavFire.txt
|
||||
2026-02-09 02:26:37 file platforms/KC-135.txt
|
||||
2026-02-09 02:26:37 file processors/patrol_fuel.txt
|
||||
2026-02-09 02:26:37 file platforms/BSHIP.txt
|
||||
2026-02-09 02:26:37 file scenarios/red/hangmu.txt
|
||||
2026-02-09 02:26:37 version wsf 2.9.0
|
||||
2026-02-09 02:26:37 file setup.txt
|
||||
2026-02-09 02:26:37 AER output file: output/vPure.aer
|
||||
2026-02-09 02:26:37 Event output file: output/vPure.evt
|
||||
2026-02-09 02:26:37 start 1
|
||||
2026-02-09 02:26:40 complete 28800.001 2.207 2.266
|
||||
|
||||
BIN
output/vPure.aer
BIN
output/vPure.aer
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
2025-01-31 11:28:27 version wsf 2.9.0
|
||||
2025-01-31 11:28:27 file C:\Users\27173\Desktop\xd1\xd1_vPure\setup.txt
|
||||
2025-01-31 11:28:27 AER output file: output/vPure.aer
|
||||
2025-01-31 11:28:27 Event output file: output/vPure.evt
|
||||
2025-01-31 11:28:27 start 1
|
||||
2025-01-31 11:29:07 terminated 2674.579 40.148 31.125
|
||||
2026-02-09 02:26:37 version wsf 2.9.0
|
||||
2026-02-09 02:26:37 file setup.txt
|
||||
2026-02-09 02:26:37 AER output file: output/vPure.aer
|
||||
2026-02-09 02:26:37 Event output file: output/vPure.evt
|
||||
2026-02-09 02:26:37 start 1
|
||||
2026-02-09 02:26:40 complete 28800.001 2.207 2.266
|
||||
|
||||
98
platforms/B-1B.txt
Normal file
98
platforms/B-1B.txt
Normal file
@@ -0,0 +1,98 @@
|
||||
include_once processors/addfuelstate.txt
|
||||
include_once sensors/geosensor/geo_sensor.txt
|
||||
include_once comm/teamdatalink.txt
|
||||
|
||||
include_once weapons/ssm/medium_range_radar_missile.txt
|
||||
|
||||
include_once processors/ucavFire.txt
|
||||
|
||||
platform_type B-1B WSF_PLATFORM
|
||||
# infrared_signature VEHICLE_INFRARED_SIGNATURE
|
||||
# optical_signature VEHICLE_OPTICAL_SIGNATURE
|
||||
# radar_signature VEHICLE_RADAR_SIGNATURE
|
||||
category airplane
|
||||
icon f16
|
||||
side blue
|
||||
script_variables
|
||||
WsfTrack targetTrack;
|
||||
double startaTime = 0;
|
||||
double endaTime;
|
||||
double lastTime = 10;
|
||||
end_script_variables
|
||||
|
||||
script_variables
|
||||
string sojZoneName = "";
|
||||
|
||||
string plat1Name = "";
|
||||
string plat2Name = "";
|
||||
|
||||
double orbitLength = 20000000;
|
||||
string state = "";
|
||||
end_script_variables
|
||||
processor data_mgr WSF_TRACK_PROCESSOR
|
||||
purge_interval 60 sec
|
||||
update_interval 1 sec
|
||||
end_processor
|
||||
commander shipblue
|
||||
//! comm
|
||||
comm sub_net TEAM_DATALINK
|
||||
network_name red_net
|
||||
internal_link track_manager
|
||||
internal_link data_mgr
|
||||
internal_link task_mgr
|
||||
end_comm
|
||||
processor task_mgr ucavFire
|
||||
script_variables
|
||||
SENSOR_NAME = "sensor1";
|
||||
WEAPON_NAME = "agm";
|
||||
end_script_variables
|
||||
operating_level ENGAGE 0
|
||||
end_processor
|
||||
processor track_manager WSF_TRACK_PROCESSOR
|
||||
purge_interval 60 sec
|
||||
report_interval 5 sec
|
||||
report_method batch
|
||||
report_to commander via sub_net
|
||||
end_processor
|
||||
mover WSF_AIR_MOVER
|
||||
update_interval 1 seconds
|
||||
maximum_impact_speed 300 m/s
|
||||
altitude_offset 20 meters
|
||||
at_end_of_path stop
|
||||
turn_failure_threshold 0.01
|
||||
bank_angle_limit 5 degrees
|
||||
heading_pursuit_gain 5
|
||||
maximum_flight_path_angle 70 degrees
|
||||
maximum_linear_acceleration 6 g
|
||||
maximum_radial_acceleration 6 g
|
||||
maximum_altitude 50000 ft
|
||||
minimum_altitude 10000 ft
|
||||
maximum_speed 900 m/s
|
||||
minimum_speed 300 m/s
|
||||
speed_variance_percent 0.0
|
||||
roll_rate_limit 1 rad/sec
|
||||
maximum_climb_rate 365 m/s
|
||||
default_linear_acceleration 1 g
|
||||
default_radial_acceleration 9 g
|
||||
default_climb_rate 122 m/s
|
||||
end_mover
|
||||
|
||||
fuel WSF_VARIABLE_RATE_FUEL
|
||||
rate 0.5 kg/s
|
||||
maximum_quantity 3160 kg
|
||||
initial_quantity 3160 kg
|
||||
end_fuel
|
||||
|
||||
sensor sensor1 common_geo_radar
|
||||
on
|
||||
maximum_range 150 km
|
||||
ignore_same_side
|
||||
internal_link data_mgr
|
||||
internal_link track_manager
|
||||
internal_link task_mgr
|
||||
end_sensor
|
||||
weapon agm MEDIUM_RANGE_RADAR_MISSILE_B-1B
|
||||
quantity 2
|
||||
internal_link task_mgr
|
||||
end_weapon
|
||||
end_platform_type
|
||||
35
platforms/BSHIP.txt
Normal file
35
platforms/BSHIP.txt
Normal file
@@ -0,0 +1,35 @@
|
||||
# File generated by Wizard 2.9.0 on Feb 9, 2026.
|
||||
include_once processors/ucavFire.txt
|
||||
|
||||
platform_type BSHIP WSF_PLATFORM
|
||||
icon ship
|
||||
|
||||
infrared_signature VEHICLE_INFRARED_SIGNATURE
|
||||
optical_signature VEHICLE_OPTICAL_SIGNATURE
|
||||
radar_signature VEHICLE_RADAR_SIGNATURE
|
||||
commander SELF
|
||||
processor data_mgr WSF_TRACK_PROCESSOR
|
||||
purge_interval 60 sec
|
||||
update_interval 1 sec
|
||||
end_processor
|
||||
|
||||
processor track_manager WSF_TRACK_PROCESSOR
|
||||
purge_interval 60 sec
|
||||
report_interval 5 sec
|
||||
report_method batch
|
||||
report_to commander via sub_net
|
||||
end_processor
|
||||
|
||||
comm sub_net TEAM_DATALINK
|
||||
network_name red_net
|
||||
internal_link track_manager
|
||||
internal_link data_mgr
|
||||
end_comm
|
||||
|
||||
processor task_mgr ucavFire
|
||||
script_variables
|
||||
SENSOR_NAME = "sensor1";
|
||||
WEAPON_NAME = "agm";
|
||||
end_script_variables
|
||||
end_processor
|
||||
end_platform_type
|
||||
61
platforms/KC-135.txt
Normal file
61
platforms/KC-135.txt
Normal file
@@ -0,0 +1,61 @@
|
||||
# File generated by Wizard 2.9.0 on Feb 3, 2026.
|
||||
platform_type YY20 WSF_PLATFORM
|
||||
icon tanker
|
||||
side red
|
||||
infrared_signature VEHICLE_INFRARED_SIGNATURE
|
||||
optical_signature VEHICLE_OPTICAL_SIGNATURE
|
||||
radar_signature VEHICLE_RADAR_SIGNATURE
|
||||
|
||||
mover WSF_AIR_MOVER
|
||||
update_interval 1 seconds
|
||||
maximum_impact_speed 300 m/s
|
||||
altitude_offset 20 meters
|
||||
at_end_of_path stop
|
||||
turn_failure_threshold 0.01
|
||||
bank_angle_limit 5 degrees
|
||||
heading_pursuit_gain 5
|
||||
maximum_flight_path_angle 70 degrees
|
||||
maximum_linear_acceleration 6 g
|
||||
maximum_radial_acceleration 6 g
|
||||
maximum_altitude 50000 ft
|
||||
minimum_altitude 50 ft
|
||||
maximum_speed 450 m/s
|
||||
minimum_speed 300 m/s
|
||||
speed_variance_percent 0.0
|
||||
roll_rate_limit 1 rad/sec
|
||||
maximum_climb_rate 365 m/s
|
||||
default_linear_acceleration 1 g
|
||||
default_radial_acceleration 6.5 g
|
||||
default_climb_rate 122 m/s
|
||||
end_mover
|
||||
|
||||
sensor eo_ir_sensor common_geo_radar
|
||||
on
|
||||
internal_link track_manager
|
||||
internal_link data_mgr
|
||||
ignore_same_side
|
||||
end_sensor
|
||||
|
||||
comm sub_net TEAM_DATALINK
|
||||
network_name red_net
|
||||
internal_link track_manager
|
||||
internal_link data_mgr
|
||||
end_comm
|
||||
processor track_manager WSF_TRACK_PROCESSOR
|
||||
purge_interval 60 sec
|
||||
report_interval 5 sec
|
||||
report_method batch
|
||||
report_to commander via sub_net
|
||||
end_processor
|
||||
fuel WSF_VARIABLE_RATE_FUEL
|
||||
rate 0.5 kg/s
|
||||
maximum_quantity 99999 kg
|
||||
initial_quantity 99999 kg
|
||||
bingo_quantity 2000 kg
|
||||
end_fuel
|
||||
|
||||
processor data_mgr WSF_TRACK_PROCESSOR
|
||||
purge_interval 60 sec
|
||||
update_interval 1 sec
|
||||
end_processor
|
||||
end_platform_type
|
||||
364
processors/addfuelstate.txt
Normal file
364
processors/addfuelstate.txt
Normal file
@@ -0,0 +1,364 @@
|
||||
# File generated by Wizard 2.9.0 on Feb 8, 2026.
|
||||
# File generated by Wizard 2.9.0 on Feb 3, 2026.
|
||||
# File generated by Wizard 2.9.0 on Dec 26, 2024.
|
||||
processor sta WSF_SCRIPT_PROCESSOR
|
||||
update_interval 10 s
|
||||
|
||||
script_variables
|
||||
double orbitLength = 20000000;
|
||||
string state = "";
|
||||
//
|
||||
string PointOrName1 = "XL04";
|
||||
string zoneType1 = "polygon";
|
||||
double Radius = 50000;
|
||||
bool iscrea = false;
|
||||
bool isaddfuel = false;
|
||||
WsfGeoPoint p1 = WsfGeoPoint.Construct("16:16:24.77n 146:53:27.50e");
|
||||
end_script_variables
|
||||
|
||||
|
||||
script bool RecvTask()
|
||||
bool rev = false;
|
||||
string sojna = PLATFORM->plat1Name;
|
||||
if(sojna.Contains("j"))
|
||||
{
|
||||
rev = true;
|
||||
}
|
||||
return rev;
|
||||
end_script
|
||||
|
||||
|
||||
//
|
||||
//@ flyZone to a point
|
||||
//
|
||||
script void flyZone(string PointOrName,string zoneType)
|
||||
if(zoneType == "circle")
|
||||
{
|
||||
WsfGeoPoint p = p.Construct(PointOrName);
|
||||
PLATFORM.GoToSpeed(1000,999,true);
|
||||
PLATFORM.GoToLocation(p);
|
||||
}
|
||||
else if(zoneType == "polygon")
|
||||
{
|
||||
WsfZone zone = zone.FindZone(PointOrName);
|
||||
PLATFORM.GoToSpeed(1000,999,true);
|
||||
PLATFORM.GoToLocation(zone.Location());
|
||||
}
|
||||
end_script
|
||||
|
||||
//
|
||||
//@ bool
|
||||
script bool isInZone(string PointOrName,string zoneType)
|
||||
if(zoneType == "circle")
|
||||
{
|
||||
WsfGeoPoint p = p.Construct(PointOrName);
|
||||
return(PLATFORM.Location().GroundRangeTo(p) <= 10);
|
||||
}
|
||||
else if(zoneType == "polygon")
|
||||
{
|
||||
WsfZone zone = zone.FindZone(PointOrName);
|
||||
return(PLATFORM.Location().GroundRangeTo(zone.Location()) <= 10000);
|
||||
}
|
||||
return false;
|
||||
end_script
|
||||
|
||||
|
||||
//
|
||||
// @ generateCirclePoints
|
||||
//
|
||||
script Array<WsfGeoPoint> generateCirclePoints(string Center , double radius)
|
||||
WsfGeoPoint center = WsfGeoPoint.Construct(Center);
|
||||
Array<WsfGeoPoint> circlePoints = {};
|
||||
double earthRadius = 6371000.0;
|
||||
double angularDistance = radius / earthRadius;
|
||||
Array<double> angles = {10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360};
|
||||
foreach(double angle in angles)
|
||||
{
|
||||
double latCenter = center.Latitude() * MATH.PI() / 180.0;
|
||||
double lonCenter = center.Longitude() * MATH.PI() / 180.0;
|
||||
|
||||
double lat = MATH.ASin(MATH.Sin(latCenter)
|
||||
* MATH.Cos(angularDistance)
|
||||
+ MATH.Cos(latCenter)
|
||||
* MATH.Sin(angularDistance)
|
||||
* MATH.Cos(angle));
|
||||
double lon = lonCenter + MATH.ATan2(MATH.Sin(angle)
|
||||
* MATH.Sin(angularDistance)
|
||||
* MATH.Cos(latCenter)
|
||||
,MATH.Cos(angularDistance)
|
||||
- MATH.Sin(latCenter)
|
||||
* MATH.Sin(lat));
|
||||
|
||||
circlePoints.PushBack(WsfGeoPoint.Construct(lat*180.0/MATH.PI(),lon * 180.0 / MATH.PI(),5000));
|
||||
}
|
||||
return circlePoints;
|
||||
end_script
|
||||
|
||||
|
||||
//
|
||||
//@ circle execute
|
||||
//
|
||||
script void executecircularPatrol()
|
||||
Array<WsfGeoPoint> circlePoints = generateCirclePoints(PointOrName1,Radius);
|
||||
WsfRoute route;
|
||||
WsfRoute r1 = route.Create("lx");
|
||||
foreach(WsfGeoPoint vertex in circlePoints)
|
||||
{
|
||||
vertex.SetAltitudeHAE(10000);
|
||||
r1.Append(vertex,1500);
|
||||
}
|
||||
r1.Waypoint(0).SetLabel("start");
|
||||
r1.Waypoint(r1.Size() - 1).SetGoToLabel("start");
|
||||
PLATFORM.FollowRoute(r1);
|
||||
r1.Print();
|
||||
end_script
|
||||
|
||||
|
||||
//
|
||||
// @ bounds execute
|
||||
//
|
||||
script void executeBoundsAreaPatrol()
|
||||
WsfZone zone = zone.FindZone(PointOrName1);
|
||||
Array<WsfGeoPoint> boundsPoints = zone.PolyPoints();
|
||||
WsfRoute route;
|
||||
WsfRoute r1 = route.Create("lx");
|
||||
foreach(WsfGeoPoint vertex in boundsPoints)
|
||||
{
|
||||
vertex.SetAltitudeHAE(10000);
|
||||
r1.Append(vertex,1500);
|
||||
}
|
||||
r1.Waypoint(0).SetLabel("start");
|
||||
r1.Waypoint(r1.Size() - 1).SetGoToLabel("start");
|
||||
PLATFORM.FollowRoute(r1);
|
||||
|
||||
end_script
|
||||
|
||||
//
|
||||
//execute once patrol
|
||||
//
|
||||
script void executeOncePatrol()
|
||||
if(zoneType1 == "circle")
|
||||
{
|
||||
executecircularPatrol();
|
||||
}
|
||||
else if( zoneType1 == "polygon")
|
||||
{
|
||||
executeBoundsAreaPatrol();
|
||||
}
|
||||
end_script
|
||||
//
|
||||
|
||||
//
|
||||
script void TurnOnJam()
|
||||
WsfProcessor pro = (WsfProcessor)PLATFORM.Processor("jamming");
|
||||
if(pro.IsTurnedOff())
|
||||
{
|
||||
pro.TurnOn();
|
||||
}
|
||||
end_script
|
||||
//
|
||||
script void TurnOffJam()
|
||||
WsfProcessor proc = (WsfProcessor)PLATFORM.Processor("jamming");
|
||||
if(proc.IsTurnedOn())
|
||||
{
|
||||
proc.TurnOff();
|
||||
}
|
||||
end_script
|
||||
|
||||
|
||||
|
||||
script bool isontime()
|
||||
return true;
|
||||
end_script
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
script_variables
|
||||
string tankerName = "yy20_1";
|
||||
bool isrecvMessage = false;
|
||||
string proName = "task_mgr";
|
||||
end_script_variables
|
||||
|
||||
script bool isRefuelRequired()
|
||||
WsfFuel fuel = PLATFORM.Fuel();
|
||||
if(fuel.IsValid())
|
||||
{
|
||||
double i = fuel.MaximumQuantity();
|
||||
double j = i * 0.45;
|
||||
if(fuel.QuantityRemaining() <= j)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
end_script
|
||||
|
||||
script void sendRefuelMessage(string tankname)
|
||||
if(WsfSimulation.FindPlatform(tankname).IsValid())
|
||||
{
|
||||
WsfComm trackComm = WsfSimulation.FindPlatform(tankname).Comm("sub_net");
|
||||
WsfMessage warningMessage = WsfMessage();
|
||||
warningMessage.SetType("FUELING");
|
||||
warningMessage.SetSubType(PLATFORM.Name());
|
||||
PLATFORM.Comm("sub_net").SendMessage(warningMessage,trackComm);
|
||||
}
|
||||
else
|
||||
{
|
||||
writeln(PLATFORM.Name()," is inVaild");
|
||||
}
|
||||
end_script
|
||||
|
||||
on_message
|
||||
type CANFUEL
|
||||
script
|
||||
WsfMessage warningMessage = (WsfMessage)MESSAGE;
|
||||
isrecvMessage = true;
|
||||
end_script
|
||||
|
||||
type default
|
||||
script
|
||||
writeln(PLATFORM.Name()," Report: Message received");
|
||||
end_script
|
||||
end_on_message
|
||||
|
||||
script bool isRecvMessage()
|
||||
return isrecvMessage;
|
||||
end_script
|
||||
|
||||
script void gotoTanker()
|
||||
WsfPlatform p = WsfSimulation.FindPlatform(tankerName);
|
||||
if(p.IsValid())
|
||||
{
|
||||
PLATFORM.GoToSpeed(p.Speed() * 1.5,999);
|
||||
PLATFORM.GoToLocation(p.Location());
|
||||
}
|
||||
end_script
|
||||
|
||||
script bool isShift()
|
||||
WsfPlatform p = WsfSimulation.FindPlatform(tankerName);
|
||||
if(p.IsValid())
|
||||
{
|
||||
if(PLATFORM.GroundRangeTo(p) <= 10000)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
end_script
|
||||
|
||||
script void shift()
|
||||
WsfPlatform p = WsfSimulation.FindPlatform(tankerName);
|
||||
if(p.IsValid())
|
||||
{
|
||||
PLATFORM.GoToSpeed(p.Speed() * 1.1,999);
|
||||
PLATFORM.GoToLocation(p.Location());
|
||||
}
|
||||
end_script
|
||||
|
||||
script bool isRefuelOk()
|
||||
WsfFuel fuel = PLATFORM.Fuel();
|
||||
if(fuel.IsValid())
|
||||
{
|
||||
if(fuel.QuantityRemaining() >= fuel.MaximumQuantity() - 300)
|
||||
{
|
||||
|
||||
isrecvMessage = false;
|
||||
isaddfuel = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
end_script
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
execute at_time 1 s relative
|
||||
SetState("STARTJA");
|
||||
end_execute
|
||||
|
||||
|
||||
state STARTJA
|
||||
next_state DETECTEDJA
|
||||
return isontime();
|
||||
end_next_state
|
||||
end_state
|
||||
|
||||
|
||||
state DETECTEDJA
|
||||
on_entry
|
||||
flyZone(PointOrName1,zoneType1);
|
||||
end_on_entry
|
||||
|
||||
next_state AREAPATROLJA
|
||||
return (isInZone(PointOrName1,zoneType1));
|
||||
end_next_state
|
||||
|
||||
//
|
||||
end_state
|
||||
|
||||
state AREAPATROLJA
|
||||
on_entry
|
||||
executeOncePatrol();
|
||||
end_on_entry
|
||||
next_state SENDMESSAGE
|
||||
return isRefuelRequired();
|
||||
end_next_state
|
||||
end_state
|
||||
|
||||
state Jamming
|
||||
on_entry
|
||||
TurnOnJam();
|
||||
end_on_entry
|
||||
|
||||
next_state SENDMESSAGE
|
||||
return isRefuelRequired();
|
||||
end_next_state
|
||||
|
||||
on_exit
|
||||
TurnOffJam();
|
||||
end_on_exit
|
||||
end_state
|
||||
|
||||
|
||||
state SENDMESSAGE
|
||||
on_entry
|
||||
sendRefuelMessage(tankerName);
|
||||
end_on_entry
|
||||
|
||||
next_state GOTOTANKER
|
||||
return isRecvMessage() && !isaddfuel;
|
||||
end_next_state
|
||||
|
||||
on_exit
|
||||
end_on_exit
|
||||
end_state
|
||||
|
||||
state GOTOTANKER
|
||||
on_entry
|
||||
|
||||
end_on_entry
|
||||
|
||||
next_state SHIFTFLY
|
||||
gotoTanker();
|
||||
return isShift();
|
||||
end_next_state
|
||||
|
||||
on_exit
|
||||
end_on_exit
|
||||
end_state
|
||||
|
||||
state SHIFTFLY
|
||||
on_entry
|
||||
end_on_entry
|
||||
|
||||
next_state STARTJA
|
||||
shift();
|
||||
return isRefuelOk();
|
||||
end_next_state
|
||||
|
||||
on_exit
|
||||
PLATFORM.GoToLocation(p1);
|
||||
PROCESSOR.TurnOff();
|
||||
end_on_exit
|
||||
end_state
|
||||
|
||||
end_processor
|
||||
272
processors/patrol_fuel.txt
Normal file
272
processors/patrol_fuel.txt
Normal file
@@ -0,0 +1,272 @@
|
||||
# File generated by Wizard 2.9.0 on Feb 3, 2026.
|
||||
processor bs_fueling WSF_SCRIPT_PROCESSOR
|
||||
update_interval 10 s
|
||||
script_variables
|
||||
double fuelRate = 50.0;
|
||||
Array<string> mplatforms = Array<string> ();
|
||||
bool isFuel = false;
|
||||
double addFuelRange = 30000;
|
||||
WsfGeoPoint p1 = WsfGeoPoint.Construct("32:04:34.53n 130:51:05.36e");
|
||||
string CenterPoint = "23:49:20.14n 121:01:08.01e";
|
||||
double Radius = 50000;
|
||||
bool isOver = false;
|
||||
string zoneName = "JY01";
|
||||
string shape = "polygon"; //polygon circle
|
||||
bool aendflag = false;
|
||||
end_script_variables
|
||||
|
||||
|
||||
|
||||
//
|
||||
// @ generateCirclePoints
|
||||
//
|
||||
script Array<WsfGeoPoint> generateCirclePoints(string Center , double radius)
|
||||
WsfGeoPoint center = WsfGeoPoint.Construct(Center);
|
||||
Array<WsfGeoPoint> circlePoints = {};
|
||||
double earthRadius = 6371000.0;
|
||||
double angularDistance = radius / earthRadius;
|
||||
Array<double> angles = {10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360};
|
||||
foreach(double angle in angles)
|
||||
{
|
||||
double latCenter = center.Latitude() * MATH.PI() / 180.0;
|
||||
double lonCenter = center.Longitude() * MATH.PI() / 180.0;
|
||||
|
||||
double lat = MATH.ASin(MATH.Sin(latCenter)
|
||||
* MATH.Cos(angularDistance)
|
||||
+ MATH.Cos(latCenter)
|
||||
* MATH.Sin(angularDistance)
|
||||
* MATH.Cos(angle));
|
||||
double lon = lonCenter + MATH.ATan2(MATH.Sin(angle)
|
||||
* MATH.Sin(angularDistance)
|
||||
* MATH.Cos(latCenter)
|
||||
,MATH.Cos(angularDistance)
|
||||
- MATH.Sin(latCenter)
|
||||
* MATH.Sin(lat));
|
||||
|
||||
circlePoints.PushBack(WsfGeoPoint.Construct(lat*180.0/MATH.PI(),lon * 180.0 / MATH.PI(),5000));
|
||||
}
|
||||
return circlePoints;
|
||||
end_script
|
||||
|
||||
|
||||
//
|
||||
//@ circle execute
|
||||
//
|
||||
script void executecircularPatrol()
|
||||
Array<WsfGeoPoint> circlePoints = generateCirclePoints(CenterPoint,Radius);
|
||||
WsfRoute route;
|
||||
WsfRoute r1 = route.Create("lx");
|
||||
foreach(WsfGeoPoint vertex in circlePoints)
|
||||
{
|
||||
vertex.SetAltitudeHAE(10000);
|
||||
r1.Append(vertex,1500);
|
||||
}
|
||||
r1.Waypoint(0).SetLabel("start");
|
||||
r1.Waypoint(r1.Size() - 1).SetGoToLabel("start");
|
||||
PLATFORM.FollowRoute(r1);
|
||||
r1.Print();
|
||||
isOver = true;
|
||||
end_script
|
||||
|
||||
//
|
||||
// @ bounds execute
|
||||
//
|
||||
script void executeBoundsAreaPatrol()
|
||||
WsfZone zone = WsfZone.FindZone(zoneName);
|
||||
Array<WsfGeoPoint> boundsPoints = zone.PolyPoints();
|
||||
WsfRoute route;
|
||||
WsfRoute r1 = route.Create("lx");
|
||||
foreach(WsfGeoPoint vertex in boundsPoints)
|
||||
{
|
||||
vertex.SetAltitudeHAE(10000);
|
||||
r1.Append(vertex,1500);
|
||||
}
|
||||
r1.Waypoint(0).SetLabel("start");
|
||||
r1.Waypoint(r1.Size() - 1).SetGoToLabel("start");
|
||||
PLATFORM.FollowRoute(r1);
|
||||
|
||||
isOver = true;
|
||||
end_script
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
script bool isAlreadyInQueue(string name)
|
||||
for(int i = 0; i < mplatforms.Size(); i = i + 1)
|
||||
{
|
||||
if(mplatforms.Get(i) == name)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
end_script
|
||||
|
||||
script int sendMessage()
|
||||
if(!mplatforms.Size() == 0)
|
||||
{
|
||||
if(WsfSimulation.FindPlatform(mplatforms.Front()).IsValid())
|
||||
{
|
||||
WsfPlatform p = WsfSimulation.FindPlatform(mplatforms.Front());
|
||||
# if(p.FuelRemaining() < p.FuelBingoQuantity())
|
||||
# {
|
||||
WsfComm trackComm = WsfSimulation.FindPlatform(mplatforms.Front()).Comm("sub_net");
|
||||
WsfMessage warningMessage = WsfMessage();
|
||||
warningMessage.SetType("CANFUEL");
|
||||
warningMessage.SetSubType(PLATFORM.Name());
|
||||
PLATFORM.Comm("sub_net").SendMessage(warningMessage,trackComm);
|
||||
return 0;
|
||||
# }
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
end_script
|
||||
|
||||
script bool isRange()
|
||||
if(mplatforms.Size() != 0)
|
||||
{
|
||||
WsfPlatform p = WsfSimulation.FindPlatform(mplatforms.Front());
|
||||
if(p.IsValid())
|
||||
{
|
||||
if(PLATFORM.GroundRangeTo(p) <= addFuelRange)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mplatforms.Reverse();
|
||||
mplatforms.PopBack();
|
||||
mplatforms.Reverse();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
end_script
|
||||
|
||||
script bool gotoFuel(double fuelRange,double fuelRate)
|
||||
WsfPlatform p = WsfSimulation.FindPlatform(mplatforms.Front());
|
||||
if(p.IsValid())
|
||||
{
|
||||
WsfFuel reciveFuel = p.Fuel();
|
||||
WsfPlatform tank = PLATFORM;
|
||||
|
||||
WsfFuel tankFuel = tank.Fuel();
|
||||
if(!tankFuel.IsValid())
|
||||
{
|
||||
writeln("This Platform : ",p.Name()," no fuel!!!!");
|
||||
return true;
|
||||
}
|
||||
if(PLATFORM.SlantRangeTo(p) < fuelRange)
|
||||
{
|
||||
reciveFuel.SetQuantityRemaining(reciveFuel.QuantityRemaining() + (fuelRate * 1));
|
||||
tankFuel.SetQuantityRemaining(tankFuel.QuantityRemaining() - (fuelRate * 1));
|
||||
writeln("zhengziagei ; ",p.Name());
|
||||
}
|
||||
if(reciveFuel.QuantityRemaining() >= reciveFuel.MaximumQuantity()-300)
|
||||
{
|
||||
isFuel = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
isFuel = true;
|
||||
}
|
||||
return isFuel;
|
||||
end_script
|
||||
|
||||
//
|
||||
////////////////////////////on_message///////////////////////////////
|
||||
//
|
||||
on_message
|
||||
type FUELING
|
||||
script
|
||||
WsfMessage warningMessage = (WsfMessage)MESSAGE;
|
||||
string originator = warningMessage.Originator();
|
||||
if(!isAlreadyInQueue(originator))
|
||||
{
|
||||
mplatforms.Insert(mplatforms.Size(), originator);
|
||||
}
|
||||
writeln(PLATFORM.Name()," Report: FUELING from ", originator);
|
||||
end_script
|
||||
|
||||
type default
|
||||
script
|
||||
writeln(PLATFORM.Name(),"Report: Message received");
|
||||
end_script
|
||||
end_on_message
|
||||
|
||||
script bool isArrayNull()
|
||||
return mplatforms.Size() > 0;
|
||||
end_script
|
||||
|
||||
script void updateArray()
|
||||
if(mplatforms.Size() != 0)
|
||||
{
|
||||
mplatforms.Reverse();
|
||||
mplatforms.PopBack();
|
||||
mplatforms.Reverse();
|
||||
isFuel = false;
|
||||
}
|
||||
end_script
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
execute at_time 1 s absolute
|
||||
PROCESSOR.SetState("start");
|
||||
end_execute
|
||||
///////////////////////////////////////////////////////////////////
|
||||
state start
|
||||
next_state DETECTED
|
||||
return true;
|
||||
end_next_state
|
||||
end_state
|
||||
|
||||
state DETECTED
|
||||
on_entry
|
||||
if(!aendflag)
|
||||
{
|
||||
executeBoundsAreaPatrol();
|
||||
}
|
||||
end_on_entry
|
||||
|
||||
next_state gotoTarget
|
||||
return isArrayNull();
|
||||
end_next_state
|
||||
|
||||
on_exit
|
||||
end_on_exit
|
||||
end_state
|
||||
|
||||
state gotoTarget
|
||||
on_entry
|
||||
writeln("--------------------- :",mplatforms.ToString());
|
||||
# sendMessage();
|
||||
end_on_entry
|
||||
|
||||
next_state FUEL
|
||||
sendMessage();
|
||||
return isRange();
|
||||
end_next_state
|
||||
|
||||
on_exit
|
||||
|
||||
end_on_exit
|
||||
end_state
|
||||
|
||||
state FUEL
|
||||
on_entry
|
||||
end_on_entry
|
||||
|
||||
next_state DETECTED
|
||||
return gotoFuel(addFuelRange,fuelRate);
|
||||
end_next_state
|
||||
|
||||
on_exit
|
||||
updateArray();
|
||||
PLATFORM.GoToLocation(p1);
|
||||
aendflag = true;
|
||||
end_on_exit
|
||||
end_state
|
||||
end_processor
|
||||
@@ -3,13 +3,13 @@ zone tw
|
||||
polygonal lat_lon
|
||||
maximum_altitude 20 km
|
||||
|
||||
point 25:39:39.36n 120:30:25.18e
|
||||
point 25:06:17.31n 122:29:29.13e
|
||||
point 21:32:49.50n 121:05:56.86e
|
||||
point 22:19:43.20n 119:36:49.51e
|
||||
point 30:03:45.52n 126:02:30.89e
|
||||
point 30:53:53.49n 126:31:12.66e
|
||||
point 30:29:11.10n 127:04:22.94e
|
||||
point 29:36:19.04n 126:22:36.55e
|
||||
|
||||
fill_color red
|
||||
line_color red
|
||||
fill_color blue
|
||||
line_color blue
|
||||
end_zone
|
||||
|
||||
processor randomPatrol WSF_SCRIPT_PROCESSOR
|
||||
|
||||
164
processors/ucavFire.txt
Normal file
164
processors/ucavFire.txt
Normal file
@@ -0,0 +1,164 @@
|
||||
|
||||
processor ucavFire WSF_TASK_PROCESSOR
|
||||
track_update_interval 5.0 sec
|
||||
|
||||
script_variables
|
||||
string SENSOR_NAME;
|
||||
string WEAPON_NAME;
|
||||
int SALVO_SIZE = 2;
|
||||
string mTrackTaskStr = "Track";
|
||||
string mShootTaskStr = "Shoot";
|
||||
end_script_variables
|
||||
|
||||
script bool FiringNow()
|
||||
return (WeaponsActiveFor(TRACK.TrackId()) > 0);
|
||||
end_script
|
||||
|
||||
script bool InInterceptEnvelopeOf(WsfPlatform shooter)
|
||||
if (shooter.IsNull() || !shooter.IsValid()) return false;
|
||||
WsfWeapon w = shooter.Weapon(WEAPON_NAME);
|
||||
if (!w.IsValid()) return false;
|
||||
if (w.LaunchComputer().IsValid())
|
||||
return w.CanIntercept(TRACK);
|
||||
return (shooter.GroundRangeTo(TRACK) <= 150000.0);
|
||||
end_script
|
||||
|
||||
script bool InInterceptEnvelopeOfAnySub()
|
||||
foreach (WsfPlatform sub in PLATFORM.Subordinates())
|
||||
{
|
||||
if (InInterceptEnvelopeOf(sub)) return true;
|
||||
}
|
||||
return false;
|
||||
end_script
|
||||
|
||||
script bool TrackingNow()
|
||||
return (TasksAssignedFor(TRACK.TrackId(), mTrackTaskStr) > 0);
|
||||
end_script
|
||||
|
||||
script void ReleaseResources()
|
||||
CancelTask(TRACK.TrackId());
|
||||
end_script
|
||||
|
||||
script bool LaunchWeapon()
|
||||
WsfWeapon weapon;
|
||||
WsfPlatform platform;
|
||||
foreach (WsfPlatform sub in PLATFORM.Subordinates())
|
||||
{
|
||||
weapon = sub.Weapon(WEAPON_NAME);
|
||||
if (weapon.IsTurnedOn() &&
|
||||
(weapon.QuantityRemaining() >= SALVO_SIZE) &&
|
||||
(TasksAssignedTo(sub, "", weapon.Name()) < 1) &&
|
||||
InInterceptEnvelopeOf(sub))
|
||||
{
|
||||
platform = sub;
|
||||
break;
|
||||
}
|
||||
}
|
||||
bool launched = false;
|
||||
if (weapon.IsValid() && !platform.IsNull())
|
||||
launched = Fire(TRACK, mShootTaskStr, weapon.Name(), SALVO_SIZE, platform);
|
||||
return launched;
|
||||
end_script
|
||||
|
||||
script bool IsAssignable()
|
||||
return ((PLATFORM == PLATFORM.Commander()) ||
|
||||
(TasksReceivedFor(TRACK.TrackId()) > 0) ||
|
||||
(OperatingLevelFor("ENGAGE") > 0));
|
||||
end_script
|
||||
|
||||
script int WeaponsAvailable(WsfPlatform aAssignee)
|
||||
WsfWeapon weapon = aAssignee.Weapon(WEAPON_NAME);
|
||||
if (!weapon.IsTurnedOn()) return 0;
|
||||
return weapon.QuantityRemaining();
|
||||
end_script
|
||||
|
||||
script int TotalWeaponsAvailable()
|
||||
int quantity = 0;
|
||||
foreach (WsfPlatform sub in PLATFORM.Subordinates())
|
||||
quantity = quantity + WeaponsAvailable(sub);
|
||||
return quantity;
|
||||
end_script
|
||||
|
||||
script bool Engage()
|
||||
if (TotalWeaponsAvailable() < 1)
|
||||
{
|
||||
writeln("Engage: no weapons available");
|
||||
return false;
|
||||
}
|
||||
foreach (WsfPlatform sub in PLATFORM.Subordinates())
|
||||
{
|
||||
if (TasksAssignedTo(sub, TRACK.TrackId(), mTrackTaskStr) > 0) continue;
|
||||
WsfSensor sensor = sub.Sensor(SENSOR_NAME);
|
||||
if (!sensor.IsValid())
|
||||
{
|
||||
writeln("Engage: sub ", sub.Name(), " sensor ", SENSOR_NAME, " invalid");
|
||||
continue;
|
||||
}
|
||||
int maxTrack = sensor.MaximumRequestCount("TRACK");
|
||||
if (maxTrack > 0 && sensor.ActiveRequestCount("TRACK") >= maxTrack)
|
||||
{
|
||||
writeln("Engage: sub ", sub.Name(), " TRACK slots full");
|
||||
continue;
|
||||
}
|
||||
if (TRACK.BelievedAlive() && InInterceptEnvelopeOf(sub))
|
||||
{
|
||||
bool ok = StartTracking(TRACK, mTrackTaskStr, sensor.Name(), "default", sub);
|
||||
writeln("Engage: StartTracking ", sub.Name(), " -> ", ok);
|
||||
if (ok) return true;
|
||||
}
|
||||
}
|
||||
writeln("Engage: no sub assigned for ", TRACK.TargetName());
|
||||
return false;
|
||||
end_script
|
||||
|
||||
evaluation_interval DETECTED 2.0 sec
|
||||
state DETECTED
|
||||
next_state DETECTED
|
||||
if (TRACK.IFF_Friend()) { CancelTask(TRACK.TrackId()); return true; }
|
||||
return false;
|
||||
end_next_state
|
||||
next_state ENGAGEABLE
|
||||
return (TRACK.BelievedAlive() && !TRACK.IFF_Friend() && IsAssignable());
|
||||
end_next_state
|
||||
end_state
|
||||
|
||||
evaluation_interval ENGAGEABLE 2.0 sec
|
||||
state ENGAGEABLE
|
||||
next_state DETECTED
|
||||
if (TRACK.BelievedDead() || TRACK.IFF_Friend() ||
|
||||
((TasksAssignedFor(TRACK.TrackId(), "ENGAGE") < 1) && !IsAssignable()))
|
||||
{ ReleaseResources(); return true; }
|
||||
return false;
|
||||
end_next_state
|
||||
next_state ENGAGE
|
||||
bool didEngage = Engage();
|
||||
bool trackNow = TrackingNow();
|
||||
int assigned = TasksAssignedFor(TRACK.TrackId(), mTrackTaskStr);
|
||||
writeln("ENGAGEABLE->ENGAGE: didEngage=", didEngage, " trackNow=", trackNow, " assigned=", assigned, " target=", TRACK.TargetName());
|
||||
return (trackNow && (assigned > 0));
|
||||
end_next_state
|
||||
end_state
|
||||
|
||||
evaluation_interval ENGAGE 2.0 sec
|
||||
state ENGAGE
|
||||
next_state ENGAGEABLE
|
||||
if (TRACK.BelievedDead() || !TrackingNow() || !IsAssignable())
|
||||
{ ReleaseResources(); return true; }
|
||||
return false;
|
||||
end_next_state
|
||||
next_state FIRING
|
||||
if (TRACK.BelievedAlive() && TrackingNow() && !FiringNow() && InInterceptEnvelopeOfAnySub())
|
||||
return LaunchWeapon();
|
||||
return false;
|
||||
end_next_state
|
||||
end_state
|
||||
|
||||
evaluation_interval FIRING 2.0 sec
|
||||
state FIRING
|
||||
next_state ENGAGE
|
||||
return (TRACK.BelievedDead() || !InInterceptEnvelopeOfAnySub() ||
|
||||
(!FiringNow() && (TasksAssignedFor(TRACK.TrackId(), mShootTaskStr) < 1)) ||
|
||||
(TotalWeaponsAvailable() < 1) || !TrackingNow());
|
||||
end_next_state
|
||||
end_state
|
||||
end_processor
|
||||
175
scenarios/blue/bomber_formation_01.txt
Normal file
175
scenarios/blue/bomber_formation_01.txt
Normal file
@@ -0,0 +1,175 @@
|
||||
include_once weapons\ssm\blue_cruise_missile.txt
|
||||
execute at_time .001 sec absolute
|
||||
for(int i = 0; i < WsfSimulation.PlatformCount();i+=1)
|
||||
{
|
||||
for(int j = 0;j<WsfSimulation.PlatformEntry(i).CommCount() ; j += 1)
|
||||
{
|
||||
if(WsfSimulation.PlatformEntry(i).CommEntry(j).IsValid())
|
||||
{
|
||||
for(int z = 0; z < WsfSimulation.PlatformEntry(i).CommCount();z += 1)
|
||||
{
|
||||
WsfComm trackComm = WsfSimulation.PlatformEntry(i).CommEntry(z);
|
||||
for(int j = 0; j < WsfSimulation.PlatformEntry(i).ProcessorCount();j += 1)
|
||||
{
|
||||
string pLink = "internal_link " +WsfSimulation.PlatformEntry(i).ProcessorEntry(j).Name();
|
||||
trackComm.ProcessInput(pLink);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
# WsfSimulation.FindPlatform("").ProcessInput("command_chain red_chain jidi");
|
||||
end_execute
|
||||
include_once platforms/B-1B.txt
|
||||
include_once platforms/KC-135.txt
|
||||
include_once processors/patrol_fuel.txt
|
||||
#include_once platforms/B-21.txt
|
||||
#include_once platforms/B-2A.txt
|
||||
#include_once platforms/B-52.txt
|
||||
#include_once platforms/B-1B1.txt
|
||||
#include_once platforms/B-2A1.txt
|
||||
#include_once platforms/F-22.txt
|
||||
zone JY01
|
||||
polygonal
|
||||
maximum_altitude 9000 m
|
||||
lat_lon
|
||||
point 28:49:00.00n 139:59:00.00e
|
||||
point 28:21:59.68n 140:39:58.72e
|
||||
point 27:54:07.35n 140:13:47.20e
|
||||
point 28:22:54.16n 139:36:57.36e
|
||||
fill_color blue
|
||||
line_color blue
|
||||
end_zone
|
||||
platform UCAV_1 B-1B
|
||||
heading -30 deg
|
||||
position 16:30:52.47n 146:41:09.33e altitude 1000 m
|
||||
|
||||
add processor state sta
|
||||
off
|
||||
script_variables
|
||||
PointOrName1 = "tw";
|
||||
tankerName = "yy20_1";
|
||||
end_script_variables
|
||||
end_processor
|
||||
execute at_time 1 min absolute
|
||||
PLATFORM.Processor("state").TurnOn();
|
||||
end_execute
|
||||
|
||||
end_platform
|
||||
|
||||
platform UCAV_2 B-1B
|
||||
heading -30 deg
|
||||
position 16:29:52.96n 146:41:57.89e altitude 1000 m
|
||||
|
||||
add processor state sta
|
||||
off
|
||||
script_variables
|
||||
PointOrName1 = "tw";
|
||||
tankerName = "yy20_2";
|
||||
end_script_variables
|
||||
end_processor
|
||||
execute at_time 1 min absolute
|
||||
PLATFORM.Processor("state").TurnOn();
|
||||
end_execute
|
||||
|
||||
end_platform
|
||||
|
||||
platform UCAV_3 B-1B
|
||||
heading -30 deg
|
||||
position 16:29:03.07n 146:40:19.86e altitude 1000 m
|
||||
|
||||
add processor state sta
|
||||
off
|
||||
script_variables
|
||||
PointOrName1 = "tw";
|
||||
tankerName = "yy20_3";
|
||||
end_script_variables
|
||||
end_processor
|
||||
execute at_time 1 min absolute
|
||||
PLATFORM.Processor("state").TurnOn();
|
||||
end_execute
|
||||
|
||||
end_platform
|
||||
|
||||
platform UCAV_4 B-1B
|
||||
heading -30 deg
|
||||
position 16:28:36.43n 146:41:38.11e altitude 1000 m
|
||||
|
||||
add processor state sta
|
||||
off
|
||||
script_variables
|
||||
PointOrName1 = "tw";
|
||||
tankerName = "yy20_4";
|
||||
end_script_variables
|
||||
end_processor
|
||||
execute at_time 1 min absolute
|
||||
PLATFORM.Processor("state").TurnOn();
|
||||
end_execute
|
||||
|
||||
end_platform
|
||||
|
||||
|
||||
|
||||
platform yy20_1 YY20
|
||||
icon kc-135
|
||||
side blue
|
||||
heading 150 deg
|
||||
position 32:01:00n 130:49:00e
|
||||
add processor jy bs_fueling
|
||||
off
|
||||
end_processor
|
||||
execute at_time 1 sec absolute
|
||||
PLATFORM.Processor("jy").TurnOn();
|
||||
end_execute
|
||||
|
||||
end_platform
|
||||
|
||||
|
||||
platform yy20_2 YY20
|
||||
icon kc-135
|
||||
side blue
|
||||
heading 150 deg
|
||||
position 31:43:54.96n 130:59:34.47e
|
||||
add processor jy bs_fueling
|
||||
off
|
||||
end_processor
|
||||
execute at_time 1 sec absolute
|
||||
PLATFORM.Processor("jy").TurnOn();
|
||||
end_execute
|
||||
|
||||
end_platform
|
||||
|
||||
platform yy20_3 YY20
|
||||
icon kc-135
|
||||
side blue
|
||||
heading 150 deg
|
||||
position 31:43:43.55n 130:59:04.81e
|
||||
add processor jy bs_fueling
|
||||
off
|
||||
end_processor
|
||||
execute at_time 1 sec absolute
|
||||
PLATFORM.Processor("jy").TurnOn();
|
||||
end_execute
|
||||
|
||||
end_platform
|
||||
|
||||
platform yy20_4 YY20
|
||||
icon kc-135
|
||||
side blue
|
||||
heading 150 deg
|
||||
position 31:44:10.23n 130:59:04.28e
|
||||
add processor jy bs_fueling
|
||||
off
|
||||
end_processor
|
||||
execute at_time 1 sec absolute
|
||||
PLATFORM.Processor("jy").TurnOn();
|
||||
end_execute
|
||||
|
||||
end_platform
|
||||
|
||||
include_once platforms/BSHIP.txt
|
||||
platform shipblue BSHIP
|
||||
side blue
|
||||
heading -30 deg
|
||||
position 16:16:56.40n 146:53:49.75e
|
||||
end_platform
|
||||
27
scenarios/red/hangmu.txt
Normal file
27
scenarios/red/hangmu.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
# File generated by Wizard 2.9.0 on Feb 8, 2026.
|
||||
platform CNS_fujian WSF_PLATFORM
|
||||
icon Carrier
|
||||
side red
|
||||
command_chain CNS SELF
|
||||
heading 300 deg
|
||||
position 29:41:35.78n 125:36:10.29e
|
||||
|
||||
end_platform
|
||||
|
||||
platform CNS_fujian1 WSF_PLATFORM
|
||||
icon Carrier
|
||||
side red
|
||||
command_chain CNS SELF
|
||||
heading 300 deg
|
||||
position 29:51:01.27n 125:53:43.00e
|
||||
|
||||
end_platform
|
||||
|
||||
platform CNS_fujian12 WSF_PLATFORM
|
||||
icon Carrier
|
||||
side red
|
||||
command_chain CNS SELF
|
||||
heading 300 deg
|
||||
position 29:52:23.42n 125:36:10.50e
|
||||
|
||||
end_platform
|
||||
@@ -13,3 +13,21 @@ sensor GEO_SENSOR WSF_GEOMETRIC_SENSOR
|
||||
reports_type
|
||||
track_quality 0.75
|
||||
end_sensor
|
||||
|
||||
sensor common_geo_radar WSF_GEOMETRIC_SENSOR
|
||||
azimuth_field_of_view -180.0 deg 180.0 deg
|
||||
elevation_field_of_view -90.0 deg 90.0 deg
|
||||
maximum_range 222.24 km
|
||||
frame_time 2 sec
|
||||
track_quality 1.0
|
||||
reports_location
|
||||
reports_velocity
|
||||
reports_iff
|
||||
reports_bearing
|
||||
ignore_same_side
|
||||
check_terrain_masking false
|
||||
on
|
||||
reports_range
|
||||
reports_range_rate
|
||||
reports_elevation
|
||||
end_sensor
|
||||
84
sensors/radar/acq_radar.txt
Normal file
84
sensors/radar/acq_radar.txt
Normal file
@@ -0,0 +1,84 @@
|
||||
# File generated by Wizard 2.9.0 on Feb 8, 2026.
|
||||
# ****************************************************************************
|
||||
# CUI
|
||||
#
|
||||
# The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
|
||||
#
|
||||
# The use, dissemination or disclosure of data in this file is subject to
|
||||
# limitation or restriction. See accompanying README and LICENSE for details.
|
||||
# ****************************************************************************
|
||||
# * * ************************************** * *
|
||||
# * ****** Demonstration input file ****** *
|
||||
# * ****** UNCLASSIFIED ****** *
|
||||
# * * ************************************** * *
|
||||
|
||||
antenna_pattern ACQ_RADAR_ANTENNA
|
||||
rectangular_pattern
|
||||
peak_gain 15 dB
|
||||
minimum_gain -10.0 db
|
||||
azimuth_beamwidth 5 deg
|
||||
elevation_beamwidth 5 deg
|
||||
end_antenna_pattern
|
||||
|
||||
# **********************************************
|
||||
|
||||
electronic_warfare ACQ_RADAR_EP WSF_ELECTRONIC_PROTECT
|
||||
technique pulse_suppression WSF_EP_TECHNIQUE
|
||||
mitigated_techniques
|
||||
random_pulse_jamming
|
||||
end_mitigated_techniques
|
||||
effect ps_effect WSF_PULSE_SUPPRESS_EFFECT
|
||||
reject pulses 0.05
|
||||
end_effect
|
||||
end_technique
|
||||
end_electronic_warfare
|
||||
|
||||
# **********************************************
|
||||
|
||||
sensor ACQ_RADAR WSF_RADAR_SENSOR
|
||||
|
||||
one_m2_detect_range 50 km
|
||||
|
||||
antenna_height 5.0 m
|
||||
|
||||
frame_time 10.0 sec
|
||||
|
||||
scan_mode azimuth_and_elevation
|
||||
azimuth_scan_limits -180 deg 180 deg
|
||||
elevation_scan_limits 0.0 deg 50.0 deg
|
||||
|
||||
transmitter
|
||||
antenna_pattern ACQ_RADAR_ANTENNA
|
||||
power 1000.0 kw
|
||||
frequency 3000 mhz
|
||||
internal_loss 2 db
|
||||
pulse_width 35 usec
|
||||
pulse_repetition_interval 350 usec
|
||||
end_transmitter
|
||||
|
||||
receiver
|
||||
antenna_pattern ACQ_RADAR_ANTENNA
|
||||
bandwidth 2.0 mhz
|
||||
noise_power -160 dBw # will be calibrated for 1 m^2
|
||||
internal_loss 7 dB
|
||||
|
||||
electronic_protect ACQ_RADAR_EP end_electronic_protect
|
||||
end_receiver
|
||||
|
||||
probability_of_false_alarm 1.0e-6
|
||||
required_pd 0.5
|
||||
swerling_case 1
|
||||
number_of_pulses_integrated 10
|
||||
|
||||
hits_to_establish_track 3 5
|
||||
hits_to_maintain_track 1 3
|
||||
|
||||
compute_measurement_errors true
|
||||
|
||||
track_quality 0.9 // 'weapons' cue quality
|
||||
|
||||
reports_range
|
||||
reports_bearing
|
||||
reports_elevation
|
||||
reports_iff
|
||||
end_sensor
|
||||
@@ -2,6 +2,9 @@ include_once scenarios/red/airDomin.txt
|
||||
include_once scenarios/blue/airDomin.txt
|
||||
include_once weapons/aam/aa_mrm.txt
|
||||
include_once processors/aa_intercept.txt
|
||||
|
||||
include_once scenarios/blue/bomber_formation_01.txt
|
||||
include_once scenarios/red/hangmu.txt
|
||||
define_path_variable CASE vPure
|
||||
log_file output/$(CASE).log
|
||||
|
||||
@@ -9,4 +12,4 @@ log_file output/$(CASE).log
|
||||
event_output file output/$(CASE).evt end_event_output
|
||||
event_pipe file output/$(CASE).aer end_event_pipe
|
||||
|
||||
end_time 4 h
|
||||
end_time 8 h
|
||||
@@ -7,7 +7,7 @@
|
||||
###############################################
|
||||
xio_interface
|
||||
unicast 127.0.0.1 # Change to this hostname if running from another machine
|
||||
send_port 62253
|
||||
send_port 58206
|
||||
pause_for_connection yes
|
||||
debug on
|
||||
verbose on
|
||||
@@ -16,4 +16,4 @@ realtime
|
||||
minimum_mover_timestep 0 s
|
||||
|
||||
# This file contains scripts which enhance the watch variable values
|
||||
include_once "E:\afsim-2.9.0-win64\resources\data\_wsf_debug_scripts_.txt"
|
||||
include_once "E:\soft\afsim-2.9.0-win64\resources\data\_wsf_debug_scripts_.txt"
|
||||
|
||||
37
warlock.log
37
warlock.log
@@ -0,0 +1,37 @@
|
||||
2026-02-09 02:24:38 file E:/soft/afsim-2.9.0-win64/mydemo/afsim_addfuel/setup.txt
|
||||
2026-02-09 02:24:38 file E:\soft\afsim-2.9.0-win64\mydemo\afsim_addfuel\scenarios/red/airDomin.txt
|
||||
2026-02-09 02:24:38 file platforms/F-16.txt
|
||||
2026-02-09 02:24:38 file signatures/F-16_sig.txt
|
||||
2026-02-09 02:24:38 file signatures/F-16_infrared_sig.txt
|
||||
2026-02-09 02:24:38 file signatures/F-16_optical_sig.txt
|
||||
2026-02-09 02:24:38 file signatures/F-16_radar_sig.txt
|
||||
2026-02-09 02:24:38 file processors/scripts/randomPatrol.txt
|
||||
2026-02-09 02:24:38 file processors/airControl.txt
|
||||
2026-02-09 02:24:38 file sensors/radar/generic_file_control_radar.txt
|
||||
2026-02-09 02:24:38 file processors/randomCirclePatrol.txt
|
||||
2026-02-09 02:24:38 file processors/pathPatrol.txt
|
||||
2026-02-09 02:24:38 file processors/flyZone.txt
|
||||
2026-02-09 02:24:38 file processors/boundsAreaPatrol.txt
|
||||
2026-02-09 02:24:38 file E:\soft\afsim-2.9.0-win64\mydemo\afsim_addfuel\scenarios/blue/airDomin.txt
|
||||
2026-02-09 02:24:38 file E:\soft\afsim-2.9.0-win64\mydemo\afsim_addfuel\weapons/aam/aa_mrm.txt
|
||||
2026-02-09 02:24:38 file sensors/radar/aa_mrm_radar.txt
|
||||
2026-02-09 02:24:38 file E:\soft\afsim-2.9.0-win64\mydemo\afsim_addfuel\processors/aa_intercept.txt
|
||||
2026-02-09 02:24:38 file E:\soft\afsim-2.9.0-win64\mydemo\afsim_addfuel\scenarios/blue/bomber_formation_01.txt
|
||||
2026-02-09 02:24:38 file weapons\ssm\blue_cruise_missile.txt
|
||||
2026-02-09 02:24:38 file platforms/B-1B.txt
|
||||
2026-02-09 02:24:38 file processors/addfuelstate.txt
|
||||
2026-02-09 02:24:38 file sensors/geosensor/geo_sensor.txt
|
||||
2026-02-09 02:24:38 file comm/teamdatalink.txt
|
||||
2026-02-09 02:24:38 file sensors/radar/acq_radar.txt
|
||||
2026-02-09 02:24:38 file weapons/ssm/medium_range_radar_missile.txt
|
||||
2026-02-09 02:24:38 file processors/ucavFire.txt
|
||||
2026-02-09 02:24:38 file platforms/KC-135.txt
|
||||
2026-02-09 02:24:38 file processors/patrol_fuel.txt
|
||||
2026-02-09 02:24:38 file platforms/BSHIP.txt
|
||||
2026-02-09 02:24:38 file E:\soft\afsim-2.9.0-win64\mydemo\afsim_addfuel\scenarios/red/hangmu.txt
|
||||
2026-02-09 02:24:38 version wsf 2.9.0
|
||||
2026-02-09 02:24:38 file E:\soft\afsim-2.9.0-win64\mydemo\afsim_addfuel\setup.txt
|
||||
2026-02-09 02:24:39 AER output file: output/vPure.aer
|
||||
2026-02-09 02:24:39 Event output file: output/vPure.evt
|
||||
2026-02-09 02:24:39 start 1
|
||||
2026-02-09 02:26:28 terminated 9900.683 108.940 163.156
|
||||
|
||||
124
weapons/ssm/blue_cruise_missile.txt
Normal file
124
weapons/ssm/blue_cruise_missile.txt
Normal file
@@ -0,0 +1,124 @@
|
||||
# ****************************************************************************
|
||||
# CUI
|
||||
#
|
||||
# The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
|
||||
#
|
||||
# The use, dissemination or disclosure of data in this file is subject to
|
||||
# limitation or restriction. See accompanying README and LICENSE for details.
|
||||
# ****************************************************************************
|
||||
#UNCLASSIFIED
|
||||
# Tomahawk surfaced launched version (has a booster)
|
||||
# All data from internet sources
|
||||
#
|
||||
# No terminal sensor for now.
|
||||
|
||||
infrared_signature BLUE_CRUISE_MISSILE_INFRARED_SIGNATURE
|
||||
constant 1 watts/steradian
|
||||
end_infrared_signature
|
||||
|
||||
optical_signature BLUE_CRUISE_MISSILE_OPTICAL_SIGNATURE
|
||||
constant 1 m^2
|
||||
end_optical_signature
|
||||
|
||||
radar_signature BLUE_CRUISE_MISSILE_RADAR_SIGNATURE
|
||||
constant 1 m^2
|
||||
end_radar_signature
|
||||
|
||||
aero BLUE_CRUISE_MISSILE_AERO WSF_AERO
|
||||
cd_zero_subsonic 0.1
|
||||
cd_zero_supersonic 0.25
|
||||
mach_begin_cd_rise 0.95
|
||||
mach_end_cd_rise 1.3
|
||||
mach_max_supersonic 4
|
||||
reference_area 0.21237 m2 #0.52 meter diameter
|
||||
cl_max 10
|
||||
aspect_ratio 16.0
|
||||
end_aero
|
||||
|
||||
weapon_effects BLUE_CRUISE_MISSILE_LETHALITY WSF_GRADUATED_LETHALITY
|
||||
radius_and_pk 30 m 0.85
|
||||
end_weapon_effects
|
||||
|
||||
platform_type BLUE_CRUISE_MISSILE WSF_PLATFORM
|
||||
icon CALCM
|
||||
category cruise-missile
|
||||
infrared_signature BLUE_CRUISE_MISSILE_INFRARED_SIGNATURE
|
||||
optical_signature BLUE_CRUISE_MISSILE_OPTICAL_SIGNATURE
|
||||
radar_signature BLUE_CRUISE_MISSILE_RADAR_SIGNATURE
|
||||
mover WSF_GUIDED_MOVER
|
||||
#show_status
|
||||
update_interval .5 sec
|
||||
integration_timestep 0.05 sec
|
||||
|
||||
stage 1 # Booster
|
||||
initial_mass 550 lbs
|
||||
fuel_mass 440 lbs
|
||||
thrust 7418 lbf
|
||||
thrust_duration 12 sec
|
||||
aero BLUE_CRUISE_MISSILE_AERO
|
||||
end_stage
|
||||
|
||||
stage 2 # Turbofan
|
||||
initial_mass 2650 lb
|
||||
fuel_mass 500 lb # guess
|
||||
thrust 696.9 lbf
|
||||
burn_rate 350 lb/hr
|
||||
aero BLUE_CRUISE_MISSILE_AERO
|
||||
thrust_delay 1.0 sec # no idea how long before it fires off after the booster falls off...
|
||||
end_stage
|
||||
end_mover
|
||||
|
||||
processor guidance WSF_GUIDANCE_COMPUTER
|
||||
#show_status
|
||||
#show_evaluations
|
||||
#debug
|
||||
guide_to_truth true # for testing
|
||||
|
||||
phase LAUNCH
|
||||
commanded_altitude 5000 ft
|
||||
commanded_flight_path_angle 60 deg
|
||||
next_phase CRUISE when phase_time > 16 sec
|
||||
end_phase
|
||||
|
||||
phase CRUISE
|
||||
commanded_altitude 500 ft agl
|
||||
commanded_speed 910 fps
|
||||
maximum_commanded_g 2 g
|
||||
next_phase TERMINAL if target_slant_range < 1 miles
|
||||
end_phase
|
||||
|
||||
phase TERMINAL
|
||||
commanded_speed 800 fps
|
||||
proportional_navigation_gain 40
|
||||
maximum_pitch_angle 90 deg
|
||||
maximum_commanded_g 10 g
|
||||
end_phase
|
||||
end_processor
|
||||
|
||||
processor fuse WSF_GROUND_TARGET_FUSE
|
||||
end_processor
|
||||
|
||||
comm uplink WSF_COMM_TRANSCEIVER
|
||||
internal_link data_mgr
|
||||
end_comm
|
||||
|
||||
processor task_mgr WSF_TASK_PROCESSOR
|
||||
end_processor
|
||||
|
||||
processor data_mgr WSF_TRACK_PROCESSOR
|
||||
purge_interval 4000 seconds
|
||||
end_processor
|
||||
|
||||
end_platform_type
|
||||
|
||||
|
||||
weapon BLUE_CRUISE_MISSILE WSF_EXPLICIT_WEAPON
|
||||
launched_platform_type BLUE_CRUISE_MISSILE
|
||||
weapon_effects BLUE_CRUISE_MISSILE_LETHALITY
|
||||
quantity 1
|
||||
firing_delay 0.0 sec
|
||||
salvo_interval 2 sec
|
||||
slew_mode azimuth
|
||||
azimuth_slew_limits -180 deg 180 deg
|
||||
tilt 88.9 deg
|
||||
end_weapon
|
||||
189
weapons/ssm/medium_range_radar_missile.txt
Normal file
189
weapons/ssm/medium_range_radar_missile.txt
Normal file
@@ -0,0 +1,189 @@
|
||||
# ****************************************************************************
|
||||
# CUI
|
||||
#
|
||||
# The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
|
||||
#
|
||||
# The use, dissemination or disclosure of data in this file is subject to
|
||||
# limitation or restriction. See accompanying README and LICENSE for details.
|
||||
# ****************************************************************************
|
||||
|
||||
|
||||
|
||||
##############################################################################
|
||||
### signatures
|
||||
##############################################################################
|
||||
infrared_signature SIMPLE_INFRARED_SIGNATURE
|
||||
constant 1 watts/steradian
|
||||
end_infrared_signature
|
||||
optical_signature SIMPLE_OPTICAL_SIGNATURE
|
||||
constant 1 m^2
|
||||
end_optical_signature
|
||||
radar_signature SIMPLE_RADAR_SIGNATURE
|
||||
constant 1 m^2
|
||||
end_radar_signature
|
||||
weapon_effects SIMPLE_EFFECT WSF_GRADUATED_LETHALITY
|
||||
radius_and_pk 100.0 m 0.75
|
||||
end_weapon_effects
|
||||
|
||||
|
||||
##############################################################################
|
||||
### antenna patterns
|
||||
##############################################################################
|
||||
antenna_pattern SEEKER_ANTENNA_B-1B
|
||||
circular_pattern
|
||||
beamwidth 6.0 deg
|
||||
peak_gain 30.0 dB
|
||||
minimum_gain -10.0 dB
|
||||
end_circular_pattern
|
||||
end_antenna_pattern
|
||||
antenna_pattern RADAR_ANTENNA_B-1B
|
||||
circular_pattern
|
||||
beamwidth 3.0 deg
|
||||
peak_gain 30.0 dB
|
||||
minimum_gain -10.0 dB
|
||||
end_circular_pattern
|
||||
end_antenna_pattern
|
||||
|
||||
|
||||
##############################################################################
|
||||
### normal radar sensor; weapon's radar seeker
|
||||
##############################################################################
|
||||
sensor RADAR_SEEKER_B-1B WSF_RADAR_SENSOR
|
||||
off
|
||||
ignore_domain land
|
||||
ignore_domain subsurface
|
||||
selection_mode single #multiple
|
||||
initial_mode SEARCH
|
||||
slew_mode azimuth_and_elevation
|
||||
azimuth_slew_limits -45 deg 45 deg
|
||||
elevation_slew_limits -45 deg 45 deg
|
||||
mode_template
|
||||
scan_mode azimuth_and_elevation
|
||||
azimuth_scan_limits -90 deg 90 deg
|
||||
elevation_scan_limits -90 deg 90 deg
|
||||
frame_time 1.0 sec
|
||||
transmitter
|
||||
antenna_pattern SEEKER_ANTENNA_B-1B
|
||||
power 1.0 kW
|
||||
frequency 10.0 GHz
|
||||
pulse_repetition_interval 3.3 usec #HPRF 300 kHz
|
||||
pulse_width 1.0 usec #30% duty factor
|
||||
end_transmitter
|
||||
receiver
|
||||
bandwidth 1 MHz
|
||||
end_receiver
|
||||
one_m2_detect_range 50.0 km
|
||||
hits_to_establish_track 1 2
|
||||
hits_to_maintain_track 1 3
|
||||
reports_location
|
||||
reports_velocity
|
||||
reports_iff
|
||||
track_quality 1.0
|
||||
end_mode_template
|
||||
mode SEARCH
|
||||
frame_time 0.1 sec
|
||||
end_mode
|
||||
end_sensor
|
||||
|
||||
|
||||
##############################################################################
|
||||
### weapon platform that requires an uplink, and will go active
|
||||
##############################################################################
|
||||
platform_type MEDIUM_RANGE_RADAR_MISSILE_B-1B WSF_PLATFORM
|
||||
|
||||
script_variables
|
||||
bool mDrawTarget = true;
|
||||
WsfDraw draw = WsfDraw();
|
||||
end_script_variables
|
||||
|
||||
execute at_interval_of 1 sec
|
||||
if (mDrawTarget)
|
||||
{
|
||||
WsfTrack tgt = PLATFORM.CurrentTargetTrack();
|
||||
if (tgt.IsValid())
|
||||
{
|
||||
draw.SetDuration(1.0); //same as execute interval
|
||||
draw.SetColor(1, 0, 1); //purple
|
||||
draw.SetLineSize(2); //double thick
|
||||
draw.BeginLines();
|
||||
draw.Vertex(PLATFORM.Location());
|
||||
draw.Vertex(tgt.CurrentLocation());
|
||||
draw.End();
|
||||
}
|
||||
}
|
||||
end_execute
|
||||
|
||||
weapon_effects SIMPLE_EFFECT
|
||||
icon Scud_Missile
|
||||
infrared_signature SIMPLE_INFRARED_SIGNATURE
|
||||
optical_signature SIMPLE_OPTICAL_SIGNATURE
|
||||
radar_signature SIMPLE_RADAR_SIGNATURE
|
||||
|
||||
###########################################################################
|
||||
### straight line movers guide themselves, towards the platform's target
|
||||
###########################################################################
|
||||
mover WSF_STRAIGHT_LINE_MOVER
|
||||
average_speed 3221.5 kts # mach 5
|
||||
update_interval 0.006 sec
|
||||
update_time_tolerance 0.0006 sec # this mover travels 1 meter in 0.00060339 seconds
|
||||
maximum_lateral_acceleration 15.0 g # average turner
|
||||
guidance_mode lead_pursuit # or pure_pursuit
|
||||
guide_to_truth false # guide to perception
|
||||
end_mover
|
||||
|
||||
###########################################################################
|
||||
### simple fuse
|
||||
###########################################################################
|
||||
processor fuse WSF_AIR_TARGET_FUSE
|
||||
max_time_of_flight_to_detonate 100.0 sec
|
||||
end_processor
|
||||
|
||||
###########################################################################
|
||||
### perfect trackers provide target truth data for the missile
|
||||
### no uplink or tracking required for this missile
|
||||
###########################################################################
|
||||
#processor seeker WSF_PERFECT_TRACKER
|
||||
# update_interval 0.5 s
|
||||
#end_processor
|
||||
|
||||
###########################################################################
|
||||
### imperfect radar provide target data for the missile
|
||||
###########################################################################
|
||||
sensor seeker RADAR_SEEKER_B-1B
|
||||
off
|
||||
internal_link track_mgr
|
||||
internal_link weapon_manager
|
||||
end_sensor
|
||||
|
||||
###########################################################################
|
||||
### simple track manager. make sure comm & sensor feed it
|
||||
###########################################################################
|
||||
processor track_mgr WSF_TRACK_PROCESSOR
|
||||
master_track_processor
|
||||
end_processor
|
||||
|
||||
###########################################################################
|
||||
### turns on the weapon radar at the right time
|
||||
###########################################################################
|
||||
processor weapon_manager WSF_WEAPON_TRACK_PROCESSOR
|
||||
turn_on_sensor seeker at_time 30 s before_intercept
|
||||
#turn_on_sensor seeker at_range 3500 m before_intercept
|
||||
coast_time 100 s
|
||||
uplink_required false #this version is active missile only (no no command guidance uplink)
|
||||
end_processor
|
||||
end_platform_type
|
||||
|
||||
|
||||
##############################################################################
|
||||
### simple missile to use, requires uplink
|
||||
##############################################################################
|
||||
weapon MEDIUM_RANGE_RADAR_MISSILE_B-1B WSF_EXPLICIT_WEAPON
|
||||
launched_platform_type MEDIUM_RANGE_RADAR_MISSILE_B-1B
|
||||
weapon_effects SIMPLE_EFFECT
|
||||
quantity 4
|
||||
firing_delay 0.5 sec
|
||||
salvo_interval 5.0 sec
|
||||
slew_mode azimuth_and_elevation
|
||||
azimuth_slew_limits -180.0 deg 180.0 deg
|
||||
end_weapon
|
||||
|
||||
Reference in New Issue
Block a user