init
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
output/
|
||||||
65
README.md
Normal file
65
README.md
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
**CUI**
|
||||||
|
|
||||||
|
# aea_iads demo
|
||||||
|
|
||||||
|
This directory contains the necessary files to test the EW effects
|
||||||
|
in a scenario similar to the iads_demo baseline scenario.
|
||||||
|
|
||||||
|
The SOJ and EW_Radar have EA and EP techniques, respectively, with them
|
||||||
|
to aid in the testing and verification of these techniques.
|
||||||
|
|
||||||
|
The strike.txt file is the normal input file to run the simulation
|
||||||
|
as a single application. The replay file will be written to the
|
||||||
|
output directory.
|
||||||
|
|
||||||
|
Also included are two realtime run files strike-rt.txt and iads-rt.txt
|
||||||
|
that can be run concurrently to test the jamming and EW effects over DIS.
|
||||||
|
Each WSF application communicates over DIS. The applications can be run
|
||||||
|
on separate hosts or on the same host. The file dis_data.txt provides
|
||||||
|
the DIS Enumeration mapping for the entity types, emitter types, and ew
|
||||||
|
technique types.
|
||||||
|
|
||||||
|
To visually monitor the progress of the realtime simulations, Warlock can
|
||||||
|
be opened and then configured to monitor multicast address 224.2.25.55,
|
||||||
|
port 3225 via an input file containing a dis_interface block.
|
||||||
|
|
||||||
|
## CUI Designation Indicator
|
||||||
|
* Controlled by: Air Force Research Laboratory
|
||||||
|
* Controlled by: Aerospace Systems Directorate
|
||||||
|
* CUI Categories: CTI, EXPT
|
||||||
|
* LDC/Distribution Statement: DIST-C
|
||||||
|
* POC: afrl.rq.afsim@us.af.mil
|
||||||
|
|
||||||
|
## Notices and Warnings
|
||||||
|
|
||||||
|
### DISTRIBUTION STATEMENT C
|
||||||
|
Distribution authorized to US Government agencies and their contractors;
|
||||||
|
Critical Technology, Export Controlled; (2021 Oct 06). Other requests for this
|
||||||
|
information shall be referred to AFRL Aerospace Systems Directorate.
|
||||||
|
|
||||||
|
### NOTICE TO ACCOMPANY FOREIGN DISCLOSURE
|
||||||
|
This content is furnished on the condition that it will not be released to
|
||||||
|
another nation without specific authority of the Department of the Air Force of
|
||||||
|
the United States, that it will be used for military purposes only, that
|
||||||
|
individual or corporate rights originating in the information, whether patented
|
||||||
|
or not, will be respected, that the recipient will report promptly to the
|
||||||
|
United States any known or suspected compromise, and that the information will
|
||||||
|
be provided substantially the same degree of security afforded it by the
|
||||||
|
Department of Defense of the United States. Also, regardless of any other
|
||||||
|
markings on the document, it will not be downgraded or declassified without
|
||||||
|
written approval from the originating U.S. agency.
|
||||||
|
|
||||||
|
### WARNING - EXPORT CONTROLLED
|
||||||
|
This content contains technical data whose export is restricted by the Arms
|
||||||
|
Export Control Act (Title 22, U.S.C. Sec 2751 et seq.) or the Export
|
||||||
|
Administration Act of 1979, as amended, Title 50 U.S.C., App. 2401 et seq.
|
||||||
|
Violations of these export laws are subject to severe criminal penalties.
|
||||||
|
Disseminate in accordance with provisions of DoD Directive 5230.25.
|
||||||
|
|
||||||
|
### HANDLING AND DESTRUCTION NOTICE
|
||||||
|
Handle this information in accordance with DoDI 5200.48. Destroy by any
|
||||||
|
approved method that will prevent unauthorized disclosure or reconstruction of
|
||||||
|
this information in accordance with NIST SP 800-88 and 32 C.F.R 2002.14
|
||||||
|
(Safeguarding Controlled Unclassified Information).
|
||||||
|
|
||||||
|
**CUI**
|
||||||
33
csv_event_output.txt
Normal file
33
csv_event_output.txt
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
csv_event_output
|
||||||
|
file replay.csv
|
||||||
|
enable all
|
||||||
|
end_csv_event_output
|
||||||
|
|
||||||
|
visual_elements
|
||||||
|
|
||||||
|
end_visual_elements
|
||||||
|
visual_elements
|
||||||
|
|
||||||
|
end_visual_elements
|
||||||
|
visual_elements
|
||||||
|
|
||||||
|
end_visual_elements
|
||||||
|
|
||||||
|
visual_elements
|
||||||
|
|
||||||
|
end_visual_elements
|
||||||
|
visual_elements
|
||||||
|
|
||||||
|
end_visual_elements
|
||||||
|
visual_elements
|
||||||
|
|
||||||
|
end_visual_elements
|
||||||
64
detection_writes.txt
Normal file
64
detection_writes.txt
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
script_variables
|
||||||
|
global Set< string > mPlatformTypes = Set< string >();
|
||||||
|
|
||||||
|
global FileIO mSensorDetectFile = FileIO();
|
||||||
|
|
||||||
|
global string mSensorFileName = "sensor_detection_data.txt";
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_initialize
|
||||||
|
if (! mSensorDetectFile.Open(mSensorFileName, "out"))
|
||||||
|
{
|
||||||
|
writeln("Could not open file: ", mSensorFileName);
|
||||||
|
}
|
||||||
|
string header = write_str("Time(sec),ObserverCallbackType,PlatformName,TrackStartTime(sec),SensorName,TargetName");
|
||||||
|
mSensorDetectFile.Writeln(header);
|
||||||
|
|
||||||
|
#Fill in platform names of interest
|
||||||
|
mPlatformTypes.Clear();
|
||||||
|
mPlatformTypes.Insert("EW_RADAR");
|
||||||
|
mPlatformTypes.Insert("ACQ_RADAR");
|
||||||
|
mPlatformTypes.Insert("TTR_RADAR");
|
||||||
|
end_on_initialize
|
||||||
|
|
||||||
|
script bool FindStr(Array<string> aArray, string aKey)
|
||||||
|
foreach (string key in aArray)
|
||||||
|
{
|
||||||
|
if (key == aKey)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end_script
|
||||||
|
|
||||||
|
script void SensorDetectionAttempt(WsfPlatform aPlatform, WsfSensor aSensor, WsfPlatform aTarget, WsfSensorInteraction aResult)
|
||||||
|
if (mPlatformTypes.Exists(aPlatform.Type()))
|
||||||
|
{
|
||||||
|
WsfEW_Effects effects = aResult.EW_Effects();
|
||||||
|
int mask = effects.Mask();
|
||||||
|
bool cohCheck = effects.EA_CoherencyCheck("noise");
|
||||||
|
double myValue1 = effects.EffectValue("jamming", "blanking");
|
||||||
|
double myValue2 = effects.EffectValue("jamming", "cancellation");
|
||||||
|
string mystring = write_str(TIME_NOW,
|
||||||
|
",", "SensorDetectionAttempt",
|
||||||
|
",", aPlatform.Name(),
|
||||||
|
//",", aResult.Failed(),
|
||||||
|
//",", cohCheck,
|
||||||
|
",", myValue1,
|
||||||
|
",", myValue2);
|
||||||
|
mSensorDetectFile.Writeln(mystring);
|
||||||
|
}
|
||||||
|
end_script
|
||||||
|
|
||||||
|
observer
|
||||||
|
enable SENSOR_DETECTION_ATTEMPT SensorDetectionAttempt
|
||||||
|
end_observer
|
||||||
40
dis_data.txt
Normal file
40
dis_data.txt
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
dis_interface
|
||||||
|
|
||||||
|
entity_type TARGET 2:1:222:2:1:1:0
|
||||||
|
entity_type ACQ_RADAR 9:1:222:2:2:3:0
|
||||||
|
entity_type EW_RADAR 9:1:222:2:2:2:0
|
||||||
|
entity_type LARGE_SAM_TTR 1:1:222:28:4:3:0
|
||||||
|
entity_type LARGE_SAM_LAUNCHER 1:1:222:28:4:2:0
|
||||||
|
entity_type LARGE_SAM_BATTALION 1:1:222:7:0:0:0
|
||||||
|
entity_type IADS_CMDR 1:1:225:0:5:0:0
|
||||||
|
entity_type RADAR_COMPANY 1:1:222:7:6:0:0
|
||||||
|
entity_type BLUE_MULTIROLE_FIGHTER_1E 1:2:225:1:9:10:0
|
||||||
|
entity_type SOJ 1:2:225:6:9:2:0
|
||||||
|
#entity_type UCAV 1:2:225:50:8:0:0 # UCAV
|
||||||
|
entity_type UCAV 1:2:225:1:9:10:0
|
||||||
|
|
||||||
|
entity_type LARGE_SAM 2:1:225:1:16:0:0
|
||||||
|
|
||||||
|
entity_type BLUE_GPS_BOMB_2 2:1:225:1:13:1:0
|
||||||
|
entity_type BLUE_GPS_BOMB_1 2:1:225:1:13:2:0
|
||||||
|
entity_type BLUE_GLIDE_BOMB_1 2:1:225:1:13:2:1
|
||||||
|
|
||||||
|
emitter_type SOJ_SBAND_JAMMER 1
|
||||||
|
emitter_type SOJ_VHF_JAMMER 2
|
||||||
|
emitter_type SOJ_XBAND_JAMMER 3
|
||||||
|
|
||||||
|
emitter_type UCAV_ESM 10
|
||||||
|
|
||||||
|
emitter_type EW_RADAR 11
|
||||||
|
emitter_type TTR_RADAR 12
|
||||||
|
emitter_type ACQ_RADAR 13
|
||||||
|
|
||||||
|
end_dis_interface
|
||||||
16
dis_ew_data.txt
Normal file
16
dis_ew_data.txt
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
dis_interface
|
||||||
|
ew_technique_type noise_jamming 0
|
||||||
|
ew_technique_type random_pulse_jamming 132
|
||||||
|
ew_technique_type jtos_gain_jamming 136
|
||||||
|
ew_technique_type false_target_jamming 148
|
||||||
|
ew_technique_type simple_false_target_jamming 152
|
||||||
|
end_dis_interface
|
||||||
|
|
||||||
37
dis_realtime.txt
Normal file
37
dis_realtime.txt
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
dis_interface
|
||||||
|
#log_created_entities
|
||||||
|
exercise 1
|
||||||
|
site 25
|
||||||
|
application 1
|
||||||
|
multicast 224.2.25.55 10.
|
||||||
|
#broadcast 10.
|
||||||
|
port 3225
|
||||||
|
autostart
|
||||||
|
|
||||||
|
#use_pdu_time
|
||||||
|
ignore_pdu_time
|
||||||
|
|
||||||
|
simple_detonations on
|
||||||
|
simple_kill_range 100 m
|
||||||
|
|
||||||
|
heartbeat_timer 5.0 sec
|
||||||
|
heartbeat_multiplier 2.4
|
||||||
|
mover_update_timer 5.0 sec
|
||||||
|
entity_position_threshold 10.0 meters
|
||||||
|
|
||||||
|
#suppress_comm_data true
|
||||||
|
|
||||||
|
#initial_distribution_interval 5 sec
|
||||||
|
|
||||||
|
#debug_emission_pdu 2
|
||||||
|
|
||||||
|
end_dis_interface
|
||||||
|
|
||||||
51
doc/aea_iads.rst
Normal file
51
doc/aea_iads.rst
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
.. ****************************************************************************
|
||||||
|
.. 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.
|
||||||
|
.. ****************************************************************************
|
||||||
|
|
||||||
|
.. demo:: aea_iads
|
||||||
|
|
||||||
|
.. |classification| replace:: Unclassified
|
||||||
|
.. |date| replace:: 2018-03-22
|
||||||
|
.. |group| replace:: Demos
|
||||||
|
.. |image| replace:: images/aea_iads_demo.png
|
||||||
|
.. |tags| replace:: n/a
|
||||||
|
.. |title| replace:: aea_iads demo
|
||||||
|
.. |startup| replace:: strike.txt
|
||||||
|
.. |summary| replace:: This directory contains the necessary files to test the EW effects in a scenario similar to the iads_demo baseline scenario.
|
||||||
|
|
||||||
|
.. |i| image:: images/aea_iads_demo.png
|
||||||
|
:height: 150 px
|
||||||
|
:width: 150 px
|
||||||
|
|
||||||
|
.. include:: demo_template.txt
|
||||||
|
|
||||||
|
| This directory contains the necessary files to test the EW effects
|
||||||
|
| in a scenario similar to the iads_demo baseline scenario.
|
||||||
|
|
|
||||||
|
| The SOJ and EW_Radar have EA and EP techniques, respectively, with them
|
||||||
|
| to aid in the testing and verification of these techniques.
|
||||||
|
|
|
||||||
|
| The strike.txt file is the normal run input file to run the simulation
|
||||||
|
| as a single application.
|
||||||
|
|
|
||||||
|
| To execute, open "strike.txt" in Wizard and execute using the mission
|
||||||
|
| application. The replay file will written to the output directory for
|
||||||
|
| opening by Mystic.
|
||||||
|
|
|
||||||
|
| Also included are two realtime run files strike-rt.txt and iads-rt.txt
|
||||||
|
| that can be run separately to test the jamming and EW effects over DIS.
|
||||||
|
| To run both concurrently, open two Wizard applications one with
|
||||||
|
| "iads-rt.txt" and one with "strike-rt.txt" and execute using the mission
|
||||||
|
| application. Each WSF application communicate over DIS. The applications
|
||||||
|
| can be run on separate hosts or on the same host. The file dis_data.txt
|
||||||
|
| provides the DIS Enumeration mapping for the entity types, emitter types,
|
||||||
|
| and EW technique types.
|
||||||
|
|
|
||||||
|
| To visually monitor the progress of the realtime sims, Warlock can be opened
|
||||||
|
| and then setup to monitor multicast address 224.2.25.55, port 3225 via input
|
||||||
|
file containing a dis_interface block.
|
||||||
25
doc/iads.rst
Normal file
25
doc/iads.rst
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
.. ****************************************************************************
|
||||||
|
.. 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.
|
||||||
|
.. ****************************************************************************
|
||||||
|
|
||||||
|
.. demo:: iads
|
||||||
|
|
||||||
|
.. |classification| replace:: Unclassified
|
||||||
|
.. |date| replace:: 2014-09-02
|
||||||
|
.. |group| replace:: Demos
|
||||||
|
.. |image| replace:: images/iads_demo.png
|
||||||
|
.. |tags| replace:: n/a
|
||||||
|
.. |title| replace:: iads demo
|
||||||
|
.. |startup| replace:: strike.txt
|
||||||
|
.. |summary| replace:: n/a
|
||||||
|
|
||||||
|
.. |i| image:: images/iads_demo.png
|
||||||
|
:height: 150 px
|
||||||
|
:width: 150 px
|
||||||
|
|
||||||
|
.. include:: demo_template.txt
|
||||||
BIN
doc/images/aea_iads_demo.png
Normal file
BIN
doc/images/aea_iads_demo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 53 KiB |
BIN
doc/images/iads_demo.png
Normal file
BIN
doc/images/iads_demo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 171 KiB |
68
event_output.txt
Normal file
68
event_output.txt
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
# common file for selecting which messages appear in the event log
|
||||||
|
|
||||||
|
event_output
|
||||||
|
file replay.evt
|
||||||
|
time_format h:m:s.1
|
||||||
|
lat_lon_format d:m:s.2
|
||||||
|
print_track_in_message true
|
||||||
|
|
||||||
|
disable TEAM_NAME_DEFINITION
|
||||||
|
|
||||||
|
#enable COMM_TURNED_OFF
|
||||||
|
#enable COMM_TURNED_ON
|
||||||
|
enable JAMMING_ATTEMPT
|
||||||
|
enable JAMMING_REQUEST_CANCELED
|
||||||
|
enable JAMMING_REQUEST_INITIATED
|
||||||
|
enable JAMMING_REQUEST_UPDATED
|
||||||
|
#enable LOCAL_TRACK_CORRELATION
|
||||||
|
#enable LOCAL_TRACK_DECORRELATION
|
||||||
|
#enable LOCAL_TRACK_INITIATED
|
||||||
|
#enable LOCAL_TRACK_UPDATED
|
||||||
|
#enable LOCAL_TRACK_DROPPED
|
||||||
|
#enable MESSAGE_DISCARDED
|
||||||
|
#enable MESSAGE_UPDATED
|
||||||
|
#enable MESSAGE_QUEUED
|
||||||
|
#enable MESSAGE_RECEIVED
|
||||||
|
#enable MESSAGE_TRANSMITTED
|
||||||
|
#enable OPERATING_LEVEL_CHANGED
|
||||||
|
#enable PLATFORM_ADDED
|
||||||
|
#enable PLATFORM_DELETED
|
||||||
|
#enable PLATFORM_BROKEN
|
||||||
|
#enable PROCESSOR_TURNED_OFF
|
||||||
|
#enable PROCESSOR_TURNED_ON
|
||||||
|
enable SENSOR_DETECTION_ATTEMPT
|
||||||
|
#enable SENSOR_FREQUENCY_CHANGED
|
||||||
|
#enable SENSOR_MODE_ACTIVATED
|
||||||
|
#enable SENSOR_MODE_DEACTIVATED
|
||||||
|
#enable SENSOR_REQUEST_CANCELED
|
||||||
|
#enable SENSOR_REQUEST_INITIATED
|
||||||
|
#enable SENSOR_REQUEST_UPDATED
|
||||||
|
#enable SENSOR_TRACK_INITIATED
|
||||||
|
#enable SENSOR_TRACK_UPDATED
|
||||||
|
#enable SENSOR_TRACK_DROPPED
|
||||||
|
#enable SENSOR_TURNED_ON
|
||||||
|
#enable SENSOR_TURNED_OFF
|
||||||
|
#enable SIMULATION_STARTING
|
||||||
|
#enable SIMULATION_COMPLETE
|
||||||
|
#enable TASK_ASSIGNED
|
||||||
|
#enable TASK_CANCELED
|
||||||
|
#enable TASK_COMPLETED
|
||||||
|
#enable WEAPON_FIRE_ABORTED
|
||||||
|
#enable WEAPON_FIRE_REQUESTED
|
||||||
|
#enable WEAPON_FIRED
|
||||||
|
#enable WEAPON_HIT
|
||||||
|
#enable WEAPON_MISSED
|
||||||
|
#enable WEAPON_RELOAD_STARTED
|
||||||
|
#enable WEAPON_RELOAD_ENDED
|
||||||
|
#enable WEAPON_TERMINATED
|
||||||
|
#enable WEAPON_TURNED_OFF
|
||||||
|
#enable WEAPON_TURNED_ON
|
||||||
|
end_event_output
|
||||||
14
event_pipe.txt
Normal file
14
event_pipe.txt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
# common file for selecting which messages appear in the event pipe
|
||||||
|
|
||||||
|
event_pipe
|
||||||
|
file replay.aer
|
||||||
|
use_preset default
|
||||||
|
end_event_pipe
|
||||||
33
iads-rt.txt
Normal file
33
iads-rt.txt
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
define_path_variable CASE iads-rt
|
||||||
|
log_file output/$(CASE).log
|
||||||
|
|
||||||
|
realtime
|
||||||
|
|
||||||
|
include setup.txt
|
||||||
|
|
||||||
|
include dis_data.txt
|
||||||
|
include dis_ew_data.txt
|
||||||
|
include dis_realtime.txt
|
||||||
|
|
||||||
|
include xio_interface.txt
|
||||||
|
|
||||||
|
include scenarios/targets.txt
|
||||||
|
include scenarios/iads_laydown.txt
|
||||||
|
|
||||||
|
event_output file NULL end_event_output
|
||||||
|
csv_event_output file NULL end_csv_event_output
|
||||||
|
event_pipe file NULL end_event_pipe
|
||||||
|
|
||||||
|
dis_interface
|
||||||
|
application 2
|
||||||
|
end_dis_interface
|
||||||
|
|
||||||
|
end_time 40 min
|
||||||
19
iads-rt.txt.ide_conf
Normal file
19
iads-rt.txt.ide_conf
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# File generated by AFSIM Wizard
|
||||||
|
# DO NOT MODIFY, YOUR CHANGES WILL BE OVERWRITTEN
|
||||||
|
############## Debugger Settings ##############
|
||||||
|
# The following inputs configure WSF to connect
|
||||||
|
# to this instance of the AFSIM Wizard.
|
||||||
|
# This text should be added to your WSF inputs
|
||||||
|
###############################################
|
||||||
|
xio_interface
|
||||||
|
unicast 127.0.0.1 # Change to this hostname if running from another machine
|
||||||
|
send_port 60321
|
||||||
|
pause_for_connection yes
|
||||||
|
debug on
|
||||||
|
verbose on
|
||||||
|
end_xio_interface
|
||||||
|
realtime
|
||||||
|
minimum_mover_timestep 0 s
|
||||||
|
|
||||||
|
# This file contains scripts which enhance the watch variable values
|
||||||
|
include_once "D:\developer\AFSIM_2.9\resources\data\_wsf_debug_scripts_.txt"
|
||||||
0
mission.log
Normal file
0
mission.log
Normal file
24
multi_thread.txt
Normal file
24
multi_thread.txt
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
multi_thread
|
||||||
|
#number_of_threads 4
|
||||||
|
#multi_thread_update_interval 0.2 sec
|
||||||
|
#platform_update_multiplier 5
|
||||||
|
#sensor_update_multiplier 1
|
||||||
|
|
||||||
|
line_of_sight_manager
|
||||||
|
multi_thread
|
||||||
|
maximum_location_change 2500.0 m
|
||||||
|
#debug_thread
|
||||||
|
end_line_of_sight_manager
|
||||||
|
|
||||||
|
dis_interface
|
||||||
|
#debug_thread
|
||||||
|
multi_threading on
|
||||||
|
end_dis_interface
|
||||||
150
nellis.sep
Normal file
150
nellis.sep
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
51277 1
|
||||||
|
1
|
||||||
|
1
|
||||||
|
4 Main
|
||||||
|
3
|
||||||
|
50331648
|
||||||
|
83886082
|
||||||
|
83886080
|
||||||
|
770
|
||||||
|
11
|
||||||
|
1
|
||||||
|
6 49 1584 1104
|
||||||
|
Graphics
|
||||||
|
1
|
||||||
|
3
|
||||||
|
38.47588
|
||||||
|
-116.6227
|
||||||
|
0
|
||||||
|
90
|
||||||
|
671181.4
|
||||||
|
MapOptions
|
||||||
|
2
|
||||||
|
7
|
||||||
|
2
|
||||||
|
5
|
||||||
|
10 Western US
|
||||||
|
0
|
||||||
|
1
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
1
|
||||||
|
0
|
||||||
|
EndMapOptions
|
||||||
|
EndGraphics
|
||||||
|
0
|
||||||
|
0
|
||||||
|
1
|
||||||
|
0
|
||||||
|
7 EndMain
|
||||||
|
6 Filter
|
||||||
|
entity_options
|
||||||
|
3
|
||||||
|
.global.
|
||||||
|
DisplayIcon 0 1
|
||||||
|
DisplayName 1 1
|
||||||
|
DisplayWaypts 0 1
|
||||||
|
DisplaySegments 0 1
|
||||||
|
DisplayZones 0 1
|
||||||
|
DisplayAltLocs 0 1
|
||||||
|
DisplayAltLocLines 0 1
|
||||||
|
SymbolSize 2.5 1
|
||||||
|
LineWidth 3 1
|
||||||
|
DisplayUnderground 0 1
|
||||||
|
DisplayAboveground 0 1
|
||||||
|
DisplayCmtBubbles 0 1
|
||||||
|
DisplayCommandChain 0 1
|
||||||
|
InheritAll 0
|
||||||
|
End_EntityOptions
|
||||||
|
end_entity_options
|
||||||
|
11 PostProcess
|
||||||
|
postprocess_options
|
||||||
|
3
|
||||||
|
.global.
|
||||||
|
DisplayIcon 0 1
|
||||||
|
DisplayName 1 1
|
||||||
|
SymbolSize 1.5 1
|
||||||
|
LineWidth 3 1
|
||||||
|
KillRemovalTime 30 1
|
||||||
|
StaleRemovalTime 30 1
|
||||||
|
DeactRemovalTime 30 1
|
||||||
|
EmitFace 0 1
|
||||||
|
EmitEdge 0 1
|
||||||
|
EmitIcon 0 1
|
||||||
|
TraceLines 1 1
|
||||||
|
AltPoles 0 1
|
||||||
|
WingRibbon 0 1
|
||||||
|
CmtBubbles 0 1
|
||||||
|
Length 6000 1
|
||||||
|
AltPoleIncr 20 1
|
||||||
|
InheritEntityAll 0
|
||||||
|
IntrAll 0 0 1
|
||||||
|
XmitDetect 0 0 1
|
||||||
|
XmitTrack 0 0 1
|
||||||
|
XmitJam 0 0 1
|
||||||
|
XmitFire 1 0 1
|
||||||
|
XmitKill 0 0 1
|
||||||
|
RecvDetect 0 0 1
|
||||||
|
RecvTrack 0 0 1
|
||||||
|
RecvJam 0 0 1
|
||||||
|
RecvFire 1 0 1
|
||||||
|
RecvKill 0 0 1
|
||||||
|
XmitComm 0 1
|
||||||
|
RecvComm 0 1
|
||||||
|
CommIntrLife 1 1
|
||||||
|
IntrHistIncr 10 1
|
||||||
|
InheritIntrAll 0
|
||||||
|
End_PostProcessOptions
|
||||||
|
.blue.
|
||||||
|
DisplayIcon 0 1
|
||||||
|
DisplayName 1 1
|
||||||
|
SymbolSize 1 0
|
||||||
|
LineWidth 3 1
|
||||||
|
KillRemovalTime 30 1
|
||||||
|
StaleRemovalTime 30 1
|
||||||
|
DeactRemovalTime 30 1
|
||||||
|
EmitFace 0 1
|
||||||
|
EmitEdge 0 1
|
||||||
|
EmitIcon 0 1
|
||||||
|
TraceLines 1 1
|
||||||
|
AltPoles 0 1
|
||||||
|
WingRibbon 0 1
|
||||||
|
CmtBubbles 0 1
|
||||||
|
Length 6000 1
|
||||||
|
AltPoleIncr 20 1
|
||||||
|
InheritEntityAll 0
|
||||||
|
IntrAll 0 0 1
|
||||||
|
XmitDetect 0 0 1
|
||||||
|
XmitTrack 0 0 1
|
||||||
|
XmitJam 0 0 1
|
||||||
|
XmitFire 1 0 1
|
||||||
|
XmitKill 0 0 1
|
||||||
|
RecvDetect 0 0 1
|
||||||
|
RecvTrack 0 0 1
|
||||||
|
RecvJam 0 0 1
|
||||||
|
RecvFire 1 0 1
|
||||||
|
RecvKill 0 0 1
|
||||||
|
XmitComm 0 1
|
||||||
|
RecvComm 0 1
|
||||||
|
CommIntrLife 1 1
|
||||||
|
IntrHistIncr 10 1
|
||||||
|
InheritIntrAll 0
|
||||||
|
End_PostProcessOptions
|
||||||
|
end_postprocess_options
|
||||||
|
6 Common
|
||||||
|
0
|
||||||
|
0 0 1260 155
|
||||||
|
end_common_data
|
||||||
|
8 EndSedit
|
||||||
24
observer_test.txt
Normal file
24
observer_test.txt
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
# The following script is called for SENSOR_TRACK_INITIATED, SENSOR_TRACK_DROPPED.
|
||||||
|
script_interface
|
||||||
|
# debug
|
||||||
|
end_script_interface
|
||||||
|
|
||||||
|
script void sensorinfo(WsfPlatform aPlatform, WsfSensor aSensor, WsfTrack aTrack)
|
||||||
|
if (aTrack.TargetName() == "300_ucav")
|
||||||
|
{
|
||||||
|
writeln(TIME_NOW, ",", aTrack.StartTime(), ",", aTrack.SensorName(), ",", aTrack.TargetName(), ",", aTrack.Range());
|
||||||
|
}
|
||||||
|
end_script
|
||||||
|
|
||||||
|
observer
|
||||||
|
enable SENSOR_TRACK_INITIATED sensorinfo
|
||||||
|
enable SENSOR_TRACK_DROPPED sensorinfo
|
||||||
|
end_observer
|
||||||
523
patterns/radar1.ant
Normal file
523
patterns/radar1.ant
Normal file
@@ -0,0 +1,523 @@
|
|||||||
|
UNCLASSIFIED
|
||||||
|
Converted from file radar1.pat
|
||||||
|
0.00 30.00 -30.00 DB 2D
|
||||||
|
0.00 1801 0.00 0.10
|
||||||
|
0.00 1801 0.00 0.10
|
||||||
|
AZCUT
|
||||||
|
0.00 -0.20 -0.81 -1.87 -3.46 -5.72 -8.97
|
||||||
|
-14.01 -24.72 -24.61 -16.76 -14.07 -13.27 -13.72
|
||||||
|
-15.36 -18.55 -24.85 -30.00 -24.78 -20.14 -18.25
|
||||||
|
-17.85 -18.66 -20.81 -25.07 -30.00 -30.00 -25.07
|
||||||
|
-22.04 -20.88 -21.01 -22.38 -25.38 -30.00 -30.00
|
||||||
|
-30.00 -25.48 -23.50 -22.99 -23.70 -25.79 -30.00
|
||||||
|
-30.00 -30.00 -29.00 -26.02 -24.84 -24.94 -26.30
|
||||||
|
-29.34 -30.00 -30.00 -30.00 -28.63 -26.69 -26.20
|
||||||
|
-26.92 -29.05 -30.00 -30.00 -30.00 -30.00 -28.66
|
||||||
|
-27.53 -27.66 -29.06 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -28.99 -28.54 -29.30 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -29.56 -29.75 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00
|
||||||
|
ELCUT
|
||||||
|
0.00 -0.20 -0.81 -1.87 -3.46 -5.72 -8.97
|
||||||
|
-14.01 -24.72 -24.61 -16.76 -14.07 -13.27 -13.72
|
||||||
|
-15.36 -18.55 -24.85 -30.00 -24.78 -20.14 -18.25
|
||||||
|
-17.85 -18.66 -20.81 -25.07 -30.00 -30.00 -25.07
|
||||||
|
-22.04 -20.88 -21.01 -22.38 -25.38 -30.00 -30.00
|
||||||
|
-30.00 -25.48 -23.50 -22.99 -23.70 -25.79 -30.00
|
||||||
|
-30.00 -30.00 -29.00 -26.02 -24.84 -24.94 -26.30
|
||||||
|
-29.34 -30.00 -30.00 -30.00 -28.63 -26.69 -26.20
|
||||||
|
-26.92 -29.05 -30.00 -30.00 -30.00 -30.00 -28.66
|
||||||
|
-27.53 -27.66 -29.06 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -28.99 -28.54 -29.30 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -29.56 -29.75 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -29.75 -29.56 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -29.30 -28.54
|
||||||
|
-28.99 -30.00 -30.00 -30.00 -30.00 -30.00 -29.06
|
||||||
|
-27.66 -27.53 -28.66 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-29.05 -26.92 -26.20 -26.69 -28.63 -30.00 -30.00
|
||||||
|
-30.00 -29.34 -26.30 -24.94 -24.84 -26.02 -29.00
|
||||||
|
-30.00 -30.00 -30.00 -25.79 -23.70 -22.99 -23.50
|
||||||
|
-25.48 -30.00 -30.00 -30.00 -25.38 -22.38 -21.01
|
||||||
|
-20.88 -22.04 -25.07 -30.00 -30.00 -25.07 -20.81
|
||||||
|
-18.66 -17.85 -18.25 -20.14 -24.78 -30.00 -24.85
|
||||||
|
-18.55 -15.36 -13.72 -13.27 -14.07 -16.76 -24.61
|
||||||
|
-24.72 -14.01 -8.97 -5.72 -3.46 -1.87 -0.81
|
||||||
|
-0.20 0.00
|
||||||
523
patterns/radar2.ant
Normal file
523
patterns/radar2.ant
Normal file
@@ -0,0 +1,523 @@
|
|||||||
|
UNCLASSIFIED
|
||||||
|
Converted from file radar2.pat
|
||||||
|
0.00 30.00 -30.00 DB 2D
|
||||||
|
0.00 1801 0.00 0.10
|
||||||
|
0.00 1801 0.00 0.10
|
||||||
|
AZCUT
|
||||||
|
0.00 -0.20 -0.81 -1.87 -3.46 -5.72 -8.97
|
||||||
|
-14.01 -24.72 -24.61 -16.76 -14.07 -13.27 -13.72
|
||||||
|
-15.36 -18.55 -24.85 -30.00 -24.78 -20.14 -18.25
|
||||||
|
-17.85 -18.66 -20.81 -25.07 -30.00 -30.00 -25.07
|
||||||
|
-22.04 -20.88 -21.01 -22.38 -25.38 -30.00 -30.00
|
||||||
|
-30.00 -25.48 -23.50 -22.99 -23.70 -25.79 -30.00
|
||||||
|
-30.00 -30.00 -29.00 -26.02 -24.84 -24.94 -26.30
|
||||||
|
-29.34 -30.00 -30.00 -30.00 -28.63 -26.69 -26.20
|
||||||
|
-26.92 -29.05 -30.00 -30.00 -30.00 -30.00 -28.66
|
||||||
|
-27.53 -27.66 -29.06 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -28.99 -28.54 -29.30 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -29.56 -29.75 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00
|
||||||
|
ELCUT
|
||||||
|
0.00 -0.20 -0.81 -1.87 -3.46 -5.72 -8.97
|
||||||
|
-14.01 -24.72 -24.61 -16.76 -14.07 -13.27 -13.72
|
||||||
|
-15.36 -18.55 -24.85 -30.00 -24.78 -20.14 -18.25
|
||||||
|
-17.85 -18.66 -20.81 -25.07 -30.00 -30.00 -25.07
|
||||||
|
-22.04 -20.88 -21.01 -22.38 -25.38 -30.00 -30.00
|
||||||
|
-30.00 -25.48 -23.50 -22.99 -23.70 -25.79 -30.00
|
||||||
|
-30.00 -30.00 -29.00 -26.02 -24.84 -24.94 -26.30
|
||||||
|
-29.34 -30.00 -30.00 -30.00 -28.63 -26.69 -26.20
|
||||||
|
-26.92 -29.05 -30.00 -30.00 -30.00 -30.00 -28.66
|
||||||
|
-27.53 -27.66 -29.06 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -28.99 -28.54 -29.30 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -29.56 -29.75 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -29.75 -29.56 -30.00
|
||||||
|
-30.00 -30.00 -30.00 -30.00 -30.00 -29.30 -28.54
|
||||||
|
-28.99 -30.00 -30.00 -30.00 -30.00 -30.00 -29.06
|
||||||
|
-27.66 -27.53 -28.66 -30.00 -30.00 -30.00 -30.00
|
||||||
|
-29.05 -26.92 -26.20 -26.69 -28.63 -30.00 -30.00
|
||||||
|
-30.00 -29.34 -26.30 -24.94 -24.84 -26.02 -29.00
|
||||||
|
-30.00 -30.00 -30.00 -25.79 -23.70 -22.99 -23.50
|
||||||
|
-25.48 -30.00 -30.00 -30.00 -25.38 -22.38 -21.01
|
||||||
|
-20.88 -22.04 -25.07 -30.00 -30.00 -25.07 -20.81
|
||||||
|
-18.66 -17.85 -18.25 -20.14 -24.78 -30.00 -24.85
|
||||||
|
-18.55 -15.36 -13.72 -13.27 -14.07 -16.76 -24.61
|
||||||
|
-24.72 -14.01 -8.97 -5.72 -3.46 -1.87 -0.81
|
||||||
|
-0.20 0.00
|
||||||
265
patterns/sup2afsim.pl
Normal file
265
patterns/sup2afsim.pl
Normal file
@@ -0,0 +1,265 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
#!/usr/bin/perl -w
|
||||||
|
# convert a suppressor antenna pattern to a tabular pattern
|
||||||
|
#
|
||||||
|
|
||||||
|
sub ReadAndTrim
|
||||||
|
{
|
||||||
|
# Read a single line from the input file, checking for EOF.
|
||||||
|
$eof = !($line = <ANT_IN>);
|
||||||
|
|
||||||
|
# Trim leading and trailing whitespace.
|
||||||
|
$line =~ s/^\s+|\s+$//g;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (@ARGV != 2)
|
||||||
|
{
|
||||||
|
die("Wrong number of arguments.\nUsage: convert <in_file> <out_file>\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
$file_name = $ARGV[0];
|
||||||
|
$out_file_name = $ARGV[1];
|
||||||
|
|
||||||
|
if (! open(ANT_IN, "+<", $file_name))
|
||||||
|
{
|
||||||
|
die("** ERROR: File $file_name could not be opened\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! open ANT_OUT, ">", $out_file_name)
|
||||||
|
{
|
||||||
|
die("** ERROR: File $out_file_name could not be opened\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
$el_array_index = 0;
|
||||||
|
$data_value_set_index = 0;
|
||||||
|
$az_array_length = 0;
|
||||||
|
$max_el_values_size = 0;
|
||||||
|
$max_el_values_index = 0;
|
||||||
|
$el_array_length = 0;
|
||||||
|
my @el_array;
|
||||||
|
#Read first line;
|
||||||
|
ReadAndTrim();
|
||||||
|
|
||||||
|
while (!eof)
|
||||||
|
{
|
||||||
|
#print $line, "\n";
|
||||||
|
# first character in the line should not be "$"
|
||||||
|
# if DIMENSION 1 AZ found
|
||||||
|
if (index($line , "DIMENSION 1 AZ")!= -1)
|
||||||
|
{
|
||||||
|
$firstChar = index($line, "(") + 1;
|
||||||
|
$lastChar = index($line, ")") - 1;
|
||||||
|
$az_units = lc(substr $line, $firstChar, ($lastChar - $firstChar + 1));
|
||||||
|
ReadAndTrim();
|
||||||
|
while (index($line, "\$") != 0)
|
||||||
|
{
|
||||||
|
# push all whitespace delimited values into the array.
|
||||||
|
push (@az_array, split(/\s+/, $line));
|
||||||
|
ReadAndTrim();
|
||||||
|
}
|
||||||
|
$az_array_length = @az_array;
|
||||||
|
|
||||||
|
# get ready for next block
|
||||||
|
$index = 0;
|
||||||
|
while ($index != $az_array_length)
|
||||||
|
{
|
||||||
|
$offset = 0.0; # may change
|
||||||
|
push(@az_array_padded, $az_array[$index]);
|
||||||
|
if (($index != 0) &&
|
||||||
|
($index != ($az_array_length - 1)))
|
||||||
|
{
|
||||||
|
push(@az_array_padded, $az_array[$index] + 0.0001);
|
||||||
|
}
|
||||||
|
$index = $index + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# convert to array with staggered edge values (e.g. -0.00001 and 0.00001)
|
||||||
|
# else if DIMENSION 2 EL found
|
||||||
|
elsif (index($line, "DIMENSION 2 EL") != -1)
|
||||||
|
{
|
||||||
|
# check the value in parentheses
|
||||||
|
# these are the units
|
||||||
|
$firstChar = index($line, "(") + 1;
|
||||||
|
$lastChar = index($line, ")") - 1;
|
||||||
|
$el_units[$data_value_set_index] = lc(substr $line, $firstChar, ($lastChar - $firstChar + 1));
|
||||||
|
|
||||||
|
#print {STDOUT} "el units: ", $el_units[data_value_set_index], "\n";
|
||||||
|
|
||||||
|
# read next line
|
||||||
|
ReadAndTrim();
|
||||||
|
|
||||||
|
# Clear the el values
|
||||||
|
@el_values = ();
|
||||||
|
|
||||||
|
# read in el values until we get to the actual data
|
||||||
|
while (index($line, "GAIN") == -1)
|
||||||
|
{
|
||||||
|
# push all whitespace delimited values into the array.
|
||||||
|
push (@el_values, split(/\s+/, $line));
|
||||||
|
ReadAndTrim();
|
||||||
|
}
|
||||||
|
|
||||||
|
# these need to be saved for later evaluation
|
||||||
|
$el_values_size = @el_values;
|
||||||
|
for($i=0; $i<$el_values_size; $i=$i+1)
|
||||||
|
{
|
||||||
|
$el_array[$data_value_set_index][$i] = $el_values[$i];
|
||||||
|
}
|
||||||
|
$el_array_length[$data_value_set_index] = $el_values_size;
|
||||||
|
|
||||||
|
# Need to determine which set of el values has the most elements
|
||||||
|
# as all other el arrays will be expanded to fit this one.
|
||||||
|
if ($el_values_size > $max_el_values_size)
|
||||||
|
{
|
||||||
|
$max_el_values_index = $data_value_set_index;
|
||||||
|
$max_el_values_size = $el_values_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
# read data values
|
||||||
|
# this is tricky because we read either until we encounter another
|
||||||
|
# header or comment line, or we reach eof :(
|
||||||
|
# for now, we will REQUIRE a comment break "$"; although this does not
|
||||||
|
# appear to be required, the files I've seen follow the rule.
|
||||||
|
|
||||||
|
# Clear the data values.
|
||||||
|
@data_values = ();
|
||||||
|
|
||||||
|
# Keep reading data until we encounter the "$" char (comment) at the first position of a line.
|
||||||
|
do
|
||||||
|
{
|
||||||
|
ReadAndTrim();
|
||||||
|
if (! $eof)
|
||||||
|
{
|
||||||
|
$char1 = substr $line, 0, 1; #check for valid data
|
||||||
|
|
||||||
|
# read el values;
|
||||||
|
push (@data_values, split(/\s+/, $line));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print "End of file.\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while ((!$eof) && (!($char1 =~ /\$/)));
|
||||||
|
|
||||||
|
# these need to be saved for later evaluation
|
||||||
|
$data_values_size = @data_values;
|
||||||
|
for($i=0; $i<$data_values_size; $i=$i+1)
|
||||||
|
{
|
||||||
|
$data_array[$data_value_set_index][$i] = $data_values[$i];
|
||||||
|
}
|
||||||
|
$data_array_length[$data_value_set_index] = $data_values_size;
|
||||||
|
|
||||||
|
# increment the data value set index
|
||||||
|
#print "Data Values: ", @data_values, "end_data_values\n";
|
||||||
|
$data_value_set_index = $data_value_set_index + 1;
|
||||||
|
|
||||||
|
# Find max set of el values. The entire table will have
|
||||||
|
# to be expanded and padded to include all elevation values.
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#comment line; read next
|
||||||
|
ReadAndTrim();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Done reading input
|
||||||
|
print "Done reading input.";
|
||||||
|
|
||||||
|
$el_array_padded[0] = $el_array[$max_el_values_index][0];
|
||||||
|
$index = 1;
|
||||||
|
while ($index != $max_el_values_size)
|
||||||
|
{
|
||||||
|
$offset = 0.0; # may change
|
||||||
|
push(@el_array_padded, $el_array[$max_el_values_index][$index]);
|
||||||
|
if ($index != ($max_el_values_size - 1))
|
||||||
|
{
|
||||||
|
push(@el_array_padded, $el_array[$max_el_values_index][$index]);
|
||||||
|
}
|
||||||
|
$index = $index + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#now ready to write out data
|
||||||
|
$num_padded_el_values = @el_array_padded;
|
||||||
|
$num_padded_az_values = @az_array_padded;
|
||||||
|
#$num_padded_values = $num_padded_az_values * $num_padded_el_values;
|
||||||
|
|
||||||
|
# Three comment lines
|
||||||
|
print {ANT_OUT} "# Generated from Suppressor\n";
|
||||||
|
print {ANT_OUT} "# \n";
|
||||||
|
print {ANT_OUT} "# \n";
|
||||||
|
print {ANT_OUT} $num_padded_az_values, " ", $num_padded_el_values, "\n ";
|
||||||
|
$prevElValue = 500;
|
||||||
|
for ($i=0; $i<$num_padded_el_values; ++$i)
|
||||||
|
{
|
||||||
|
if ($el_array_padded[$i] == $prevElValue)
|
||||||
|
{
|
||||||
|
print {ANT_OUT} $el_array_padded[$i]+0.01, " ";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print {ANT_OUT} $el_array_padded[$i], " ";
|
||||||
|
}
|
||||||
|
$prevElValue = $el_array_padded[$i];
|
||||||
|
}
|
||||||
|
print {ANT_OUT} "\n";
|
||||||
|
|
||||||
|
#print el index
|
||||||
|
# All data for the first az bin (first and second indices) are available in the first el set.
|
||||||
|
# Just need to expand values into all el bins
|
||||||
|
$az_index = 0;
|
||||||
|
for ($az = 0; $az < $num_padded_az_values; ++$az)
|
||||||
|
{
|
||||||
|
$el_index = 0;
|
||||||
|
#print $az, " ", $az_array[$az_index], " ", $az_array_padded[$az],"\n";
|
||||||
|
for ($el = 0; $el < $num_padded_el_values; ++$el)
|
||||||
|
{
|
||||||
|
#print $az, " ", $el, " ", $az_index, " ", $el_index, " ", $el_array[$az_index][$el_index], " ", $el_array_padded[$el], " ", $data_array[$az_index][$el_index], "\n";
|
||||||
|
$pattern[$az][$el] = $data_array[$az_index][$el_index];
|
||||||
|
if ($el_array[$az_index][$el_index] < $el_array_padded[$el])
|
||||||
|
{
|
||||||
|
if ($el_array[$az_index][$el_index+1] <= $el_array_padded[$el])
|
||||||
|
{
|
||||||
|
$el_index += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($az_array[$az_index] < ($az_array_padded[$az] - 0.0001))
|
||||||
|
{
|
||||||
|
$az_index += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$prevAzValue = 500;
|
||||||
|
for ($az = 0; $az < $num_padded_az_values; ++$az)
|
||||||
|
{
|
||||||
|
if ($az_array_padded[$az] == $prevAzValue)
|
||||||
|
{
|
||||||
|
print {ANT_OUT} $az_array_padded[$az]+0.01, " ";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print {ANT_OUT} $az_array_padded[$az], " ";
|
||||||
|
}
|
||||||
|
$prevAzValue = $az_array_padded[$az];
|
||||||
|
for ($el = 0; $el < $num_padded_el_values; ++$el)
|
||||||
|
{
|
||||||
|
print {ANT_OUT} $pattern[$az][$el], " ";
|
||||||
|
}
|
||||||
|
print {ANT_OUT} "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
#print $az_array_padded;
|
||||||
|
# Close input and output files
|
||||||
|
close(ANT_IN);
|
||||||
|
close(ANT_OUT);
|
||||||
|
select(STDOUT);
|
||||||
44
patterns/test.dat
Normal file
44
patterns/test.dat
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# UNCLASSIFIED//FOUO
|
||||||
|
# See AAA_ITAR.txt for distribution and usage.
|
||||||
|
# ****************************************************************************
|
||||||
|
DATA-TABLE
|
||||||
|
|
||||||
|
$ --UNCLASSIFIED
|
||||||
|
|
||||||
|
$ ...
|
||||||
|
$ ...
|
||||||
|
|
||||||
|
DIMENSION 1 AZ (DEG)
|
||||||
|
-180 -90 -30 0 30 90 180
|
||||||
|
|
||||||
|
$ EL DATA FOR AZ Interval: -180 to -90
|
||||||
|
DIMENSION 2 EL (DEG)
|
||||||
|
-90 -30 30 90
|
||||||
|
GAIN (DB)
|
||||||
|
-10 -8 -10
|
||||||
|
$ EL DATA FOR AZ Interval: -90 to -30
|
||||||
|
DIMENSION 2 EL (DEG)
|
||||||
|
-90 -30 0 30 90
|
||||||
|
GAIN (DB)
|
||||||
|
-9 -7 -7 -9
|
||||||
|
$ EL DATA FOR AZ Interval: -30 to 0
|
||||||
|
DIMENSION 2 EL (DEG)
|
||||||
|
-90 -30 -10 10 30 90
|
||||||
|
GAIN (DB)
|
||||||
|
-3 -2 0 -2 -3
|
||||||
|
$ EL DATA FOR AZ Interval: 0 to 30
|
||||||
|
DIMENSION 2 EL (DEG)
|
||||||
|
-90 -30 30 90
|
||||||
|
GAIN (DB)
|
||||||
|
-3 0 -3
|
||||||
|
$ EL DATA FOR AZ Interval: 30 to 90
|
||||||
|
DIMENSION 2 EL (DEG)
|
||||||
|
-90 -30 30 90
|
||||||
|
GAIN (DB)
|
||||||
|
-9 -7 -9
|
||||||
|
$ EL DATA FOR AZ Interval: 90 to 180
|
||||||
|
DIMENSION 2 EL (DEG)
|
||||||
|
-90 -30 30 90
|
||||||
|
GAIN (DB)
|
||||||
|
-10 -8 -10
|
||||||
30
platforms/acq_radar.txt
Normal file
30
platforms/acq_radar.txt
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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 ****** *
|
||||||
|
# * * ************************************** * *
|
||||||
|
|
||||||
|
include_once platforms/red_radar.txt
|
||||||
|
include_once sensors/radar/acq_radar.txt
|
||||||
|
|
||||||
|
platform_type ACQ_RADAR RED_RADAR
|
||||||
|
icon Ground_Radar
|
||||||
|
category ACQUISITION
|
||||||
|
|
||||||
|
sensor acq_radar ACQ_RADAR
|
||||||
|
off
|
||||||
|
internal_link data_mgr
|
||||||
|
ignore_same_side
|
||||||
|
end_sensor
|
||||||
|
|
||||||
|
aux_data
|
||||||
|
double max_range = 92600 # meters = 50 nm
|
||||||
|
end_aux_data
|
||||||
|
end_platform_type
|
||||||
85
platforms/awacs.txt
Normal file
85
platforms/awacs.txt
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
###############################################################################
|
||||||
|
# simple AWACS Platform (Airborne CAOC)
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
optical_signature awacs_optical_signature
|
||||||
|
constant 1000 m^2
|
||||||
|
end_optical_signature
|
||||||
|
|
||||||
|
radar_signature awacs_radar_signature
|
||||||
|
constant 1000 m^2
|
||||||
|
end_radar_signature
|
||||||
|
|
||||||
|
|
||||||
|
platform_type AWACS WSF_PLATFORM
|
||||||
|
|
||||||
|
icon KC-10
|
||||||
|
side blue
|
||||||
|
|
||||||
|
mover WSF_AIR_MOVER
|
||||||
|
default_linear_acceleration 1.0 g
|
||||||
|
default_radial_acceleration 1.0 g
|
||||||
|
end_mover
|
||||||
|
|
||||||
|
optical_signature awacs_optical_signature
|
||||||
|
radar_signature awacs_radar_signature
|
||||||
|
|
||||||
|
# command_chain sat-ops self // satellites
|
||||||
|
# command_chain uavs self // UAVs
|
||||||
|
# command_chain strike self // Strike assets
|
||||||
|
|
||||||
|
// --- * --- * ---
|
||||||
|
// Comm
|
||||||
|
// --- * --- * ---
|
||||||
|
# comm constellation-xmtr WSF_RADIO_XMTR
|
||||||
|
# frequency 900.0 mhz
|
||||||
|
# end_comm
|
||||||
|
|
||||||
|
# comm constellation-rcvr WSF_RADIO_RCVR
|
||||||
|
# frequency 1000.0 mhz
|
||||||
|
# internal_link track-proc
|
||||||
|
# end_comm
|
||||||
|
|
||||||
|
|
||||||
|
// --- * --- * ---
|
||||||
|
// Sensors
|
||||||
|
// --- * --- * ---
|
||||||
|
// N/A
|
||||||
|
sensor geo_sensor WSF_GEOMETRIC_SENSOR
|
||||||
|
azimuth_field_of_view -180.0 degrees 180.0 degrees
|
||||||
|
elevation_field_of_view -90.0 degrees 90.0 degrees
|
||||||
|
minimum_range 0 m
|
||||||
|
# 300 nm
|
||||||
|
maximum_range 555600 m
|
||||||
|
on
|
||||||
|
frame_time 0.5 sec
|
||||||
|
reports_location
|
||||||
|
reports_velocity
|
||||||
|
reports_iff
|
||||||
|
reports_bearing
|
||||||
|
#do not report weapons quality tracks
|
||||||
|
track_quality 0.75
|
||||||
|
ignore_same_side
|
||||||
|
internal_link track-proc
|
||||||
|
end_sensor
|
||||||
|
|
||||||
|
|
||||||
|
// --- * --- * ---
|
||||||
|
// Processors
|
||||||
|
// --- * --- * ---
|
||||||
|
processor track-proc WSF_TRACK_PROCESSOR
|
||||||
|
# purge_interval 5 min
|
||||||
|
purge_interval 120.0 sec
|
||||||
|
update_interval 10.0 sec
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
|
||||||
|
end_platform_type
|
||||||
55
platforms/blue_adv_fighter_1_base.txt
Normal file
55
platforms/blue_adv_fighter_1_base.txt
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
include_once ../weapons/aam/simple_a2a_missile.txt
|
||||||
|
|
||||||
|
platform_type BLUE_ADV_FIGHTER_1_BASE WSF_PLATFORM
|
||||||
|
|
||||||
|
icon F-22
|
||||||
|
category fighter
|
||||||
|
|
||||||
|
mover WSF_AIR_MOVER
|
||||||
|
|
||||||
|
roll_rate_limit 1 rad/sec
|
||||||
|
default_linear_acceleration 1.0 g
|
||||||
|
default_radial_acceleration 6.5 g
|
||||||
|
default_climb_rate 400 fps
|
||||||
|
|
||||||
|
# Mach 1.7 (1095.3 kts) at 30K feet, with afterburner, Janes Reference
|
||||||
|
maximum_speed 1095.3 knots
|
||||||
|
|
||||||
|
# Ceiling, Janes Reference
|
||||||
|
maximum_altitude 50000 ft
|
||||||
|
minimum_altitude 50 ft
|
||||||
|
|
||||||
|
# g limit, Janes Reference
|
||||||
|
maximum_linear_acceleration 9 g
|
||||||
|
|
||||||
|
#no_pitch
|
||||||
|
at_end_of_path extrapolate
|
||||||
|
|
||||||
|
end_mover
|
||||||
|
|
||||||
|
fuel WSF_VARIABLE_RATE_FUEL
|
||||||
|
rate 7.0 lb/s
|
||||||
|
initial_quantity 14000 lb
|
||||||
|
maximum_quantity 14000 lb
|
||||||
|
end_fuel
|
||||||
|
|
||||||
|
|
||||||
|
processor track_manager WSF_TRACK_PROCESSOR
|
||||||
|
//debug
|
||||||
|
purge_interval 60 sec
|
||||||
|
update_interval 1 sec
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
weapon int_missile SIMPLE_A2A_MISSILE_WEAPON end_weapon
|
||||||
|
|
||||||
|
end_platform_type
|
||||||
16
platforms/blue_adv_fighter_1_noripr.txt
Normal file
16
platforms/blue_adv_fighter_1_noripr.txt
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
#for BLUE_ADV_FIGHTER_1
|
||||||
|
include_once blue_adv_fighter_1_base.txt
|
||||||
|
|
||||||
|
|
||||||
|
platform_type blue_adv_fighter_1 BLUE_ADV_FIGHTER_1_BASE
|
||||||
|
//nothing new for now
|
||||||
|
end_platform_type
|
||||||
120
platforms/blue_adv_fighter_1_ripr.txt
Normal file
120
platforms/blue_adv_fighter_1_ripr.txt
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
#for BLUE_ADV_FIGHTER_1
|
||||||
|
include_once platforms/blue_adv_fighter_1_base.txt
|
||||||
|
|
||||||
|
#for AIAI-thinker
|
||||||
|
include_once processors/ripr_agents/aiai/aiai_processor.txt
|
||||||
|
|
||||||
|
include_once weapons/aam/simple_short_range_missile.txt
|
||||||
|
include_once weapons/aam/super_long_range_missile.txt
|
||||||
|
include_once weapons/aam/blue_lr_a2a_rf_missile.txt
|
||||||
|
|
||||||
|
platform_type blue_adv_fighter_1 BLUE_ADV_FIGHTER_1_BASE
|
||||||
|
|
||||||
|
//use a longer range missile for this type
|
||||||
|
//adjust missile ranges in int-thinker below to accomodate
|
||||||
|
|
||||||
|
delete weapon int_missile
|
||||||
|
|
||||||
|
#weapon int_missile SUPER_LONG_RANGE_MISSILE end_weapon
|
||||||
|
#weapon int_missile SIMPLE_LONG_RANGE_MISSILE end_weapon
|
||||||
|
#weapon aim9 SIMPLE_SHORT_RANGE_MISSILE end_weapon
|
||||||
|
#weapon jdradm SUPER_LONG_RANGE_MISSILE end_weapon
|
||||||
|
|
||||||
|
weapon blue_lr_a2a_rf_missile SIMPLE_BLUE_LR_A2A_RF_MISSILE
|
||||||
|
quantity 8
|
||||||
|
end_weapon
|
||||||
|
|
||||||
|
# edit weapon blue_sr_a2a_ir_missile
|
||||||
|
# quantity 2
|
||||||
|
# end_weapon
|
||||||
|
# edit weapon jdradm
|
||||||
|
# quantity 6
|
||||||
|
# end_weapon
|
||||||
|
|
||||||
|
//This is the code that lets the interceptor intercept
|
||||||
|
processor int-thinker AIAI-thinker
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
#mWeaponArray[0] = Map<string, Object>();
|
||||||
|
#mWeaponArray[0].Set("name", "blue_sr_a2a_ir_missile");
|
||||||
|
#mWeaponArray[0].Set("weapon", PLATFORM.Weapon("blue_sr_a2a_ir_missile"));
|
||||||
|
#mWeaponArray[0].Set("rangeMin", 1000);
|
||||||
|
#mWeaponArray[0].Set("rangeMax", 65000); // ~35 miles
|
||||||
|
|
||||||
|
mWeaponArray[0] = Map<string, Object>();
|
||||||
|
mWeaponArray[0].Set("name", "blue_lr_a2a_rf_missile");
|
||||||
|
mWeaponArray[0].Set("weapon", PLATFORM.Weapon("blue_lr_a2a_rf_missile"));
|
||||||
|
mWeaponArray[0].Set("rangeMin", 1000);
|
||||||
|
mWeaponArray[0].Set("rangeMax", 111120); // ~60 miles
|
||||||
|
mWeaponArray[0].Set("numActiveMax", 2); // how many weapons of this type can be in play simultaneously
|
||||||
|
mWeaponArray[0].Set("AIR", 1); // DOMAIN CAPABLE, yes, this weapon can hit air (default true)
|
||||||
|
mWeaponArray[0].Set("LAND", 0); // DOMAIN CAPABLE, no, this weapon can NOT hit land (default false)
|
||||||
|
|
||||||
|
/*
|
||||||
|
mWeaponArray[1] = Map<string, Object>();
|
||||||
|
#mWeaponArray[1].Set("name", "blue_lr_a2a_rf_missile");
|
||||||
|
#mWeaponArray[1].Set("weapon", PLATFORM.Weapon("blue_lr_a2a_rf_missile"));
|
||||||
|
mWeaponArray[1].Set("name", "jdradm");
|
||||||
|
mWeaponArray[1].Set("weapon", PLATFORM.Weapon("jdradm"));
|
||||||
|
mWeaponArray[1].Set("rangeMin", 9260);
|
||||||
|
#mWeaponArray[1].Set("rangeMax", 111120); // ~60 miles
|
||||||
|
mWeaponArray[1].Set("rangeMax", 296320); // ~160 miles
|
||||||
|
mWeaponArray[1].Set("numActiveMax", 1); // how many weapons of this type can be in play simultaneously
|
||||||
|
*/
|
||||||
|
end_script_variables
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
sensor geo_sensor WSF_GEOMETRIC_SENSOR
|
||||||
|
azimuth_field_of_view -180.0 degrees 180.0 degrees
|
||||||
|
elevation_field_of_view -90.0 degrees 90.0 degrees
|
||||||
|
//azimuth_field_of_view -60.0 degrees 60.0 degrees
|
||||||
|
//elevation_field_of_view -30.0 degrees 30.0 degrees
|
||||||
|
minimum_range 0 m
|
||||||
|
#maximum_range 100000 m
|
||||||
|
#maximum_range 138900 m #about 75 nm, 75% of missile range
|
||||||
|
maximum_range 185200 m #about 100 nm
|
||||||
|
on
|
||||||
|
frame_time 0.5 sec
|
||||||
|
reports_location
|
||||||
|
reports_velocity
|
||||||
|
reports_iff
|
||||||
|
track_quality 1.0
|
||||||
|
ignore_same_side
|
||||||
|
internal_link track_manager
|
||||||
|
end_sensor
|
||||||
|
|
||||||
|
processor incoming_threats WSF_THREAT_PROCESSOR
|
||||||
|
update_interval 0.1 sec
|
||||||
|
#update_interval 2.0 sec
|
||||||
|
|
||||||
|
#1300 knots
|
||||||
|
threat_velocity 668.7778 m/s
|
||||||
|
threat_angle_spread 20.0 deg
|
||||||
|
|
||||||
|
script void identified_new_threat(WsfTrack aTrack)
|
||||||
|
writeln("!!! me: ", PLATFORM.Name(), ", new threat: ", aTrack.TargetName(), ", speed: ", aTrack.Speed());
|
||||||
|
end_script
|
||||||
|
|
||||||
|
script void dropped_threat(WsfTrack aTrack)
|
||||||
|
if (aTrack.IsValid())
|
||||||
|
{
|
||||||
|
writeln("!!! ", PLATFORM.Name(), " dropped a threat: ", aTrack.TargetName());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
writeln("!!! ", PLATFORM.Name(), " dropped a threat");
|
||||||
|
}
|
||||||
|
end_script
|
||||||
|
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
end_platform_type
|
||||||
155
platforms/blue_multirole_fighter_1_base.txt
Normal file
155
platforms/blue_multirole_fighter_1_base.txt
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
//include_once ../sensors/blue_esm.txt
|
||||||
|
//include_once ../weapons/blue_lr_a2a_rf_missile.txt
|
||||||
|
//include_once ../weapons/blue_sr_a2a_ir_missile.txt
|
||||||
|
//include_once ../weapons/harm2.txt
|
||||||
|
//include_once ../weapons/jsow.txt
|
||||||
|
//include_once aiai_weapon.txt
|
||||||
|
|
||||||
|
include_once ../sensors/radar/blue_a2a_radar.txt
|
||||||
|
include_once ../weapons/aam/simple_a2a_missile.txt
|
||||||
|
include_once ../signatures/blue_multirole_fighter_3_radar_signature.txt
|
||||||
|
|
||||||
|
|
||||||
|
platform_type BLUE_MULTIROLE_FIGHTER_1 WSF_PLATFORM
|
||||||
|
|
||||||
|
icon F-18E
|
||||||
|
category fighter
|
||||||
|
|
||||||
|
fuel WSF_VARIABLE_RATE_FUEL
|
||||||
|
rate 7.0 lb/s
|
||||||
|
initial_quantity 14000 lb
|
||||||
|
maximum_quantity 14000 lb
|
||||||
|
end_fuel
|
||||||
|
|
||||||
|
mover WSF_AIR_MOVER
|
||||||
|
roll_rate_limit 1 rad/sec
|
||||||
|
default_linear_acceleration 1.0 g
|
||||||
|
default_radial_acceleration 6.5 g
|
||||||
|
default_climb_rate 400 fps
|
||||||
|
|
||||||
|
//old value
|
||||||
|
//maximum_speed 600.0 knots
|
||||||
|
// Janes Reference, Max level speed: more than M1.8 (1160 kts)
|
||||||
|
maximum_speed 1160.0 knots
|
||||||
|
|
||||||
|
//old value
|
||||||
|
//maximum_altitude 55000 ft
|
||||||
|
//Combat Ceiling, Janes Reference
|
||||||
|
maximum_altitude 50000 ft
|
||||||
|
|
||||||
|
minimum_altitude 50 ft
|
||||||
|
maximum_linear_acceleration 8 g
|
||||||
|
#no_pitch
|
||||||
|
at_end_of_path extrapolate
|
||||||
|
end_mover
|
||||||
|
|
||||||
|
radar_signature blue_multirole_fighter_3_radar_signature
|
||||||
|
|
||||||
|
sensor blue_a2a_radar BLUE_A2A_RADAR
|
||||||
|
//debug
|
||||||
|
on
|
||||||
|
internal_link track_manager
|
||||||
|
ignore_same_side
|
||||||
|
end_sensor
|
||||||
|
|
||||||
|
sensor esm-1 BLUE_ESM
|
||||||
|
//debug
|
||||||
|
off
|
||||||
|
internal_link track_manager
|
||||||
|
end_sensor
|
||||||
|
|
||||||
|
processor track_manager WSF_TRACK_PROCESSOR
|
||||||
|
//debug
|
||||||
|
purge_interval 60 sec
|
||||||
|
update_interval 1 sec
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
weapon int_missile SIMPLE_A2A_MISSILE_WEAPON end_weapon
|
||||||
|
|
||||||
|
|
||||||
|
// weapon blue_lr_a2a_rf_missile BLUE_LR_A2A_RF_MISSILE
|
||||||
|
// quantity 10
|
||||||
|
// end_weapon
|
||||||
|
// weapon blue_sr_a2a_ir_missile BLUE_SR_A2A_IR_MISSILE
|
||||||
|
// quantity 2
|
||||||
|
// end_weapon
|
||||||
|
// weapon HARM2 HARM2_WEAPON
|
||||||
|
// quantity 2
|
||||||
|
// end_weapon
|
||||||
|
// weapon JSOW JSOW_WEAPON
|
||||||
|
// quantity 2
|
||||||
|
// end_weapon
|
||||||
|
|
||||||
|
end_platform_type
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#xobject BLUE_MULTIROLE_FIGHTER_1 {
|
||||||
|
#x name "BLUE_MULTIROLE_FIGHTER_1 %d"
|
||||||
|
#x icon "f_18"
|
||||||
|
# opponent_icon "f_18"
|
||||||
|
#x team blue
|
||||||
|
# extern_attribute body_type_id 12
|
||||||
|
# sensors (
|
||||||
|
#x BLUE_A2A_RADAR
|
||||||
|
#x BLUE_ESM
|
||||||
|
# IFF )
|
||||||
|
#x tactics military_tactics
|
||||||
|
#x dynamics powered_dynamics
|
||||||
|
#x aero_model (
|
||||||
|
#x linear_accel 1.0 G
|
||||||
|
#x radial_accel 6.5 G
|
||||||
|
#x climb_rate 400.0 fps
|
||||||
|
#x max_speed 850.0 knots
|
||||||
|
#x max_alt 55000 ft
|
||||||
|
#x min_alt 50 ft
|
||||||
|
# fuel_table ( 76 (115 1.37 pps
|
||||||
|
# 150 1.59 pps
|
||||||
|
# 301 6.76 pps
|
||||||
|
# 321 23.4 pps)
|
||||||
|
# 5473 (143 1.24 pps
|
||||||
|
# 187 1.44 pps
|
||||||
|
# 293 4.65 pps
|
||||||
|
# 318 16.50 pps)
|
||||||
|
# 10671 (206 1.20 pps
|
||||||
|
# 236 1.27 pps
|
||||||
|
# 271 2.13 pps
|
||||||
|
# 295 7.37 pps))
|
||||||
|
# max_speed_table ( 76 321
|
||||||
|
# 4573 318
|
||||||
|
# 10671 295)
|
||||||
|
# fuel 14000 lb
|
||||||
|
# )
|
||||||
|
# launch_to_alt 32000 ft
|
||||||
|
# launch_to_speed 500 knots
|
||||||
|
#x stores (
|
||||||
|
#x blue_lr_a2a_rf_missile BLUE_LR_A2A_RF_MISSILE
|
||||||
|
#x HARM2 HARM2
|
||||||
|
#x JSOW
|
||||||
|
#x blue_sr_a2a_ir_missile BLUE_SR_A2A_IR_MISSILE)
|
||||||
|
# //nonsense accuracy values for testing
|
||||||
|
# tgt_err_attributes target_range_err 10.0 ft
|
||||||
|
# tgt_err_attributes target_az_err 0.01 deg
|
||||||
|
# tgt_err_attributes target_el_err 0.02 deg
|
||||||
|
# tgt_err_attributes target_rdot_err 1.0 ft
|
||||||
|
# tgt_err_attributes target_azdot_err 0.03 deg
|
||||||
|
# tgt_err_attributes target_eldot_err 0.04 deg
|
||||||
|
# tgt_err_attributes launch_azalign_err 0.05 deg
|
||||||
|
# tgt_err_attributes launch_elalign_err 0.06 deg
|
||||||
|
# tgt_err_attributes launch_rollalign_err 0.07 deg
|
||||||
|
# tgt_err_attributes launch_msl_align_err 0.08 deg
|
||||||
|
#x ir_signature (1.0 1.6 2.1 2.4 2.6 2.6 2.6 2.6 2.6 2.6 2.5 2.1
|
||||||
|
#x 1.6 2.1 2.5 2.6 2.6 2.6 2.6 2.6 2.6 2.4 2.1 1.6)
|
||||||
|
#x rcs3d F15CRCS
|
||||||
|
#x}
|
||||||
|
#
|
||||||
16
platforms/blue_multirole_fighter_1_noripr.txt
Normal file
16
platforms/blue_multirole_fighter_1_noripr.txt
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
#for BLUE_MULTIROLE_FIGHTER_1
|
||||||
|
include_once blue_multirole_fighter_1_base.txt
|
||||||
|
|
||||||
|
|
||||||
|
platform_type blue_multirole_fighter_1 BLUE_MULTIROLE_FIGHTER_1
|
||||||
|
//nothing new for now
|
||||||
|
end_platform_type
|
||||||
73
platforms/blue_multirole_fighter_1_ripr.txt
Normal file
73
platforms/blue_multirole_fighter_1_ripr.txt
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
#for BLUE_MULTIROLE_FIGHTER_1
|
||||||
|
include_once platforms/blue_multirole_fighter_1_base.txt
|
||||||
|
|
||||||
|
#for AIAI-thinker
|
||||||
|
include_once processors/ripr_agents/aiai/aiai_processor.txt
|
||||||
|
|
||||||
|
platform_type blue_multirole_fighter_1 BLUE_MULTIROLE_FIGHTER_1
|
||||||
|
|
||||||
|
|
||||||
|
//This is the code that lets the interceptor intercept
|
||||||
|
processor int-thinker AIAI-thinker
|
||||||
|
script_variables
|
||||||
|
mWeaponArray[0] = Map<string, Object>();
|
||||||
|
mWeaponArray[0].Set("name", "int_missile");
|
||||||
|
mWeaponArray[0].Set("weapon", PLATFORM.Weapon("int_missile"));
|
||||||
|
mWeaponArray[0].Set("rangeMin", 1000);
|
||||||
|
mWeaponArray[0].Set("rangeMax", 65000); // ~35 miles
|
||||||
|
mWeaponArray[0].Set("numActiveMax", 1); // how many weapons of this type can be in play simultaneously
|
||||||
|
end_script_variables
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
|
||||||
|
//don't mess around with crappy radars, use a simple geometric sensor
|
||||||
|
delete sensor blue_a2a_radar
|
||||||
|
delete sensor esm-1
|
||||||
|
sensor geo_sensor WSF_GEOMETRIC_SENSOR
|
||||||
|
azimuth_field_of_view -180.0 degrees 180.0 degrees
|
||||||
|
elevation_field_of_view -90.0 degrees 90.0 degrees
|
||||||
|
minimum_range 0 m
|
||||||
|
maximum_range 100000 m
|
||||||
|
on
|
||||||
|
frame_time 0.5 sec
|
||||||
|
reports_location
|
||||||
|
reports_velocity
|
||||||
|
reports_iff
|
||||||
|
track_quality 1.0
|
||||||
|
ignore_same_side
|
||||||
|
internal_link track_manager
|
||||||
|
end_sensor
|
||||||
|
|
||||||
|
processor incoming_threats WSF_THREAT_PROCESSOR
|
||||||
|
update_interval 0.1 sec
|
||||||
|
#update_interval 2.0 sec
|
||||||
|
|
||||||
|
#1300 knots
|
||||||
|
threat_velocity 668.7778 m/s
|
||||||
|
|
||||||
|
script void identified_new_threat(WsfTrack aTrack)
|
||||||
|
writeln("!!! me: ", PLATFORM.Name(), ", new threat: ", aTrack.TargetName());
|
||||||
|
end_script
|
||||||
|
|
||||||
|
script void dropped_threat(WsfTrack aTrack)
|
||||||
|
if (aTrack.IsValid())
|
||||||
|
{
|
||||||
|
writeln("!!! ", PLATFORM.Name(), " dropped a threat: ", aTrack.TargetName());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
writeln("!!! ", PLATFORM.Name(), " dropped a threat");
|
||||||
|
}
|
||||||
|
end_script
|
||||||
|
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
end_platform_type
|
||||||
15
platforms/blue_players.txt
Normal file
15
platforms/blue_players.txt
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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 ****** *
|
||||||
|
# * * ************************************** * *
|
||||||
|
|
||||||
|
include_once platforms/ucav.txt
|
||||||
|
include_once platforms/soj.txt
|
||||||
58
platforms/bomber.txt
Normal file
58
platforms/bomber.txt
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
platform_type BOMBER WSF_PLATFORM
|
||||||
|
|
||||||
|
# icon EA-6B
|
||||||
|
icon B-52
|
||||||
|
|
||||||
|
mover WSF_AIR_MOVER
|
||||||
|
|
||||||
|
# WAGs - Luke Miklos
|
||||||
|
roll_rate_limit 0.7 rad/sec
|
||||||
|
default_linear_acceleration 0.7 g
|
||||||
|
default_radial_acceleration 2.5 g
|
||||||
|
default_climb_rate 300 fps
|
||||||
|
|
||||||
|
# Mach 0.9 (516.0 kts) at altitude, Janes Reference
|
||||||
|
maximum_speed 516.0 knots
|
||||||
|
|
||||||
|
# Ceiling, Janes Reference
|
||||||
|
maximum_altitude 55000 ft
|
||||||
|
minimum_altitude 1000 ft
|
||||||
|
|
||||||
|
# WAG - Luke Miklos
|
||||||
|
maximum_linear_acceleration 7 g
|
||||||
|
|
||||||
|
#no_pitch
|
||||||
|
at_end_of_path extrapolate
|
||||||
|
|
||||||
|
end_mover
|
||||||
|
|
||||||
|
fuel WSF_VARIABLE_RATE_FUEL
|
||||||
|
#rough calculation for fuel rate: based on max range, cruising speed, & max fuel
|
||||||
|
rate 4.0 lb/s
|
||||||
|
# Janes Reference, max fuel
|
||||||
|
# 46000 gallons internal, plus two 700 gallon underwing drop tanks
|
||||||
|
# jet fuel is 6 lb per gallon
|
||||||
|
initial_quantity 284400 lb
|
||||||
|
maximum_quantity 284400 lb
|
||||||
|
end_fuel
|
||||||
|
|
||||||
|
|
||||||
|
processor track_manager WSF_TRACK_PROCESSOR
|
||||||
|
//debug
|
||||||
|
purge_interval 60 sec
|
||||||
|
update_interval 2 sec
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
end_platform_type
|
||||||
1112
platforms/brawler/ACFT_BAC1.FXW
Normal file
1112
platforms/brawler/ACFT_BAC1.FXW
Normal file
File diff suppressed because it is too large
Load Diff
1191
platforms/brawler/ACFT_BD.FXW
Normal file
1191
platforms/brawler/ACFT_BD.FXW
Normal file
File diff suppressed because it is too large
Load Diff
1114
platforms/brawler/ACFT_RAC1.FXW
Normal file
1114
platforms/brawler/ACFT_RAC1.FXW
Normal file
File diff suppressed because it is too large
Load Diff
96
platforms/brawler/MIND
Normal file
96
platforms/brawler/MIND
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
AGE1 2.
|
||||||
|
CHISIG 6.
|
||||||
|
TCORR 10. 10. 10. !OBSERVATION CORRELATION TIMES
|
||||||
|
44444444444444444444444444400000000000000000000000 VALKEY 1-50
|
||||||
|
00000000000000000000000000000000000000000000000000 VALKEY 51-100
|
||||||
|
AGEMOD 5.0 20.0
|
||||||
|
0.5 5.0
|
||||||
|
0.25 1.0
|
||||||
|
5.0 20.0
|
||||||
|
5.0 60.0
|
||||||
|
5.0 60.0
|
||||||
|
0.1 1.0
|
||||||
|
VALSIG 0.001
|
||||||
|
VCUTF 0.6
|
||||||
|
MALTS 5
|
||||||
|
STKPN 5.0
|
||||||
|
TMUSUP 5.0
|
||||||
|
TRCH 20.0
|
||||||
|
TRCHW 5.0
|
||||||
|
WTVMSL 0.5
|
||||||
|
TPROJ 3.0
|
||||||
|
AGFOLO 20.0
|
||||||
|
AGERAD 10.0
|
||||||
|
CLIMBM 10000.0
|
||||||
|
GMAXM 4.0
|
||||||
|
RFXDLY 0.2 !REFLEX_DELAY - FOR MANEUVER IMPLEMENTATION AFTER DECISION IS
|
||||||
|
WRFORM 0.1
|
||||||
|
WRRFRM 0.5
|
||||||
|
RNGWPN 25000. 30000. 85000. 3000. 40000. !SRM,MRM,LRM,GUN,DEW
|
||||||
|
TVPOLD 15.
|
||||||
|
DETR0 0.02
|
||||||
|
TEARLY 4.99
|
||||||
|
HDSPRD 2.0
|
||||||
|
HDPKLO 0.05
|
||||||
|
HDPKHI 0.10
|
||||||
|
HDRKMX 0.5
|
||||||
|
HDPSMN 0.8
|
||||||
|
SPLITA 45.0
|
||||||
|
REQDLY 15.0
|
||||||
|
ORDDLY 20.1
|
||||||
|
CHSWLS .3
|
||||||
|
CHSWLO .2
|
||||||
|
10. NEARBY UPDATE INTERVAL
|
||||||
|
DTUDES 5.0
|
||||||
|
DELFAC 0.3
|
||||||
|
CWIDTH 5.0
|
||||||
|
MAXAC_LOW 3
|
||||||
|
MAXAC_MED 5
|
||||||
|
MAXAC_HI 10
|
||||||
|
SLOGEE 3.
|
||||||
|
SL_G_LEEWAY 2.
|
||||||
|
TNL_ALPHA 0.3
|
||||||
|
TNL_BETA_LOW 0.6
|
||||||
|
TNL_BETA_MED 0.75
|
||||||
|
TNL_BETA_HI 0.9
|
||||||
|
TNL_TAU_LOW 60.0
|
||||||
|
TNL_TAU_MED 30.0
|
||||||
|
TNL_TAU_HI 0.001
|
||||||
|
TNL_CNTRST 2.
|
||||||
|
HOTMIN 1000. !minimum height over terrain
|
||||||
|
FT_REJECT_T 0.02 !Time (per false tgt) to reject false targets (sec)
|
||||||
|
TAU_ESTAB 30. Establishment value time constant
|
||||||
|
ESTABLISH 20. Threshold for establishment
|
||||||
|
DIS-ESTABLISH 10. Threshold for disestablishment (currently unused)
|
||||||
|
PURGE 1. Threshold for purging (currently unused)
|
||||||
|
VISUAL 40. Value added for a visual observation
|
||||||
|
RADAR Values added for radar obs
|
||||||
|
SCAN 13.2 => roughly 2 hits in 20 seconds will establish
|
||||||
|
STT 40.
|
||||||
|
TWS 40.
|
||||||
|
SPOT 40.
|
||||||
|
ACTIVE 40.
|
||||||
|
MESSAGE 40.
|
||||||
|
INFERRED 40.
|
||||||
|
JAMMED_RADAR
|
||||||
|
SCAN 13.2
|
||||||
|
STT 40.
|
||||||
|
TWS 40.
|
||||||
|
SPOT 40.
|
||||||
|
ACTIVE 40.
|
||||||
|
JAMMED_MESSAGE 40.
|
||||||
|
IFF 40.
|
||||||
|
RHAW 40.
|
||||||
|
IRST 40.
|
||||||
|
MW 40.
|
||||||
|
MAW 40.
|
||||||
|
RWR 40.
|
||||||
|
SAN 40.
|
||||||
|
TTT 40.
|
||||||
|
SSS 40.
|
||||||
|
XAV 40.
|
||||||
|
TOC 40.
|
||||||
|
ESM 40.
|
||||||
|
EXT 40.
|
||||||
|
OTD 40.
|
||||||
|
DLD 40.
|
||||||
335
platforms/brawler/alternatives/BrawlerScriptUtil.txt
Normal file
335
platforms/brawler/alternatives/BrawlerScriptUtil.txt
Normal file
@@ -0,0 +1,335 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
#no other easy way in WSF to get relative NED position
|
||||||
|
#here we calculate a rough approximation ourselves
|
||||||
|
script Vec3 RelativePositionNED(WsfGeoPoint from, WsfGeoPoint to)
|
||||||
|
double deg2ft = 364812.76313;
|
||||||
|
Vec3 vec = Vec3.Construct( (to.Latitude() -from.Latitude() )*deg2ft,
|
||||||
|
(to.Longitude()-from.Longitude())*deg2ft*MATH.Cos(from.Latitude()*MATH.RAD_PER_DEG()),
|
||||||
|
-(to.Altitude() -from.Altitude() )*MATH.FT_PER_M());
|
||||||
|
return vec;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
#replicates subroutine makecs(bxin,bzin,b)
|
||||||
|
script Array<double> makecs(Vec3 bxin, Vec3 bzin)
|
||||||
|
Array<double> b = Array<double>();
|
||||||
|
Vec3 bx;
|
||||||
|
Vec3 by;
|
||||||
|
Vec3 bz;
|
||||||
|
// Normalize bxin, store in bx
|
||||||
|
bx = bxin.Normal();
|
||||||
|
// Cross product of bzin and Normalized bxin, stored in by
|
||||||
|
by = Vec3.Cross(bzin, bx);
|
||||||
|
// Normalize by and evaluate the magnitude of original by
|
||||||
|
if (by.Normalize() == 0.0)
|
||||||
|
{
|
||||||
|
// If the magnitude of by is zero, replace by with cross of bx and unit Z vector
|
||||||
|
Vec3 unitZ = Vec3.Construct(0.0, 0.0, 1.0);
|
||||||
|
by = Vec3.Cross(unitZ, bx);
|
||||||
|
by.Normalize();
|
||||||
|
}
|
||||||
|
//cross product of bx and by stored in bz
|
||||||
|
bz = Vec3.Cross(bx, by);
|
||||||
|
|
||||||
|
b[0] = bx.Get(0); // b(1,1) = bx(1)
|
||||||
|
b[3] = bx.Get(1); // b(1,2) = bx(2)
|
||||||
|
b[6] = bx.Get(2); // b(1,3) = bx(3)
|
||||||
|
b[1] = by.Get(0); // b(2,1) = by(1)
|
||||||
|
b[4] = by.Get(1); // b(2,2) = by(2)
|
||||||
|
b[7] = by.Get(2); // b(2,3) = by(3)
|
||||||
|
b[2] = bz.Get(0); // b(3,1) = bz(1)
|
||||||
|
b[5] = bz.Get(1); // b(3,2) = bz(2)
|
||||||
|
b[8] = bz.Get(2); // b(3,3) = bz(3)
|
||||||
|
return b;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
#replicates subroutine makex(cxin,[return c])
|
||||||
|
# EQUIVALENT TO MAKECS WHEN ARGUMENT BZIN = (0,0,1)
|
||||||
|
script Array<double> makex(Vec3 cxin)
|
||||||
|
Array<double> c = Array<double>();
|
||||||
|
Vec3 unitZ = Vec3.Construct(0.0, 0.0, 1.0);
|
||||||
|
c = makecs(cxin, unitZ);
|
||||||
|
return c;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
#replicates subroutine makeh([return matrix], dir)
|
||||||
|
#returns an array (rot) that represents a 3x3 rotation matrix
|
||||||
|
#where rot[0] = matrix(1,1) and rot[1] == matrix(1,2)
|
||||||
|
script Array<double> makeh(Vec3 dir)
|
||||||
|
Array<double> rot = Array<double>();
|
||||||
|
double temp = MATH.Sqrt(dir[0]*dir[0] + dir[1]*dir[1]);
|
||||||
|
rot[0] = dir[0]/temp; #c(1,1) = cxin(1)/sngl(temp)
|
||||||
|
rot[1] = dir[1]/temp; #c(1,2) = cxin(2)/sngl(temp)
|
||||||
|
rot[2] = 0.0; #c(1,3) = 0.
|
||||||
|
rot[3] = -rot[1]; #c(2,1) = -c(1,2)
|
||||||
|
rot[4] = rot[0]; #c(2,2) = c(1,1)
|
||||||
|
rot[5] = 0.0; #c(2,3) = 0.
|
||||||
|
rot[6] = 0.0; #c(3,1) = 0.
|
||||||
|
rot[7] = 0.0; #c(3,2) = 0.
|
||||||
|
rot[8] = 1.0; #c(3,3) = 1.
|
||||||
|
return rot;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# replicates: subroutine vxfrmc(b,v, [return Vec3 vt],1)
|
||||||
|
# "b" represents a 3x3 rotation matrix
|
||||||
|
# where b[0] = matrix(1,1) and b[1] == matrix(1,2)
|
||||||
|
script Vec3 vxfrmc1(Array<double> b, Vec3 v)
|
||||||
|
#b = 3x3 rotation matrix where [0] = (1,1) and [1] == (1,2)
|
||||||
|
double x = v[0]*b[0]+v[1]*b[1]+v[2]*b[2];
|
||||||
|
double y = v[0]*b[3]+v[1]*b[4]+v[2]*b[5];
|
||||||
|
double z = v[0]*b[6]+v[1]*b[7]+v[2]*b[8];
|
||||||
|
Vec3 vt = Vec3.Construct(x,y,z);
|
||||||
|
return vt;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# replicates: subroutine vxfrmc(b,[return Vec3],vt,2)
|
||||||
|
# "b" represents a 3x3 rotation matrix
|
||||||
|
# where b[0] = matrix(1,1) and b[1] == matrix(1,2)
|
||||||
|
script Vec3 vxfrmc2(Array<double> b, Vec3 vt)
|
||||||
|
#b = 3x3 rotation matrix where [0] = (1,1) and [1] == (1,2)
|
||||||
|
double x = vt[0]*b[0]+vt[1]*b[3]+vt[2]*b[6];
|
||||||
|
double y = vt[0]*b[1]+vt[1]*b[4]+vt[2]*b[7];
|
||||||
|
double z = vt[0]*b[2]+vt[1]*b[5]+vt[2]*b[8];
|
||||||
|
Vec3 v = Vec3.Construct(x,y,z);
|
||||||
|
return v;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# replicates: subroutine rotx(chi,vin,[return vout])
|
||||||
|
# FINDS VECTOR IN A FRAME ROTATED BY CHI ABOUT X-AXIS
|
||||||
|
script Vec3 rotx(double chi, Vec3 vin)
|
||||||
|
double cchi = (Math.Cos(chi * Math.DEG_PER_RAD())) * Math.RAD_PER_DEG();
|
||||||
|
double schi = (Math.Sin(chi * Math.DEG_PER_RAD())) * Math.RAD_PER_DEG();
|
||||||
|
Vec3 vout = Vec3.Construct(vin[0], (cchi*vin[1]+schi*vin[2]), (-schi*vin[1]+cchi*vin[2]));
|
||||||
|
return vout;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# replicates: subroutine rotv(chi,vaxis,vin,[return vout])
|
||||||
|
# ROTATE VECTOR BY ANGLE ABOUT SPECIFIED AXIS
|
||||||
|
#CIN CHI REAL - DESIRED ANGLE OF ROTATION (radians)
|
||||||
|
#CIN VAXIS 3-VEC - AXIS OF ROTATION
|
||||||
|
#CIN VIN 3-VEC - UNROTATED VECTOR
|
||||||
|
#COUT VOUT 3-VEC - RESULT OF ROTATING VIN BY CHI ABOUT VAXIS
|
||||||
|
script Vec3 rotv(double chi, Vec3 vaxis, Vec3 vin)
|
||||||
|
Array<double> rot = Array<double>();
|
||||||
|
if (vaxis[0]*vaxis[0] + vaxis[1]*vaxis[1] == 0.0)
|
||||||
|
{
|
||||||
|
Vec3 unitX = Vec3.Construct(1,0,0);
|
||||||
|
rot = makecs(vaxis, unitX);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rot = makex(vaxis);
|
||||||
|
}
|
||||||
|
Vec3 vout = vxfrmc1(rot,vin);
|
||||||
|
vout = rotx(-chi,vout);
|
||||||
|
vout = vxfrmc2(rot,vout);
|
||||||
|
return vout;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# replicates: vmake(a,vin,vout)
|
||||||
|
# a - desired vector norm
|
||||||
|
# vector - vector to rescale
|
||||||
|
script Vec3 vmake(double a, Vec3 vin)
|
||||||
|
double b = a / vin.Magnitude();
|
||||||
|
// TODO prevent div by zero?
|
||||||
|
// b = a/sqrt(1.e-35 + vin(1)*vin(1) + vin(2)*vin(2) + vin(3)*vin(3))
|
||||||
|
Vec3 vout = Vec3.Construct(b*vin.X(), b*vin.Y(), b*vin.Z());
|
||||||
|
return vout;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# replicates: subroutine ramp(xlo,xval,xhi)
|
||||||
|
script double ramp(double xlo, double xval, double xhi)
|
||||||
|
double rampVal = (xval-xlo) / (xhi-xlo);
|
||||||
|
if(rampVal <= 0.0)
|
||||||
|
{
|
||||||
|
rampVal = 0.0;
|
||||||
|
}
|
||||||
|
if(rampVal >= 1.0)
|
||||||
|
{
|
||||||
|
rampVal = 1.0;
|
||||||
|
}
|
||||||
|
return rampVal;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# replicates: subroutine border(z, z0)
|
||||||
|
script double border(double z, double z0)
|
||||||
|
double border = 0;
|
||||||
|
if (z <= 0)
|
||||||
|
{
|
||||||
|
double t = (z / z0 - 1.0);
|
||||||
|
border = 1.0 / (1.0 + (t * t));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
double u = (z / z0 + 1.0) * (z / z0 + 1.0);
|
||||||
|
border = u / (1 + u);
|
||||||
|
}
|
||||||
|
return border;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# replicates: subroutine cauchy(z, z0)
|
||||||
|
script double cauchy(double z, double z0)
|
||||||
|
double t = (z / z0);
|
||||||
|
return 1.0 / (1.0 + (t * t));
|
||||||
|
end_script
|
||||||
|
|
||||||
|
|
||||||
|
script Vec3 vorth(Vec3 a, Vec3 b)
|
||||||
|
double x = (a[0]*b[0]+a[1]*b[1]+a[2]*b[2])/(b[0]*b[0]+b[1]*b[1]+b[2]*b[2]);
|
||||||
|
Vec3 temp = b;
|
||||||
|
temp.Scale(x);
|
||||||
|
Vec3 c = Vec3.Subtract(a,temp);
|
||||||
|
return c;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
|
||||||
|
script bool HaveWeapon(WsfPlatform plat)
|
||||||
|
for(int i=0; i<plat.WeaponCount(); i+=1)
|
||||||
|
{
|
||||||
|
if (plat.WeaponEntry(i).QuantityRemaining() >= 1)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
|
||||||
|
script Vec3 unitv2(Vec3 a)
|
||||||
|
double mag = MATH.Sqrt(a.X()*a.X() + a.Y()*a.Y());
|
||||||
|
Vec3 val = Vec3.Construct(a.X()/mag, a.Y()/mag, 0.0);
|
||||||
|
return val;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
|
||||||
|
#replicates portion of desvvi that calculates "vuse" and "spduse"
|
||||||
|
#function arguments:
|
||||||
|
# vdes = normalized direction vector
|
||||||
|
# spddes = speed in ft/sec
|
||||||
|
#returns a vec in ft/sec
|
||||||
|
script Vec3 desvvi(WsfBrawlerPlatform plat, Vec3 vdes, double spddes)
|
||||||
|
bool lngtrn;
|
||||||
|
Vec3 vuse = Vec3();
|
||||||
|
double spduse;
|
||||||
|
double cornrv = plat.CorneringVelocity(); //fps
|
||||||
|
double grav = 32.17405; //fps
|
||||||
|
double gmxsut = plat.MaxSustainedGs();
|
||||||
|
|
||||||
|
//C --external declarations
|
||||||
|
# integer rspace
|
||||||
|
# realdot,ramp,xlimit
|
||||||
|
# real arccos
|
||||||
|
//C --local declarations
|
||||||
|
//real h(2),hdes(2);
|
||||||
|
Vec3 h = Vec3();
|
||||||
|
Vec3 hdes = Vec3();
|
||||||
|
double d10 = 0.174533; //radians (10 deg)
|
||||||
|
double s30 = 0.5;
|
||||||
|
double s45 = 0.707107;
|
||||||
|
double s15 = 0.258819;
|
||||||
|
double dsemax,hnorm,csenow,senow;
|
||||||
|
//real arcsin
|
||||||
|
//C*ENDDEC
|
||||||
|
vuse = unitv2(vdes);
|
||||||
|
h = unitv2(plat.VelocityNED());
|
||||||
|
|
||||||
|
//C CURRENT HEADING COORDINATES:
|
||||||
|
//C X = [ H(1),H(2)]
|
||||||
|
//C Y = [-H(2),H(1)]
|
||||||
|
//hdes(1) = vuse(1)*h(1)+vuse(2)*h(2)
|
||||||
|
hdes.SetX(vuse.X()*h.X()+vuse.Y()*h.Y());
|
||||||
|
|
||||||
|
//C TO AVOID MESSING UP LATER ARCCOS(HDES(1)):
|
||||||
|
if(MATH.Fabs(hdes.X()) > 1.0)
|
||||||
|
{
|
||||||
|
if(MATH.Fabs(hdes.X()) > 1.000001)
|
||||||
|
{
|
||||||
|
//call nabort('HDES(1) NORM');
|
||||||
|
writeln("ABORT!!!! hdes(1) > 1.000001");
|
||||||
|
return Vec3();
|
||||||
|
}
|
||||||
|
hdes.SetX(1.0);
|
||||||
|
if (hdes.X() < 0)
|
||||||
|
{
|
||||||
|
hdes.SetX(-1.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hdes.SetY(-vuse.X()*h.Y()+vuse.Y()*h.X());
|
||||||
|
csenow = plat.Speed()*MATH.FT_PER_M()+0.01;
|
||||||
|
csenow = Vec3.Dot(vdes,plat.VelocityNED())/csenow;
|
||||||
|
senow = MATH.ACos(csenow);
|
||||||
|
double tproj3 = plat.ProjectedTimeDelta();
|
||||||
|
dsemax = tproj3*(gmxsut*grav/cornrv);
|
||||||
|
//C LNGTRN REQUIRES LARGE ERRORS IN BOTH MAGNITUDE AND HEADING
|
||||||
|
lngtrn = MATH.ACos(hdes.X()) > dsemax && senow > 1.5*dsemax;
|
||||||
|
if (!lngtrn)
|
||||||
|
{
|
||||||
|
//C
|
||||||
|
//C SHORTER TURN:
|
||||||
|
//C
|
||||||
|
vuse = vdes;
|
||||||
|
spduse = spddes;
|
||||||
|
//goto 9999
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//C
|
||||||
|
//C LONGER TURN:
|
||||||
|
//C
|
||||||
|
if((plat.Speed()*MATH.FT_PER_M()) > 0.9*cornrv)
|
||||||
|
{
|
||||||
|
if((plat.Speed()*MATH.FT_PER_M()) < 1.1*cornrv)
|
||||||
|
{
|
||||||
|
//C HERE SPEED NEAR CORNER - MAINTAIN MODEST DIVE TO HELP MAINTAIN SPD
|
||||||
|
vuse.SetZ(s15);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//C TOO FAST - PULL UP WHILE TURNING
|
||||||
|
//format('DESVVI... TOO FAST, CORNER = ',f8.2,' MACH ',f5.1)
|
||||||
|
vuse.SetZ(-s45*ramp(1.1*cornrv,plat.Speed()*MATH.FT_PER_M(),1.2*cornrv));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//C TOO SLOW - SET 30 DEG DIVE
|
||||||
|
vuse.SetZ(s30);
|
||||||
|
}
|
||||||
|
|
||||||
|
hnorm = MATH.Sqrt(1.0-vuse.Z()*vuse.Z());
|
||||||
|
if(hdes.X() > 0.0)
|
||||||
|
{
|
||||||
|
//C RENORMALIZE HORIZONTAL FOR LESS THAN 90 DEG HEADING CHANGES
|
||||||
|
vuse.SetX(vuse.X()*hnorm);
|
||||||
|
vuse.SetY(vuse.Y()*hnorm);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//C SET UP 90 DEG HEADING CHANGE AND DO ROTATION BACK TO EARTH COORDINATES
|
||||||
|
//C IMPLICIT IS HDES(1) = 0
|
||||||
|
hdes.SetY(hnorm);
|
||||||
|
if (hdes.Y() < 0)
|
||||||
|
{
|
||||||
|
hdes.SetY(-hnorm);
|
||||||
|
}
|
||||||
|
vuse.SetX(-h.Y()*hdes.Y());
|
||||||
|
vuse.SetY(h.X()*hdes.Y());
|
||||||
|
}
|
||||||
|
spduse = cornrv;
|
||||||
|
//goto 9999
|
||||||
|
}
|
||||||
|
//C
|
||||||
|
//9999
|
||||||
|
vuse.Normalize();
|
||||||
|
vuse.Scale(spduse);
|
||||||
|
return vuse;
|
||||||
|
end_script
|
||||||
23
platforms/brawler/alternatives/behavior_alt1514_point.txt
Normal file
23
platforms/brawler/alternatives/behavior_alt1514_point.txt
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
behavior alt1514_point
|
||||||
|
|
||||||
|
precondition
|
||||||
|
return 1.0;
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
execute
|
||||||
|
extern int kturn;
|
||||||
|
kturn = 0; //go straight at target
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
behavior alt1516_bvr_end_run_left
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
precondition
|
||||||
|
return 1.0;
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
execute
|
||||||
|
extern int kturn;
|
||||||
|
kturn = -1; //go left around target
|
||||||
|
writeln_d("executed alt1516_bvr_end_run_left");
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
behavior alt1517_bvr_end_run_right
|
||||||
|
|
||||||
|
precondition
|
||||||
|
return 1.0;
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
execute
|
||||||
|
extern int kturn;
|
||||||
|
kturn = 1; //go right around target
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt31.f
|
||||||
|
// Replicates the straight and level at max speed 3,1,1,1 alternative behavior
|
||||||
|
|
||||||
|
|
||||||
|
behavior alt3111_straight_level_max_speed
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfPerceptionProcessor perception;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3111Enabled = true;
|
||||||
|
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 1;
|
||||||
|
int icall = 1;
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
Vec3 mDir0 = Vec3();
|
||||||
|
double mGMX = 1.0;
|
||||||
|
double mSpd0 = 3.0;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
perception = (WsfPerceptionProcessor)PLATFORM.Processor("perception");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition behavior_alt3111_straight_level_max_speed, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mAlternative3111Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
// ALL CONDITIONS PASS
|
||||||
|
### Generate Maneuver Alternative
|
||||||
|
# C STRAIGHT AND LEVEL AT MAX SPEED
|
||||||
|
#10 iactn = 4
|
||||||
|
# lenalt = lactn(iactn)
|
||||||
|
# altdsc = indpk(3,1,1,1)
|
||||||
|
# call xmit(2,vp(1,me),dir0)
|
||||||
|
# dir0(3) = 0.
|
||||||
|
# call vnorm(dir0,dir0)
|
||||||
|
# gmx = gmxsu
|
||||||
|
# spdmod = thrttl
|
||||||
|
# spd0 = 3.
|
||||||
|
# go to 800
|
||||||
|
|
||||||
|
mDir0 = PLATFORM.VelocityNED();
|
||||||
|
mDir0.SetZ(0.0);
|
||||||
|
mDir0.Normalize();
|
||||||
|
mGMX = brawlerPlatform.MaxSustainedGs();
|
||||||
|
mSpd0 = 3.0;
|
||||||
|
|
||||||
|
### Evaluate [Projected] Maneuver Alternative
|
||||||
|
double score = brawlerPlatform.EvaluateVectorWithThrottle(mDir0, mGMX, mSpd0, ilevel, kalt, icall, lcall);
|
||||||
|
return score;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
|
||||||
|
execute
|
||||||
|
## what was evaluated should be actually performed now
|
||||||
|
brawlerPlatform.FlyVectorWithThrottle(mDir0, mGMX, mSpd0);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt31.f
|
||||||
|
// Replicates the straight and level (current speed) 3,1,2,1 alternative behavior
|
||||||
|
|
||||||
|
behavior alt3121_straight_level
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfPerceptionProcessor perception;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3121Enabled = true;
|
||||||
|
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 1;
|
||||||
|
int icall = 2;
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
Vec3 mDir0;
|
||||||
|
double mGMX = 1.0;
|
||||||
|
double mSpd0;
|
||||||
|
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
perception = (WsfPerceptionProcessor)PLATFORM.Processor("perception");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition behavior_alt3121_straight_levelt, T=", TIME_NOW);
|
||||||
|
|
||||||
|
|
||||||
|
#writeln_d("T = ", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mAlternative3121Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
// ALL CONDITIONS PASS
|
||||||
|
### Generate Maneuver Alternative
|
||||||
|
# C STRAIGHT-AND-LEVEL
|
||||||
|
#20 iactn = 4
|
||||||
|
# lenalt = lactn(iactn)
|
||||||
|
# altdsc=indpk(3,1,2,1)
|
||||||
|
# call xmit(2,vp(1,me),dir0)
|
||||||
|
# dir0(3) = 0.
|
||||||
|
# call vnorm(dir0,dir0)
|
||||||
|
# gmx = gmxsu
|
||||||
|
# spd0 = spdnow(me)
|
||||||
|
# spdmod = desspd
|
||||||
|
|
||||||
|
mDir0 = PLATFORM.VelocityNED();
|
||||||
|
mDir0.SetZ(0.0);
|
||||||
|
mDir0.Normalize();
|
||||||
|
mGMX = brawlerPlatform.MaxSustainedGs();
|
||||||
|
mSpd0 = PLATFORM.Speed();
|
||||||
|
|
||||||
|
### Evaluate [Projected] Maneuver Alternative
|
||||||
|
double score = brawlerPlatform.EvaluateVectorWithSpeed(mDir0, mGMX, mSpd0, ilevel, kalt, icall, lcall);
|
||||||
|
writeln_d("T=", TIME_NOW, ", alt3121_straight_level = ", score);
|
||||||
|
return score;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
|
||||||
|
execute
|
||||||
|
|
||||||
|
writeln_d("3121_straight_level, dir0 = ", mDir0.ToString());
|
||||||
|
## what was evaluated should be actually performed now
|
||||||
|
brawlerPlatform.FlyVectorWithSpeed(mDir0, mGMX, mSpd0);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt32.f and captrn.f
|
||||||
|
// Replicates the route maneuver 3,2,1,1 and cap turn 3,2,2,1 alternative behavior
|
||||||
|
// This behavior will just fly the WSF platform route
|
||||||
|
|
||||||
|
behavior alt3211_route_maneuver
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfPerceptionProcessor perception;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3211Enabled = true;
|
||||||
|
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 2;
|
||||||
|
int icall = 1;
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
perception = (WsfPerceptionProcessor)PLATFORM.Processor("perception");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition behavior_alt3411_straight_flight, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mAlternative3211Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
WsfTaskList tasks = processor.TasksReceivedOfType("WEAPON");
|
||||||
|
if(tasks.Count() > 0)
|
||||||
|
{
|
||||||
|
// Fail if we should be pursuing a weapon task
|
||||||
|
return Failure("pursuing WEAPON task");
|
||||||
|
}
|
||||||
|
|
||||||
|
WsfRoute route = PLATFORM.Route();
|
||||||
|
if (!route.IsValid() || route.Size() < 2)
|
||||||
|
{
|
||||||
|
// Fail if we do not have a valid route
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " invalid route");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Otherwise return a high score for this alternative
|
||||||
|
// so it is picked and we just follow our route
|
||||||
|
double score = 10.0;
|
||||||
|
return score;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
execute
|
||||||
|
PLATFORM.ReturnToRoute();
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
@@ -0,0 +1,169 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt34.f
|
||||||
|
// Replicates the 1v1 Offensive Maneuver 3,4,1,1 alternative behavior
|
||||||
|
// Straight Flight
|
||||||
|
//
|
||||||
|
// Operates on nearest perceived threat to generate maneuver alternative
|
||||||
|
|
||||||
|
behavior alt3411_straight_flight
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfPerceptionProcessor perception;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
WsfLocalTrack targetTrack;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3411Enabled = true;
|
||||||
|
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 4;
|
||||||
|
int icall = 1;
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
double mLongRange = 5.0 * Math.M_PER_NM();
|
||||||
|
|
||||||
|
Vec3 dir0;
|
||||||
|
double mGMX = 1.0;
|
||||||
|
double mSpd0 = 3.0;
|
||||||
|
|
||||||
|
// ALSO NEED:
|
||||||
|
// randomization to simulate imperfect decision making, valsig, read from MIND file, typically ~0.01
|
||||||
|
// Production rule bias, used in scoring of alternative
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
perception = (WsfPerceptionProcessor)PLATFORM.Processor("perception");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition behavior_alt3411_straight_flight, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mAlternative3411Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
WsfTaskList tasks = processor.TasksReceivedOfType("WEAPON");
|
||||||
|
if(tasks.Count() <= 0)
|
||||||
|
{
|
||||||
|
return Failure("no weapon (target) tasks!");
|
||||||
|
}
|
||||||
|
WsfTask targetTask = tasks.Entry(0);
|
||||||
|
targetTrack = PLATFORM.MasterTrackList().Find(targetTask.LocalTrackId());
|
||||||
|
if (!targetTrack.IsValid())
|
||||||
|
{
|
||||||
|
return Failure("no target track!");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get nearest hostile and check that range is less than max
|
||||||
|
// alt34.f line 114
|
||||||
|
WsfTrack nearestHostile = perception.NearestThreat();
|
||||||
|
double rangeToNearest = 999999999; # default large value, in meters
|
||||||
|
if (nearestHostile.IsValid() &&
|
||||||
|
nearestHostile.LocationValid())
|
||||||
|
{
|
||||||
|
rangeToNearest = nearestHostile.SlantRangeTo(PLATFORM);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!nearestHostile.IsValid())
|
||||||
|
{
|
||||||
|
writeln_d("nearest hostile not valid!");
|
||||||
|
return Failure("no vaild hostiles closer than 5 nautical miles");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rangeToNearest > mLongRange)
|
||||||
|
{
|
||||||
|
writeln_d("nearest hostile too far away! (", rangeToNearest," m)");
|
||||||
|
return Failure("no vaild hostiles closer than 5 nautical miles");
|
||||||
|
}
|
||||||
|
|
||||||
|
// ALL CONDITIONS PASS
|
||||||
|
### Generate Maneuver Alternative
|
||||||
|
# alt34.f line 115 - 121
|
||||||
|
# iactn = 4
|
||||||
|
# call vnorm(vp(1,me),dir0) - get a unit vector (dir0) of my current velocity vector
|
||||||
|
# gmx = amin1(3.,gmxsu) - take the smaller of 3.0 and Maximum load possible at maximum thrust
|
||||||
|
# spd0 = 3.
|
||||||
|
# spdmod = thrttl (desspd = 1, thrttl = 2, desacc = 3)
|
||||||
|
int iactn = 4;
|
||||||
|
dir0 = PLATFORM.VelocityNED().Normal();
|
||||||
|
mGMX = Math.Min(3.0, brawlerPlatform.MaxSustainedGs());
|
||||||
|
mSpd0 = 3.0;
|
||||||
|
int spdmod = 2; // thrttl
|
||||||
|
|
||||||
|
### Project and Evaluate (Score) Maneuver Alternative
|
||||||
|
// Alternative is only projected tproj sec and then evaluated
|
||||||
|
double alternativeScore = brawlerPlatform.EvaluateVectorWithThrottle(dir0, mGMX, mSpd0, ilevel, kalt, icall, lcall);
|
||||||
|
writeln_d(PLATFORM.Name(), " behavior_alt3411_straight_flight score = ", alternativeScore, ", T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Return Maneuver Alternative Score
|
||||||
|
return alternativeScore;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
|
||||||
|
execute
|
||||||
|
#writeln_d(PLATFORM.Name(), " executing behavior_alt3411_straight_flight, T=", TIME_NOW);
|
||||||
|
brawlerPlatform.FlyVectorWithThrottle(dir0, mGMX, mSpd0);
|
||||||
|
|
||||||
|
# if (mDrawSteering == true)
|
||||||
|
# {
|
||||||
|
# mDraw.SetLayer("behavior_pursue_target");
|
||||||
|
# mDraw.SetDuration(processor.UpdateInterval());
|
||||||
|
# mDraw.SetColor(1.0, 0.5, 0.0);
|
||||||
|
# mDraw.SetLineSize(1);
|
||||||
|
# mDraw.BeginLines();
|
||||||
|
# mDraw.Vertex(PLATFORM.Location());
|
||||||
|
# mDraw.Vertex(mTargetPoint);
|
||||||
|
# mDraw.End();
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# string msg = write_str("pursue-target: ", targetTrack.TargetName(), " at speed ", (string)mTargetSpeed);
|
||||||
|
# writeln_d(" T=", TIME_NOW, " ", PLATFORM.Name(), " ", msg);
|
||||||
|
# FlyTarget( PLATFORM, mTargetPoint, mTargetSpeed);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt34.f -> alt342.f
|
||||||
|
// Replicates the 3,4,2,1 alternative behavior
|
||||||
|
// alt3421_roll_+15_pull
|
||||||
|
|
||||||
|
include_once BrawlerScriptUtil.txt
|
||||||
|
|
||||||
|
behavior alt3421_roll_15_pull
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfPerceptionProcessor perception;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3421Enabled = true;
|
||||||
|
double mLongRange = 5.0 * Math.M_PER_NM();
|
||||||
|
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 4;
|
||||||
|
int icall = 2;
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
Vec3 a0; # maneuver plane
|
||||||
|
Vec3 dir0; # direction vector
|
||||||
|
double gmx; # max Gs
|
||||||
|
double spd0; # throttle setting
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
double grav = 32.17405;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
perception = (WsfPerceptionProcessor)PLATFORM.Processor("perception");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition alt3421 roll_+15_pull, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mAlternative3421Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
## alt 34.f line 97, & 140
|
||||||
|
#lrange = rhst*ftnmi .gt. 5.0
|
||||||
|
#if(lrange)goto 15
|
||||||
|
|
||||||
|
WsfTrack nearestHostile = perception.NearestThreat();
|
||||||
|
double rangeToNearest = 999999999; # default large value, in meters
|
||||||
|
if (nearestHostile.IsValid() &&
|
||||||
|
nearestHostile.LocationValid())
|
||||||
|
{
|
||||||
|
rangeToNearest = nearestHostile.SlantRangeTo(PLATFORM);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!nearestHostile.IsValid())
|
||||||
|
{
|
||||||
|
writeln_d("nearest hostile not valid!");
|
||||||
|
return Failure("no vaild hostiles closer than 5 nautical miles");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rangeToNearest > mLongRange)
|
||||||
|
{
|
||||||
|
writeln_d("nearest hostile too far away! (", rangeToNearest," m)");
|
||||||
|
return Failure("no vaild hostiles closer than 5 nautical miles");
|
||||||
|
}
|
||||||
|
|
||||||
|
##alt342.f line 99-112
|
||||||
|
## GENERATE MAX TURNS IN MANEUVER PLANES ADJACENT TO PRESENT PLANE
|
||||||
|
## ROLL +15 & PULL
|
||||||
|
#iactn = 4
|
||||||
|
#dir0(1) = 0.
|
||||||
|
#dir0(2) = sd15
|
||||||
|
#dir0(3) = -cd15
|
||||||
|
#call vxfrmc(rwep,dir0,dir0,2)
|
||||||
|
## DIR0 IS UNIT ACCELERATION VECTOR IN DESIRED MANEUVER PLANE
|
||||||
|
#call manpln(dir0,gmxsu)
|
||||||
|
|
||||||
|
double sd15 = 0.2588190;
|
||||||
|
double cd15 = 0.9659258;
|
||||||
|
dir0 = Vec3.Construct(0.0, sd15, -cd15);
|
||||||
|
dir0 = brawlerPlatform.ConvertWindtoNED(dir0);
|
||||||
|
double gmxsu = brawlerPlatform.MaxTacticalGs();
|
||||||
|
#call manpln(dir0,gmxsu)
|
||||||
|
#manpln() - maneuver in plane: replicated in 6 lines below
|
||||||
|
dir0 = vorth(dir0, PLATFORM.VelocityNED());
|
||||||
|
dir0.Normalize();
|
||||||
|
int iactn = 4;
|
||||||
|
gmx = gmxsu;
|
||||||
|
spd0 = 3.0;
|
||||||
|
int spdmod = 2; //thrttl
|
||||||
|
|
||||||
|
### Project and Evaluate (Score) Maneuver Alternative
|
||||||
|
double score = brawlerPlatform.EvaluateVectorWithThrottle(dir0, gmx, spd0, ilevel, kalt, icall, lcall);
|
||||||
|
return score;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
execute
|
||||||
|
## what was evaluated should be actually performed now
|
||||||
|
PLATFORM.FlyVectorWithThrottle(dir0, gmx, spd0);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
140
platforms/brawler/alternatives/behavior_alt3431_roll-15_pull.txt
Normal file
140
platforms/brawler/alternatives/behavior_alt3431_roll-15_pull.txt
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt34.f -> alt343.f
|
||||||
|
// Replicates the 3,4,3,1 alternative behavior
|
||||||
|
// alt3431_roll-15_pull
|
||||||
|
|
||||||
|
behavior alt3431_roll-15_pull
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfPerceptionProcessor perception;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3431Enabled = true;
|
||||||
|
double mLongRange = 5.0 * Math.M_PER_NM();
|
||||||
|
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 4;
|
||||||
|
int icall = 3;
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
Vec3 a0; # maneuver plane
|
||||||
|
Vec3 dir0; # direction vector
|
||||||
|
double gmx; # max Gs
|
||||||
|
double spd0; # throttle setting
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
double grav = 32.17405;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
perception = (WsfPerceptionProcessor)PLATFORM.Processor("perception");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition alt3431 roll-15_pull, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mAlternative3431Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
## alt 34.f line 97, & 140
|
||||||
|
#lrange = rhst*ftnmi .gt. 5.0
|
||||||
|
#if(lrange)goto 15
|
||||||
|
|
||||||
|
WsfTrack nearestHostile = perception.NearestThreat();
|
||||||
|
double rangeToNearest = 999999999; # default large value, in meters
|
||||||
|
if (nearestHostile.IsValid() &&
|
||||||
|
nearestHostile.LocationValid())
|
||||||
|
{
|
||||||
|
rangeToNearest = nearestHostile.SlantRangeTo(PLATFORM);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!nearestHostile.IsValid())
|
||||||
|
{
|
||||||
|
writeln_d("nearest hostile not valid!");
|
||||||
|
return Failure("no vaild hostiles closer than 5 nautical miles");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rangeToNearest > mLongRange)
|
||||||
|
{
|
||||||
|
writeln_d("nearest hostile too far away! (", rangeToNearest," m)");
|
||||||
|
return Failure("no vaild hostiles closer than 5 nautical miles");
|
||||||
|
}
|
||||||
|
|
||||||
|
##alt343.f line 99-109
|
||||||
|
## ROLL -15 & PULL
|
||||||
|
#dir0(1) = 0.
|
||||||
|
#dir0(2) = -sd15
|
||||||
|
#dir0(3) = -cd15
|
||||||
|
#call vxfrmc(rwep,dir0,dir0,2)
|
||||||
|
## DIR0 IS UNIT ACCELERATION VECTOR IN DESIRED MANEUVER PLANE
|
||||||
|
#call manpln(dir0,gmxsu)
|
||||||
|
double sd15 = 0.2588190;
|
||||||
|
double cd15 = 0.9659258;
|
||||||
|
dir0 = Vec3.Construct(0.0, -sd15, -cd15);
|
||||||
|
dir0 = brawlerPlatform.ConvertWindtoNED(dir0);
|
||||||
|
double gmxsu = brawlerPlatform.MaxTacticalGs();
|
||||||
|
#call manpln(dir0,gmxsu)
|
||||||
|
#manpln() - maneuver in plane: replicated in 6 lines below
|
||||||
|
dir0 = vorth(dir0, PLATFORM.VelocityNED());
|
||||||
|
dir0.Normalize();
|
||||||
|
int iactn = 4;
|
||||||
|
gmx = gmxsu;
|
||||||
|
spd0 = 3.0;
|
||||||
|
int spdmod = 2; //thrttl
|
||||||
|
|
||||||
|
### Project and Evaluate (Score) Maneuver Alternative
|
||||||
|
double score = brawlerPlatform.EvaluateVectorWithThrottle(dir0, gmx, spd0, ilevel, kalt, icall, lcall);
|
||||||
|
return score;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
execute
|
||||||
|
## what was evaluated should be actually performed now
|
||||||
|
PLATFORM.FlyVectorWithThrottle(dir0, gmx, spd0);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
331
platforms/brawler/alternatives/behavior_alt3441_tail_attack.txt
Normal file
331
platforms/brawler/alternatives/behavior_alt3441_tail_attack.txt
Normal file
@@ -0,0 +1,331 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt34.f -> alt344.f
|
||||||
|
// Replicates the 3,4,4,1 alternative behavior
|
||||||
|
// alt3441_tail_attack
|
||||||
|
|
||||||
|
include_once BrawlerScriptUtil.txt
|
||||||
|
|
||||||
|
behavior alt3441_tail_attack
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfPerceptionProcessor perception;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
WsfLocalTrack targetTrack;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3441Enabled = true;
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 4;
|
||||||
|
int icall = 4;
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
Vec3 a0; # maneuver plane
|
||||||
|
Vec3 dir0; # direction vector
|
||||||
|
double gmx; # max Gs
|
||||||
|
double spd0; # speed or throttle setting (depending on spdmod)
|
||||||
|
int spdmod;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
double grav = 32.17405;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
perception = (WsfPerceptionProcessor)PLATFORM.Processor("perception");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
|
||||||
|
#when talatk() is done:
|
||||||
|
# dir0 is normalized
|
||||||
|
# spd0 is in units of ft/sec (or set to 3.0 for throttle mode)
|
||||||
|
script void talatk()
|
||||||
|
writeln_d("alt3441 tail attack: talatk");
|
||||||
|
# # local declarations
|
||||||
|
# integer jacid
|
||||||
|
# real t,pres,dens,vs,pr,dr,xcarot(3),vcarot(3)
|
||||||
|
# real xprj(3),vprj(3),rhprj(3,3),dlag,dlagn,dlagun,vtemp(3)
|
||||||
|
# real dxtail(3),aprj(3),ause(3),dt,spdwtd,x_tgt(3)
|
||||||
|
# data dlagn/5000./,dlagun/1000./
|
||||||
|
# # ENDDEC
|
||||||
|
# # SET TARGET POSITION BEHIND TARGET A/C A DISTANCE DLAG
|
||||||
|
# jacid = iacidt(iac)
|
||||||
|
# dlag=dlagn
|
||||||
|
# if(.not.noaim) dlag= (ppmrmn+ppmrmx)/2.
|
||||||
|
# if(mslpp.eq.nummis+1) dlag= dlagun
|
||||||
|
# # GET POSITION OF AC 5 SECONDS IN FUTURE:
|
||||||
|
# dt = 5.
|
||||||
|
# #if (xp(3,iac).ge.trkr_neg_alt) call nabort('talatk...tgt more than /par/trkr_neg_alt feet below ground')
|
||||||
|
# call xmit3(xp(1,iac),x_tgt)
|
||||||
|
# if (x_tgt(3).ge.0.) x_tgt(3) = -1.0
|
||||||
|
# call atmos(-x_tgt(3),t,pres,dens,vs,pr,dr)
|
||||||
|
# call a_lim(x_tgt,vp(1,iac),ap(1,iac),dt,casmin(iac)/sqrt(dr),ause)
|
||||||
|
# call projw(x_tgt,vp(1,iac),ause,dt,xprj,vprj,aprj,rhprj)
|
||||||
|
# call vmake(-dlag,vprj,vtemp)
|
||||||
|
# call vsum(x_tgt,vtemp,dxtail)
|
||||||
|
# call vsub(dxtail,xp(1,me),dxtail)
|
||||||
|
# call vecinc(vp(1,iac),0.5/tproj3,dxtail,dir0)
|
||||||
|
# spd0 = xmag(dir0)
|
||||||
|
# spdmod = desspd
|
||||||
|
# spdwtd = spdnow(me)+almax*tproj3*1.1
|
||||||
|
# if (spd0 .gt. spdwtd)
|
||||||
|
# {
|
||||||
|
# spd0 = 3.
|
||||||
|
# spdmod = thrttl
|
||||||
|
# }
|
||||||
|
# call vnorm(dir0,dir0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
double dlagn = 5000.0;
|
||||||
|
double dlagun = 1000.0;
|
||||||
|
double dlag = dlagn;
|
||||||
|
|
||||||
|
## check if we have a weapon task - it shouldn't reach this point if we didn't
|
||||||
|
#if(.not.noaim) dlag= (ppmrmn+ppmrmx)/2.
|
||||||
|
## check if we have a weapon, otherwise close at gun range
|
||||||
|
#if(mslpp.eq.nummis+1) dlag= dlagun
|
||||||
|
if (!HaveWeapon(PLATFORM))
|
||||||
|
{
|
||||||
|
dlag = dlagun;
|
||||||
|
}
|
||||||
|
|
||||||
|
# GET POSITION OF AC 5 SECONDS IN FUTURE:
|
||||||
|
double dt = 5.0;
|
||||||
|
#if (xp(3,iac).ge.trkr_neg_alt) call nabort('talatk...tgt more than /par/trkr_neg_alt feet below ground')
|
||||||
|
|
||||||
|
# call xmit3(xp(1,iac),x_tgt)
|
||||||
|
|
||||||
|
# ##LBM - dont do projection for now
|
||||||
|
# if (x_tgt(3).ge.0.) x_tgt(3) = -1.0
|
||||||
|
# call atmos(-x_tgt(3),t,pres,dens,vs,pr,dr)
|
||||||
|
# call a_lim(x_tgt,vp(1,iac),ap(1,iac),dt,casmin(iac)/sqrt(dr),ause)
|
||||||
|
# call projw(x_tgt,vp(1,iac),ause,dt,xprj,vprj,aprj,rhprj)
|
||||||
|
|
||||||
|
//LBM - not able to perceive target's acceleration
|
||||||
|
//assume target's velocity after dt is same as now
|
||||||
|
|
||||||
|
//LBM - convert everything to feet when calculating against BRAWLER constants
|
||||||
|
// convert back to meters to call WSF commands
|
||||||
|
Vec3 vprj = targetTrack.VelocityNED();
|
||||||
|
Vec3 vtemp = vprj.Normal();
|
||||||
|
vtemp.Scale(-dlag);
|
||||||
|
# Vec3 x_tgt; //target position
|
||||||
|
# Vec3 xp; //my position
|
||||||
|
# Vec3 dxtail = Vec3.Add(x_tgt,vtemp); #adding vtemp is not accounted for in the line below
|
||||||
|
# dxtail = Vec3.Subtract(dxtail,xp);
|
||||||
|
Vec3 dx = RelativePositionNED(PLATFORM.Location(), targetTrack.CurrentLocation());
|
||||||
|
dx.Scale(MATH.FT_PER_M());
|
||||||
|
Vec3 dxtail = Vec3.Add(dx,vtemp);
|
||||||
|
|
||||||
|
Vec3 vpt = targetTrack.VelocityNED();
|
||||||
|
vpt.Scale(MATH.FT_PER_M());
|
||||||
|
dxtail.Scale(0.5/brawlerPlatform.ProjectedTimeDelta());
|
||||||
|
dir0 = Vec3.Add(vpt,dxtail);
|
||||||
|
spd0 = dir0.Magnitude(); #ft/sec
|
||||||
|
spdmod = 1; //(desspd = 1, thrttl = 2, desacc = 3)
|
||||||
|
#double almax = brawlerPlatform.MaxForwardAccelWithGravity() * MATH.M_PER_FT();
|
||||||
|
double almax = brawlerPlatform.MaxForwardAccelWithGravity(); #ft/sec^2
|
||||||
|
double spdwtd = PLATFORM.Speed()*MATH.FT_PER_M() + almax * brawlerPlatform.ProjectedTimeDelta() * 1.1;
|
||||||
|
if (spd0 > spdwtd)
|
||||||
|
{
|
||||||
|
spd0 = 3.0;
|
||||||
|
spdmod = 2; //(desspd = 1, thrttl = 2, desacc = 3)
|
||||||
|
}
|
||||||
|
dir0.Normalize();
|
||||||
|
end_script
|
||||||
|
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition alt3441 tail_attack, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mAlternative3441Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
WsfTaskList tasks = processor.TasksReceivedOfType("WEAPON");
|
||||||
|
if(tasks.Count() <= 0)
|
||||||
|
{
|
||||||
|
writeln_d("no weapon (target) tasks!");
|
||||||
|
return Failure("no weapon (target) tasks!");
|
||||||
|
}
|
||||||
|
WsfTask targetTask = tasks.Entry(0);
|
||||||
|
targetTrack = PLATFORM.MasterTrackList().Find(targetTask.LocalTrackId());
|
||||||
|
if (!targetTrack.IsValid())
|
||||||
|
{
|
||||||
|
writeln_d("no target track!");
|
||||||
|
return Failure("no target track!");
|
||||||
|
}
|
||||||
|
if (!targetTrack.VelocityValid())
|
||||||
|
{
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " target track does not have valid velocity!");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
##alt344.f line 172 - 224
|
||||||
|
int iactn = 4;
|
||||||
|
# GENERATE TURNS IN MANEUVER PLANE CONTAINING LOS TO OPPONENT
|
||||||
|
Vec3 dxpme = RelativePositionNED(PLATFORM.Location(),targetTrack.CurrentLocation());
|
||||||
|
Vec3 vp = PLATFORM.VelocityNED();
|
||||||
|
Vec3 vp_iac = targetTrack.VelocityNED();
|
||||||
|
bool bhndme = (Vec3.Dot(dxpme,vp) < 0.0);
|
||||||
|
bool bhndhm = (Vec3.Dot(dxpme,vp_iac) > 0.0);
|
||||||
|
|
||||||
|
if (bhndme && bhndhm)
|
||||||
|
{
|
||||||
|
# BEHIND EACH OTHER: WANT COURSE REVERSAL
|
||||||
|
# USE TAIL ATTACK FOR NOW
|
||||||
|
talatk();
|
||||||
|
}
|
||||||
|
else if (bhndme && !bhndhm)
|
||||||
|
{
|
||||||
|
# HE'S ON MY TAIL!: NO TAIL ATTACK ALTERNATIVE GENERATED
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " HE IS ON MY TAIL! NO TAIL ATTACK!");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
else if (!bhndme && bhndhm)
|
||||||
|
{
|
||||||
|
# I'M ON HIS TAIL!: GENERATE TAIL ATTACK
|
||||||
|
talatk();
|
||||||
|
}
|
||||||
|
else if (!bhndme && !bhndhm)
|
||||||
|
{
|
||||||
|
# NOSE TO NOSE: PLAN INTERCEPT
|
||||||
|
#call aimpt(xp(1,me),spdnow(me),xp(1,iac),vp(1,iac),spdnow(iac),daimpt,lsoln);
|
||||||
|
WsfWaypoint aimptWP = WsfWaypoint();
|
||||||
|
double intTime = PLATFORM.InterceptLocation3D(targetTrack, aimptWP);
|
||||||
|
#if (lsoln)
|
||||||
|
if (intTime > 0)
|
||||||
|
{
|
||||||
|
WsfGeoPoint daimpt = aimptWP.Location();
|
||||||
|
#call vsub(daimpt,xp(1,me),dxaim);
|
||||||
|
Vec3 dxaim = RelativePositionNED(PLATFORM.Location(), daimpt); #NED coordinates
|
||||||
|
dir0 = dxaim.Normal();
|
||||||
|
spd0 = 3.0;
|
||||||
|
spdmod = 2; //(desspd = 1, thrttl = 2, desacc = 3)
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//return Failure("ERROR: intercept somehow not possible, even though head to head with target!");
|
||||||
|
# ASSUME OVERSHOOT, SO TRY A TAIL ATTACK
|
||||||
|
talatk();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//call nabort('AL344...UNKNOWN GEOMETRY');
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " ...UNKNOWN GEOMETRY");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
//lmore = .true.
|
||||||
|
double gmxsu = brawlerPlatform.MaxTacticalGs();
|
||||||
|
gmx = gmxsu;
|
||||||
|
|
||||||
|
### Project and Evaluate (Score) Maneuver Alternative
|
||||||
|
double score = 0;
|
||||||
|
if (spdmod == 2)
|
||||||
|
{
|
||||||
|
score = brawlerPlatform.EvaluateVectorWithThrottle(dir0, gmx, spd0, ilevel, kalt, icall, lcall);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
score = brawlerPlatform.EvaluateVectorWithSpeed(dir0, gmx, spd0 * MATH.M_PER_FT(), ilevel, kalt, icall, lcall);
|
||||||
|
}
|
||||||
|
writeln_d("T=", TIME_NOW, ", 3441_tail_attack = ", score);
|
||||||
|
|
||||||
|
writeln_d("raw = ", brawlerPlatform.RawManeuverValueComponent("offensive"),
|
||||||
|
", ", brawlerPlatform.RawManeuverValueComponent("low speed recovery"),
|
||||||
|
", ", brawlerPlatform.RawManeuverValueComponent("defensive"),
|
||||||
|
", ", brawlerPlatform.RawManeuverValueComponent("illumination"),
|
||||||
|
", ", brawlerPlatform.RawManeuverValueComponent("missile evasion"),
|
||||||
|
", ", brawlerPlatform.RawManeuverValueComponent("missile aiming"));
|
||||||
|
|
||||||
|
writeln_d("component = ", brawlerPlatform.ManeuverValueComponent("offensive"),
|
||||||
|
", ", brawlerPlatform.ManeuverValueComponent("low speed recovery"),
|
||||||
|
", ", brawlerPlatform.ManeuverValueComponent("defensive"),
|
||||||
|
", ", brawlerPlatform.ManeuverValueComponent("illumination"),
|
||||||
|
", ", brawlerPlatform.ManeuverValueComponent("missile evasion"),
|
||||||
|
", ", brawlerPlatform.ManeuverValueComponent("missile aiming"));
|
||||||
|
|
||||||
|
writeln_d("tunnel = ", brawlerPlatform.TunnelVisionMultiplier("offensive"),
|
||||||
|
", ", brawlerPlatform.TunnelVisionMultiplier("low speed recovery"),
|
||||||
|
", ", brawlerPlatform.TunnelVisionMultiplier("defensive"),
|
||||||
|
", ", brawlerPlatform.TunnelVisionMultiplier("illumination"),
|
||||||
|
", ", brawlerPlatform.TunnelVisionMultiplier("missile evasion"),
|
||||||
|
", ", brawlerPlatform.TunnelVisionMultiplier("missile aiming"));
|
||||||
|
|
||||||
|
writeln_d("bias = ", brawlerPlatform.InherentBiasFaults("aggressiveness"),
|
||||||
|
", ", brawlerPlatform.InherentBiasFaults("mutual support"),
|
||||||
|
", ", brawlerPlatform.InherentBiasFaults("airspeed maintenance"));
|
||||||
|
|
||||||
|
writeln_d("mult = ", brawlerPlatform.OffensiveMultiplier(),
|
||||||
|
", ", brawlerPlatform.DefensiveMultiplier());
|
||||||
|
|
||||||
|
if (targetTrack.Target().IsValid())
|
||||||
|
{
|
||||||
|
writeln_d("engage = ", brawlerPlatform.LastEngagementValue(targetTrack.Target()));
|
||||||
|
}
|
||||||
|
|
||||||
|
return score;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
execute
|
||||||
|
writeln_d("3441_tail_attack");
|
||||||
|
## what was evaluated should be actually performed now
|
||||||
|
if (spdmod == 2)
|
||||||
|
{
|
||||||
|
PLATFORM.FlyVectorWithThrottle(dir0, gmx, spd0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PLATFORM.FlyVectorWithSpeed(dir0, gmx, spd0 * MATH.M_PER_FT());
|
||||||
|
}
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
@@ -0,0 +1,129 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt34.f -> alt345.f
|
||||||
|
// Replicates the 3,4,5,1 alternative behavior
|
||||||
|
// alt3451_pull_gmax_sust
|
||||||
|
|
||||||
|
include_once BrawlerScriptUtil.txt
|
||||||
|
|
||||||
|
behavior alt3451_pull_gmax_sust
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfPerceptionProcessor perception;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3451Enabled = true;
|
||||||
|
bool mCheckRollOverTopValue = true; #this alternative assumes a different one has already evaluated and flown (to set the roll over the top value)
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 4;
|
||||||
|
int icall = 5;
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
Vec3 a0; # maneuver plane
|
||||||
|
Vec3 dir0; # direction vector
|
||||||
|
double gmx; # max Gs
|
||||||
|
double spd0; # throttle setting
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
double grav = 32.17405;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
perception = (WsfPerceptionProcessor)PLATFORM.Processor("perception");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition alt3451 pull_gmax_sust, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mAlternative3451Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
##alt34.f line 160 //filter out this alternative?
|
||||||
|
double valrot = brawlerPlatform.RollOverTopValue();
|
||||||
|
if(mCheckRollOverTopValue == true && valrot == 0.0)
|
||||||
|
{
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " valrot == 0");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
##alt345.f line 104 - 119
|
||||||
|
#iactn = 4
|
||||||
|
#call makeh(vp(1,me),rot)
|
||||||
|
#dir0(1) = 0.001
|
||||||
|
#dir0(2) = 0.0
|
||||||
|
#dir0(3) = -1.000
|
||||||
|
#call vxfrmc(rot,dir0,dir0,2)
|
||||||
|
#call vnorm(dir0,dir0)
|
||||||
|
#gmx = gmxsu
|
||||||
|
#spd0 = 3.
|
||||||
|
#spdmod = thrttl
|
||||||
|
|
||||||
|
int iactn = 4;
|
||||||
|
Vec3 vp = PLATFORM.VelocityNED();
|
||||||
|
Array<double> rot = makeh(vp);
|
||||||
|
dir0 = Vec3.Construct(0.001, 0.0, -1.0);
|
||||||
|
dir0 = vxfrmc2(rot, dir0);
|
||||||
|
dir0.Normalize();
|
||||||
|
double gmxsu = brawlerPlatform.MaxTacticalGs();
|
||||||
|
gmx = gmxsu;
|
||||||
|
spd0 = 3.0;
|
||||||
|
int spdmod = 2; //thrttl // spdmod = thrttl (desspd = 1, thrttl = 2, desacc = 3)
|
||||||
|
|
||||||
|
### Project and Evaluate (Score) Maneuver Alternative
|
||||||
|
double score = brawlerPlatform.EvaluateVectorWithThrottle(dir0, gmx, spd0, ilevel, kalt, icall, lcall);
|
||||||
|
|
||||||
|
return score;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
execute
|
||||||
|
## what was evaluated should be actually performed now
|
||||||
|
PLATFORM.FlyVectorWithThrottle(dir0, gmx, spd0);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
@@ -0,0 +1,113 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt34.f -> alt347.f
|
||||||
|
// Replicates the 3,4,7,1 alternative behavior
|
||||||
|
// alt3471_slow_current_dir
|
||||||
|
|
||||||
|
behavior alt3471_slow_current_dir
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfPerceptionProcessor perception;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3471Enabled = true;
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 4;
|
||||||
|
int icall = 7;
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
Vec3 a0; # maneuver plane
|
||||||
|
Vec3 dir0; # direction vector
|
||||||
|
double gmx; # max Gs
|
||||||
|
double spd0; # throttle setting
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
double grav = 32.17405;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
perception = (WsfPerceptionProcessor)PLATFORM.Processor("perception");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition alt3471 slow_current_dir, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mAlternative3471Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
##alt347.f line 108 //initialize value
|
||||||
|
#call vnorm(vp(1,me),myvdir)
|
||||||
|
##alt347.f line 124 - 134
|
||||||
|
#iactn=4
|
||||||
|
#call xmit(3,myvdir,dir0)
|
||||||
|
#gmx=amin1(3.,gmxsu)
|
||||||
|
#spd0=spdnow(me)+almin*tproj3*1.1
|
||||||
|
#spd0 = amax1(200.,spd0)
|
||||||
|
#spdmod = desspd
|
||||||
|
|
||||||
|
Vec3 myvdir = PLATFORM.VelocityNED().Normal();
|
||||||
|
int iactn = 4;
|
||||||
|
dir0 = myvdir;
|
||||||
|
double gmxsu = brawlerPlatform.MaxTacticalGs();
|
||||||
|
gmx = MATH.Min(3.0,gmxsu);
|
||||||
|
double almin = brawlerPlatform.MinForwardAccelWithGravity(); #ft/sec^2
|
||||||
|
spd0 = PLATFORM.Speed() * MATH.FT_PER_M() + almin * brawlerPlatform.ProjectedTimeDelta() * 1.1;
|
||||||
|
spd0 = MATH.Max(200.0, spd0);
|
||||||
|
spd0 *= MATH.M_PER_FT();
|
||||||
|
int spdmod = 1; //desspd // spdmod = thrttl (desspd = 1, thrttl = 2, desacc = 3)
|
||||||
|
|
||||||
|
### Project and Evaluate (Score) Maneuver Alternative
|
||||||
|
double score = brawlerPlatform.EvaluateVectorWithSpeed(dir0, gmx, spd0, ilevel, kalt, icall, lcall);
|
||||||
|
return score;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
execute
|
||||||
|
## what was evaluated should be actually performed now
|
||||||
|
PLATFORM.FlyVectorWithSpeed(dir0, gmx, spd0);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt34.f -> alt347.f
|
||||||
|
// Replicates the 3,4,7,2 alternative behavior
|
||||||
|
// alt3472_slow_pull_right
|
||||||
|
|
||||||
|
behavior alt3472_slow_pull_right
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfPerceptionProcessor perception;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3472Enabled = true;
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 4;
|
||||||
|
int icall = 7;
|
||||||
|
int lcall = 2;
|
||||||
|
|
||||||
|
Vec3 a0; # maneuver plane
|
||||||
|
Vec3 dir0; # direction vector
|
||||||
|
double gmx; # max Gs
|
||||||
|
double spd0; # throttle setting
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
double grav = 32.17405;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
perception = (WsfPerceptionProcessor)PLATFORM.Processor("perception");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition alt3472 slow_pull_right, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mAlternative3472Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
##alt347.f line 108 //initialize value
|
||||||
|
#call vnorm(vp(1,me),myvdir)
|
||||||
|
##alt347.f line 135 - 148
|
||||||
|
#iactn=4
|
||||||
|
#acc0(1)=0.
|
||||||
|
#acc0(2)=sroll
|
||||||
|
#acc0(3)=-croll
|
||||||
|
#call vxfrmc(rwep,dir0,acc0,2)
|
||||||
|
#gmx=gmxsu
|
||||||
|
#spd0=spdnow(me)+almin*tproj3*1.1
|
||||||
|
#spd0 = amax1(200.,spd0)
|
||||||
|
#spdmod = desspd
|
||||||
|
|
||||||
|
Vec3 myvdir = PLATFORM.VelocityNED().Normal();
|
||||||
|
int iactn = 4;
|
||||||
|
double sroll = 0.2588190; //sin of roll angle (15 deg)
|
||||||
|
double croll = 0.9659258; //cos of roll angle (15 deg)
|
||||||
|
Vec3 acc0 = Vec3.Construct(0.0, sroll, -croll);
|
||||||
|
dir0 = brawlerPlatform.ConvertWindtoNED(acc0);
|
||||||
|
double gmxsu = brawlerPlatform.MaxTacticalGs();
|
||||||
|
gmx = gmxsu;
|
||||||
|
double almin = brawlerPlatform.MinForwardAccelWithGravity();
|
||||||
|
spd0 = PLATFORM.Speed() * MATH.FT_PER_M() + almin * brawlerPlatform.ProjectedTimeDelta() * 1.1;
|
||||||
|
spd0 = MATH.Max(200.0, spd0);
|
||||||
|
spd0 *= MATH.M_PER_FT();
|
||||||
|
int spdmod = 1; //desspd // spdmod = thrttl (desspd = 1, thrttl = 2, desacc = 3)
|
||||||
|
|
||||||
|
### Project and Evaluate (Score) Maneuver Alternative
|
||||||
|
double score = brawlerPlatform.EvaluateVectorWithSpeed(dir0, gmx, spd0, ilevel, kalt, icall, lcall);
|
||||||
|
return score;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
execute
|
||||||
|
## what was evaluated should be actually performed now
|
||||||
|
PLATFORM.FlyVectorWithSpeed(dir0, gmx, spd0);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt34.f -> alt347.f
|
||||||
|
// Replicates the 3,4,7,3 alternative behavior
|
||||||
|
// alt3473_slow_pull_left
|
||||||
|
|
||||||
|
behavior alt3473_slow_pull_left
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfPerceptionProcessor perception;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3473Enabled = true;
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 4;
|
||||||
|
int icall = 7;
|
||||||
|
int lcall = 3;
|
||||||
|
|
||||||
|
Vec3 a0; # maneuver plane
|
||||||
|
Vec3 dir0; # direction vector
|
||||||
|
double gmx; # max Gs
|
||||||
|
double spd0; # throttle setting
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
double grav = 32.17405;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
perception = (WsfPerceptionProcessor)PLATFORM.Processor("perception");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition alt3473 slow_pull_left, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mAlternative3473Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
##alt347.f line 108 //initialize value
|
||||||
|
#call vnorm(vp(1,me),myvdir)
|
||||||
|
##alt347.f line 150 - 163
|
||||||
|
#iactn=4
|
||||||
|
#acc0(1)=0.
|
||||||
|
#acc0(2)=-sroll
|
||||||
|
#acc0(3)=-croll
|
||||||
|
#call vxfrmc(rwep,dir0,acc0,2)
|
||||||
|
#gmx=gmxsu
|
||||||
|
#spd0=spdnow(me)+almin*tproj3*1.1
|
||||||
|
#spd0 = amax1(200.,spd0)
|
||||||
|
#spdmod = desspd
|
||||||
|
|
||||||
|
Vec3 myvdir = PLATFORM.VelocityNED().Normal();
|
||||||
|
int iactn = 4;
|
||||||
|
double sroll = 0.2588190; //sin of roll angle (15 deg)
|
||||||
|
double croll = 0.9659258; //cos of roll angle (15 deg)
|
||||||
|
Vec3 acc0 = Vec3.Construct(0.0, -sroll, -croll);
|
||||||
|
dir0 = brawlerPlatform.ConvertWindtoNED(acc0);
|
||||||
|
double gmxsu = brawlerPlatform.MaxTacticalGs();
|
||||||
|
gmx = gmxsu;
|
||||||
|
double almin = brawlerPlatform.MinForwardAccelWithGravity();
|
||||||
|
spd0 = PLATFORM.Speed() * MATH.FT_PER_M() + almin * brawlerPlatform.ProjectedTimeDelta() * 1.1;
|
||||||
|
spd0 = MATH.Max(200.0, spd0);
|
||||||
|
spd0 *= MATH.M_PER_FT();
|
||||||
|
int spdmod = 1; //desspd // spdmod = thrttl (desspd = 1, thrttl = 2, desacc = 3)
|
||||||
|
|
||||||
|
### Project and Evaluate (Score) Maneuver Alternative
|
||||||
|
double score = brawlerPlatform.EvaluateVectorWithSpeed(dir0, gmx, spd0, ilevel, kalt, icall, lcall);
|
||||||
|
return score;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
execute
|
||||||
|
## what was evaluated should be actually performed now
|
||||||
|
PLATFORM.FlyVectorWithSpeed(dir0, gmx, spd0);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt34.f -> alt347.f
|
||||||
|
// Replicates the 3,4,7,4 alternative behavior
|
||||||
|
// alt3474_slow_pull_current_plane
|
||||||
|
|
||||||
|
behavior alt3474_slow_pull_current_plane
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfPerceptionProcessor perception;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3474Enabled = true;
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 4;
|
||||||
|
int icall = 7;
|
||||||
|
int lcall = 4;
|
||||||
|
|
||||||
|
Vec3 a0; # maneuver plane
|
||||||
|
double gmx; # max Gs
|
||||||
|
double spd0; # throttle setting
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
double grav = 32.17405;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
perception = (WsfPerceptionProcessor)PLATFORM.Processor("perception");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition alt3474 slow_pull_current_plane, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mAlternative3474Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
##alt347.f line 108 //initialize value
|
||||||
|
#call vnorm(vp(1,me),myvdir)
|
||||||
|
##alt347.f line 165 - 183
|
||||||
|
#if(xmag(ap(1,me)).lt.0.1)then
|
||||||
|
# //FAIL
|
||||||
|
#endif
|
||||||
|
#iactn=3
|
||||||
|
#call cross(myvdir,ap(1,me),a0)
|
||||||
|
#call vnorm(a0,a0)
|
||||||
|
#gmx = gmxsu*grav
|
||||||
|
#--spd0 is a throttle setting under the NEW iactn=3 format
|
||||||
|
#spd0 = -1.0
|
||||||
|
|
||||||
|
Vec3 myvdir = PLATFORM.VelocityNED().Normal();
|
||||||
|
Vec3 ap = PLATFORM.AccelerationNED(); //meters/sec^2
|
||||||
|
ap.Scale(Math.FT_PER_M()); //convert to feet/sec^2
|
||||||
|
if(ap.Magnitude() < 0.1)
|
||||||
|
{
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " acceleration not high enough to clearly define a maneuever plane!");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
int iactn = 3;
|
||||||
|
a0 = Vec3.Cross(myvdir, ap).Normal();
|
||||||
|
double gmxsu = brawlerPlatform.MaxTacticalGs();
|
||||||
|
gmx = gmxsu*grav;
|
||||||
|
#--spd0 is a throttle setting under the NEW iactn=3 format
|
||||||
|
#spd0 = -1.0; //this means 100% thrust reversal setting
|
||||||
|
spd0 = 1.0; //NO thrust reversal in brawler -> -1 gets converted to 1 (mil power)
|
||||||
|
|
||||||
|
### Project and Evaluate (Score) Maneuver Alternative
|
||||||
|
double score = brawlerPlatform.EvaluateTurnInPlaneWithThrottle(a0, gmx, spd0, ilevel, kalt, icall, lcall);
|
||||||
|
return score;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
execute
|
||||||
|
## what was evaluated should be actually performed now
|
||||||
|
PLATFORM.PullGsInPlaneWithThrottle(a0, gmx, spd0);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
207
platforms/brawler/alternatives/behavior_alt3511_break_right.txt
Normal file
207
platforms/brawler/alternatives/behavior_alt3511_break_right.txt
Normal file
@@ -0,0 +1,207 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt35.f
|
||||||
|
// Replicates the 1v1 Defensive Maneuver 3,5,1,1 alternative behavior
|
||||||
|
// Defensive right break turn
|
||||||
|
// Operates on nearest perceived threat to generate maneuver alternative
|
||||||
|
|
||||||
|
include_once BrawlerScriptUtil.txt
|
||||||
|
|
||||||
|
behavior alt3511_break_right
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfPerceptionProcessor perception;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3511Enabled = true;
|
||||||
|
bool mCheckRange = true;
|
||||||
|
bool mCheckBoresight = true;
|
||||||
|
bool mCheckClosingSpeed = true;
|
||||||
|
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 5;
|
||||||
|
int icall = 1;
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
// Maneuver Alternative flight values
|
||||||
|
Vec3 mDir0;
|
||||||
|
double mGMX = 1.0;
|
||||||
|
double mSpd0 = 3.0;
|
||||||
|
|
||||||
|
// ALSO NEED:
|
||||||
|
// randomization to simulate imperfect desision making, valsig, read from MIND file, typically ~0.01
|
||||||
|
// Production rule bias, used in socring of alternative
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
perception = (WsfPerceptionProcessor)PLATFORM.Processor("perception");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition behavior_alt3511_break_right, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mAlternative3511Enabled)
|
||||||
|
{
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
WsfTaskList tasks = processor.TasksReceivedOfType("WEAPON");
|
||||||
|
if(tasks.Count() <= 0)
|
||||||
|
{
|
||||||
|
return Failure("no weapon (hostile) tasks!");
|
||||||
|
}
|
||||||
|
WsfTask targetTask = tasks.Entry(0);
|
||||||
|
WsfLocalTrack hostile = PLATFORM.MasterTrackList().Find(targetTask.LocalTrackId());
|
||||||
|
if (!hostile.IsValid())
|
||||||
|
{
|
||||||
|
return Failure("no hostile track!");
|
||||||
|
}
|
||||||
|
|
||||||
|
//TODO - change this script so it doesn't use a truth method?
|
||||||
|
if (hostile.TargetKilled())
|
||||||
|
{
|
||||||
|
return Failure("hostile was destroyed!");
|
||||||
|
}
|
||||||
|
|
||||||
|
// alt35.f line 136 - 140
|
||||||
|
//if the predicted range (rngun) between me and threat greater then 2 nautical miles, skip
|
||||||
|
double projectionTime = TIME_NOW + brawlerPlatform.ProjectedTimeDelta();
|
||||||
|
WsfGeoPoint projectedHostileLocation = hostile.LocationAtTime(projectionTime);
|
||||||
|
double rangeToHostile = PLATFORM.SlantRangeTo(projectedHostileLocation);
|
||||||
|
if (mCheckRange == true && rangeToHostile > 2.0 * Math.M_PER_NM())
|
||||||
|
{
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " nearest hostile further than 2 nautical miles");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
//if the off-bore angle between threat and me is greater than pi/2, skip
|
||||||
|
if (mCheckBoresight == true && brawlerPlatform.OffBoresightAngle(hostile.Target(), PLATFORM) > Math.PI_OVER_2())
|
||||||
|
{
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " Boresight angle between hostile and me greater than Pi/2");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
//if the off-bore angle between me and the threat is less than pi/2 check more conditions
|
||||||
|
if (mCheckBoresight == true && brawlerPlatform.OffBoresightAngle(PLATFORM, hostile.Target()) < Math.PI_OVER_2())
|
||||||
|
{
|
||||||
|
//if the predicted range rate (rngrun) of the threat is greater then zero, skip
|
||||||
|
if (mCheckClosingSpeed == true && PLATFORM.ClosingSpeedOf(hostile) > 0)
|
||||||
|
{
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " Hostile is not closing");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
//if the predicted range minus the range rate * 2 is greater than 3000, skip
|
||||||
|
if (mCheckRange == true && rangeToHostile * Math.FT_PER_M() - (PLATFORM.ClosingSpeedOf(hostile) * 3.28084 * 2.0) > 3000.0)
|
||||||
|
{
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " Hostile further than 3000 ft within 2 seconds");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ALL CONDITIONS PASS
|
||||||
|
### Generate Maneuver Alternative
|
||||||
|
// alt35.f line 141 - 153
|
||||||
|
# fill dir0 with values from dxpme(1,iac)
|
||||||
|
# vxfrmc(rwep,dir0,dir0,1) - transforms vectors as specified by an orientation matrix
|
||||||
|
# dir0(1) = 0
|
||||||
|
# vxfrmc(rwep,dir0,dir0,2)
|
||||||
|
# if(-xp(3,me).lt.5000.) dir0(3) = amin1(0.,dir0(3))
|
||||||
|
# vnorm(dir0,dir0)
|
||||||
|
# gmx = gmxin+(2.-gmxin)*ramp(1.,rngun(iac)*ftnmi,2.)
|
||||||
|
# iactn = 4
|
||||||
|
# lenalt = lactn(iactn)
|
||||||
|
# altdsc = altpk(3,5,icall,1,iacidt(iac),0)
|
||||||
|
# spd0 = 3.
|
||||||
|
# spdmod = thrttl
|
||||||
|
|
||||||
|
mDir0 = RelativePositionNED(PLATFORM.Location(), projectedHostileLocation);
|
||||||
|
mDir0 = brawlerPlatform.ConvertNEDtoWind(mDir0);
|
||||||
|
mDir0.SetX(0.0);
|
||||||
|
mDir0 = brawlerPlatform.ConvertWindtoNED(mDir0);
|
||||||
|
if (PLATFORM.Altitude() < 5000.0 * Math.M_PER_FT())
|
||||||
|
{
|
||||||
|
mDir0.SetZ( Math.Min(0.0, mDir0.Z()) );
|
||||||
|
}
|
||||||
|
mDir0.Normalize();
|
||||||
|
mGMX = brawlerPlatform.MaxAvailableGs() + (2.0 - brawlerPlatform.MaxAvailableGs()) *
|
||||||
|
ramp(1.0, rangeToHostile * Math.M_PER_NM(), 2.0);
|
||||||
|
mSpd0 = 3.0;
|
||||||
|
|
||||||
|
### Evaluate (Score) Maneuver Alternative
|
||||||
|
double alternativeScore = brawlerPlatform.EvaluateVectorWithThrottle(mDir0, mGMX, mSpd0, ilevel, kalt, icall, lcall);
|
||||||
|
|
||||||
|
### Return Maneuver Alternative Score
|
||||||
|
return alternativeScore;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
|
||||||
|
execute
|
||||||
|
writeln_d(PLATFORM.Name(), " executing behavior_alt3511_break_right, T=", TIME_NOW);
|
||||||
|
// Fly this alternative
|
||||||
|
brawlerPlatform.FlyVectorWithThrottle(mDir0, mGMX, mSpd0);
|
||||||
|
|
||||||
|
# if (mDrawSteering == true)
|
||||||
|
# {
|
||||||
|
# mDraw.SetLayer("behavior_pursue_target");
|
||||||
|
# mDraw.SetDuration(processor.UpdateInterval());
|
||||||
|
# mDraw.SetColor(1.0, 0.5, 0.0);
|
||||||
|
# mDraw.SetLineSize(1);
|
||||||
|
# mDraw.BeginLines();
|
||||||
|
# mDraw.Vertex(PLATFORM.Location());
|
||||||
|
# mDraw.Vertex(mTargetPoint);
|
||||||
|
# mDraw.End();
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# string msg = write_str("pursue-target: ", targetTrack.TargetName(), " at speed ", (string)mTargetSpeed);
|
||||||
|
# writeln_d(" T=", TIME_NOW, " ", PLATFORM.Name(), " ", msg);
|
||||||
|
# FlyTarget( PLATFORM, mTargetPoint, mTargetSpeed);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
210
platforms/brawler/alternatives/behavior_alt3531_break_left.txt
Normal file
210
platforms/brawler/alternatives/behavior_alt3531_break_left.txt
Normal file
@@ -0,0 +1,210 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt35.f
|
||||||
|
// Replicates the 1v1 Defensive Maneuver 3,5,3,1 alternative behavior
|
||||||
|
// Defensive left break turn
|
||||||
|
// Operates on nearest perceived threat to generate maneuver alternative
|
||||||
|
|
||||||
|
include_once BrawlerScriptUtil.txt
|
||||||
|
|
||||||
|
behavior alt3531_break_left
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3531Enabled = true;
|
||||||
|
bool mCheckRange = true;
|
||||||
|
bool mCheckBoresight = true;
|
||||||
|
bool mCheckClosingSpeed = true;
|
||||||
|
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 5;
|
||||||
|
int icall = 3;
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
// Maneuver Alternative flight values
|
||||||
|
Vec3 mDir0;
|
||||||
|
double mGMX = 1.0;
|
||||||
|
double mSpd0 = 3.0;
|
||||||
|
|
||||||
|
// ALSO NEED:
|
||||||
|
// randomization to simulate imperfect desision making, valsig, read from MIND file, typically ~0.01
|
||||||
|
// Production rule bias, used in socring of alternative
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition behavior_alt3531_break_left, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mAlternative3531Enabled)
|
||||||
|
{
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
WsfTaskList tasks = processor.TasksReceivedOfType("WEAPON");
|
||||||
|
if(tasks.Count() <= 0)
|
||||||
|
{
|
||||||
|
return Failure("no weapon (hostile) tasks!");
|
||||||
|
}
|
||||||
|
WsfTask targetTask = tasks.Entry(0);
|
||||||
|
WsfLocalTrack hostile = PLATFORM.MasterTrackList().Find(targetTask.LocalTrackId());
|
||||||
|
if (!hostile.IsValid())
|
||||||
|
{
|
||||||
|
return Failure("no hostile track!");
|
||||||
|
}
|
||||||
|
|
||||||
|
//TODO - change this script so it doesn't use a truth method?
|
||||||
|
if (hostile.TargetKilled())
|
||||||
|
{
|
||||||
|
return Failure("hostile was destroyed!");
|
||||||
|
}
|
||||||
|
|
||||||
|
// alt35.f line 184 - 188
|
||||||
|
# if(rngun(iac)*ftnmi .gt. 2.) go to 205
|
||||||
|
# if(obang(iac,me) .gt. hafpi) go to 205
|
||||||
|
# if(obang(me,iac).gt.hafpi) go to 232
|
||||||
|
# if(rngrun(iac) .gt. 0.) go to 205
|
||||||
|
# if(rngun(iac)-rngrun(iac)*2. .gt. 3000.) go to 205
|
||||||
|
//if the predicted range (rngun) between me and threat greater then 2 nautical miles, skip
|
||||||
|
double projectionTime = TIME_NOW + brawlerPlatform.ProjectedTimeDelta();
|
||||||
|
WsfGeoPoint projectedHostileLocation = hostile.LocationAtTime(projectionTime);
|
||||||
|
double rangeToHostile = PLATFORM.SlantRangeTo(projectedHostileLocation);
|
||||||
|
if (mCheckRange == true && rangeToHostile > 2.0 * Math.M_PER_NM())
|
||||||
|
{
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " nearest hostile further than 2 nautical miles");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
//if the off-bore angle between threat and me is greater than pi/2, skip
|
||||||
|
if (mCheckBoresight == true && brawlerPlatform.OffBoresightAngle(hostile.Target(), PLATFORM) > Math.PI_OVER_2())
|
||||||
|
{
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " Boresight angle between hostile and me greater than Pi/2");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
//if the off-bore angle between me and the threat is less than pi/2 check more conditions
|
||||||
|
if (mCheckBoresight == true && brawlerPlatform.OffBoresightAngle(PLATFORM, hostile.Target()) < Math.PI_OVER_2())
|
||||||
|
{
|
||||||
|
//if the predicted range rate (rngrun) of the threat is greater then zero, skip
|
||||||
|
if (mCheckClosingSpeed == true && PLATFORM.ClosingSpeedOf(hostile) > 0)
|
||||||
|
{
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " Hostile is not closing");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
//if the predicted range minus the range rate * 2 is greater than 3000, skip
|
||||||
|
if (mCheckRange == true && rangeToHostile * Math.FT_PER_M() - (PLATFORM.ClosingSpeedOf(hostile) * 3.28084 * 2.0) > 3000.0)
|
||||||
|
{
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " Hostile further than 3000 ft within 2 seconds");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ALL CONDITIONS PASS
|
||||||
|
### Generate Maneuver Alternative
|
||||||
|
// alt35.f line 189 - 201
|
||||||
|
#232 continue
|
||||||
|
# call xmit(3,dxp(1,me,iac),dir0)
|
||||||
|
# call vxfrmc(rwep,dir0,dir0,1)
|
||||||
|
# dir0(1) = 0.
|
||||||
|
# call vxfrmc(rwep,dir0,dir0,2)
|
||||||
|
# if(-xp(3,me).lt.5000.) dir0(3) = amin1(0.,dir0(3))
|
||||||
|
# call vnorm(dir0,dir0)
|
||||||
|
# gmx = gmxin+(2.-gmxin)*ramp(1.,rngun(iac)*ftnmi,2.)
|
||||||
|
# iactn = 4
|
||||||
|
# lenalt = lactn(iactn)
|
||||||
|
# altdsc = altpk(3,5,icall,1,iacidt(iac),0)
|
||||||
|
# spd0 = 3.
|
||||||
|
# spdmod = thrttl
|
||||||
|
mDir0 = RelativePositionNED(PLATFORM.Location(), projectedHostileLocation);
|
||||||
|
mDir0 = brawlerPlatform.ConvertNEDtoWind(mDir0);
|
||||||
|
mDir0.SetX(0.0);
|
||||||
|
mDir0 = brawlerPlatform.ConvertWindtoNED(mDir0);
|
||||||
|
if (PLATFORM.Altitude() < 5000.0 * Math.M_PER_FT())
|
||||||
|
{
|
||||||
|
mDir0.SetZ( Math.Min(0.0, mDir0.Z()) );
|
||||||
|
}
|
||||||
|
mDir0.Normalize();
|
||||||
|
mGMX = brawlerPlatform.MaxAvailableGs() + (2.0 - brawlerPlatform.MaxAvailableGs()) *
|
||||||
|
ramp(1.0, rangeToHostile * Math.M_PER_NM(), 2.0);
|
||||||
|
mSpd0 = 3.0;
|
||||||
|
|
||||||
|
### Evaluate (Score) Maneuver Alternative
|
||||||
|
double alternativeScore = brawlerPlatform.EvaluateVectorWithThrottle(mDir0, mGMX, mSpd0, ilevel, kalt, icall, lcall);
|
||||||
|
|
||||||
|
### Return Maneuver Alternative Score
|
||||||
|
return alternativeScore;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
|
||||||
|
execute
|
||||||
|
writeln_d(PLATFORM.Name(), " executing behavior_alt3531_break_left, T=", TIME_NOW);
|
||||||
|
// Fly this alternative
|
||||||
|
brawlerPlatform.FlyVectorWithThrottle(mDir0, mGMX, mSpd0);
|
||||||
|
|
||||||
|
# if (mDrawSteering == true)
|
||||||
|
# {
|
||||||
|
# mDraw.SetLayer("behavior_pursue_target");
|
||||||
|
# mDraw.SetDuration(processor.UpdateInterval());
|
||||||
|
# mDraw.SetColor(1.0, 0.5, 0.0);
|
||||||
|
# mDraw.SetLineSize(1);
|
||||||
|
# mDraw.BeginLines();
|
||||||
|
# mDraw.Vertex(PLATFORM.Location());
|
||||||
|
# mDraw.Vertex(mTargetPoint);
|
||||||
|
# mDraw.End();
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# string msg = write_str("pursue-target: ", targetTrack.TargetName(), " at speed ", (string)mTargetSpeed);
|
||||||
|
# writeln_d(" T=", TIME_NOW, " ", PLATFORM.Name(), " ", msg);
|
||||||
|
# FlyTarget( PLATFORM, mTargetPoint, mTargetSpeed);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
156
platforms/brawler/alternatives/behavior_alt3551_run_away.txt
Normal file
156
platforms/brawler/alternatives/behavior_alt3551_run_away.txt
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt35.f
|
||||||
|
// Replicates the 1v1 Defensive Maneuver 3,5,5,1 alternative behavior
|
||||||
|
// RUN AWAY!
|
||||||
|
|
||||||
|
include_once BrawlerScriptUtil.txt
|
||||||
|
|
||||||
|
behavior alt3551_run_away
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfPerceptionProcessor perception;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3551Enabled = true;
|
||||||
|
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 5;
|
||||||
|
int icall = 5;
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
// Maneuver Alternative flight values
|
||||||
|
Vec3 mDir0 = Vec3();
|
||||||
|
double mGMX = 1.0;
|
||||||
|
double mSpd0 = 3.0;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
perception = (WsfPerceptionProcessor)PLATFORM.Processor("perception");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition behavior_alt3551_run_away, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mAlternative3551Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
WsfTaskList tasks = processor.TasksReceivedOfType("WEAPON");
|
||||||
|
if(tasks.Count() <= 0)
|
||||||
|
{
|
||||||
|
writeln_d("no weapon (hostile) tasks!");
|
||||||
|
return Failure("no weapon (hostile) tasks!");
|
||||||
|
}
|
||||||
|
WsfTask targetTask = tasks.Entry(0);
|
||||||
|
WsfLocalTrack hostile = PLATFORM.MasterTrackList().Find(targetTask.LocalTrackId());
|
||||||
|
if (!hostile.IsValid())
|
||||||
|
{
|
||||||
|
writeln_d("no hostile track!");
|
||||||
|
return Failure("no hostile track!");
|
||||||
|
}
|
||||||
|
|
||||||
|
//TODO - change this script so it doesn't use a truth method?
|
||||||
|
if (hostile.TargetKilled())
|
||||||
|
{
|
||||||
|
writeln_d("hostile was destroyed!");
|
||||||
|
return Failure("hostile was destroyed!");
|
||||||
|
}
|
||||||
|
|
||||||
|
// alt35.f line 233 - 234
|
||||||
|
# rrunmn = 5.*ramp(twopi,obang(iac,me)+obang(me,iac),0.)
|
||||||
|
# if(rngun(iac)*ftnmi .lt. rrunmn) go to 205
|
||||||
|
double obang_hostile_me = brawlerPlatform.OffBoresightAngle(hostile.Target(), PLATFORM);
|
||||||
|
double obang_me_hostile = brawlerPlatform.OffBoresightAngle(PLATFORM, hostile.Target());
|
||||||
|
double rrunmn = 5.0 * ramp(Math.TWO_PI(), obang_hostile_me + obang_me_hostile, 0.0);
|
||||||
|
|
||||||
|
double projectionTime = TIME_NOW + brawlerPlatform.ProjectedTimeDelta();
|
||||||
|
WsfGeoPoint projectedHostileLocation = hostile.LocationAtTime(projectionTime);
|
||||||
|
double rangeToHostile = PLATFORM.SlantRangeTo(projectedHostileLocation);
|
||||||
|
|
||||||
|
if (rangeToHostile * Math.M_PER_NM() < rrunmn)
|
||||||
|
{
|
||||||
|
// Hostile too far
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " range to hostile < minimum range to run");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ALL CONDITIONS PASS
|
||||||
|
### Generate Maneuver Alternative
|
||||||
|
// alt35.f line 235 - 243
|
||||||
|
#245 continue
|
||||||
|
# iactn = 4
|
||||||
|
# call vmult(-1.,dxeuan(1,iac),dir0)
|
||||||
|
# lenalt = lactn(iactn)
|
||||||
|
# altdsc = altpk(3,5,icall,1,iacidt(iac),0)
|
||||||
|
# dir0(3) = 0.
|
||||||
|
# gmx = gmxsu
|
||||||
|
# spd0 = 3.
|
||||||
|
# spdmod = thrttl
|
||||||
|
|
||||||
|
Vec3 dxeuan = RelativePositionNED(PLATFORM.Location(), projectedHostileLocation);
|
||||||
|
mDir0.SetX(dxeuan.X() * -1.0);
|
||||||
|
mDir0.SetY(dxeuan.Y() * -1.0);
|
||||||
|
mDir0.SetZ(0.0);
|
||||||
|
mGMX = brawlerPlatform.MaxSustainedGs();
|
||||||
|
mSpd0 = 3.0;
|
||||||
|
|
||||||
|
### Evaluate [Projected] Maneuver Alternative
|
||||||
|
double score = brawlerPlatform.EvaluateVectorWithThrottle(mDir0, mGMX, mSpd0, ilevel, kalt, icall, lcall);
|
||||||
|
writeln_d("mDir0 = ", mDir0.ToString(), ", mGMX = ", mGMX, ", mSpd0 = ", mSpd0, ", score = ", score, ", my speed = ", PLATFORM.Speed());
|
||||||
|
return score;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
|
||||||
|
execute
|
||||||
|
## what was evaluated should be actually performed now
|
||||||
|
brawlerPlatform.FlyVectorWithThrottle(mDir0, mGMX, mSpd0);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
@@ -0,0 +1,143 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt35.f
|
||||||
|
// Replicates the force overshoot 3,5,6,1 alternative behavior
|
||||||
|
|
||||||
|
behavior alt3561_force_overshoot
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfPerceptionProcessor perception;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3561Enabled = true;
|
||||||
|
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 5;
|
||||||
|
int icall = 6;
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
// Maneuver Alternative flight values
|
||||||
|
Vec3 mDir0;
|
||||||
|
double mGMX = 1.0;
|
||||||
|
double mSpd0 = 3.0;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
perception = (WsfPerceptionProcessor)PLATFORM.Processor("perception");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition behavior_alt3561_force_overshoot, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mAlternative3561Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
WsfTaskList tasks = processor.TasksReceivedOfType("WEAPON");
|
||||||
|
if(tasks.Count() <= 0)
|
||||||
|
{
|
||||||
|
return Failure("no weapon (hostile) tasks!");
|
||||||
|
}
|
||||||
|
WsfTask targetTask = tasks.Entry(0);
|
||||||
|
WsfLocalTrack hostile = PLATFORM.MasterTrackList().Find(targetTask.LocalTrackId());
|
||||||
|
if (!hostile.IsValid())
|
||||||
|
{
|
||||||
|
return Failure("no hostile track!");
|
||||||
|
//TODO also validate location / veloctiy
|
||||||
|
}
|
||||||
|
|
||||||
|
// alt35.f line 247
|
||||||
|
# if(rngun(iac).gt.3000.) go to 205
|
||||||
|
double projectionTime = TIME_NOW + brawlerPlatform.ProjectedTimeDelta();
|
||||||
|
WsfGeoPoint projectedHostileLocation = hostile.LocationAtTime(projectionTime);
|
||||||
|
double rangeToHostile = PLATFORM.SlantRangeTo(projectedHostileLocation);
|
||||||
|
|
||||||
|
if (rangeToHostile > 3000 * Math.FT_PER_M())
|
||||||
|
{
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " hostile range greater than 3000 ft");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ALL CONDITIONS PASS
|
||||||
|
### Generate Maneuver Alternative
|
||||||
|
// alt35.f line 249 - 256
|
||||||
|
# iactn = 4
|
||||||
|
# lenalt = lactn(iactn)
|
||||||
|
# altdsc = altpk(3,5,icall,1,iacidt(iac),0)
|
||||||
|
# call cros1(vp(1,me),vp(1,iac),dir0)
|
||||||
|
# if(dir0(3).gt.0.) call vmult(-1.,dir0,dir0)
|
||||||
|
# gmx = amin1(5.,gmxin)
|
||||||
|
# spd0 = spdnow(me)+almin*tproj3*1.1
|
||||||
|
# spdmod = desspd
|
||||||
|
Vec3 myVdir = PLATFORM.VelocityNED();
|
||||||
|
Vec3 tgtVdir = hostile.VelocityNED();
|
||||||
|
mDir0 = Vec3.Cross(myVdir, tgtVdir);
|
||||||
|
mDir0.Normalize();
|
||||||
|
if (mDir0.Z() > 0)
|
||||||
|
{
|
||||||
|
mDir0.Scale(-1.0);
|
||||||
|
}
|
||||||
|
mGMX = Math.Min(5.0, brawlerPlatform.MaxAvailableGs());
|
||||||
|
double almin = brawlerPlatform.MinForwardAccelWithGravity();
|
||||||
|
mSpd0 = PLATFORM.Speed() * MATH.FT_PER_M() + almin * brawlerPlatform.ProjectedTimeDelta() * 1.1;
|
||||||
|
mSpd0 *= MATH.M_PER_FT();
|
||||||
|
|
||||||
|
### Evaluate [Projected] Maneuver Alternative
|
||||||
|
double score = brawlerPlatform.EvaluateVectorWithSpeed(mDir0, mGMX, mSpd0, ilevel, kalt, icall, lcall);
|
||||||
|
writeln_d("T=", TIME_NOW, ", 3561_force_overshoot = ", score);
|
||||||
|
return score;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
execute
|
||||||
|
writeln_d("3561_force_overshoot");
|
||||||
|
## what was evaluated should be actually performed now
|
||||||
|
brawlerPlatform.FlyVectorWithSpeed(mDir0, mGMX, mSpd0);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
@@ -0,0 +1,165 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt35.f
|
||||||
|
// Replicates the negative velocity 3,5,8,1 alternative behavior
|
||||||
|
|
||||||
|
include_once BrawlerScriptUtil.txt
|
||||||
|
|
||||||
|
behavior alt3581_negative_velocity
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfPerceptionProcessor perception;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3581Enabled = true;
|
||||||
|
bool mCheckBoresight = true;
|
||||||
|
bool mCheckRange = true;
|
||||||
|
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 5;
|
||||||
|
int icall = 8;
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
// Maneuver Alternative flight values
|
||||||
|
Vec3 mDir0;
|
||||||
|
double mGMX = 1.0;
|
||||||
|
double mSpd0 = 3.0;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
perception = (WsfPerceptionProcessor)PLATFORM.Processor("perception");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition behavior_alt3581_negative_velocity, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mAlternative3581Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
WsfTaskList tasks = processor.TasksReceivedOfType("WEAPON");
|
||||||
|
if(tasks.Count() <= 0)
|
||||||
|
{
|
||||||
|
return Failure("no weapon (hostile) tasks!");
|
||||||
|
}
|
||||||
|
WsfTask targetTask = tasks.Entry(0);
|
||||||
|
WsfLocalTrack hostile = PLATFORM.MasterTrackList().Find(targetTask.LocalTrackId());
|
||||||
|
if (!hostile.IsValid())
|
||||||
|
{
|
||||||
|
return Failure("no hostile track!");
|
||||||
|
}
|
||||||
|
|
||||||
|
//TODO - change this script so it doesn't use a truth method?
|
||||||
|
if (hostile.TargetKilled())
|
||||||
|
{
|
||||||
|
return Failure("hostile was destroyed!");
|
||||||
|
}
|
||||||
|
|
||||||
|
// alt35.f line 282 - 285
|
||||||
|
# if(spdut(iac).eq.0.0)goto 205
|
||||||
|
# if(obang(iac,me).gt.hafpi) go to 205
|
||||||
|
# rrunmn = 5.*ramp(twopi,obang(iac,me)+obang(me,iac),0.) <- same as 3551
|
||||||
|
# if(rngun(iac)*ftnmi .gt. rrunmn+1.) go to 205
|
||||||
|
|
||||||
|
if (!hostile.VelocityValid() || (hostile.Speed()*MATH.FT_PER_M()) < 1)
|
||||||
|
{
|
||||||
|
// If we don't have valid velocity or spoed is effectively zero
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " hostile has invalid or no speed");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
double obang_hostile_me = brawlerPlatform.OffBoresightAngle(hostile.Target(), PLATFORM);
|
||||||
|
double obang_me_hostile = brawlerPlatform.OffBoresightAngle(PLATFORM, hostile.Target());
|
||||||
|
|
||||||
|
if (mCheckBoresight == true && obang_hostile_me > Math.PI_OVER_2())
|
||||||
|
{
|
||||||
|
// Not ahead of hostile
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " off boresight angle hostile to me > Pi/2");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
double rrunmn = 5.0 * ramp(Math.TWO_PI(), obang_hostile_me + obang_me_hostile, 0.0);
|
||||||
|
double projectionTime = TIME_NOW + brawlerPlatform.ProjectedTimeDelta();
|
||||||
|
WsfGeoPoint projectedHostileLocation = hostile.LocationAtTime(projectionTime);
|
||||||
|
double rangeToHostile = PLATFORM.SlantRangeTo(projectedHostileLocation);
|
||||||
|
if (mCheckRange == true && rangeToHostile * Math.M_PER_NM() < rrunmn + 1.0)
|
||||||
|
{
|
||||||
|
// Hostile too far
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " range to hostile < minimum range to run");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ALL CONDITIONS PASS
|
||||||
|
### Generate Maneuver Alternative
|
||||||
|
// alt35.f line 286 - 292
|
||||||
|
# iactn = 4
|
||||||
|
# lenalt = lactn(iactn)
|
||||||
|
# altdsc = altpk(3,5,icall,1,iacidt(iac),0)
|
||||||
|
# call vmake(-1.,veut(1,iac),dir0)
|
||||||
|
# gmx = gmxsu
|
||||||
|
# spd0 = 3.
|
||||||
|
# spdmod = thrttl
|
||||||
|
mDir0 = vmake(-1.0, hostile.VelocityNED());
|
||||||
|
mGMX = brawlerPlatform.MaxSustainedGs();
|
||||||
|
mSpd0 = 3.0;
|
||||||
|
|
||||||
|
### Evaluate [Projected] Maneuver Alternative
|
||||||
|
double score = brawlerPlatform.EvaluateVectorWithThrottle(mDir0, mGMX, mSpd0, ilevel, kalt, icall, lcall);
|
||||||
|
return score;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
|
||||||
|
execute
|
||||||
|
## what was evaluated should be actually performed now
|
||||||
|
brawlerPlatform.FlyVectorWithThrottle(mDir0, mGMX, mSpd0);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
153
platforms/brawler/alternatives/behavior_alt3611_fly_vector.txt
Normal file
153
platforms/brawler/alternatives/behavior_alt3611_fly_vector.txt
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// converted from BRAWLER v7.5 alt36.f
|
||||||
|
// Replicates the blah blah 3,6,1,1 alternative behavior
|
||||||
|
// blah blah
|
||||||
|
// alt3611_fly_vector
|
||||||
|
|
||||||
|
behavior alt3611_fly_vector
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfPerceptionProcessor perception;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
WsfLocalTrack targetTrack;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3611Enabled = true;
|
||||||
|
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 6;
|
||||||
|
int icall = 1;
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
double mMaxSustainedG = 2.0;
|
||||||
|
|
||||||
|
double mLongRange = 5.0 * Math.M_PER_NM();
|
||||||
|
|
||||||
|
Vec3 dir0;
|
||||||
|
double gmx = 1.0;
|
||||||
|
double spd0 = 3.0;
|
||||||
|
|
||||||
|
// ALSO NEED:
|
||||||
|
// randomization to simulate imperfect decision making, valsig, read from MIND file, typically ~0.01
|
||||||
|
// Production rule bias, used in scoring of alternative
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
perception = (WsfPerceptionProcessor)PLATFORM.Processor("perception");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition behavior_alt33841_aim_missile_typ4, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
### check if alternative should even be considered?
|
||||||
|
|
||||||
|
if (!mAlternative3611Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
WsfTaskList tasks = processor.TasksReceivedOfType("WEAPON");
|
||||||
|
if(tasks.Count() <= 0)
|
||||||
|
{
|
||||||
|
return Failure("no weapon (target) tasks!");
|
||||||
|
}
|
||||||
|
WsfTask targetTask = tasks.Entry(0);
|
||||||
|
targetTrack = PLATFORM.MasterTrackList().Find(targetTask.LocalTrackId());
|
||||||
|
if (!targetTrack.IsValid())
|
||||||
|
{
|
||||||
|
return Failure("no target track!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
extern Vec3 vecfpp;
|
||||||
|
extern double valfpp;
|
||||||
|
extern double sflypp;
|
||||||
|
#alt36()
|
||||||
|
#iactn = 4
|
||||||
|
#set_gmx()
|
||||||
|
Vec3 vv = vecfpp.Normal();
|
||||||
|
dir0 = desvvi(brawlerPlatform, vv, sflypp);
|
||||||
|
spd0 = dir0.Magnitude();
|
||||||
|
dir0.Normalize();
|
||||||
|
|
||||||
|
//spdmod = desspd;
|
||||||
|
//call indupk(altd1,tac_ilevel,tac_kalt,tac_icall,tac_lcall);
|
||||||
|
//if (tac_kalt.ne.8 .or. tac_icall.ne.2) then
|
||||||
|
if ((PLATFORM.Speed()*MATH.FT_PER_M()) <= spd0+100.0)
|
||||||
|
{
|
||||||
|
double gmxsut = brawlerPlatform.MaxSustainedGs();
|
||||||
|
double gmxsu = brawlerPlatform.MaxTacticalGs();
|
||||||
|
double wt = ramp(spd0 - 100.0, PLATFORM.Speed()*MATH.FT_PER_M(),spd0+100.0);
|
||||||
|
gmx = wt*MATH.Max(2.0,MATH.Max(gmxsut,gmxsu)) + (1.0-wt)*MATH.Min(gmxsut,gmxsu);
|
||||||
|
gmx = MATH.Max(gmx,2.0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gmx = brawlerPlatform.MaxAvailableGs(); #gmxin;
|
||||||
|
}
|
||||||
|
//else
|
||||||
|
#LBM - not doing GCI drag tactic (1,8,2,1) right now
|
||||||
|
//...
|
||||||
|
//endif
|
||||||
|
spd0 *= MATH.M_PER_FT();
|
||||||
|
double score = brawlerPlatform.EvaluateVectorWithSpeed(dir0, gmx, spd0, ilevel, kalt, icall, lcall);
|
||||||
|
writeln_d("alt3611_fly_vector score = ", score);
|
||||||
|
return score;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
|
||||||
|
execute
|
||||||
|
## what was evaluated should be actually performed now
|
||||||
|
brawlerPlatform.FlyVectorWithSpeed(dir0, gmx, spd0);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
@@ -0,0 +1,201 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt38.f
|
||||||
|
// Replicates the blah blah 3,8,4,1 alternative behavior
|
||||||
|
// blah blah
|
||||||
|
//alt3841_aim_missile_typ4
|
||||||
|
|
||||||
|
//LBM - NOTE: using typ4 because it uses maneuver type 4 (instead of type 9)
|
||||||
|
// according to notes in BRAWLER, this is the replacement for typ1
|
||||||
|
// especially for certain sims because of stability problems
|
||||||
|
|
||||||
|
behavior alt3841_aim_missile_typ4
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfPerceptionProcessor perception;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
WsfLocalTrack targetTrack;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3841Enabled = true;
|
||||||
|
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 8;
|
||||||
|
int icall = 4;
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
double mMaxSustainedG = 2.0;
|
||||||
|
|
||||||
|
double mLongRange = 5.0 * Math.M_PER_NM();
|
||||||
|
|
||||||
|
Vec3 dir0;
|
||||||
|
double gmx = 1.0;
|
||||||
|
double spd0 = 3.0;
|
||||||
|
|
||||||
|
// ALSO NEED:
|
||||||
|
// randomization to simulate imperfect decision making, valsig, read from MIND file, typically ~0.01
|
||||||
|
// Production rule bias, used in scoring of alternative
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
perception = (WsfPerceptionProcessor)PLATFORM.Processor("perception");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition behavior_alt33841_aim_missile_typ4, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
### check if alternative should even be considered?
|
||||||
|
|
||||||
|
if (!mAlternative3841Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
WsfTaskList tasks = processor.TasksReceivedOfType("WEAPON");
|
||||||
|
if(tasks.Count() <= 0)
|
||||||
|
{
|
||||||
|
return Failure("no weapon (target) tasks!");
|
||||||
|
}
|
||||||
|
WsfTask targetTask = tasks.Entry(0);
|
||||||
|
targetTrack = PLATFORM.MasterTrackList().Find(targetTask.LocalTrackId());
|
||||||
|
if (!targetTrack.IsValid())
|
||||||
|
{
|
||||||
|
return Failure("no target track!");
|
||||||
|
}
|
||||||
|
|
||||||
|
bool alt_ctrl = false; //see ali38()
|
||||||
|
bool msl_loft = false; //see line 147 (no productions rules right now)
|
||||||
|
|
||||||
|
## alt38.f : lines 136 - 150
|
||||||
|
#if (noaim) go to 980
|
||||||
|
#if (mslpp .ge. nummis+1) then
|
||||||
|
if (!HaveWeapon(PLATFORM))
|
||||||
|
{
|
||||||
|
# SKIP ALT_CTRL DETERMINATION IF SELECTED WEAPON IS A GUN
|
||||||
|
alt_ctrl = false;
|
||||||
|
msl_loft = false;
|
||||||
|
//go to 900
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#call gmisld(ppmptr,1) #TODO
|
||||||
|
# Call special handler to see if desire missile loft
|
||||||
|
#call pcode(23) #TODO
|
||||||
|
# Loft missile if ready and pr_loft is set
|
||||||
|
#msl_loft = (ready && pr_loft); #TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
## alt38.f : lines 227 - 253
|
||||||
|
# generate aim_missile_typ4 unless alt_ctrl = T.
|
||||||
|
if (alt_ctrl)
|
||||||
|
{
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " alt_ctrl is true, do not do aim_missile_typ4 behavior");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
# generate aim_missile_typ1 if pointing in direction of aimpoint
|
||||||
|
#LBM - not doing vectored flight right now
|
||||||
|
# if (valfpp > 0.0)
|
||||||
|
# {
|
||||||
|
# double theta = sepa(dxeuan(1,ppmiac),vecfpp);
|
||||||
|
# if (theta > 0.8*zeta_lim)
|
||||||
|
# {
|
||||||
|
# return Failure("not pointing in right direction, do not do aim_missile_typ4 behavior");
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
|
||||||
|
#LBM - not a manned sim, dont even check, right now
|
||||||
|
#if (simltr != mansim) goto 900
|
||||||
|
# This is a replacement for icall=1 maneuver, for manned simulators
|
||||||
|
# Use a type 4 maneuver to avoid stability problems with type
|
||||||
|
# 9 maneuver at WSSC:
|
||||||
|
int iactn = 4;
|
||||||
|
Vec3 ppmapt; //calculated from mlsenv() -> envgeo() -> aimpt()
|
||||||
|
|
||||||
|
WsfWaypoint aimptWP = WsfWaypoint();
|
||||||
|
double weaponSpeedFtSec = 3349.35; //(mach 3) ft/sec
|
||||||
|
double intTime = PLATFORM.InterceptLocation3D(targetTrack, aimptWP, weaponSpeedFtSec, 5.0);
|
||||||
|
if (intTime < 0)
|
||||||
|
{
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " missile intercept not possible!");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
#call vdir(xp(1,me),ppmapt,desdir);
|
||||||
|
Vec3 desdir = RelativePositionNED(PLATFORM.Location(), aimptWP.Location());
|
||||||
|
desdir.Normalize();
|
||||||
|
double spddes = PLATFORM.Speed()*MATH.FT_PER_M(); //from ali38() -> slow_aim is never set, so use current speed
|
||||||
|
#call des1v1(desdir,spddes,dir0,spd0,lngtrn,semin,sewid);
|
||||||
|
spd0 = spddes; //from des1v1 (direct copy, duh)
|
||||||
|
dir0 = desdir; //from des1v1 (direct copy, duh)
|
||||||
|
int spdmod = 1; //(desspd = 1, thrttl = 2, desacc = 3)
|
||||||
|
if ((PLATFORM.Speed()*MATH.FT_PER_M()) <= spd0+100.0)
|
||||||
|
{
|
||||||
|
double gmxsut = brawlerPlatform.MaxSustainedGs();
|
||||||
|
double gmxsu = brawlerPlatform.MaxTacticalGs();
|
||||||
|
double wt = ramp(spd0-100.0, PLATFORM.Speed()*MATH.FT_PER_M(), spd0+100.0);
|
||||||
|
gmx = wt*MATH.Max(2.0,MATH.Max(gmxsut,gmxsu)) + (1.0-wt)*MATH.Min(gmxsut,gmxsu);
|
||||||
|
gmx = MATH.Max(gmx,2.0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gmx = brawlerPlatform.MaxAvailableGs(); #gmxin
|
||||||
|
}
|
||||||
|
spd0 *= MATH.M_PER_FT();
|
||||||
|
|
||||||
|
|
||||||
|
### Evaluate [Projected] Maneuver Alternative
|
||||||
|
double score = brawlerPlatform.EvaluateVectorWithSpeed(dir0, gmx, spd0, ilevel, kalt, icall, lcall);
|
||||||
|
return score;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
|
||||||
|
execute
|
||||||
|
## what was evaluated should be actually performed now
|
||||||
|
brawlerPlatform.FlyVectorWithSpeed(dir0, gmx, spd0);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt39.f
|
||||||
|
// Replicates the evade missile 3,9,1,1 alternative behavior
|
||||||
|
// GENERATES MISSILE EVASION MANEUVER
|
||||||
|
|
||||||
|
|
||||||
|
behavior alt3911_evade_missile
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfThreatProcessor threatProc;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3911Enabled = true;
|
||||||
|
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 9;
|
||||||
|
int icall = 1;
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
// Maneuver Alternative flight values
|
||||||
|
Vec3 mDir0 = Vec3();
|
||||||
|
double mGMX = 1.0;
|
||||||
|
double mSpd0 = 3.0;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
threatProc = (WsfThreatProcessor)PLATFORM.Processor("incoming_threats");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition behavior_alt3911_straight_flight, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mAlternative3911Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
WsfTrack threat = threatProc.NearestThreat();
|
||||||
|
if (!threat.IsValid())
|
||||||
|
{
|
||||||
|
// This check equivalent to noneed in alt39.f
|
||||||
|
writeln_d("no incoming missiles");
|
||||||
|
return Failure("no incoming missiles");
|
||||||
|
}
|
||||||
|
|
||||||
|
// ALL CONDITIONS PASS
|
||||||
|
### Generate Maneuver Alternative
|
||||||
|
# iactn = 4
|
||||||
|
# lenalt = lactn(iactn)
|
||||||
|
# altdsc = altpk(3,9,1,1,0,0)
|
||||||
|
# call xmit(3,direv,dir0)
|
||||||
|
# gmx = gmxin
|
||||||
|
# spd0 = throtm(iacid) <- limits throttle to 2 if there are IR missiles coming at me
|
||||||
|
# spdmod = thrttl
|
||||||
|
|
||||||
|
// Get stored evasion direction vector
|
||||||
|
//Vec3 direvd = brawlerPlatform.EvasionDirection();
|
||||||
|
Vec3 direvd = brawlerPlatform.EvasionDirection();
|
||||||
|
mDir0 = direvd;
|
||||||
|
mGMX = brawlerPlatform.MaxAvailableGs();
|
||||||
|
mSpd0 = 2; // Always 2 for now
|
||||||
|
|
||||||
|
### Evaluate [Projected] Maneuver Alternative
|
||||||
|
double score = brawlerPlatform.EvaluateVectorWithThrottle(mDir0, mGMX, mSpd0, ilevel, kalt, icall, lcall);
|
||||||
|
return score;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
|
||||||
|
execute
|
||||||
|
## what was evaluated should be actually performed now
|
||||||
|
brawlerPlatform.FlyVectorWithThrottle(mDir0, mGMX, mSpd0);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt3a.f
|
||||||
|
// Replicates the low speed recover 3,A,1,1 alternative behavior
|
||||||
|
|
||||||
|
include_once BrawlerScriptUtil.txt
|
||||||
|
|
||||||
|
behavior alt3A11_low_speed_recover
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfPerceptionProcessor perception;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3A11Enabled = true;
|
||||||
|
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 10;
|
||||||
|
int icall = 1;
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
// Maneuver Alternative flight values
|
||||||
|
Vec3 mDir0 = Vec3();
|
||||||
|
double mGMX = 1.0;
|
||||||
|
double mSpd0 = 3.0;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
perception = (WsfPerceptionProcessor)PLATFORM.Processor("perception");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition behavior_alt3411_straight_flight, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mAlternative3A11Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!brawlerPlatform.SlowFlight())
|
||||||
|
{
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " not in slow flight");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ALL CONDITIONS PASS
|
||||||
|
### Generate Maneuver Alternative
|
||||||
|
# C ALTERNATIVE 1: "ALMOST" STRAIGHT DOWN
|
||||||
|
#20 continue
|
||||||
|
#C --SET DIR0 ALMOST STRAIGHT DOWN, BUT SLIGHLY IN THE DIRECTION
|
||||||
|
#C --OF MY CURRENT VELOCITY
|
||||||
|
# call xmit3(unitz,dir0)
|
||||||
|
# call vcross(vp(1,me),unitz,vtemp)
|
||||||
|
# call rotv(2.0*rad,vtemp,dir0,dir0)
|
||||||
|
# go to 990
|
||||||
|
#990 submor = .true.
|
||||||
|
# iactn = 4
|
||||||
|
# lenalt = lactn(iactn)
|
||||||
|
# altdsc = altpk(3,10,icall,1,0,0)
|
||||||
|
#C --SET TO HIGHEST THROTTLE SETTING FOR MAX SPEED
|
||||||
|
# spd0 = 3.
|
||||||
|
# spdmod = thrttl
|
||||||
|
# call srch(dragvl,ndatbl,acmasp*grav,index,xx) <- search drag versus lift table for aircraft mass * gravity
|
||||||
|
# if(index.ne.0) go to 995
|
||||||
|
# index = ndatbl
|
||||||
|
# xx = 0.0
|
||||||
|
#995 continue
|
||||||
|
# gmx = gmxin*(index-xx-1.0)/(ndatbl-1.0)
|
||||||
|
# gmx = amax1(gmx,1.5)
|
||||||
|
# gmx = 1.5+(gmx-1.5)*ramp(.5,vp(3,me)/spdnow(me),0.)
|
||||||
|
|
||||||
|
mDir0 = Vec3.Construct(0, 0, 1);
|
||||||
|
Vec3 vtemp = Vec3.Cross(PLATFORM.VelocityNED(), mDir0);
|
||||||
|
double rad = Math.PI()/180.0;
|
||||||
|
mDir0 = rotv(2.0*rad, vtemp, mDir0);
|
||||||
|
|
||||||
|
mSpd0 = 3;
|
||||||
|
|
||||||
|
mGMX = brawlerPlatform.MaxAvailableGs(); // TODO add drag v lift
|
||||||
|
mGMX = Math.Max(mGMX, 1.5);
|
||||||
|
Vec3 vp = PLATFORM.VelocityNED();
|
||||||
|
double speed = PLATFORM.Speed() * Math.FT_PER_M(); // Speed in f/sec
|
||||||
|
mGMX = 1.5 + (mGMX - 1.5) * ramp(0.5, (vp[2] * Math.FT_PER_M()/speed), 0.0);
|
||||||
|
|
||||||
|
### Evaluate [Projected] Maneuver Alternative
|
||||||
|
double score = brawlerPlatform.EvaluateVectorWithThrottle(mDir0, mGMX, mSpd0, ilevel, kalt, icall, lcall);
|
||||||
|
return score;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
|
||||||
|
execute
|
||||||
|
## what was evaluated should be actually performed now
|
||||||
|
brawlerPlatform.FlyVectorWithThrottle(mDir0, mGMX, mSpd0);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
@@ -0,0 +1,139 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt3a.f
|
||||||
|
// Replicates the low speed recover right 45 deg 3,A,2,1 alternative behavior
|
||||||
|
|
||||||
|
behavior alt3A21_low_speed_recover_right45
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfPerceptionProcessor perception;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3A21Enabled = false;
|
||||||
|
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 10;
|
||||||
|
int icall = 2;
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
// Maneuver Alternative flight values
|
||||||
|
Vec3 mDir0 = Vec3();
|
||||||
|
double mGMX = 1.0;
|
||||||
|
double mSpd0 = 3.0;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
|
||||||
|
// Magic numbers from alt3a.f
|
||||||
|
double sd45 = 0.7071068;
|
||||||
|
double cd45 = 0.7071068;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
perception = (WsfPerceptionProcessor)PLATFORM.Processor("perception");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition behavior_alt3411_straight_flight, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mAlternative3A21Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!brawlerPlatform.SlowFlight())
|
||||||
|
{
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " not in slow flight");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ALL CONDITIONS PASS
|
||||||
|
### Generate Maneuver Alternative
|
||||||
|
#C ALTERNATIVE 2: ROLL +45 DEGREES
|
||||||
|
#40 continue
|
||||||
|
# dir0(1) = 0.
|
||||||
|
# dir0(2) = sd45
|
||||||
|
# dir0(3) = -cd45
|
||||||
|
# call vxfrmc(rbep,dir0,dir0,2)
|
||||||
|
# go to 990
|
||||||
|
#990 submor = .true.
|
||||||
|
# iactn = 4
|
||||||
|
# lenalt = lactn(iactn)
|
||||||
|
# altdsc = altpk(3,10,icall,1,0,0)
|
||||||
|
#C --SET TO HIGHEST THROTTLE SETTING FOR MAX SPEED
|
||||||
|
# spd0 = 3.
|
||||||
|
# spdmod = thrttl
|
||||||
|
# call srch(dragvl,ndatbl,acmasp*grav,index,xx)
|
||||||
|
# if(index.ne.0) go to 995
|
||||||
|
# index = ndatbl
|
||||||
|
# xx = 0.0
|
||||||
|
#995 continue
|
||||||
|
# gmx = gmxin*(index-xx-1.0)/(ndatbl-1.0)
|
||||||
|
# gmx = amax1(gmx,1.5)
|
||||||
|
# gmx = 1.5+(gmx-1.5)*ramp(.5,vp(3,me)/spdnow(me),0.)
|
||||||
|
|
||||||
|
mDir0 = Vec3.Construct(0.0, sd45, -cd45);
|
||||||
|
//TODO convert from earth to body coordinates
|
||||||
|
|
||||||
|
mSpd0 = 3;
|
||||||
|
|
||||||
|
mGMX = brawlerPlatform.MaxAvailableGs(); // TODO add drag v lift
|
||||||
|
mGMX = Math.Max(mGMX, 1.5);
|
||||||
|
Vec3 vp = PLATFORM.VelocityNED();
|
||||||
|
double speed = PLATFORM.Speed() * Math.FT_PER_M(); // Speed in f/sec
|
||||||
|
mGMX = 1.5 + (mGMX - 1.5) * ramp(0.5, (vp[2] * Math.FT_PER_M()/speed), 0.0);
|
||||||
|
|
||||||
|
### Evaluate [Projected] Maneuver Alternative
|
||||||
|
double score = brawlerPlatform.EvaluateVectorWithThrottle(mDir0, mGMX, mSpd0, ilevel, kalt, icall, lcall);
|
||||||
|
return score;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
|
||||||
|
execute
|
||||||
|
## what was evaluated should be actually performed now
|
||||||
|
brawlerPlatform.FlyVectorWithThrottle(mDir0, mGMX, mSpd0);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
@@ -0,0 +1,139 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt3a.f
|
||||||
|
// Replicates the low speed recover left 45 deg 3,A,3,1 alternative behavior
|
||||||
|
|
||||||
|
behavior alt3A31_low_speed_recover_left45
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfPerceptionProcessor perception;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3A31Enabled = false;
|
||||||
|
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 10;
|
||||||
|
int icall = 3;
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
// Maneuver Alternative flight values
|
||||||
|
Vec3 mDir0 = Vec3();
|
||||||
|
double mGMX = 1.0;
|
||||||
|
double mSpd0 = 3.0;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
|
||||||
|
// Magic numbers from alt3a.f
|
||||||
|
double sd45 = 0.7071068;
|
||||||
|
double cd45 = 0.7071068;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
perception = (WsfPerceptionProcessor)PLATFORM.Processor("perception");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition behavior_alt3411_straight_flight, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mAlternative3A31Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!brawlerPlatform.SlowFlight())
|
||||||
|
{
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " not in slow flight");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ALL CONDITIONS PASS
|
||||||
|
### Generate Maneuver Alternative
|
||||||
|
# C ALTERNATIVE 3: ROLL -45 DEGREES
|
||||||
|
#60 continue
|
||||||
|
# dir0(1) = 0.
|
||||||
|
# dir0(2) = -sd45
|
||||||
|
# dir0(3) = -cd45
|
||||||
|
# call vxfrmc(rbep,dir0,dir0,2)
|
||||||
|
# go to 990
|
||||||
|
#990 submor = .true.
|
||||||
|
# iactn = 4
|
||||||
|
# lenalt = lactn(iactn)
|
||||||
|
# altdsc = altpk(3,10,icall,1,0,0)
|
||||||
|
#C --SET TO HIGHEST THROTTLE SETTING FOR MAX SPEED
|
||||||
|
# spd0 = 3.
|
||||||
|
# spdmod = thrttl
|
||||||
|
# call srch(dragvl,ndatbl,acmasp*grav,index,xx)
|
||||||
|
# if(index.ne.0) go to 995
|
||||||
|
# index = ndatbl
|
||||||
|
# xx = 0.0
|
||||||
|
#995 continue
|
||||||
|
# gmx = gmxin*(index-xx-1.0)/(ndatbl-1.0)
|
||||||
|
# gmx = amax1(gmx,1.5)
|
||||||
|
# gmx = 1.5+(gmx-1.5)*ramp(.5,vp(3,me)/spdnow(me),0.)
|
||||||
|
|
||||||
|
mDir0 = Vec3.Construct(0.0, -sd45, -cd45);
|
||||||
|
//TODO convert from earth to body coordinates
|
||||||
|
|
||||||
|
mSpd0 = 3;
|
||||||
|
|
||||||
|
mGMX = brawlerPlatform.MaxAvailableGs(); // TODO add drag v lift
|
||||||
|
mGMX = Math.Max(mGMX, 1.5);
|
||||||
|
Vec3 vp = PLATFORM.VelocityNED();
|
||||||
|
double speed = PLATFORM.Speed() * Math.FT_PER_M(); // Speed in f/sec
|
||||||
|
mGMX = 1.5 + (mGMX - 1.5) * ramp(0.5, (vp[2] * Math.FT_PER_M()/speed), 0.0);
|
||||||
|
|
||||||
|
### Evaluate [Projected] Maneuver Alternative
|
||||||
|
double score = brawlerPlatform.EvaluateVectorWithThrottle(mDir0, mGMX, mSpd0, ilevel, kalt, icall, lcall);
|
||||||
|
return score;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
|
||||||
|
execute
|
||||||
|
## what was evaluated should be actually performed now
|
||||||
|
brawlerPlatform.FlyVectorWithThrottle(mDir0, mGMX, mSpd0);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
188
platforms/brawler/alternatives/behavior_alt3B11_illuminate.txt
Normal file
188
platforms/brawler/alternatives/behavior_alt3B11_illuminate.txt
Normal file
@@ -0,0 +1,188 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt3b.f
|
||||||
|
// Replicates the illuminate 3,B,1,1 alternative behavior
|
||||||
|
// GENERATES ILLUMINATION MANEUVER
|
||||||
|
//
|
||||||
|
|
||||||
|
behavior alt3B11_illuminate
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfPerceptionProcessor perception;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
WsfLocalTrack targetTrack;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
bool mAlternative3B11Enabled = true;
|
||||||
|
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 11;
|
||||||
|
int icall = 1;
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
double mMaxSustainedG = 2.0;
|
||||||
|
|
||||||
|
double mLongRange = 5.0 * Math.M_PER_NM();
|
||||||
|
|
||||||
|
Vec3 dir0;
|
||||||
|
double gmx = 1.0;
|
||||||
|
double spd0;
|
||||||
|
|
||||||
|
// ALSO NEED:
|
||||||
|
// randomization to simulate imperfect decision making, valsig, read from MIND file, typically ~0.01
|
||||||
|
// Production rule bias, used in scoring of alternative
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
double mLastTime = 0.0;
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
perception = (WsfPerceptionProcessor)PLATFORM.Processor("perception");
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition behavior_alt3B11_illuminate, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
### check if alternative should even be considered?
|
||||||
|
|
||||||
|
if (!mAlternative3B11Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
WsfTaskList tasks = processor.TasksReceivedOfType("WEAPON");
|
||||||
|
if(tasks.Count() <= 0)
|
||||||
|
{
|
||||||
|
return Failure("no weapon (target) tasks!");
|
||||||
|
}
|
||||||
|
WsfTask targetTask = tasks.Entry(0);
|
||||||
|
targetTrack = PLATFORM.MasterTrackList().Find(targetTask.LocalTrackId());
|
||||||
|
if (!targetTrack.IsValid())
|
||||||
|
{
|
||||||
|
return Failure("no target track!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
## alt3b.f : lines 84 - 127
|
||||||
|
|
||||||
|
# if(!lillum)
|
||||||
|
# {
|
||||||
|
# return Failure("lillum == false");
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
dir0 = Vec3.Construct(0,0,0);
|
||||||
|
#if(nbvr == 0) call nabort('ALT3B...NBVR=0')
|
||||||
|
|
||||||
|
# #LBM - only fly against targetTrack, not all things
|
||||||
|
# do 50 ibvr=1,nbvr
|
||||||
|
# if (jtgbvr(ibvr).lt.0) call nabort('ALT3B...JTGBVR IS ZERO')
|
||||||
|
# if (jtgbvr(ibvr).eq.0) goto 50
|
||||||
|
# iac = mmindt(jtgbvr(ibvr))
|
||||||
|
# if (iac.eq.0) goto 50
|
||||||
|
|
||||||
|
#call vdir(xp(1,me),xp(1,iac),dx)
|
||||||
|
Vec3 dx = RelativePositionNED(PLATFORM.Location(), targetTrack.CurrentLocation());
|
||||||
|
dx.Normalize();
|
||||||
|
Vec3 vp = PLATFORM.VelocityNED();
|
||||||
|
Vec3 dir0i = vorth(vp,dx);
|
||||||
|
|
||||||
|
#call veclin(0.5/xmag(dir0i),dir0i,root3*0.5,dx,dir0i)
|
||||||
|
|
||||||
|
//missile phases:
|
||||||
|
//pinfr=1, psema=2, pactr=3, pcomg=4, pguns=5, phor=6, p_act_ir_1=7, p_inertial=8, pnewg=9
|
||||||
|
|
||||||
|
int kndbvr; //TODO? = pcomg if command guided launch
|
||||||
|
int psema = 2; //semi active
|
||||||
|
int pcomg = 4; //command guided
|
||||||
|
if (kndbvr == psema)
|
||||||
|
{
|
||||||
|
# SEMI-ACTIVE MISSILE, GIVE FULL WEIGHT
|
||||||
|
|
||||||
|
#call vsum(dir0,dir0i,dir0);
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (kndbvr == pcomg)
|
||||||
|
{
|
||||||
|
# ACTIVE RADAR MISSILE, PRESUMABLY PRE-ACQUISITION
|
||||||
|
# GIVE 50% WEIGHT TO ITS ILLUM VECTOR
|
||||||
|
|
||||||
|
#call vecinc(dir0,0.5,dir0i,dir0)
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#call nabort('ALT3B...unknown/illegal kndbvr')
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " unknown/illegal kndbvr");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
# If BVR target is not to be considered in high detail do not
|
||||||
|
# illuminate
|
||||||
|
if (dir0.Magnitude() == 0.0)
|
||||||
|
{
|
||||||
|
string msg = write_str("T=",TIME_NOW,", alt ", ilevel, kalt, icall, lcall, " dir0 == zero");
|
||||||
|
writeln_d(msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
#call unitv(dir0,dir0)
|
||||||
|
int iactn = 4;
|
||||||
|
gmx = 2.0;
|
||||||
|
double bvrmch = 1.0; //TODO - find for real
|
||||||
|
double fmachp = 1.0; //TODO - find for real
|
||||||
|
spd0 = PLATFORM.Speed() * MATH.Max(1.0,bvrmch/fmachp); #spd0 in meter/seconds units here
|
||||||
|
int spdmod = 1; //(desspd = 1, thrttl = 2, desacc = 3)
|
||||||
|
|
||||||
|
### Evaluate [Projected] Maneuver Alternative
|
||||||
|
double score = brawlerPlatform.EvaluateVectorWithSpeed(dir0, gmx, spd0, ilevel, kalt, icall, lcall);
|
||||||
|
return score;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
|
||||||
|
execute
|
||||||
|
## what was evaluated should be actually performed now
|
||||||
|
brawlerPlatform.FlyVectorWithSpeed(dir0, gmx, spd0);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
123
platforms/brawler/alternatives/behavior_alt3G11_barrel_roll.txt
Normal file
123
platforms/brawler/alternatives/behavior_alt3G11_barrel_roll.txt
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 alt3g.f and brlrol.f
|
||||||
|
// Replicates the barrel roll 3,16,1,1 alternative behavior
|
||||||
|
// DO A BARREL ROLL! - Peppy
|
||||||
|
|
||||||
|
|
||||||
|
behavior alt3G11_barrel_roll
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
// Takes the place of 'brlflg'
|
||||||
|
bool mAlternative3G11Enabled = true;
|
||||||
|
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 3;
|
||||||
|
int kalt = 16;
|
||||||
|
int icall = 1;
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
// Barrel Roll Generation Parameters (formerly from rules file)
|
||||||
|
// See Brawler Production Rule Handbook 2.1.2.4 Barrel Roll - brlrol
|
||||||
|
double rolrat = 15; // Desired roll rate in degrees/sec
|
||||||
|
double ptchrt = 30; // Desired pitch rate in degrees/sec
|
||||||
|
double lgees = 0; // Desired longitudinal acceleration in units of gees.
|
||||||
|
|
||||||
|
// Maneuver Alternative flight values
|
||||||
|
Vec3 mA0 = Vec3();
|
||||||
|
Vec3 mAl0 = Vec3();
|
||||||
|
double mAccmod = 0.0;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
double grav = 32.17405; // From pcon.fi
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition behavior_alt3G11_barrel_roll, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mAlternative3G11Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
// ALL CONDITIONS PASS
|
||||||
|
### Generate Maneuver Alternative
|
||||||
|
# brlrol.f
|
||||||
|
#--NEXT LINE ALLOWS ALT3G TO GENERATE ALTERNATIVE
|
||||||
|
#brlflg=.true.
|
||||||
|
#if(lprnt) write(ioutp,1000) rolrat,ptchrt,lgees
|
||||||
|
#--SET DESIRED RATES
|
||||||
|
#w0(1)=rolrat*rad
|
||||||
|
#w0(2)=ptchrt*rad
|
||||||
|
#w0(3)=0.0
|
||||||
|
#al0 = grav*lgees
|
||||||
|
#accmod = desacc
|
||||||
|
#call xmit(5,althld(5),baralt)
|
||||||
|
mA0.SetX(rolrat * Math.RAD_PER_DEG());
|
||||||
|
mA0.SetY(ptchrt * Math.RAD_PER_DEG());
|
||||||
|
mA0.SetZ(0.0);
|
||||||
|
mAl0.SetX(grav * lgees); // Note al0 is actually a singe value, it is set to vector accreq(1) in command.f
|
||||||
|
//mAccmod = ??; where do we get desacc?
|
||||||
|
|
||||||
|
# alt3g.f
|
||||||
|
#iactn = 1
|
||||||
|
#lenalt=lactn(iactn)
|
||||||
|
#altdsc = indpk(3,16,1,1)
|
||||||
|
#call xmit(5,baralt,althld(5)) <- copy predefined barrel roll maneuver into alternative storage
|
||||||
|
|
||||||
|
### Evaluate [Projected] Maneuver Alternative
|
||||||
|
double score = brawlerPlatform.EvaluateRates(mA0, mAl0, ilevel, kalt, icall, lcall);
|
||||||
|
return score;
|
||||||
|
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
|
||||||
|
execute
|
||||||
|
## what was evaluated should be actually performed now
|
||||||
|
brawlerPlatform.FlyRates(mA0, mAl0);
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
264
platforms/brawler/alternatives/behavior_pilot_posture.txt
Normal file
264
platforms/brawler/alternatives/behavior_pilot_posture.txt
Normal file
@@ -0,0 +1,264 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
behavior pilot_posture
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
WsfTask targetTask;
|
||||||
|
WsfLocalTrack targetTrack;
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
double root3 = 1.732050808; # pcon.fi
|
||||||
|
double splita = 45.0; # MIND file, TODO - use read in value
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
|
||||||
|
precondition
|
||||||
|
|
||||||
|
WsfTaskList tasks = processor.TasksReceivedOfType("WEAPON");
|
||||||
|
if(tasks.Count() <= 0)
|
||||||
|
{
|
||||||
|
string err = write_str("no weapon (target) tasks!");
|
||||||
|
writeln_d(err);
|
||||||
|
return Failure(err);
|
||||||
|
}
|
||||||
|
targetTask = tasks.Entry(0);
|
||||||
|
targetTrack = PLATFORM.MasterTrackList().Find(targetTask.LocalTrackId());
|
||||||
|
if (!targetTrack.IsValid() || targetTrack.TargetKilled())
|
||||||
|
{
|
||||||
|
string err = write_str("no target track!");
|
||||||
|
writeln_d(err);
|
||||||
|
return Failure(err);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
|
||||||
|
execute
|
||||||
|
|
||||||
|
writeln_d("executing pilot_posture");
|
||||||
|
|
||||||
|
Vec3 xp = brawlerPlatform.LocationNED();
|
||||||
|
Vec3 vp = PLATFORM.VelocityNED();
|
||||||
|
double spdnow = PLATFORM.Speed()*MATH.FT_PER_M();
|
||||||
|
Vec3 xp_iac = brawlerPlatform.LocationNED(targetTrack);
|
||||||
|
Vec3 vp_iac = targetTrack.VelocityNED();
|
||||||
|
|
||||||
|
|
||||||
|
#aslct2()
|
||||||
|
#spcial()
|
||||||
|
#spbvri()
|
||||||
|
|
||||||
|
|
||||||
|
// "iac" is target index, get target track from WEAPON task, for now
|
||||||
|
|
||||||
|
Vec3 hlvec = Vec3();
|
||||||
|
double hlspd = 0.0;
|
||||||
|
double hlval = 0.0;
|
||||||
|
|
||||||
|
extern int kturn;
|
||||||
|
//C --GET KTURN VALUE
|
||||||
|
//call ckrngi(myturn,-2,2,'~KTURN(IACID)~')
|
||||||
|
double sgn = 1.0;
|
||||||
|
if (kturn<0)
|
||||||
|
{
|
||||||
|
sgn = -1.0;
|
||||||
|
}
|
||||||
|
#double vsme = 0.0; #TODO - speed of sound
|
||||||
|
#double bvrmch = 0.0; #TODO - mach to use BVR (MIND2)
|
||||||
|
#double bvrmch = PLATFORM.Speed()*MATH.FT_PER_M() / vsme;
|
||||||
|
#double sa = vsme*bvrmch;
|
||||||
|
double sa = brawlerPlatform.Speed()*MATH.FT_PER_M();
|
||||||
|
|
||||||
|
//call asstgt(iacord,jacidord,virtl,nassign)
|
||||||
|
//if(nassign.eq.0) goto 900
|
||||||
|
//iac = iacord(1);
|
||||||
|
if (kturn != 0)
|
||||||
|
{
|
||||||
|
writeln_d("kturn != 0");
|
||||||
|
//C --THIS CODE NOT NEEDED FOR POINT TACTIC:
|
||||||
|
//C --COMPUTE INTERCEPT PT AIMP, BASED ON MAX OF MACH 1 OR PRESENT MACH
|
||||||
|
//C --USE THE FIRST MEMBER OF THE ASSIGNED TARGET GROUP.
|
||||||
|
#st = xmag(vp(1,iac));
|
||||||
|
double st = vp_iac.Magnitude();
|
||||||
|
|
||||||
|
//LBM - TODO - verify units used in WsfBrawlerPlatform AimPoint and Intercept() methods!!!
|
||||||
|
#call aimpt(xp(1,me),amax1(sa,vsme),xp(1,iac),vp_iac,st,aimp,lsoln);
|
||||||
|
#Vec3 aimp = brawlerPlatform.AimPoint(xp, MATH.Max(sa, vsme), xp_iac, vp_iac, st);
|
||||||
|
Vec3 aimp = brawlerPlatform.AimPoint(xp, sa, xp_iac, vp_iac, st);
|
||||||
|
|
||||||
|
#Vec3 dxpme = Vec3.Subtract(xp_iac, xp);
|
||||||
|
#Vec3 dxt = dxpme;
|
||||||
|
Vec3 dxt = Vec3.Subtract(xp_iac, xp);
|
||||||
|
dxt.SetZ(0.0);
|
||||||
|
dxt.Normalize();
|
||||||
|
if(aimp.Magnitude() > 0)
|
||||||
|
{
|
||||||
|
#call vsub(aimp,xp(1,me),dxi);
|
||||||
|
Vec3 dxi = Vec3.Subtract(aimp, xp);
|
||||||
|
dxi.SetZ(0.0);
|
||||||
|
dxi.Normalize();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# if (kturn == 0) //C --POINT AT TGT
|
||||||
|
# {
|
||||||
|
# hdes = -xp(3,me);
|
||||||
|
# if (lbit(pp_skrs,saskr) || pp_comg)
|
||||||
|
# {
|
||||||
|
# if (!ppmtrk)
|
||||||
|
# {
|
||||||
|
# hdes = amin1(hdes,-xp(3,iac));
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
## //LBM - dont worry about rules right now
|
||||||
|
## //C --CHANGED RULFLG VALUE 18 NOV 87 DICKERSON
|
||||||
|
## if (rulflg == 1510)
|
||||||
|
## {
|
||||||
|
## call pcode(-rulflg);
|
||||||
|
## hdes = prdalt;
|
||||||
|
## }
|
||||||
|
#
|
||||||
|
# Vec3 aimpt = ((WsfBrawlerPlatform)PLATFORM).AimPoint(Vec3, double, Vec3, Vec3, double);
|
||||||
|
#
|
||||||
|
# #call intcpt(xp(1,me),spdnow(me),xp(1,iac),vp(1,iac),root3/2.0,0.0,hdes,hlvec,hlspd);
|
||||||
|
# hlvec = ((WsfBrawlerPlatform)PLATFORM).Intercept(Vec3, PLATFORM.Speed()*MATH.FT_PER_M(), Vec3, Vec3, double, double, double);
|
||||||
|
# hlspd = hlvec.Magnitude();
|
||||||
|
# hlvec.Normalize();
|
||||||
|
#
|
||||||
|
# //goto 965;
|
||||||
|
# }
|
||||||
|
# //else
|
||||||
|
if (kturn == 1 || kturn == -1) //C --END-RUN TGT
|
||||||
|
{
|
||||||
|
writeln_d("end run");
|
||||||
|
double closmn = root3/2.0;
|
||||||
|
double angint = splita*sgn;
|
||||||
|
double hdes = PLATFORM.Altitude();
|
||||||
|
//hdes = -xp(3,me);
|
||||||
|
|
||||||
|
//LBM - dont worry about lower targets or flying lower, for now
|
||||||
|
# if (lbit(pp_skrs,saskr) || pp_comg)
|
||||||
|
# {
|
||||||
|
# if (!ppmtrk)
|
||||||
|
# {
|
||||||
|
# hdes = amin1(hdes,-xp(3,iac));
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
//LBM - dont worry about rules right now
|
||||||
|
# //C --CHANGED RULFLG VALUE 18 NOV 87 DICKERSON
|
||||||
|
# if (rulflg == 1510)
|
||||||
|
# {
|
||||||
|
# call pcode(-rulflg);
|
||||||
|
# hdes = prdalt;
|
||||||
|
# }
|
||||||
|
|
||||||
|
|
||||||
|
//LBM - TODO - verify units used in WsfBrawlerPlatform AimPoint and Intercept() methods!!!
|
||||||
|
//call intcpt(xp(1,me),spdnow(me),xp(1,iac),vp(1,iac),root3/2.0,splita*sgn,hdes,hlvec,hlspd);
|
||||||
|
Vec3 desVec = brawlerPlatform.Intercept(xp, spdnow, xp_iac, vp_iac, closmn, angint, hdes);
|
||||||
|
hlvec = desVec.Normal();
|
||||||
|
hlspd = desVec.Magnitude();
|
||||||
|
|
||||||
|
//brawlerPlatform.InterceptLocation3D(
|
||||||
|
|
||||||
|
//goto 965;
|
||||||
|
}
|
||||||
|
# else if (kturn == 2 || kturn == -2) //C --LOOP
|
||||||
|
# {
|
||||||
|
# if (lsoln) then
|
||||||
|
# call xmit3(dxi,temp)
|
||||||
|
# else
|
||||||
|
# call xmit3(dxt,temp)
|
||||||
|
# endif
|
||||||
|
# call makex(vp(1,me),r)
|
||||||
|
# call vxfrmc(r,temp,temp,1)
|
||||||
|
# loopha = loopha .or. temp(1).lt.0.
|
||||||
|
# loopnf = loopnf .or. (loopha .and. temp(1).gt.0. .and. (sign(1.,temp(2)).eq.sgn) )
|
||||||
|
# if (loopnf) then
|
||||||
|
# //C --HERE NO LONGER LOOP - POINT
|
||||||
|
# goto 100
|
||||||
|
# endif
|
||||||
|
# temp(1) = 0.
|
||||||
|
# temp(2) = sgn
|
||||||
|
# temp(3) = 0.
|
||||||
|
# call vxfrmc(r,hlvec,temp,2)
|
||||||
|
# hlval = valme*1.5
|
||||||
|
# hlspd = bvrmch*spdnow(me)/fmachp
|
||||||
|
# //C --TURN OFF FORMATION VALUES DURING LOOP:
|
||||||
|
# mdskpp = iand(mdskpp,6)
|
||||||
|
# stkppp = stkppp*0.25
|
||||||
|
# goto 970
|
||||||
|
# }
|
||||||
|
|
||||||
|
# //C
|
||||||
|
#//900 continue
|
||||||
|
# //C --HERE NO TGT - PRESUMABLY DEAD
|
||||||
|
# hlval = 0.
|
||||||
|
# goto 970
|
||||||
|
# //C
|
||||||
|
|
||||||
|
//965 continue
|
||||||
|
//C --FINISH SETTING UP HIGH LEVEL STEERING VALUES
|
||||||
|
#hlval = valeff(iac);
|
||||||
|
hlval = brawlerPlatform.LastEngagementValue(targetTrack.Target());
|
||||||
|
#writeln_d("hlvec = ", hlvec.ToString(), ", hlval = ", hlval, ", hlspd = ", hlspd);
|
||||||
|
|
||||||
|
//970 continue
|
||||||
|
|
||||||
|
//call steer
|
||||||
|
#steer()
|
||||||
|
# if (dirspc.ne.0) then
|
||||||
|
# //C --SUPPRESS VECTORED FLIGHT VALUES - DIRECT HAS PRECEDENCE
|
||||||
|
# valfpp= 0.0
|
||||||
|
# elseif (vfspc.eq.0) then
|
||||||
|
//C --USE NORMAL HIGH_LEVEL VALUES FOR VECTORED_FLIGHT
|
||||||
|
//call xmit(3,hlvec,vecfpp)
|
||||||
|
|
||||||
|
extern Vec3 vecfpp;
|
||||||
|
extern double valfpp;
|
||||||
|
extern double sflypp;
|
||||||
|
vecfpp = hlvec;
|
||||||
|
valfpp = hlval;
|
||||||
|
sflypp = hlspd;
|
||||||
|
|
||||||
|
writeln_d("vecfpp = ", vecfpp.ToString(), ", valfpp = ", valfpp, ", sflypp = ", sflypp);
|
||||||
|
|
||||||
|
|
||||||
|
brawlerPlatform.SuggestVectoredFlight(vecfpp, valfpp, sflypp);
|
||||||
|
# else
|
||||||
|
# //C --USE FORCE_V VECTOR INSTEAD OF HL... VALUES
|
||||||
|
# //C --THESE MAY BE SET BY EITHER PRODUCTION RULES OR IP
|
||||||
|
# call xmit(3,hlvfor,vecfpp)
|
||||||
|
# valfpp = hlvalf
|
||||||
|
# sflypp = hlspdf
|
||||||
|
# endif
|
||||||
|
|
||||||
|
|
||||||
|
//call sepset(10.0) //LBM - not doing separation yet
|
||||||
|
//9999
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
329
platforms/brawler/alternatives/behavior_weapon_decision_gun.txt
Normal file
329
platforms/brawler/alternatives/behavior_weapon_decision_gun.txt
Normal file
@@ -0,0 +1,329 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 aslct7.f and akshn7.f
|
||||||
|
// Replicates the gun fire 7,3,7,x alternative behavior
|
||||||
|
|
||||||
|
include_once BrawlerScriptUtil.txt
|
||||||
|
|
||||||
|
behavior weapon_decision_gun
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
double RNGWPN = 3000.0; #feet (from MIND file)
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
WsfBrawlerPlatform brawlerPlatform;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawGuns = true;
|
||||||
|
WsfDraw mDraw = WsfDraw();
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
// Takes the place of production rules
|
||||||
|
bool mAlternative7371Enabled = true;
|
||||||
|
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 7;
|
||||||
|
int kalt = 3;
|
||||||
|
int icall = 7; // Always 7 for gun
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Needed?
|
||||||
|
brawlerPlatform = (WsfBrawlerPlatform)PLATFORM;
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
// Replicates the checks done in canfirg.f
|
||||||
|
// Return true if the gun can be fired ("hard" checks)
|
||||||
|
// Sets the string to the fail reason
|
||||||
|
script bool canfirg(string failMsg)
|
||||||
|
/*
|
||||||
|
cnfire = .false.
|
||||||
|
C --NOTE THAT WE ARE RECALCULATING PILOT POSTURE VARIABLES HERE
|
||||||
|
C --ppmrmx WILL BE NEEDED IN shldfrg, SO PERFORM THIS CALCULATION
|
||||||
|
C --UNCONDITIONALLY.
|
||||||
|
call gunenv(xp(1,me),vp(1,me),xp(1,ppmiac),vp(1,ppmiac),
|
||||||
|
1 ppmptr,ppmrmn,ppmrmx,ppmapt,ppmse,ppmaof,ppmenv,ppmtrk,ppmohr,
|
||||||
|
2 rbep )
|
||||||
|
C --If temp midway in a 0.5 second burst exceeds maximum (1.0 by
|
||||||
|
C --definition) then you can't shoot. Rate of temperature rise
|
||||||
|
C --is 1.0/t_to_heat, so that firing for t_to_heat seconds reaches
|
||||||
|
C --the limit.
|
||||||
|
overheat = (gun_temp+0.25/t_to_heat .gt. 1.0)
|
||||||
|
if (overheat) then
|
||||||
|
rsfail = 'GUN OVERHEAT'
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
C
|
||||||
|
C --CHECK IF TARGET IS IN ENVELOPE
|
||||||
|
if (.not.ppmenv) then
|
||||||
|
rsfail = 'NOT IN ENVELOPE '
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
C
|
||||||
|
C --CHECK ON PROBABILITY IN RANGE
|
||||||
|
pinrng = prmax2(ppmiac,ppmrmx,1.0,0.2)
|
||||||
|
pbinrg = pinrng.ge.pr2lim
|
||||||
|
if (.not.pbinrg) then
|
||||||
|
rsfail = 'LOW PROB IN RANGE'
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
C
|
||||||
|
visacq = inform(ppmiac).eq.1 .and. time.le.seet(ppmiac)+0.5
|
||||||
|
C --If pilot has not had a recent visual (or does not have a
|
||||||
|
C --radar lock if rdrgun is set), then gun can't be fired.
|
||||||
|
if(.not.rdrgun) then
|
||||||
|
C --DO I HAVE A RECENT VISUAL?
|
||||||
|
if(.not.visacq) then
|
||||||
|
rsfail = 'NO RECENT VISUAL'
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
C --AN ESTABLISHED RADAR TRACK MAY SUBSTITUTE FOR A VISUAL
|
||||||
|
C --IF RDRGUN=.TRUE.
|
||||||
|
call lockid(iacid,ppmjid,locked)
|
||||||
|
gunacq = visacq .or. locked.eq.2
|
||||||
|
if(.not.gunacq) then
|
||||||
|
rsfail = 'NO RECENT VISUAL OR LOCK'
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
C
|
||||||
|
cnfire = .true.
|
||||||
|
*/
|
||||||
|
#bool canFire = false;
|
||||||
|
bool canFire = true; #LBM - temporary
|
||||||
|
|
||||||
|
return canFire;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
// Replicates the checks done in shldfrg.f
|
||||||
|
// Return true if the should should be fired ("soft" checks)
|
||||||
|
// Sets the string to the fail reason if any
|
||||||
|
script bool shldfrg(string failMsg)
|
||||||
|
/*
|
||||||
|
C --If target is inside Rmax2, don't need the following
|
||||||
|
C --tests(target is inside no-escape range).
|
||||||
|
C --CHECK THAT PILOT BELIEVES RANGE IS OK FOR TARGETING
|
||||||
|
pinrng = prmax2(ppmiac,ppmrmx,ppm_rpeak,0.2)
|
||||||
|
pbinrg = pinrng.ge.pr2lim
|
||||||
|
call pdset('PROB_IN_RANGE',pbinrg)
|
||||||
|
C
|
||||||
|
C --CALCULATE CURRENT ENVELOPE LEVEL; ppmrmx WAS RECALCULATED IN canfirg
|
||||||
|
elevnow = envlvg(rngnow(me,ppmiac),rdotme(ppmiac),ppmse,ppmrmx,
|
||||||
|
1 'SHOOT')
|
||||||
|
C --CALCULATE PROJECTED ENVELOPE, CONSTANT VELOCITY PROJECTION FOR
|
||||||
|
C --ME AND CURRENT ACCELERATION PROJECTION FOR TARGET.
|
||||||
|
C --call vecinc(xp(1,me),tproj3,vp(1,me),xme)
|
||||||
|
C --Full projection for target, fixed velocity projection
|
||||||
|
C --for attacker.
|
||||||
|
C --call gunenv(xme,vp(1,me),xeut(1,ppmiac),veut(1,ppmiac),
|
||||||
|
call gunenv(xeuan,veuan,xeut(1,ppmiac),veut(1,ppmiac),
|
||||||
|
1 ppmptr,rmin,rmax,aimp,se,aof,inenvp,trkbl,ovrhoz,rbep)
|
||||||
|
elevprj = envlvg(rngun(ppmiac),rngrun(ppmiac),se,rmax,'SHOOT')
|
||||||
|
if(lprnt) write(ioutp,2000) rmin,rmax,rng(ppmiac),aimp,se,aof,
|
||||||
|
1 elevprj
|
||||||
|
C
|
||||||
|
C --CHECK PROJECTION -- IS LEVEL DECREASING?
|
||||||
|
worse = (elevnow.ge.elevprj)
|
||||||
|
call pdset('SHOT_WORSENING',worse)
|
||||||
|
C
|
||||||
|
needid = (irel(ppmiac).eq.0) .and. (id_mode.ne.bvr_id_md)
|
||||||
|
call pdset('SURE_BAD_GUY',.not.needid)
|
||||||
|
C
|
||||||
|
if (needid)then
|
||||||
|
lfire = .false.
|
||||||
|
rsfail = 'NEED ID'
|
||||||
|
elseif(.not.(pbinrg.or.worse))then
|
||||||
|
rsfail = '!(IN RPEAK OR WORSE)'
|
||||||
|
lfire = .false.
|
||||||
|
else
|
||||||
|
lfire = .true.
|
||||||
|
endif
|
||||||
|
*/
|
||||||
|
# bool lfire = false;
|
||||||
|
bool lfire = true; #LBM - temporary
|
||||||
|
|
||||||
|
|
||||||
|
return lfire;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition weapon_decision_gun, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
// aslct7.f line 123 - 132
|
||||||
|
# --CHECK IF TARGET SELECTED
|
||||||
|
# if (ppmiac .eq. 0 .and. .not.dewvmsl)then
|
||||||
|
# rsfail = 'NO TARGET SELECTED'
|
||||||
|
# goto 800
|
||||||
|
# endif
|
||||||
|
# --CHECK IF WEAPON SELECTED
|
||||||
|
# if (ppmptr .eq. 0)then
|
||||||
|
# rsfail = 'NO WEAPON SELECTED'
|
||||||
|
# goto 800
|
||||||
|
# endif
|
||||||
|
WsfTaskList tasks = processor.TasksReceivedOfType("WEAPON");
|
||||||
|
if(tasks.Count() <= 0)
|
||||||
|
{
|
||||||
|
return Failure("no target selected");
|
||||||
|
}
|
||||||
|
|
||||||
|
WsfTrack targetTrack = PLATFORM.MasterTrackList().FindTrack(tasks.Entry(0).LocalTrackId());
|
||||||
|
if (!targetTrack.IsValid())
|
||||||
|
{
|
||||||
|
return Failure("no valid target track");
|
||||||
|
}
|
||||||
|
|
||||||
|
#LBM - temporary
|
||||||
|
# // Weapon selection done in selwpn.f (called from aslct2.f)
|
||||||
|
# // checks weapon inventory. Use a similar check here as a replacement
|
||||||
|
# if (!HaveWeapon(PLATFORM))
|
||||||
|
# {
|
||||||
|
# // TODO Account for weapon type gun/missile
|
||||||
|
# return Failure("no weapon selected");
|
||||||
|
# }
|
||||||
|
|
||||||
|
if (!PLATFORM.Weapon("gun").IsValid() || PLATFORM.Weapon("gun").QuantityRemaining() <= 0)
|
||||||
|
{
|
||||||
|
writeln_d(" ", PLATFORM.Name(), " no weapon selected at time: ", TIME_NOW);
|
||||||
|
return Failure("no weapon selected");
|
||||||
|
}
|
||||||
|
|
||||||
|
# // aslct7() calls canfir().
|
||||||
|
# // canfir.f checks production rules and GCI inhibit
|
||||||
|
# // just doing a simple flag for now
|
||||||
|
# if (!mAlternative7371Enabled)
|
||||||
|
# {
|
||||||
|
# writeln_d("behavior not enabled!");
|
||||||
|
# return Failure("behavior alternative not enabled");
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# //canfir.f calls canfirg()
|
||||||
|
# string msg = "";
|
||||||
|
# if (!canfirg(msg))
|
||||||
|
# {
|
||||||
|
# return Failure(msg);
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# // aslct7 line 199 - 205
|
||||||
|
# // if undamaged calls shldfr().
|
||||||
|
# // if we are damaged skip checks and fire now
|
||||||
|
# if (PLATFORM.DamageFactor() <= 0.0)
|
||||||
|
# {
|
||||||
|
# // shldfr.f just calls the specific weapon type
|
||||||
|
# if (!shldfrg(msg))
|
||||||
|
# {
|
||||||
|
# return Failure(msg);
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# // aslct7 creates and alternative to evaluate.
|
||||||
|
# // The alternative has no projection and always
|
||||||
|
# // evaluates to 1, so skip that processing
|
||||||
|
|
||||||
|
WsfWeapon gun = PLATFORM.Weapon("gun");
|
||||||
|
if (gun.LaunchComputer().CanIntercept(targetTrack, 0.1)) #see "firing_delay" for BULLET weapon
|
||||||
|
{
|
||||||
|
WsfGeoPoint pt = gun.LaunchComputer().InterceptPoint();
|
||||||
|
|
||||||
|
#TODO - move slant range check to gun's launch computer???
|
||||||
|
|
||||||
|
if (PLATFORM.SlantRangeTo(pt) <= (RNGWPN * MATH.M_PER_FT()))
|
||||||
|
{
|
||||||
|
# #draw line to intercept point
|
||||||
|
# if (mDrawGuns)
|
||||||
|
# {
|
||||||
|
# double delta = ((WsfBrawlerPlatform)PLATFORM).ProjectedTimeDelta();
|
||||||
|
# mDraw.SetLayer("behavior_weapon_decision_gun");
|
||||||
|
# mDraw.SetDuration(delta);
|
||||||
|
# mDraw.SetColor(0.5, 0.5, 0.5); #gray
|
||||||
|
# mDraw.SetLineSize(1);
|
||||||
|
# mDraw.SetLineStyle("solid");
|
||||||
|
# mDraw.BeginLines();
|
||||||
|
# mDraw.Vertex(PLATFORM.Location());
|
||||||
|
# mDraw.Vertex(pt);
|
||||||
|
# mDraw.End();
|
||||||
|
# }
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
writeln_d("no gun fire, too far away");
|
||||||
|
return Failure("no gun fire, too far away");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
writeln_d("gun cannot intercept target yet");
|
||||||
|
return Failure("gun cannot intercept target yet");
|
||||||
|
}
|
||||||
|
|
||||||
|
// All conditions pass, weapon can fire
|
||||||
|
return true;
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
execute
|
||||||
|
// Replicates akshn7.f
|
||||||
|
// We don't need to do all the bookeeping that BRAWLER
|
||||||
|
// does. Just launch the weapon.
|
||||||
|
// TODO Fill in gun fire
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#LBM - temporary
|
||||||
|
WsfTrack targetTrack = PLATFORM.MasterTrackList().FindTrack(processor.TasksReceivedOfType("WEAPON").Entry(0).LocalTrackId());
|
||||||
|
WsfWeapon weapon = PLATFORM.Weapon("gun");
|
||||||
|
bool launched = weapon.FireSalvo(targetTrack, 1); // Always firing one for now
|
||||||
|
if (!launched)
|
||||||
|
{
|
||||||
|
writeln_d(" ", PLATFORM.Name(), " could NOT fire at track: ", targetTrack.TargetName(), " at time: ", TIME_NOW);
|
||||||
|
}
|
||||||
|
else if (mDrawGuns)
|
||||||
|
{
|
||||||
|
double delta = ((WsfBrawlerPlatform)PLATFORM).ProjectedTimeDelta();
|
||||||
|
|
||||||
|
mDraw.SetLayer("behavior_weapon_decision_gun");
|
||||||
|
mDraw.SetDuration(delta);
|
||||||
|
mDraw.SetColor(1.0, 1.0, 1.0); #white
|
||||||
|
mDraw.SetLineSize(2);
|
||||||
|
mDraw.SetLineStyle("dotted2");
|
||||||
|
mDraw.BeginLines();
|
||||||
|
mDraw.Vertex(PLATFORM.Location());
|
||||||
|
mDraw.Vertex(targetTrack.CurrentLocation());
|
||||||
|
mDraw.End();
|
||||||
|
}
|
||||||
|
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
@@ -0,0 +1,510 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
// converted BRAWLER v7.5 aslct7.f and akshn7.f
|
||||||
|
// Replicates the missile fire 7,3,1,x alternative behavior
|
||||||
|
|
||||||
|
include_once BrawlerScriptUtil.txt
|
||||||
|
|
||||||
|
behavior weapon_decision_missile
|
||||||
|
|
||||||
|
script_debug_writes off
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
|
||||||
|
WsfQuantumTaskerProcessor processor;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** debugging parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
bool mDrawSteering = false;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//** alternative parameters **//
|
||||||
|
//**********************************************************************//
|
||||||
|
// Flag used to enable/disable this alternative
|
||||||
|
// Takes the place of production rules
|
||||||
|
bool mAlternative7311Enabled = true;
|
||||||
|
|
||||||
|
// Alternative ID
|
||||||
|
int ilevel = 7;
|
||||||
|
int kalt = 3;
|
||||||
|
int icall = 1; // Weapon number, for missiles 1 - 6
|
||||||
|
int lcall = 1;
|
||||||
|
|
||||||
|
// Max/Min range for a SRM (meters)
|
||||||
|
double mMaxRange = 25000 * Math.M_PER_FT();
|
||||||
|
double mMinRange = 4000 * Math.M_PER_FT();
|
||||||
|
|
||||||
|
// Maximum angle a shot can be taken at (degrees)
|
||||||
|
double mMaxFiringAngle = 15.0;
|
||||||
|
|
||||||
|
// Percent range is reduced by for simple envelope
|
||||||
|
double mPercentRange = 0.2;
|
||||||
|
|
||||||
|
// Maximum number of missiles on a target
|
||||||
|
int mTargetSaturation = 1;
|
||||||
|
// Required track quality for a shot
|
||||||
|
double mRequiredTrackQuality = 0.8;
|
||||||
|
|
||||||
|
//**********************************************************************//
|
||||||
|
//********* VARIABLES BELOW THIS LINE ARE NOT FOR USER EDITING *********//
|
||||||
|
//**********************************************************************//
|
||||||
|
double grav = 32.17405; // From pcon.fi
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_init
|
||||||
|
if (PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
processor = (WsfQuantumTaskerProcessor)PROCESSOR;
|
||||||
|
}
|
||||||
|
end_on_init
|
||||||
|
|
||||||
|
// Replicates the checks done in canfirm.f
|
||||||
|
// Return true if the missile can be fired
|
||||||
|
// Sets the string to the fail reason
|
||||||
|
script bool canfirm(WsfLocalTrack target, string failMsg)
|
||||||
|
/*
|
||||||
|
cnfire = .false.
|
||||||
|
--MISSILE COMING OFF RAIL
|
||||||
|
if (lnchng) then
|
||||||
|
rsfail = 'MISL COMING OFF RAIL'
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
--SWITCHOLOGY DELAYS
|
||||||
|
pswtch = (time .ge. timemf)
|
||||||
|
if (.not. pswtch)then
|
||||||
|
rsfail = 'SWITCHOLOGY'
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
--CHECK IF TARGET IS IN ENVELOPE
|
||||||
|
--NOTE THAT SOME PPM... VARIABLES ARE RECALCULATED.
|
||||||
|
call mslenv_typ_mm(ppmiac,renv_typ)
|
||||||
|
call mslenv(iacid,xp(1,me),vp(1,me),ap(1,me),
|
||||||
|
1 alphap,xp(1,ppmiac),vp(1,ppmiac),ap(1,ppmiac),
|
||||||
|
2 ppmptr, rbep, rwep, ext_mle, .true., renv_typ, ppmrmn, ppmrmx,
|
||||||
|
3 ppmapt, ppmse, ppmaof, ppmenv, ppmtrk, ppmohr,l_config)
|
||||||
|
if (.not. ppmenv)then
|
||||||
|
rsfail = 'TGT NOT IN ENV'
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
--Does pilot beleive that target is within max range (R<Rmax1)?
|
||||||
|
pinrng = prmax2(ppmiac,ppmrmx,1.,0.2)
|
||||||
|
pbinrg = (pinrng .gt. pr2lim)
|
||||||
|
if (.not.pbinrg)then
|
||||||
|
rsfail = 'LOW PROB. TGT IN RNG'
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
if(lnchma.eq.0)then
|
||||||
|
rsfail = 'FAIL ALL FIRE MODES'
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
cnfire = .true.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Not currently checking for another missile coming off the rail
|
||||||
|
|
||||||
|
// Not currently checking for switchology delays
|
||||||
|
|
||||||
|
// CHECK IF TARGET IS IN ENVELOPE
|
||||||
|
// Using a very simplified replacement of mslenv()
|
||||||
|
// that take a percentage of ange and a simple angle check
|
||||||
|
double range = PLATFORM.SlantRangeTo(target);
|
||||||
|
double absRelativeBearing = MATH.Fabs(PLATFORM.RelativeBearingTo(target));
|
||||||
|
if (range < (mMinRange + mMinRange * mPercentRange) ||
|
||||||
|
range > (mMaxRange - mMaxRange * mPercentRange) ||
|
||||||
|
absRelativeBearing >= mMaxFiringAngle )
|
||||||
|
{
|
||||||
|
#writeln("absRelativeBearing = ", absRelativeBearing, ", range = ", range);
|
||||||
|
#failMsg = "TGT NOT IN ENV";
|
||||||
|
target.SetAuxData("msg", "TGT NOT IN ENV");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Does pilot beleive that target is within max range (R<Rmax1)?
|
||||||
|
// Using simplified version of prmax2
|
||||||
|
// and assuming short range missile with rmax = 25000 ft
|
||||||
|
double drng = (mMaxRange - PLATFORM.SlantRangeTo(target));
|
||||||
|
if (drng < 0.0)
|
||||||
|
{
|
||||||
|
#failMsg = "LOW PROB. TGT IN RNG";
|
||||||
|
target.SetAuxData("msg", "LOW PROB. TGT IN RNG");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Not currently checking launch modes
|
||||||
|
// lnchma set if fctest() passes checks
|
||||||
|
|
||||||
|
return true;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
// Replicates the checks done in shldfrm.f
|
||||||
|
// Return true if the missile should be fired
|
||||||
|
// Sets the string to the fail reason if any
|
||||||
|
script bool shldfrm(WsfLocalTrack target, string failMsg)
|
||||||
|
/*
|
||||||
|
C --CHECK THAT PILOT BELIEVES RANGE IS OK FOR TARGETING
|
||||||
|
pinrng = prmax2(ppmiac,ppmrmx,ppm_rpeak,0.2)
|
||||||
|
pbinrg = pinrng.ge.pr2lim
|
||||||
|
call pdset('PROB_IN_RANGE',pbinrg)
|
||||||
|
call mslenv_typ_mm(ppmiac,renv_typ)
|
||||||
|
C
|
||||||
|
C --CALCULATE tgleav
|
||||||
|
C --POSSIBLE PROJECTIONS
|
||||||
|
C -- ATTACKER TARGET
|
||||||
|
C --(1) CONSTANT VELOCITY XEUAN CONSTANT VELOCITY vecinc
|
||||||
|
C --(2) CURRENT MANEUVER XEUA CURRENT MANEUVER XEUT
|
||||||
|
C --(3) CURRENT MANEUVER XEUA CONSTANT VELOCITY vecinc
|
||||||
|
C --(4) CONSTANT VELOCITY XEUAN CURRENT MANEUVER XEUT
|
||||||
|
C --LOGIC IS AS FOLLOWS:
|
||||||
|
C --IF CASE (1) (neither maneuver) IS IN ENVELOPE THEN
|
||||||
|
C -- IF CASE (2) (both maneuver) IS OUT OF ENVELOPE
|
||||||
|
C -- IF CASE (3) (atkr maneuvers) IS IN ENVELOPE
|
||||||
|
C -- IF CASE(4) (tgt maneuvers) IS OUT OF ENVELOPE
|
||||||
|
C -- ASSERT: TARGET AT FAULT
|
||||||
|
C
|
||||||
|
C CASE 1: CALCULATE INENVP_CC
|
||||||
|
if (ient.eq.sament) then
|
||||||
|
call xmit3(xp(1,me),xme)
|
||||||
|
call xmit3(vp(1,me),vme)
|
||||||
|
call xmit(9,rbep,rbeme)
|
||||||
|
call xmit(9,rwep,rweme)
|
||||||
|
else
|
||||||
|
call xmit3(xeuan,xme)
|
||||||
|
call xmit3(veuan,vme)
|
||||||
|
call xmit(9,rbeuan,rbeme)
|
||||||
|
call xmit(9,rweuan,rweme)
|
||||||
|
endif
|
||||||
|
call vecinc(xp(1,ppmiac),tproj3,vp(1,ppmiac),xtgt)
|
||||||
|
call xmit3(vp(1,ppmiac),vtgt)
|
||||||
|
call zero3(azero)
|
||||||
|
xtgt(3) = amin1(xtgt(3),-50.)
|
||||||
|
call mslenv(iacid,xme,vme,azero,alphap,xtgt,vtgt,azero,
|
||||||
|
1 misl(mslpp),rbeme,rweme,.false.,.true.,renv_typ,rmin_mm,
|
||||||
|
2 rmax_mm,aimp,se_mm,aof_mm,inenvp_cc,trkbl,ovrhoz,l_config)
|
||||||
|
C --"target leaving" CANNOT BE TRUE IF NOT IN ENVELOPE WHEN NEITHER
|
||||||
|
C --MANEUVERING
|
||||||
|
if(.not.inenvp_cc)then
|
||||||
|
tgleav = .false.
|
||||||
|
goto 200
|
||||||
|
endif
|
||||||
|
C
|
||||||
|
C --CASE 2: CALCULATE INENVP_MM
|
||||||
|
if (ient.eq.sament) then
|
||||||
|
C --USE SAME AS CASE 1 SINCE I CAN'T MANEUVER
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
call xmit3(xeua,xme)
|
||||||
|
call xmit3(veua,vme)
|
||||||
|
call xmit(9,rbeua,rbeme)
|
||||||
|
call xmit(9,rweua,rweme)
|
||||||
|
endif
|
||||||
|
call xmit3(xeut(1,ppmiac),xtgt)
|
||||||
|
call xmit3(veut(1,ppmiac),vtgt)
|
||||||
|
call mslenv(iacid,xme,vme,azero,alphap,xtgt,vtgt,azero,
|
||||||
|
1 misl(mslpp),rbeme,rweme,.false.,.true.,renv_typ,rmin,rmax,
|
||||||
|
2 aimp,se,aof,inenvp_mm,trkbl,ovrhoz,l_config)
|
||||||
|
C --"target leaving" CANNOT BE TRUE IF STILL IN ENV. WHEN BOTH MANEUVER
|
||||||
|
if(inenvp_mm)then
|
||||||
|
tgleav = .false.
|
||||||
|
goto 200
|
||||||
|
endif
|
||||||
|
C
|
||||||
|
C --CASE 3: CALCULATE INENVP_MC
|
||||||
|
if (ient.eq.sament) then
|
||||||
|
C --USE SAME AS CASE 1 SINCE I CAN'T MANEUVER
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
call xmit3(xeua,xme)
|
||||||
|
call xmit3(veua,vme)
|
||||||
|
call xmit(9,rbeua,rbeme)
|
||||||
|
call xmit(9,rweua,rweme)
|
||||||
|
endif
|
||||||
|
call vecinc(xp(1,ppmiac),tproj3,vp(1,ppmiac),xtgt)
|
||||||
|
call xmit3(vp(1,ppmiac),vtgt)
|
||||||
|
xtgt(3) = amin1(xtgt(3),-50.)
|
||||||
|
call mslenv(iacid,xme,vme,azero,alphap,xtgt,vtgt,azero,
|
||||||
|
1 misl(mslpp),rbeme,rweme,.false.,.true.,renv_typ,rmin,rmax,
|
||||||
|
2 aimp,se,aof,inenvp_mc,trkbl,ovrhoz,l_config)
|
||||||
|
if(.not.inenvp_mc)then
|
||||||
|
tgleav = .false.
|
||||||
|
goto 200
|
||||||
|
endif
|
||||||
|
C
|
||||||
|
C --CASE 4: CALCULATE INENVP_CM
|
||||||
|
if (ient.eq.sament) then
|
||||||
|
C --USE SAME AS CASE 1 SINCE I CAN'T MANEUVER
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
call xmit3(xeuan,xme)
|
||||||
|
call xmit3(veuan,vme)
|
||||||
|
call xmit(9,rbeuan,rbeme)
|
||||||
|
call xmit(9,rweuan,rweme)
|
||||||
|
endif
|
||||||
|
call xmit3(xeut(1,ppmiac),xtgt)
|
||||||
|
call xmit3(veut(1,ppmiac),vtgt)
|
||||||
|
call mslenv(iacid,xme,vme,azero,alphap,xtgt,vtgt,azero,
|
||||||
|
1 misl(mslpp),rbeme,rweme,.false.,.true.,renv_typ,rmin,rmax,aimp,
|
||||||
|
2 se,aof,inenvp_cm,trkbl,ovrhoz,l_config)
|
||||||
|
tgleav = .not.inenvp_cm
|
||||||
|
C
|
||||||
|
200 continue
|
||||||
|
call pdset('TGT_LEAVING_ENV',tgleav)
|
||||||
|
C
|
||||||
|
C --Calculate current envelope level (WORSE)
|
||||||
|
elevnow= envlvl(rngnow(me,ppmiac),rdotme(ppmiac),ppmse,
|
||||||
|
1 ppmaof,ppmrmn,ppmrmx,ppm_rpeak,ppm_semax,aoffmx,
|
||||||
|
2 ppmtrk,ppmohr,'SHOOT ')
|
||||||
|
C
|
||||||
|
if (ient.ne.sament) then
|
||||||
|
elevprj= envlvl(rng(ppmiac),rngr(ppmiac),se_mm,aof_mm,rmin_mm,
|
||||||
|
1 rmax_mm,ppm_rpeak,ppm_semax,aoffmx,trkbl,ovrhoz,'SHOOT ')
|
||||||
|
if(lprnt) write(ioutp,2000) rmin_mm,rmax_mm,
|
||||||
|
1 rng(ppmiac),aimp,se_mm,aof_mm,elevprj
|
||||||
|
else
|
||||||
|
C --rng, rngr NOT SET FOR SAM, USE rngun, rngrun
|
||||||
|
elevprj= envlvl(rngun(ppmiac),rngrun(ppmiac),se_mm,aof_mm,
|
||||||
|
1 rmin_mm,rmax_mm,ppm_rpeak,ppm_semax,aoffmx,trkbl,ovrhoz,
|
||||||
|
2 'SHOOT ')
|
||||||
|
if(lprnt) write(ioutp,2000) rmin_mm,rmax_mm,
|
||||||
|
1 rngun(ppmiac),aimp,se_mm,aof_mm,elevprj
|
||||||
|
endif
|
||||||
|
C --CHECK PROJECTION -- IS LEVEL DECREASING?
|
||||||
|
worse = (elevnow.ge.elevprj)
|
||||||
|
call pdset('SHOT_WORSENING',worse)
|
||||||
|
10 continue
|
||||||
|
C
|
||||||
|
C --Check if target is too near beam for successful semi-active
|
||||||
|
C -- missile shot
|
||||||
|
lbeam = beamsht()
|
||||||
|
call pdset('SA_BEAM_SHOT',lbeam)
|
||||||
|
C
|
||||||
|
C --If positive target ID required to fire, has ID been
|
||||||
|
C --established?
|
||||||
|
needid = (irel(ppmiac).eq.0) .and. (id_mode.ne.bvr_id_md)
|
||||||
|
call pdset('SURE_BAD_GUY',.not.needid)
|
||||||
|
C
|
||||||
|
C --check for fratricide risk
|
||||||
|
call set_hldcod(mslpp,ppmiac,hldcode,pp_skrs,pp_undes,lfrshot)
|
||||||
|
lfrat = lbit(hldcode,2)
|
||||||
|
call pdset('FRAT_RISK',lfrat)
|
||||||
|
C
|
||||||
|
C --CHECK IF FRIEND HAS A BETTER SHOT
|
||||||
|
lfrnd = lbit(hldcode,1)
|
||||||
|
call pdset('FRND_BETTER_SHOT',lfrnd)
|
||||||
|
C
|
||||||
|
C --Is target already engaged with max number of missiles/target?
|
||||||
|
other_tgtd = 0
|
||||||
|
do 100 igg=1,ngg
|
||||||
|
iacf = listf(igg)
|
||||||
|
acidf = iacidt(iacf)
|
||||||
|
if (iacid .eq. acidf)goto 100
|
||||||
|
C --Don't count another's selection if you have a much better
|
||||||
|
C --shot, since he will wait for you to shoot
|
||||||
|
if (.not.lfrshot(iacf)) goto 100
|
||||||
|
C --Don't count another's selection if you have selected the
|
||||||
|
C --same target earlier! RMK 9 Apr 92
|
||||||
|
C --(Cant use others_tgt(iacid) here since not set until akshn7)
|
||||||
|
if (others_tgt(acidf).eq.ppmiac)then
|
||||||
|
C --However, we do need to use others_tgt(iacid) here, since
|
||||||
|
C --we need to use others_msgtim(iacid), which is only correct
|
||||||
|
C --if others_tgt(iacid) .eq. ppmiac
|
||||||
|
if(others_tgt(iacid).eq.ppmiac) then
|
||||||
|
C --I have selected this tgt previously
|
||||||
|
if (others_msgtim(acidf).lt.others_msgtim(iacid)) then
|
||||||
|
C --He selected this target earlier than I, so count him
|
||||||
|
other_tgtd = other_tgtd + 1
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
C --I just changed to this target, so if anybody else has
|
||||||
|
C --sent me a message selecting him, they must have gotten
|
||||||
|
C --there first
|
||||||
|
other_tgtd = other_tgtd + 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
100 continue
|
||||||
|
110 continue
|
||||||
|
satur = ((nmhutl(ppmiac)+other_tgtd).ge.mxtgt_ac(ppmjid))
|
||||||
|
call pdset('TARGET_SATURATED',satur)
|
||||||
|
skr_lock = .false.
|
||||||
|
do 300 iseek = 1, mx_skr
|
||||||
|
if (skr_acquired(iseek)) then
|
||||||
|
skr_lock = .true.
|
||||||
|
goto 305
|
||||||
|
endif
|
||||||
|
300 continue
|
||||||
|
305 continue
|
||||||
|
call pdset('SEEKER_LOCK',skr_lock)
|
||||||
|
C
|
||||||
|
C --CHECK WEAPON QUALITY TRACK
|
||||||
|
C --no_trk indicates track not needed for this launch mode
|
||||||
|
no_trk = (lnchma .eq. ppsli) .or.
|
||||||
|
1 (lnchma .eq. ppslr) .or.
|
||||||
|
2 (lnchma .eq. pcguv) .or.
|
||||||
|
3 (lnchma .eq. pvtnhms)
|
||||||
|
if (.not.usewqt(iflite)) then
|
||||||
|
C --Flight does not require WQT
|
||||||
|
needwqt = .false.
|
||||||
|
elseif (no_trk) then
|
||||||
|
C --Using a luanch mode that is not cued from a track
|
||||||
|
needwqt = .false.
|
||||||
|
else
|
||||||
|
needwqt = .not.wpnqual
|
||||||
|
endif
|
||||||
|
400 continue
|
||||||
|
C
|
||||||
|
C --FIRING LOGIC:
|
||||||
|
lfire =
|
||||||
|
1 .not.(needid.or.satur.or.lfrat.or.lfrnd.or.lbeam.or.needwqt)
|
||||||
|
2 .and.(pbinrg.or.(worse.and..not.tgleav))
|
||||||
|
if(lfire)then
|
||||||
|
rsfail = ' '
|
||||||
|
else
|
||||||
|
if(needid)then
|
||||||
|
rsfail = 'NEED ID'
|
||||||
|
elseif(satur)then
|
||||||
|
rsfail = 'MXTGT_AC LIMIT'
|
||||||
|
elseif(lfrat)then
|
||||||
|
rsfail = 'FRATRICIDE RISK'
|
||||||
|
elseif(lfrnd)then
|
||||||
|
rsfail = 'FRND HAS BETTER SHOT'
|
||||||
|
elseif(lbeam)then
|
||||||
|
rsfail = 'TGT TOO NEAR BEAM'
|
||||||
|
elseif(.not.(pbinrg.or.(worse.and..not.tgleav)))then
|
||||||
|
rsfail = 'FAILED ENV LOGIC'
|
||||||
|
elseif (needwqt) then
|
||||||
|
rsfail = 'NO WEAPON QUAL TRK'
|
||||||
|
else
|
||||||
|
call nabort('SHLDFRM..unknown failure reason')
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
*/
|
||||||
|
|
||||||
|
// ONLY Checking target stauration and track quality for now
|
||||||
|
if (PLATFORM.WeaponsActiveFor(target.TrackId()) >= mTargetSaturation)
|
||||||
|
{
|
||||||
|
//lfire = true;
|
||||||
|
writeln_d(" ", PLATFORM.Name(), " shouldn't fire ", target.TargetName(), " saturated");
|
||||||
|
failMsg = "MXTGT_AC LIMIT";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (target.TrackQuality() < mRequiredTrackQuality)
|
||||||
|
{
|
||||||
|
failMsg = "NO WEAPON QUAL TRK";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
precondition
|
||||||
|
#writeln_d(PLATFORM.Name(), " precondition weapon_decision_missile, T=", TIME_NOW);
|
||||||
|
|
||||||
|
### Evaluate conditions that would prevent behavior alternative from running
|
||||||
|
|
||||||
|
if (!PROCESSOR.IsA_TypeOf("WSF_QUANTUM_TASKER_PROCESSOR"))
|
||||||
|
{
|
||||||
|
writeln_d("not a quantum tasker!");
|
||||||
|
return Failure("behavior not attached to a WSF_QUANTUM_TASKER_PROCESSOR");
|
||||||
|
}
|
||||||
|
|
||||||
|
// aslct7.f line 123 - 132
|
||||||
|
# --CHECK IF TARGET SELECTED
|
||||||
|
# if (ppmiac .eq. 0 .and. .not.dewvmsl)then
|
||||||
|
# rsfail = 'NO TARGET SELECTED'
|
||||||
|
# goto 800
|
||||||
|
# endif
|
||||||
|
# --CHECK IF WEAPON SELECTED
|
||||||
|
# if (ppmptr .eq. 0)then
|
||||||
|
# rsfail = 'NO WEAPON SELECTED'
|
||||||
|
# goto 800
|
||||||
|
# endif
|
||||||
|
WsfTaskList tasks = processor.TasksReceivedOfType("WEAPON");
|
||||||
|
if(tasks.Count() <= 0)
|
||||||
|
{
|
||||||
|
return Failure("no tasks");
|
||||||
|
}
|
||||||
|
// Assuming 1v1 and first and only task is the one we want
|
||||||
|
WsfLocalTrack targetTrack = PLATFORM.MasterTrackList().FindTrack(tasks.Entry(0).LocalTrackId());
|
||||||
|
if(tasks.Count() <= 0 || targetTrack.IsNull() || !targetTrack.IsValid())
|
||||||
|
{
|
||||||
|
writeln_d(" ", PLATFORM.Name(), " no target selected at time: ", TIME_NOW);
|
||||||
|
return Failure("no target selected");
|
||||||
|
}
|
||||||
|
// Weapon selection done in selwpn.f (called from aslct2.f)
|
||||||
|
// checks weapon inventory. Use a similar check here as a replacement
|
||||||
|
if (!PLATFORM.Weapon("srm").IsValid() || PLATFORM.Weapon("srm").QuantityRemaining() <= 0)
|
||||||
|
{
|
||||||
|
writeln_d(" ", PLATFORM.Name(), " no weapon selected at time: ", TIME_NOW);
|
||||||
|
return Failure("no weapon selected");
|
||||||
|
}
|
||||||
|
|
||||||
|
// aslct7() calls canfir().
|
||||||
|
// canfir.f checks production rules and GCI inhibit
|
||||||
|
// just doing a simple flag for now
|
||||||
|
if (!mAlternative7311Enabled)
|
||||||
|
{
|
||||||
|
writeln_d("behavior not enabled!");
|
||||||
|
return Failure("behavior alternative not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
//canfir.f calls canfirm()
|
||||||
|
string msg = "";
|
||||||
|
if (!canfirm(targetTrack, msg))
|
||||||
|
{
|
||||||
|
msg = targetTrack.AuxDataString("msg");
|
||||||
|
writeln_d(" ", PLATFORM.Name(), " couldn't fire at time: ", TIME_NOW, " ", msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
// aslct7 line 199 - 205
|
||||||
|
// if undamaged calls shldfr().
|
||||||
|
// if we are damaged skip checks and fire now
|
||||||
|
if (PLATFORM.DamageFactor() <= 0.0)
|
||||||
|
{
|
||||||
|
// shldfr.f just calls the specific weapon type
|
||||||
|
if (!shldfrm(targetTrack, msg))
|
||||||
|
{
|
||||||
|
writeln_d(" ", PLATFORM.Name(), " shouldn't fire at time: ", TIME_NOW, " ", msg);
|
||||||
|
return Failure(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// aslct7 creates and alternative to evaluate.
|
||||||
|
// The alternative has no projection and always
|
||||||
|
// evaluates to 1, so skip that processing
|
||||||
|
|
||||||
|
// All conditions pass, weapon can fire
|
||||||
|
return true;
|
||||||
|
end_precondition
|
||||||
|
|
||||||
|
execute
|
||||||
|
// Replicates akshn7.f
|
||||||
|
// We don't need to do all the bookeeping that BRAWLER
|
||||||
|
// does. Just launch the weapon.
|
||||||
|
|
||||||
|
WsfTaskList tasks = processor.TasksReceivedOfType("WEAPON");
|
||||||
|
// Assuming 1v1 and first and only task is the one we want
|
||||||
|
WsfLocalTrack targetTrack = PLATFORM.MasterTrackList().FindTrack(tasks.Entry(0).LocalTrackId());
|
||||||
|
|
||||||
|
//Assuming weapon name, checked in precondition
|
||||||
|
WsfWeapon weapon = PLATFORM.Weapon("srm");
|
||||||
|
bool launched = weapon.FireSalvo(targetTrack, 1); // Always firing one for now
|
||||||
|
if (!launched)
|
||||||
|
{
|
||||||
|
writeln_d(" ", PLATFORM.Name(), " could NOT fire at track: ", targetTrack.TargetName(), " at time: ", TIME_NOW);
|
||||||
|
}
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
end_behavior
|
||||||
|
|
||||||
72
platforms/brawler/brawler_flight_lead.txt
Normal file
72
platforms/brawler/brawler_flight_lead.txt
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
platform_type BRAWLER_FLIGHT_LEAD WSF_PLATFORM
|
||||||
|
comm datalink WSF_COMM_TRANSCEIVER
|
||||||
|
network_name brawler_net
|
||||||
|
internal_link data_mgr
|
||||||
|
internal_link task_mgr
|
||||||
|
internal_link perception
|
||||||
|
end_comm
|
||||||
|
processor data_mgr WSF_TRACK_PROCESSOR
|
||||||
|
master_track_processor
|
||||||
|
end_processor
|
||||||
|
track_manager
|
||||||
|
retain_raw_tracks
|
||||||
|
retain_track_history
|
||||||
|
uncorrelated_track_drops disable
|
||||||
|
end_track_manager
|
||||||
|
processor perception WSF_PERCEPTION_PROCESSOR
|
||||||
|
asset_perception status_messages
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
processor task_mgr WSF_QUANTUM_TASKER_PROCESSOR
|
||||||
|
script_variables
|
||||||
|
## for evaluating weapon tasks
|
||||||
|
Map<string,int> mKnownTargetTypes = Map<string,int>();
|
||||||
|
mKnownTargetTypes["BRAWLER_PLATFORM"] = 1;
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
script Array<WsfTask> FlightLeadTaskGeneration (Array<WsfLocalTrack> TRACKS, Array<WsfAssetPerception> ASSETS )
|
||||||
|
Array<WsfTask> tasks = Array<WsfTask>();
|
||||||
|
//if its us, then create weapon tasks for enemy tracks
|
||||||
|
writeln_d("TRACKS.Size() = ", TRACKS.Size(), ", ASSETS.Size() = ", ASSETS.Size());
|
||||||
|
for (int i=0; i<TRACKS.Size(); i=i+1)
|
||||||
|
{
|
||||||
|
WsfLocalTrack lt = TRACKS.Get(i);
|
||||||
|
if (lt.IsValid() && (!lt.SideValid() || lt.Side() != PLATFORM.Side()))
|
||||||
|
{
|
||||||
|
if (mKnownTargetTypes.Size() <= 0 || mKnownTargetTypes.Exists(lt.TargetType()))
|
||||||
|
{
|
||||||
|
WsfTask task = WsfTask.Construct(1.0, "WEAPON", lt);
|
||||||
|
task.SetTaskType("WEAPON");
|
||||||
|
tasks.PushBack(task);
|
||||||
|
writeln_d("weapon task generated for: ", lt.TargetName(), ", updated time: ", lt.UpdateTime());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return tasks;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
on_initialize
|
||||||
|
end_on_initialize
|
||||||
|
|
||||||
|
#debug
|
||||||
|
#script_debug_writes on
|
||||||
|
#show_task_messages
|
||||||
|
reallocation_strategy dynamic
|
||||||
|
generator custom FlightLeadTaskGeneration
|
||||||
|
evaluator distance
|
||||||
|
#allocator greedy_isolated
|
||||||
|
allocator optimal_profit
|
||||||
|
allocator_extra_assets optimal_profit #assigns tasks to extra blue guys
|
||||||
|
update_interval 0.3 sec
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
end_platform_type
|
||||||
208
platforms/brawler/brawler_platform.txt
Normal file
208
platforms/brawler/brawler_platform.txt
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
#TODO - give blue_sr_a2a_ir_missile limited IR seekers, not perfect trackers
|
||||||
|
include_once ../../weapons/aam/blue_sr_a2a_ir_missile.txt
|
||||||
|
include_once ../../../site_types/weapons/other/gun.txt
|
||||||
|
|
||||||
|
# BRAWLER Behaviors
|
||||||
|
# "CONTEXT-FREE" Maneuvers
|
||||||
|
include_once alternatives/behavior_alt3111_straight_level_max_speed.txt
|
||||||
|
include_once alternatives/behavior_alt3121_straight_level.txt
|
||||||
|
|
||||||
|
include_once alternatives/behavior_alt3211_route_maneuver.txt
|
||||||
|
|
||||||
|
# Offensive 1v1 Maneuvers
|
||||||
|
include_once alternatives/behavior_alt3411_straight_flight.txt
|
||||||
|
include_once alternatives/behavior_alt3421_roll_+15_pull.txt
|
||||||
|
include_once alternatives/behavior_alt3431_roll-15_pull.txt
|
||||||
|
include_once alternatives/behavior_alt3441_tail_attack.txt
|
||||||
|
include_once alternatives/behavior_alt3451_pull_gmax_sust.txt
|
||||||
|
include_once alternatives/behavior_alt3471_slow_current_dir.txt
|
||||||
|
include_once alternatives/behavior_alt3472_slow_pull_right.txt
|
||||||
|
include_once alternatives/behavior_alt3473_slow_pull_left.txt
|
||||||
|
include_once alternatives/behavior_alt3474_slow_pull_current_plane.txt
|
||||||
|
|
||||||
|
# Defensive 1v1 Maneuvers
|
||||||
|
include_once alternatives/behavior_alt3511_break_right.txt
|
||||||
|
include_once alternatives/behavior_alt3531_break_left.txt
|
||||||
|
include_once alternatives/behavior_alt3551_run_away.txt
|
||||||
|
include_once alternatives/behavior_alt3561_force_overshoot.txt
|
||||||
|
include_once alternatives/behavior_alt3581_negative_velocity.txt
|
||||||
|
|
||||||
|
#missile aiming maneuever
|
||||||
|
include_once alternatives/behavior_alt3841_aim_missile_typ4.txt
|
||||||
|
|
||||||
|
include_once alternatives/behavior_alt3911_evade_missile.txt
|
||||||
|
include_once alternatives/behavior_alt3A11_low_speed_recover.txt
|
||||||
|
include_once alternatives/behavior_alt3A21_low_speed_recover_right45.txt
|
||||||
|
include_once alternatives/behavior_alt3A31_low_speed_recover_left45.txt
|
||||||
|
#include_once alternatives/behavior_alt3B11_illuminate.txt
|
||||||
|
include_once alternatives/behavior_alt3G11_barrel_roll.txt
|
||||||
|
|
||||||
|
# Weapon employment decision alternatives
|
||||||
|
include_once alternatives/behavior_weapon_decision_gun.txt
|
||||||
|
include_once alternatives/behavior_weapon_decision_missile.txt
|
||||||
|
|
||||||
|
#include_once alternatives/behavior_alt1514_point.txt
|
||||||
|
#include_once alternatives/behavior_alt1516_bvr_end_run_left.txt
|
||||||
|
#include_once alternatives/behavior_alt1517_bvr_end_run_right.txt
|
||||||
|
#include_once alternatives/behavior_pilot_posture.txt
|
||||||
|
#
|
||||||
|
##direct maneuver
|
||||||
|
##
|
||||||
|
##fly vector
|
||||||
|
#include_once alternatives/behavior_alt3611_fly_vector.txt
|
||||||
|
|
||||||
|
|
||||||
|
#include_once alternatives/behavior_debug_data.txt
|
||||||
|
|
||||||
|
# A WSF_BRAWLER_PLATFORM must have the following defined:
|
||||||
|
# 1. A WSF_BRAWLER_MOVER or WSF_P6DOF_MOVER
|
||||||
|
# 2. A WSF_QUANTUM_TASKER_PROCESSOR (typically named task_mgr)
|
||||||
|
# 3. A WSF_PERCEPTION_PROCESSOR (typically named perception)
|
||||||
|
# 4. A WSF_THREAT_PROCESSOR (typically named incoming_threats)
|
||||||
|
|
||||||
|
platform_type BRAWLER_PLATFORM WSF_BRAWLER_PLATFORM
|
||||||
|
|
||||||
|
icon F-15
|
||||||
|
|
||||||
|
mover WSF_BRAWLER_MOVER
|
||||||
|
aero_file ACFT_BD.FXW
|
||||||
|
#draw_projection
|
||||||
|
end_mover
|
||||||
|
|
||||||
|
mind_file MIND
|
||||||
|
#draw_alternatives
|
||||||
|
#draw_nominal_states
|
||||||
|
#debug
|
||||||
|
|
||||||
|
weapon srm BLUE_SR_A2A_IR_MISSILE
|
||||||
|
quantity 2
|
||||||
|
end_weapon
|
||||||
|
|
||||||
|
weapon gun BULLET
|
||||||
|
quantity 12 #each "bullet" represents a 1-sec burst of gunfire
|
||||||
|
end_weapon
|
||||||
|
|
||||||
|
comm datalink WSF_COMM_TRANSCEIVER
|
||||||
|
network_name brawler_net
|
||||||
|
internal_link data_mgr
|
||||||
|
internal_link task_mgr
|
||||||
|
internal_link perception
|
||||||
|
end_comm
|
||||||
|
|
||||||
|
sensor simple_sensor WSF_GEOMETRIC_SENSOR
|
||||||
|
on
|
||||||
|
#azimuth_field_of_view -45.0 degrees 45.0 degrees
|
||||||
|
#elevation_field_of_view -20.0 degrees 20.0 degrees
|
||||||
|
azimuth_field_of_view -180.0 degrees 180.0 degrees
|
||||||
|
elevation_field_of_view -90.0 degrees 90.0 degrees
|
||||||
|
maximum_range 150 km
|
||||||
|
frame_time 0.5 sec
|
||||||
|
reports_location
|
||||||
|
reports_velocity
|
||||||
|
reports_range
|
||||||
|
reports_iff
|
||||||
|
track_quality 1.0
|
||||||
|
internal_link data_mgr
|
||||||
|
ignore_same_side
|
||||||
|
end_sensor
|
||||||
|
|
||||||
|
processor data_mgr WSF_TRACK_PROCESSOR
|
||||||
|
purge_interval 60 sec
|
||||||
|
report_interval 1.0 sec
|
||||||
|
report_to commander via datalink
|
||||||
|
fused_track_reporting on
|
||||||
|
raw_track_reporting off
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
processor perception WSF_PERCEPTION_PROCESSOR
|
||||||
|
threat_update_interval 2 sec
|
||||||
|
max_threat_load 5
|
||||||
|
reports_self on
|
||||||
|
report_interval 1.0 sec
|
||||||
|
report_to commander via datalink
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
processor incoming_threats WSF_THREAT_PROCESSOR
|
||||||
|
threat_time_to_intercept 120 sec #default: 60 sec
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
processor task_mgr WSF_QUANTUM_TASKER_PROCESSOR
|
||||||
|
#debug
|
||||||
|
#show_task_messages
|
||||||
|
|
||||||
|
# script_variables
|
||||||
|
# int kturn = 0; //turn type for BVR flight tactics
|
||||||
|
# Vec3 vecfpp = Vec3(); //vectored flight, direction
|
||||||
|
# double valfpp = 0.0; //vectored flight, value
|
||||||
|
# double sflypp = 0.0; //vectored flight, speed
|
||||||
|
# end_script_variables
|
||||||
|
|
||||||
|
behavior_tree
|
||||||
|
#behavior_node debug_data
|
||||||
|
|
||||||
|
# #FLIGHT TACTIC DECISION
|
||||||
|
# priority_selector
|
||||||
|
# behavior_node alt1516_bvr_end_run_left
|
||||||
|
# behavior_node alt1517_bvr_end_run_right
|
||||||
|
# behavior_node alt1514_point
|
||||||
|
# end_priority_selector
|
||||||
|
|
||||||
|
# #FLIGHT POSTURE DECISION
|
||||||
|
# selector
|
||||||
|
# #behavior_node altWXYZ_blah_blah
|
||||||
|
# end_selector
|
||||||
|
|
||||||
|
# #PILOT POSTURE DECISION
|
||||||
|
# selector
|
||||||
|
# behavior_node pilot_posture
|
||||||
|
# end_selector
|
||||||
|
|
||||||
|
#PILOT MANEUVERING DECISION
|
||||||
|
priority_selector
|
||||||
|
#when debug: prints precondition score of each selector child behavior
|
||||||
|
#debug
|
||||||
|
behavior_node alt3111_straight_level_max_speed
|
||||||
|
behavior_node alt3121_straight_level
|
||||||
|
behavior_node alt3411_straight_flight
|
||||||
|
behavior_node alt3421_roll_15_pull
|
||||||
|
behavior_node alt3431_roll-15_pull
|
||||||
|
behavior_node alt3441_tail_attack
|
||||||
|
behavior_node alt3451_pull_gmax_sust
|
||||||
|
behavior_node alt3471_slow_current_dir
|
||||||
|
behavior_node alt3472_slow_pull_right
|
||||||
|
behavior_node alt3473_slow_pull_left
|
||||||
|
behavior_node alt3474_slow_pull_current_plane
|
||||||
|
behavior_node alt3511_break_right
|
||||||
|
behavior_node alt3531_break_left
|
||||||
|
behavior_node alt3551_run_away
|
||||||
|
behavior_node alt3561_force_overshoot
|
||||||
|
behavior_node alt3581_negative_velocity
|
||||||
|
#behavior_node alt3611_fly_vector
|
||||||
|
behavior_node alt3841_aim_missile_typ4
|
||||||
|
#behavior_node alt3211_route_maneuver
|
||||||
|
behavior_node alt3911_evade_missile
|
||||||
|
#behavior_node alt3A11_low_speed_recover
|
||||||
|
#behavior_node alt3A21_low_speed_recover_right45
|
||||||
|
#behavior_node alt3A31_low_speed_recover_left45
|
||||||
|
#behavior_node alt3B11_illuminate
|
||||||
|
behavior_node alt3G11_barrel_roll
|
||||||
|
end_priority_selector
|
||||||
|
|
||||||
|
#WEAPON EMPLOYMENT DECISION
|
||||||
|
selector
|
||||||
|
behavior_node weapon_decision_gun
|
||||||
|
behavior_node weapon_decision_missile
|
||||||
|
end_selector
|
||||||
|
|
||||||
|
end_behavior_tree
|
||||||
|
end_processor
|
||||||
|
end_platform_type
|
||||||
21
platforms/cmdr_players.txt
Normal file
21
platforms/cmdr_players.txt
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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 ****** *
|
||||||
|
# * * ************************************** * *
|
||||||
|
|
||||||
|
include_once platforms/iads_cmdr.txt
|
||||||
|
|
||||||
|
include_once platforms/red_radar_company.txt
|
||||||
|
|
||||||
|
platform_type RADAR_COMPANY RED_RADAR_COMPANY
|
||||||
|
end_platform_type
|
||||||
|
|
||||||
|
include_once platforms/target.txt
|
||||||
48
platforms/common.txt
Normal file
48
platforms/common.txt
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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 ****** *
|
||||||
|
# * * ************************************** * *
|
||||||
|
|
||||||
|
# --------------------------------------------------------------
|
||||||
|
# Vehicle Signatures
|
||||||
|
# --------------------------------------------------------------
|
||||||
|
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 RED_DATALINK WSF_COMM_TRANSCEIVER
|
||||||
|
transfer_rate 100 mbits/sec
|
||||||
|
end_comm
|
||||||
|
|
||||||
|
# --------------------------------------------------------------
|
||||||
|
# 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
|
||||||
37
platforms/ew_radar.txt
Normal file
37
platforms/ew_radar.txt
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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 ****** *
|
||||||
|
# * * ************************************** * *
|
||||||
|
|
||||||
|
include_once platforms/red_radar.txt
|
||||||
|
include_once sensors/radar/ew_radar.txt
|
||||||
|
include_once processors/ep_operations.txt
|
||||||
|
|
||||||
|
platform_type EW_RADAR RED_RADAR
|
||||||
|
icon Ground_Radar
|
||||||
|
category 2D_RADAR
|
||||||
|
|
||||||
|
sensor ew_radar EW_RADAR
|
||||||
|
on
|
||||||
|
internal_link data_mgr
|
||||||
|
ignore_same_side
|
||||||
|
end_sensor
|
||||||
|
|
||||||
|
processor ep_operations EP_OPERATIONS
|
||||||
|
script_variables
|
||||||
|
mSensorNameList.PushBack("ew_radar");
|
||||||
|
end_script_variables
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
aux_data
|
||||||
|
double max_range = 185200 # meters = 100 nm
|
||||||
|
end_aux_data
|
||||||
|
end_platform_type
|
||||||
42
platforms/flight_lead_base.txt
Normal file
42
platforms/flight_lead_base.txt
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
platform_type FLIGHT_LEAD_BASE WSF_PLATFORM
|
||||||
|
|
||||||
|
|
||||||
|
//these definitions go in scenario specific platform type derivatives
|
||||||
|
// comm cmdr_net DATALINK_TYPE
|
||||||
|
// network_name <local:slave>
|
||||||
|
// internal_link data_mgr
|
||||||
|
// end_comm
|
||||||
|
// comm sub_net DATALINK_TYPE
|
||||||
|
// network_name <local:master>
|
||||||
|
// internal_link data_mgr
|
||||||
|
// end_comm
|
||||||
|
|
||||||
|
processor track_manager WSF_TRACK_PROCESSOR
|
||||||
|
//debug
|
||||||
|
purge_interval 60 seconds
|
||||||
|
|
||||||
|
#report_to commander via cmdr_net
|
||||||
|
report_to subordinates via sub_net
|
||||||
|
|
||||||
|
//Only report fused tracks to entities that won't transmit tracks back.
|
||||||
|
//report_interval 20 sec
|
||||||
|
report_interval 4 sec
|
||||||
|
fused_track_reporting off
|
||||||
|
raw_track_reporting on
|
||||||
|
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
|
||||||
|
end_platform_type
|
||||||
|
|
||||||
16
platforms/flight_lead_noripr.txt
Normal file
16
platforms/flight_lead_noripr.txt
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
#for flight lead base
|
||||||
|
include_once flight_lead_base.txt
|
||||||
|
|
||||||
|
|
||||||
|
platform_type FLIGHT_LEAD FLIGHT_LEAD_BASE
|
||||||
|
|
||||||
|
end_platform_type
|
||||||
28
platforms/flight_lead_ripr.txt
Normal file
28
platforms/flight_lead_ripr.txt
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
#for AIFL-thinker
|
||||||
|
include_once processors/ripr_agents/aifl/aifl_processor.txt
|
||||||
|
|
||||||
|
#for flight lead base
|
||||||
|
include_once platforms/flight_lead_base.txt
|
||||||
|
|
||||||
|
platform_type FLIGHT_LEAD FLIGHT_LEAD_BASE
|
||||||
|
processor lead-thinker AIFL-thinker
|
||||||
|
#debug
|
||||||
|
script_variables
|
||||||
|
###mEscortNames[0] = "some platform name";
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
#auto_exclusive_mode true
|
||||||
|
#job_window_open_length 5 sec
|
||||||
|
#bid_window_open_length 5 sec
|
||||||
|
end_processor
|
||||||
|
end_platform_type
|
||||||
|
|
||||||
31
platforms/gci_base.txt
Normal file
31
platforms/gci_base.txt
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
platform_type GCI_BASE WSF_PLATFORM
|
||||||
|
|
||||||
|
|
||||||
|
processor track_manager WSF_TRACK_PROCESSOR
|
||||||
|
//debug
|
||||||
|
purge_interval 60 seconds
|
||||||
|
|
||||||
|
//report_to commander via cmdr_net
|
||||||
|
report_to subordinates via sub_net
|
||||||
|
|
||||||
|
//Only report fused tracks to entities that won't transmit tracks back.
|
||||||
|
//report_interval 20 sec
|
||||||
|
|
||||||
|
report_interval 4 sec
|
||||||
|
|
||||||
|
fused_track_reporting off
|
||||||
|
raw_track_reporting on
|
||||||
|
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
end_platform_type
|
||||||
17
platforms/gci_noripr.txt
Normal file
17
platforms/gci_noripr.txt
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
#for gci base
|
||||||
|
include_once gci_base.txt
|
||||||
|
|
||||||
|
|
||||||
|
platform_type GCI GCI_BASE
|
||||||
|
|
||||||
|
end_platform_type
|
||||||
22
platforms/gci_ripr.txt
Normal file
22
platforms/gci_ripr.txt
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
#for AIGCI-thinker
|
||||||
|
include_once processors/ripr_agents/aigci/aigci_processor.txt
|
||||||
|
|
||||||
|
#for gci base
|
||||||
|
include_once platforms/gci_base.txt
|
||||||
|
|
||||||
|
platform_type GCI GCI_BASE
|
||||||
|
|
||||||
|
processor gci-thinker AIGCI-thinker
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
end_platform_type
|
||||||
|
|
||||||
195
platforms/iads_cmdr.txt
Normal file
195
platforms/iads_cmdr.txt
Normal file
@@ -0,0 +1,195 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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 ****** *
|
||||||
|
# * * ************************************** * *
|
||||||
|
|
||||||
|
processor IADS_CMDR_DATA_MGR WSF_TRACK_PROCESSOR
|
||||||
|
purge_interval 60 sec
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
processor IADS_CMDR_TASK_MGR WSF_TASK_PROCESSOR
|
||||||
|
number_of_servers 5
|
||||||
|
|
||||||
|
track_update_interval 10.0 sec
|
||||||
|
|
||||||
|
#script_debug_writes true
|
||||||
|
#show_state_transitions
|
||||||
|
#show_task_messages
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
int MAX_SAMS_PER_TARGET = 2;
|
||||||
|
int MAX_ASSIGNMENTS_PER_SAM = 4;
|
||||||
|
string WEAPON_NAME = "sam";
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
// determine if TRACK is assignable
|
||||||
|
script bool IsAssignable()
|
||||||
|
if ((! TRACK.IFF_Friend()) &&
|
||||||
|
(TRACK.TimeSinceUpdated() < 30.0))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
// determine if the subordinate and/or his subordinates have weapons remaining
|
||||||
|
script bool WeaponsAvailable(WsfPlatform aAssignee)
|
||||||
|
bool weaponsAvailable = false;
|
||||||
|
|
||||||
|
int quantity = 0;
|
||||||
|
WsfWeapon weapon = aAssignee.Weapon(WEAPON_NAME);
|
||||||
|
if (weapon.IsTurnedOn())
|
||||||
|
{
|
||||||
|
quantity = quantity + weapon.QuantityRemaining();
|
||||||
|
}
|
||||||
|
if (quantity > 0)
|
||||||
|
{
|
||||||
|
weaponsAvailable = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach (WsfPlatform sub in aAssignee.Subordinates())
|
||||||
|
{
|
||||||
|
weapon = sub.Weapon(WEAPON_NAME);
|
||||||
|
if (weapon.IsTurnedOn())
|
||||||
|
{
|
||||||
|
quantity = quantity + weapon.QuantityRemaining();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (quantity > 0) weaponsAvailable = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return weaponsAvailable;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
script void MakeAssignments()
|
||||||
|
Array<WsfPlatform> filter = Array<WsfPlatform>();
|
||||||
|
foreach (WsfPlatform sub in PLATFORM.Subordinates())
|
||||||
|
{
|
||||||
|
if (sub.Type() == "LARGE_SAM_BATTALION")
|
||||||
|
{
|
||||||
|
if (WeaponsAvailable(sub) &&
|
||||||
|
(TasksAssignedTo(sub) < MAX_ASSIGNMENTS_PER_SAM) &&
|
||||||
|
(TasksAssignedTo(sub, TRACK.TrackId()) < 1) &&
|
||||||
|
(TRACK.WithinZoneOf(sub, "battalion_sector")))
|
||||||
|
{
|
||||||
|
writeln_d("*** Adding ", sub.Name(), " to filter");
|
||||||
|
filter.PushBack(sub);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int i;
|
||||||
|
int numAssignments = (int)MATH.Min(filter.Size(), MAX_SAMS_PER_TARGET);
|
||||||
|
for (int i=0; i < numAssignments; i = i + 1)
|
||||||
|
{
|
||||||
|
AssignTask(TRACK, "ENGAGE", filter[i]);
|
||||||
|
}
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
evaluation_interval DETECTED 10.0 sec
|
||||||
|
time_to_evaluate DETECTED 5.0 secs
|
||||||
|
state DETECTED
|
||||||
|
next_state ASSIGNED
|
||||||
|
if (! IsAssignable()) return false;
|
||||||
|
|
||||||
|
MakeAssignments();
|
||||||
|
return true;
|
||||||
|
end_next_state
|
||||||
|
end_state
|
||||||
|
|
||||||
|
evaluation_interval ASSIGNED 10.0 sec
|
||||||
|
time_to_evaluate ASSIGNED 1.0 secs
|
||||||
|
state ASSIGNED
|
||||||
|
next_state DETECTED
|
||||||
|
if (! IsAssignable())
|
||||||
|
{
|
||||||
|
CancelTask(TRACK.TrackId());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
MakeAssignments();
|
||||||
|
return false;
|
||||||
|
end_next_state
|
||||||
|
end_state
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
|
||||||
|
platform_type IADS_CMDR WSF_PLATFORM
|
||||||
|
icon C4I
|
||||||
|
|
||||||
|
infrared_signature VEHICLE_INFRARED_SIGNATURE
|
||||||
|
optical_signature VEHICLE_OPTICAL_SIGNATURE
|
||||||
|
radar_signature VEHICLE_RADAR_SIGNATURE
|
||||||
|
|
||||||
|
comm sub_net RED_DATALINK
|
||||||
|
network_name <local:master>
|
||||||
|
internal_link data_mgr
|
||||||
|
internal_link task_mgr
|
||||||
|
end_comm
|
||||||
|
|
||||||
|
processor data_mgr IADS_CMDR_DATA_MGR
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
processor task_mgr IADS_CMDR_TASK_MGR
|
||||||
|
operating_level ENGAGE 1
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
include processors/commander_track_manager$(TRACKER_TYPE).txt
|
||||||
|
|
||||||
|
/*
|
||||||
|
# ---------------------------------------------
|
||||||
|
# Draw track to false targets and real targets
|
||||||
|
# ---------------------------------------------
|
||||||
|
script_variables
|
||||||
|
# Create a WsfDraw object.
|
||||||
|
WsfDraw draw = WsfDraw();
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
execute at_interval_of 10.0 s
|
||||||
|
foreach (WsfTrack track in MasterTrackList())
|
||||||
|
{
|
||||||
|
if (track.IsValid())
|
||||||
|
{
|
||||||
|
# use the track ID as a unique draw ID
|
||||||
|
# a track icon and a line to the track icon
|
||||||
|
# is drawn at each track update
|
||||||
|
string trackId = track.TrackId().ToString();
|
||||||
|
draw.SetId(trackId);
|
||||||
|
draw.SetDuration(10.0); # this is faster than calling erase every time
|
||||||
|
|
||||||
|
if (track.IsFalseTarget())
|
||||||
|
{
|
||||||
|
draw.SetColor(0,1,0);
|
||||||
|
draw.BeginIcons(track.Heading(), "Wedge");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
draw.SetColor(0,0,1);
|
||||||
|
draw.BeginIcons(track.Heading(), "Wedge");
|
||||||
|
}
|
||||||
|
draw.Vertex(track.CurrentLocation());
|
||||||
|
draw.End();
|
||||||
|
|
||||||
|
# Draw a line to the track
|
||||||
|
draw.SetLineStyle("dashed");
|
||||||
|
draw.BeginLines();
|
||||||
|
draw.Vertex(PLATFORM);
|
||||||
|
draw.Vertex(track.CurrentLocation());
|
||||||
|
draw.End();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end_execute
|
||||||
|
*/
|
||||||
|
end_platform_type
|
||||||
160
platforms/large_sam_battalion.txt
Normal file
160
platforms/large_sam_battalion.txt
Normal file
@@ -0,0 +1,160 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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 ****** *
|
||||||
|
# * * ************************************** * *
|
||||||
|
|
||||||
|
include_once processors/red_sam_battery_tactics.txt
|
||||||
|
include_once platforms/large_sam_ttr.txt
|
||||||
|
include_once platforms/large_sam_launcher.txt
|
||||||
|
|
||||||
|
processor LARGE_SAM_BATTALION_TASK_MGR RED_SAM_BATTERY_TASK_MGR
|
||||||
|
number_of_servers 2
|
||||||
|
|
||||||
|
#script_debug_writes on
|
||||||
|
#show_state_transitions
|
||||||
|
#show_task_messages
|
||||||
|
|
||||||
|
on_initialize
|
||||||
|
SENSOR_NAME = "ttr";
|
||||||
|
REQUIRED_TRACK_QUALITY = 0.75;
|
||||||
|
SENSOR_ACQUIRE_MODE = "ACQUIRE";
|
||||||
|
SENSOR_TRACK_MODE = "TRACK";
|
||||||
|
WEAPON_NAME = "sam";
|
||||||
|
ENVELOPE = "full_kinematic";
|
||||||
|
SALVO_SIZE = 2;
|
||||||
|
end_on_initialize
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// on task assign / cancel, command the acquisition radar to emcon-on and
|
||||||
|
// emcon-off, respectively
|
||||||
|
script void EvaluateOperatingLevel()
|
||||||
|
if ((TasksReceived() > 0) ||
|
||||||
|
(OperatingLevelFor("ENGAGE") > 0))
|
||||||
|
{
|
||||||
|
foreach (WsfPlatform sub in PLATFORM.Subordinates())
|
||||||
|
{
|
||||||
|
string subType = sub.Type();
|
||||||
|
if (subType == "ACQ_RADAR")
|
||||||
|
{
|
||||||
|
if (OperatingLevelFor("ENGAGE", sub) < 1)
|
||||||
|
{
|
||||||
|
ChangeOperatingLevel("ENGAGE", 1, sub);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach (WsfPlatform sub in PLATFORM.Subordinates())
|
||||||
|
{
|
||||||
|
string subType = sub.Type();
|
||||||
|
if (subType == "ACQ_RADAR")
|
||||||
|
{
|
||||||
|
if (OperatingLevelFor("ENGAGE", sub) > 0)
|
||||||
|
{
|
||||||
|
ChangeOperatingLevel("ENGAGE", 0, sub);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end_script
|
||||||
|
|
||||||
|
script void on_task_assign(WsfTask aTask, WsfTrack aTrack)
|
||||||
|
EvaluateOperatingLevel();
|
||||||
|
end_script
|
||||||
|
|
||||||
|
script void on_task_cancel(WsfTask aTask)
|
||||||
|
EvaluateOperatingLevel();
|
||||||
|
end_script
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
platform_type LARGE_SAM_BATTALION WSF_PLATFORM
|
||||||
|
icon TWIN_BOX
|
||||||
|
category ENGAGEMENT
|
||||||
|
|
||||||
|
infrared_signature VEHICLE_INFRARED_SIGNATURE
|
||||||
|
optical_signature VEHICLE_OPTICAL_SIGNATURE
|
||||||
|
radar_signature VEHICLE_RADAR_SIGNATURE
|
||||||
|
|
||||||
|
include processors/commander_track_manager$(TRACKER_TYPE).txt
|
||||||
|
|
||||||
|
comm cmdr_net RED_DATALINK
|
||||||
|
network_name <local:slave>
|
||||||
|
internal_link data_mgr
|
||||||
|
internal_link task_mgr
|
||||||
|
end_comm
|
||||||
|
|
||||||
|
comm sub_net RED_DATALINK
|
||||||
|
network_name <local:master>
|
||||||
|
internal_link data_mgr
|
||||||
|
internal_link task_mgr
|
||||||
|
end_comm
|
||||||
|
|
||||||
|
zone full_kinematic
|
||||||
|
circular
|
||||||
|
maximum_altitude 30 km
|
||||||
|
maximum_radius 25 nm
|
||||||
|
end_zone
|
||||||
|
|
||||||
|
processor data_mgr WSF_TRACK_PROCESSOR
|
||||||
|
purge_interval 30 seconds
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
processor task_mgr LARGE_SAM_BATTALION_TASK_MGR
|
||||||
|
end_processor
|
||||||
|
/*
|
||||||
|
# ---------------------------------------------
|
||||||
|
# Draw track to false targets and real targets
|
||||||
|
# ---------------------------------------------
|
||||||
|
script_variables
|
||||||
|
# Create a WsfDraw object.
|
||||||
|
WsfDraw draw = WsfDraw();
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
execute at_interval_of 1.0 s
|
||||||
|
foreach (WsfLocalTrack track in MasterTrackList())
|
||||||
|
{
|
||||||
|
if (track.IsValid() && track.SensorTypeContributor("TTR_RADAR"))
|
||||||
|
{
|
||||||
|
# use the track ID as a unique draw ID
|
||||||
|
# a track icon and a line to the track icon
|
||||||
|
# is drawn at each track update
|
||||||
|
string trackId = track.TrackId().ToString();
|
||||||
|
draw.SetId(trackId);
|
||||||
|
draw.SetDuration(1.0); # this is faster than calling erase every time
|
||||||
|
|
||||||
|
if (track.IsFalseTarget())
|
||||||
|
{
|
||||||
|
draw.SetColor(0,1,0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
draw.SetColor(1,0,0);
|
||||||
|
|
||||||
|
}
|
||||||
|
draw.BeginIcons(track.Heading(), "Wedge");
|
||||||
|
draw.Vertex(track.ReportedLocation());
|
||||||
|
draw.End();
|
||||||
|
|
||||||
|
# Draw a line to the track
|
||||||
|
draw.SetLineStyle("dashed");
|
||||||
|
draw.BeginLines();
|
||||||
|
draw.Vertex(PLATFORM);
|
||||||
|
draw.Vertex(track.ReportedLocation());
|
||||||
|
draw.End();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end_execute
|
||||||
|
*/
|
||||||
|
end_platform_type
|
||||||
35
platforms/large_sam_launcher.txt
Normal file
35
platforms/large_sam_launcher.txt
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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 ****** *
|
||||||
|
# * * ************************************** * *
|
||||||
|
|
||||||
|
include_once weapons/sam/large_sam.txt
|
||||||
|
|
||||||
|
platform_type LARGE_SAM_LAUNCHER WSF_PLATFORM
|
||||||
|
icon SA-10_Launcher
|
||||||
|
|
||||||
|
comm cmdr_net RED_DATALINK
|
||||||
|
network_name <local:slave>
|
||||||
|
internal_link data_mgr
|
||||||
|
internal_link task_mgr
|
||||||
|
end_comm
|
||||||
|
|
||||||
|
processor data_mgr WSF_TRACK_PROCESSOR
|
||||||
|
purge_interval 60 sec
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
processor task_mgr WSF_TASK_PROCESSOR
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
weapon sam LARGE_SAM
|
||||||
|
quantity 4
|
||||||
|
end_weapon
|
||||||
|
end_platform_type
|
||||||
42
platforms/large_sam_ttr.txt
Normal file
42
platforms/large_sam_ttr.txt
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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 ****** *
|
||||||
|
# * * ************************************** * *
|
||||||
|
|
||||||
|
include_once sensors/radar/ttr_radar.txt
|
||||||
|
|
||||||
|
platform_type LARGE_SAM_TTR WSF_PLATFORM
|
||||||
|
icon flaplid_radar_maz
|
||||||
|
category FIRE_CONTROL
|
||||||
|
|
||||||
|
comm datalink RED_DATALINK
|
||||||
|
network_name <local:slave>
|
||||||
|
internal_link task_mgr
|
||||||
|
end_comm
|
||||||
|
|
||||||
|
sensor ttr TTR_RADAR
|
||||||
|
off
|
||||||
|
internal_link data_mgr
|
||||||
|
ignore_same_side
|
||||||
|
end_sensor
|
||||||
|
|
||||||
|
processor data_mgr WSF_LINKED_PROCESSOR
|
||||||
|
report_to commander via datalink to sub_net
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
processor task_mgr WSF_TASK_PROCESSOR
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
aux_data
|
||||||
|
double max_range = 64820 # meters = 35 nm
|
||||||
|
double pk = .7
|
||||||
|
end_aux_data
|
||||||
|
end_platform_type
|
||||||
17
platforms/radar_players.txt
Normal file
17
platforms/radar_players.txt
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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 ****** *
|
||||||
|
# * * ************************************** * *
|
||||||
|
|
||||||
|
include_once platforms/red_radar.txt
|
||||||
|
|
||||||
|
include_once platforms/ew_radar.txt
|
||||||
|
include_once platforms/acq_radar.txt
|
||||||
61
platforms/red_adv_fighter_1_base.txt
Normal file
61
platforms/red_adv_fighter_1_base.txt
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
include_once ../weapons/aam/simple_a2a_missile.txt
|
||||||
|
|
||||||
|
|
||||||
|
#all guesses in this platform type definition are simply scaled up values from other known jets
|
||||||
|
|
||||||
|
platform_type RED_ADV_FIGHTER_1_BASE WSF_PLATFORM
|
||||||
|
|
||||||
|
icon F-22
|
||||||
|
category fighter
|
||||||
|
|
||||||
|
mover WSF_AIR_MOVER
|
||||||
|
|
||||||
|
# WAGs - Luke Miklos
|
||||||
|
roll_rate_limit 1.4 rad/sec
|
||||||
|
default_linear_acceleration 1.2 g
|
||||||
|
default_radial_acceleration 7.0 g
|
||||||
|
default_climb_rate 500 fps
|
||||||
|
|
||||||
|
# Mach 2.0 at altitude, WAG - Luke Miklos
|
||||||
|
maximum_speed 1288.6 knots
|
||||||
|
|
||||||
|
# Ceiling, WAG - Luke Miklos
|
||||||
|
maximum_altitude 60000 ft
|
||||||
|
minimum_altitude 50 ft
|
||||||
|
|
||||||
|
# g limit, WAG - Luke Miklos
|
||||||
|
maximum_linear_acceleration 10 g
|
||||||
|
|
||||||
|
#no_pitch
|
||||||
|
at_end_of_path extrapolate
|
||||||
|
|
||||||
|
end_mover
|
||||||
|
|
||||||
|
fuel WSF_VARIABLE_RATE_FUEL
|
||||||
|
rate 7.0 lb/s
|
||||||
|
initial_quantity 14000 lb
|
||||||
|
maximum_quantity 14000 lb
|
||||||
|
end_fuel
|
||||||
|
|
||||||
|
|
||||||
|
processor track_manager WSF_TRACK_PROCESSOR
|
||||||
|
//debug
|
||||||
|
purge_interval 60 sec
|
||||||
|
update_interval 1 sec
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
|
||||||
|
weapon int_missile SIMPLE_A2A_MISSILE_WEAPON end_weapon
|
||||||
|
|
||||||
|
|
||||||
|
end_platform_type
|
||||||
16
platforms/red_adv_fighter_1_noripr.txt
Normal file
16
platforms/red_adv_fighter_1_noripr.txt
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
#for RED_ADV_FIGHTER_1
|
||||||
|
include_once red_adv_fighter_1_base.txt
|
||||||
|
|
||||||
|
|
||||||
|
platform_type RED_ADV_FIGHTER_1 RED_ADV_FIGHTER_1_BASE
|
||||||
|
//nothing new for now
|
||||||
|
end_platform_type
|
||||||
106
platforms/red_adv_fighter_1_ripr.txt
Normal file
106
platforms/red_adv_fighter_1_ripr.txt
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
#for RED_ADV_FIGHTER_1
|
||||||
|
include_once red_adv_fighter_1_base.txt
|
||||||
|
|
||||||
|
#for AIAI-thinker
|
||||||
|
include_once processors/ripr_agents/aiai/aiai_processor.txt
|
||||||
|
|
||||||
|
#for red_mr_a2a_rf_missile
|
||||||
|
include_once weapons/aam/red_mr_a2a_rf_missile.txt
|
||||||
|
|
||||||
|
include_once weapons/aam/simple_blue_lr_a2a_rf_missile.txt
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
platform_type RED_ADV_FIGHTER_1 RED_ADV_FIGHTER_1_BASE
|
||||||
|
|
||||||
|
//use a different missile for this type
|
||||||
|
//adjust missile ranges in int-thinker below to accomodate
|
||||||
|
delete weapon int_missile
|
||||||
|
|
||||||
|
#weapon int_missile RED_MR_A2A_RF_MISSILE end_weapon # ~45 nm range
|
||||||
|
|
||||||
|
weapon blue_lr_a2a_rf_missile SIMPLE_BLUE_LR_A2A_RF_MISSILE end_weapon # ~60 nm range
|
||||||
|
edit weapon blue_lr_a2a_rf_missile
|
||||||
|
quantity 8
|
||||||
|
end_weapon
|
||||||
|
|
||||||
|
//This is the code that lets the interceptor intercept
|
||||||
|
processor int-thinker AIAI-thinker
|
||||||
|
script_variables
|
||||||
|
#agentProductions must be relative to working directory of application
|
||||||
|
#this file usually sits in scenario_name/platforms folder
|
||||||
|
#working directory is typically the scenario folder
|
||||||
|
#agentProductions = "../ripr/agents/aiai/RIPR-AIAI.soar";
|
||||||
|
|
||||||
|
#mWeaponArray[0] = Map<string, Object>();
|
||||||
|
#mWeaponArray[0].Set("name", "int_missile");
|
||||||
|
#mWeaponArray[0].Set("weapon", PLATFORM.Weapon("int_missile"));
|
||||||
|
#mWeaponArray[0].Set("rangeMin", 5556);
|
||||||
|
#mWeaponArray[0].Set("rangeMax", 83340);
|
||||||
|
#mWeaponArray[0].Set("numActiveMax", 2); // how many weapons of this type can be in play simultaneously
|
||||||
|
|
||||||
|
mWeaponArray[0] = Map<string, Object>();
|
||||||
|
mWeaponArray[0].Set("name", "blue_lr_a2a_rf_missile");
|
||||||
|
mWeaponArray[0].Set("weapon", PLATFORM.Weapon("blue_lr_a2a_rf_missile"));
|
||||||
|
mWeaponArray[0].Set("rangeMin", 1000);
|
||||||
|
mWeaponArray[0].Set("rangeMax", 111120); // ~60 miles
|
||||||
|
mWeaponArray[0].Set("numActiveMax", 2); // how many weapons of this type can be in play simultaneously
|
||||||
|
|
||||||
|
end_script_variables
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
sensor geo_sensor WSF_GEOMETRIC_SENSOR
|
||||||
|
//azimuth_field_of_view -180.0 degrees 180.0 degrees
|
||||||
|
//elevation_field_of_view -90.0 degrees 90.0 degrees
|
||||||
|
azimuth_field_of_view -60.0 degrees 60.0 degrees
|
||||||
|
elevation_field_of_view -30.0 degrees 30.0 degrees
|
||||||
|
minimum_range 0 m
|
||||||
|
# maximum_range 100000 m
|
||||||
|
maximum_range 63000 m
|
||||||
|
on
|
||||||
|
frame_time 0.5 sec
|
||||||
|
reports_location
|
||||||
|
reports_velocity
|
||||||
|
reports_iff
|
||||||
|
track_quality 1.0
|
||||||
|
ignore_same_side
|
||||||
|
internal_link track_manager
|
||||||
|
end_sensor
|
||||||
|
|
||||||
|
processor incoming_threats WSF_THREAT_PROCESSOR
|
||||||
|
update_interval 0.1 sec
|
||||||
|
#update_interval 2.0 sec
|
||||||
|
|
||||||
|
#1300 knots
|
||||||
|
threat_velocity 668.7778 m/s
|
||||||
|
|
||||||
|
threat_angle_spread 15.0 deg
|
||||||
|
threat_time_to_intercept 240 sec
|
||||||
|
|
||||||
|
script void identified_new_threat(WsfTrack aTrack)
|
||||||
|
writeln("!!! me: ", PLATFORM.Name(), ", new threat: ", aTrack.TargetName());
|
||||||
|
end_script
|
||||||
|
|
||||||
|
script void dropped_threat(WsfTrack aTrack)
|
||||||
|
if (aTrack.IsValid())
|
||||||
|
{
|
||||||
|
writeln("!!! ", PLATFORM.Name(), " dropped a threat: ", aTrack.TargetName());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
writeln("!!! ", PLATFORM.Name(), " dropped a threat");
|
||||||
|
}
|
||||||
|
end_script
|
||||||
|
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
end_platform_type
|
||||||
58
platforms/red_fighter_1_base.txt
Normal file
58
platforms/red_fighter_1_base.txt
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
include_once ../weapons/aam/simple_a2a_missile.txt
|
||||||
|
|
||||||
|
|
||||||
|
platform_type RED_FIGHTER_1_BASE WSF_PLATFORM
|
||||||
|
|
||||||
|
icon SU-27
|
||||||
|
category fighter
|
||||||
|
|
||||||
|
mover WSF_AIR_MOVER
|
||||||
|
|
||||||
|
roll_rate_limit 1 rad/sec
|
||||||
|
default_linear_acceleration 1.0 g
|
||||||
|
default_radial_acceleration 6.5 g
|
||||||
|
default_climb_rate 400 fps
|
||||||
|
|
||||||
|
# Mach 1.85 (1192.0 kts) at altitude, Janes Reference
|
||||||
|
maximum_speed 1192.0 knots
|
||||||
|
|
||||||
|
# Ceiling, Janes Reference
|
||||||
|
maximum_altitude 59000 ft
|
||||||
|
minimum_altitude 50 ft
|
||||||
|
|
||||||
|
# g limit, Janes Reference
|
||||||
|
maximum_linear_acceleration 9 g
|
||||||
|
|
||||||
|
#no_pitch
|
||||||
|
at_end_of_path extrapolate
|
||||||
|
|
||||||
|
end_mover
|
||||||
|
|
||||||
|
fuel WSF_VARIABLE_RATE_FUEL
|
||||||
|
rate 7.0 lb/s
|
||||||
|
initial_quantity 19842 lb
|
||||||
|
#max internal fuel + max external stores load, Janes reference
|
||||||
|
#(4500 internal + 4500 external = 9000 kg)
|
||||||
|
maximum_quantity 19842 lb
|
||||||
|
end_fuel
|
||||||
|
|
||||||
|
|
||||||
|
processor track_manager WSF_TRACK_PROCESSOR
|
||||||
|
//debug
|
||||||
|
purge_interval 60 sec
|
||||||
|
update_interval 1 sec
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
weapon int_missile SIMPLE_A2A_MISSILE_WEAPON end_weapon
|
||||||
|
|
||||||
|
end_platform_type
|
||||||
16
platforms/red_fighter_1_noripr.txt
Normal file
16
platforms/red_fighter_1_noripr.txt
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
#for RED_FIGHTER_1
|
||||||
|
include_once red_fighter_1_base.txt
|
||||||
|
|
||||||
|
|
||||||
|
platform_type RED_FIGHTER_1 RED_FIGHTER_1_BASE
|
||||||
|
//nothing new for now
|
||||||
|
end_platform_type
|
||||||
82
platforms/red_fighter_1_ripr.txt
Normal file
82
platforms/red_fighter_1_ripr.txt
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
#for RED_FIGHTER_1
|
||||||
|
include_once red_fighter_1_base.txt
|
||||||
|
|
||||||
|
#for AIAI-thinker
|
||||||
|
include_once processors/ripr_agents/aiai/aiai_processor.txt
|
||||||
|
|
||||||
|
#for red_mr_a2a_rf_missile
|
||||||
|
include_once weapons/aam/red_mr_a2a_rf_missile.txt
|
||||||
|
|
||||||
|
|
||||||
|
platform_type RED_FIGHTER_1 RED_FIGHTER_1_BASE
|
||||||
|
|
||||||
|
//use a different missile for this type
|
||||||
|
//adjust missile ranges in int-thinker below to accomodate
|
||||||
|
delete weapon int_missile
|
||||||
|
weapon int_missile RED_MR_A2A_RF_MISSILE end_weapon
|
||||||
|
|
||||||
|
//This is the code that lets the interceptor intercept
|
||||||
|
processor int-thinker AIAI-thinker
|
||||||
|
script_variables
|
||||||
|
mWeaponArray[0] = Map<string, Object>();
|
||||||
|
mWeaponArray[0].Set("name", "int_missile");
|
||||||
|
mWeaponArray[0].Set("weapon", PLATFORM.Weapon("int_missile"));
|
||||||
|
mWeaponArray[0].Set("rangeMin", 5556);
|
||||||
|
mWeaponArray[0].Set("rangeMax", 83340);
|
||||||
|
mWeaponArray[0].Set("numActiveMax", 2); // how many weapons of this type can be in play simultaneously
|
||||||
|
end_script_variables
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
sensor geo_sensor WSF_GEOMETRIC_SENSOR
|
||||||
|
//azimuth_field_of_view -180.0 degrees 180.0 degrees
|
||||||
|
//elevation_field_of_view -90.0 degrees 90.0 degrees
|
||||||
|
azimuth_field_of_view -60.0 degrees 60.0 degrees
|
||||||
|
elevation_field_of_view -30.0 degrees 30.0 degrees
|
||||||
|
minimum_range 0 m
|
||||||
|
# maximum_range 100000 m
|
||||||
|
maximum_range 63000 m
|
||||||
|
on
|
||||||
|
frame_time 0.5 sec
|
||||||
|
reports_location
|
||||||
|
reports_velocity
|
||||||
|
reports_iff
|
||||||
|
track_quality 1.0
|
||||||
|
ignore_same_side
|
||||||
|
internal_link track_manager
|
||||||
|
end_sensor
|
||||||
|
|
||||||
|
processor incoming_threats WSF_THREAT_PROCESSOR
|
||||||
|
update_interval 0.1 sec
|
||||||
|
#update_interval 2.0 sec
|
||||||
|
|
||||||
|
#1300 knots
|
||||||
|
threat_velocity 668.7778 m/s
|
||||||
|
threat_angle_spread 13.0 deg
|
||||||
|
threat_time_to_intercept 240 sec
|
||||||
|
|
||||||
|
script void identified_new_threat(WsfTrack aTrack)
|
||||||
|
writeln("!!! me: ", PLATFORM.Name(), ", new threat: ", aTrack.TargetName());
|
||||||
|
end_script
|
||||||
|
|
||||||
|
script void dropped_threat(WsfTrack aTrack)
|
||||||
|
if (aTrack.IsValid())
|
||||||
|
{
|
||||||
|
writeln("!!! ", PLATFORM.Name(), " dropped a threat: ", aTrack.TargetName());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
writeln("!!! ", PLATFORM.Name(), " dropped a threat");
|
||||||
|
}
|
||||||
|
end_script
|
||||||
|
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
end_platform_type
|
||||||
129
platforms/red_multirole_fighter_2_base.txt
Normal file
129
platforms/red_multirole_fighter_2_base.txt
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
//include_once ../sensors/red_esm.txt
|
||||||
|
//include_once ../sensors/rwr_esm.txt
|
||||||
|
//include_once ../weapons/x_jammer_red.txt
|
||||||
|
|
||||||
|
include_once ../sensors/radar/red_a2a_radar.txt
|
||||||
|
|
||||||
|
include_once ../weapons/aam/simple_a2a_missile.txt
|
||||||
|
|
||||||
|
|
||||||
|
platform_type RED_MULTIROLE_FIGHTER_2_BASE WSF_PLATFORM
|
||||||
|
|
||||||
|
icon SU-27
|
||||||
|
category fighter
|
||||||
|
|
||||||
|
mover WSF_AIR_MOVER
|
||||||
|
roll_rate_limit 1 rad/sec
|
||||||
|
default_linear_acceleration 1.0 g
|
||||||
|
default_radial_acceleration 6.0 g
|
||||||
|
default_climb_rate 400 fps
|
||||||
|
maximum_speed 850.0 knots
|
||||||
|
maximum_altitude 50000 ft
|
||||||
|
minimum_altitude 50 ft
|
||||||
|
maximum_linear_acceleration 8 g
|
||||||
|
at_end_of_path extrapolate
|
||||||
|
end_mover
|
||||||
|
|
||||||
|
|
||||||
|
processor track_manager WSF_TRACK_PROCESSOR
|
||||||
|
//debug
|
||||||
|
purge_interval 60 sec
|
||||||
|
update_interval 1 sec
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
sensor red_multirole_fighter_2_radar RED_A2A_RADAR
|
||||||
|
on
|
||||||
|
processor track_manager
|
||||||
|
ignore_same_side
|
||||||
|
end_sensor
|
||||||
|
|
||||||
|
// sensor red_esm RED_ESM
|
||||||
|
// processor track_manager
|
||||||
|
// end_sensor
|
||||||
|
// sensor rwr_esm RWR_ESM
|
||||||
|
// processor track_manager
|
||||||
|
// end_sensor
|
||||||
|
|
||||||
|
|
||||||
|
weapon int_missile SIMPLE_A2A_MISSILE_WEAPON end_weapon
|
||||||
|
|
||||||
|
// weapon disrupt1 X_JAMMER_RED
|
||||||
|
// on
|
||||||
|
// end_weapon
|
||||||
|
|
||||||
|
|
||||||
|
fuel WSF_FUEL
|
||||||
|
//maximum_quantity 6531 kg
|
||||||
|
//10,000 lbs is about 4536 kg
|
||||||
|
maximum_quantity 4536 kg
|
||||||
|
//initial_quantity 6000 kg
|
||||||
|
initial_quantity 4500 kg
|
||||||
|
consumption_rate 1 kg/sec
|
||||||
|
bingo_quantity 1500 kg
|
||||||
|
on_bingo
|
||||||
|
writeln_d ("!!! ", PLATFORM.Name(), " on_bingo fuel");
|
||||||
|
end_on_bingo
|
||||||
|
on_empty
|
||||||
|
writeln_d ("!!! ", PLATFORM.Name(), " on_empty fuel");
|
||||||
|
end_on_empty
|
||||||
|
end_fuel
|
||||||
|
|
||||||
|
end_platform_type
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#object RED_MULTIROLE_FIGHTER_2 {
|
||||||
|
# name "RED_MULTIROLE_FIGHTER_2 %d"
|
||||||
|
# team red
|
||||||
|
# icon "su_27"
|
||||||
|
# opponent_icon "su_27"
|
||||||
|
# //opponent_icon "CH_53"
|
||||||
|
# sensors (RED_A2A_RADAR RED_ESM RWR_ESM)
|
||||||
|
# tactics military_tactics
|
||||||
|
# dynamics powered_dynamics
|
||||||
|
# aero_model (
|
||||||
|
# linear_accel 1.0 G
|
||||||
|
# radial_accel 6.0 G
|
||||||
|
# climb_rate 400.0 fps
|
||||||
|
# max_speed 850.0 knots
|
||||||
|
# max_alt 50000 ft
|
||||||
|
# min_alt 50 ft
|
||||||
|
# fuel_table ( 76 (115 1.37 pps
|
||||||
|
# 150 1.59 pps
|
||||||
|
# 301 6.76 pps
|
||||||
|
# 321 23.4 pps)
|
||||||
|
# 5473 (143 1.24 pps
|
||||||
|
# 187 1.44 pps
|
||||||
|
# 293 4.65 pps
|
||||||
|
# 318 16.50 pps)
|
||||||
|
# 10671 (206 1.20 pps
|
||||||
|
# 236 1.27 pps
|
||||||
|
# 271 2.13 pps
|
||||||
|
# 295 7.37 pps))
|
||||||
|
# max_speed_table ( 76 321
|
||||||
|
# 4573 318
|
||||||
|
# 10671 295)
|
||||||
|
# fuel 10000 lb
|
||||||
|
# )
|
||||||
|
# launch_to_alt 32000 ft
|
||||||
|
# launch_to_speed 500 knots
|
||||||
|
# net off
|
||||||
|
#x ir_signature (1.0 1.2 1.6 1.8 2.0 2.0 2.0 2.0 2.0 2.0 1.9 1.8
|
||||||
|
#x 1.7 1.9 2.0 2.0 2.0 2.0 2.0 2.0 2.0 1.8 1.6 1.2)
|
||||||
|
# rcs3d FTR_RCS
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
#
|
||||||
16
platforms/red_multirole_fighter_2_noripr.txt
Normal file
16
platforms/red_multirole_fighter_2_noripr.txt
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
|
||||||
|
#for RED_MULTIROLE_FIGHTER_2
|
||||||
|
include_once red_multirole_fighter_2_base.txt
|
||||||
|
|
||||||
|
|
||||||
|
platform_type RED_MULTIROLE_FIGHTER_2 RED_MULTIROLE_FIGHTER_2_BASE
|
||||||
|
//nothing new for now
|
||||||
|
end_platform_type
|
||||||
99
platforms/red_multirole_fighter_2_ripr.txt
Normal file
99
platforms/red_multirole_fighter_2_ripr.txt
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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.
|
||||||
|
# ****************************************************************************
|
||||||
|
#for RED_MULTIROLE_FIGHTER_2
|
||||||
|
include_once red_multirole_fighter_2_base.txt
|
||||||
|
|
||||||
|
#for AIAI-thinker
|
||||||
|
include_once processors/ripr_agents/aiai/aiai_processor.txt
|
||||||
|
|
||||||
|
#for red_mr_a2a_rf_missile
|
||||||
|
include_once weapons/aam/red_mr_a2a_rf_missile.txt
|
||||||
|
|
||||||
|
script_interface
|
||||||
|
//debug
|
||||||
|
end_script_interface
|
||||||
|
|
||||||
|
|
||||||
|
// This is a ripr interceptor, based on red_multirole_fighter_2.
|
||||||
|
platform_type RED_MULTIROLE_FIGHTER_2 RED_MULTIROLE_FIGHTER_2_BASE
|
||||||
|
|
||||||
|
//use a different missile for this type
|
||||||
|
//adjust missile ranges in int-thinker below to accomodate
|
||||||
|
delete weapon int_missile
|
||||||
|
weapon int_missile RED_MR_A2A_RF_MISSILE end_weapon
|
||||||
|
|
||||||
|
//This is the code that lets the interceptor intercept
|
||||||
|
processor int-thinker AIAI-thinker
|
||||||
|
script_variables
|
||||||
|
#agentProductions must be relative to working directory of application
|
||||||
|
#this file usually sits in scenario_name/platforms folder
|
||||||
|
#working directory is typically the scenario folder
|
||||||
|
#agentProductions = "../ripr/agents/aiai/RIPR-AIAI.soar";
|
||||||
|
|
||||||
|
mWeaponArray[0] = Map<string, Object>();
|
||||||
|
mWeaponArray[0].Set("name", "int_missile");
|
||||||
|
mWeaponArray[0].Set("weapon", PLATFORM.Weapon("int_missile"));
|
||||||
|
mWeaponArray[0].Set("rangeMin", 5556);
|
||||||
|
mWeaponArray[0].Set("rangeMax", 83340);
|
||||||
|
mWeaponArray[0].Set("numActiveMax", 2); // how many weapons of this type can be in play simultaneously
|
||||||
|
end_script_variables
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//don't mess around with crappy radars, just use a simple geometric sensor
|
||||||
|
delete sensor red_a2a_radar
|
||||||
|
|
||||||
|
sensor geo_sensor WSF_GEOMETRIC_SENSOR
|
||||||
|
//azimuth_field_of_view -180.0 degrees 180.0 degrees
|
||||||
|
//elevation_field_of_view -90.0 degrees 90.0 degrees
|
||||||
|
azimuth_field_of_view -60.0 degrees 60.0 degrees
|
||||||
|
elevation_field_of_view -30.0 degrees 30.0 degrees
|
||||||
|
minimum_range 0 m
|
||||||
|
# maximum_range 100000 m
|
||||||
|
maximum_range 63000 m
|
||||||
|
on
|
||||||
|
frame_time 0.5 sec
|
||||||
|
reports_location
|
||||||
|
reports_velocity
|
||||||
|
reports_iff
|
||||||
|
track_quality 1.0
|
||||||
|
ignore_same_side
|
||||||
|
internal_link track_manager
|
||||||
|
end_sensor
|
||||||
|
|
||||||
|
|
||||||
|
processor incoming_threats WSF_THREAT_PROCESSOR
|
||||||
|
update_interval 0.1 sec
|
||||||
|
#update_interval 2.0 sec
|
||||||
|
|
||||||
|
#1300 knots
|
||||||
|
threat_velocity 668.7778 m/s
|
||||||
|
threat_angle_spread 10.0 deg
|
||||||
|
threat_time_to_intercept 240 sec
|
||||||
|
|
||||||
|
script void identified_new_threat(WsfTrack aTrack)
|
||||||
|
writeln("!!! me: ", PLATFORM.Name(), ", new threat: ", aTrack.TargetName());
|
||||||
|
end_script
|
||||||
|
|
||||||
|
script void dropped_threat(WsfTrack aTrack)
|
||||||
|
if (aTrack.IsValid())
|
||||||
|
{
|
||||||
|
writeln("!!! ", PLATFORM.Name(), " dropped a threat: ", aTrack.TargetName());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
writeln("!!! ", PLATFORM.Name(), " dropped a threat");
|
||||||
|
}
|
||||||
|
end_script
|
||||||
|
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
end_platform_type
|
||||||
|
|
||||||
36
platforms/red_radar.txt
Normal file
36
platforms/red_radar.txt
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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 ****** *
|
||||||
|
# * * ************************************** * *
|
||||||
|
|
||||||
|
include_once platforms/red_radar_tactics.txt
|
||||||
|
|
||||||
|
# This serves as a base for 'red' standalone radar players
|
||||||
|
|
||||||
|
platform_type RED_RADAR WSF_PLATFORM
|
||||||
|
icon Ground_Radar
|
||||||
|
|
||||||
|
infrared_signature VEHICLE_INFRARED_SIGNATURE
|
||||||
|
optical_signature VEHICLE_OPTICAL_SIGNATURE
|
||||||
|
radar_signature VEHICLE_RADAR_SIGNATURE
|
||||||
|
|
||||||
|
comm sub_net RED_DATALINK
|
||||||
|
network_name <local:slave>
|
||||||
|
internal_link task_mgr
|
||||||
|
end_comm
|
||||||
|
|
||||||
|
processor data_mgr WSF_LINKED_PROCESSOR
|
||||||
|
report_to commander via sub_net
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
processor task_mgr RED_RADAR_TACTICS
|
||||||
|
end_processor
|
||||||
|
end_platform_type
|
||||||
91
platforms/red_radar_company.txt
Normal file
91
platforms/red_radar_company.txt
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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 ****** *
|
||||||
|
# * * ************************************** * *
|
||||||
|
|
||||||
|
platform_type RED_RADAR_COMPANY WSF_PLATFORM
|
||||||
|
icon TWIN_BOX
|
||||||
|
|
||||||
|
infrared_signature VEHICLE_INFRARED_SIGNATURE
|
||||||
|
optical_signature VEHICLE_OPTICAL_SIGNATURE
|
||||||
|
radar_signature VEHICLE_RADAR_SIGNATURE
|
||||||
|
|
||||||
|
comm cmdr_net RED_DATALINK
|
||||||
|
network_name <local:slave>
|
||||||
|
internal_link data_mgr
|
||||||
|
internal_link task_mgr
|
||||||
|
end_comm
|
||||||
|
|
||||||
|
comm sub_net RED_DATALINK
|
||||||
|
network_name <local:master>
|
||||||
|
internal_link data_mgr
|
||||||
|
internal_link task_mgr
|
||||||
|
end_comm
|
||||||
|
|
||||||
|
include processors/commander_track_manager$(TRACKER_TYPE).txt
|
||||||
|
|
||||||
|
processor data_mgr WSF_TRACK_PROCESSOR
|
||||||
|
purge_interval 60 sec
|
||||||
|
|
||||||
|
report_to commander via cmdr_net to sub_net
|
||||||
|
|
||||||
|
report_interval 20 sec
|
||||||
|
|
||||||
|
fused_track_reporting on
|
||||||
|
raw_track_reporting off
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
processor task_mgr WSF_TASK_PROCESSOR
|
||||||
|
end_processor
|
||||||
|
/*
|
||||||
|
# ---------------------------------------------
|
||||||
|
# Draw track to false targets and real targets
|
||||||
|
# ---------------------------------------------
|
||||||
|
script_variables
|
||||||
|
# Create a WsfDraw object.
|
||||||
|
WsfDraw draw = WsfDraw();
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
execute at_interval_of 1.0 s
|
||||||
|
foreach (WsfTrack track in MasterTrackList())
|
||||||
|
{
|
||||||
|
if (track.IsValid())
|
||||||
|
{
|
||||||
|
# use the track ID as a unique draw ID
|
||||||
|
# a track icon and a line to the track icon
|
||||||
|
# is drawn at each track update
|
||||||
|
string trackId = track.TrackId().ToString();
|
||||||
|
draw.SetId(trackId);
|
||||||
|
draw.SetDuration(1.0); # this is faster than calling erase every time
|
||||||
|
|
||||||
|
if (track.IsFalseTarget())
|
||||||
|
{
|
||||||
|
draw.SetColor(0,1,0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
draw.SetColor(0,0,1);
|
||||||
|
}
|
||||||
|
draw.BeginIcons(track.Heading(), "Wedge");
|
||||||
|
draw.Vertex(track.ReportedLocation());
|
||||||
|
draw.End();
|
||||||
|
|
||||||
|
# Draw a line to the track
|
||||||
|
draw.SetLineStyle("dashed");
|
||||||
|
draw.BeginLines();
|
||||||
|
draw.Vertex(PLATFORM);
|
||||||
|
draw.Vertex(track.ReportedLocation());
|
||||||
|
draw.End();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end_execute
|
||||||
|
*/
|
||||||
|
end_platform_type
|
||||||
83
platforms/red_radar_tactics.txt
Normal file
83
platforms/red_radar_tactics.txt
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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 ****** *
|
||||||
|
# * * ************************************** * *
|
||||||
|
|
||||||
|
# this file defines a simple task manager which implements very basic EMCON
|
||||||
|
# rules for EW/ACQ type radar players
|
||||||
|
|
||||||
|
processor RED_RADAR_TACTICS WSF_TASK_PROCESSOR
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
bool cEVALUATE_EMCON_TURN_OFF = false;
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
script void EvaluateEmcon()
|
||||||
|
int sensorCount = PLATFORM.SensorCount();
|
||||||
|
if (sensorCount > 0)
|
||||||
|
{
|
||||||
|
WsfSensor sensor = PLATFORM.SensorEntry(0);
|
||||||
|
if (sensor.IsTurnedOff())
|
||||||
|
{
|
||||||
|
# sensor is off. Turn it on if we've received a task or
|
||||||
|
# we are put on alert
|
||||||
|
if ((TasksReceived() > 0) ||
|
||||||
|
(OperatingLevelFor("ENGAGE") > 0))
|
||||||
|
{
|
||||||
|
for (int entry = 0; entry < sensorCount; entry = entry + 1)
|
||||||
|
{
|
||||||
|
PLATFORM.SensorEntry(entry).TurnOn();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (sensor.IsTurnedOn() &&
|
||||||
|
cEVALUATE_EMCON_TURN_OFF)
|
||||||
|
{
|
||||||
|
# sensor is on. Turn it off if we have no tasks and are
|
||||||
|
# not on alert
|
||||||
|
if ((TasksReceived() < 1) &&
|
||||||
|
(OperatingLevelFor("ENGAGE") < 1))
|
||||||
|
{
|
||||||
|
for (int entry = 0; entry < sensorCount; entry = entry + 1)
|
||||||
|
{
|
||||||
|
PLATFORM.SensorEntry(entry).TurnOff();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# this cannot be done in 'on_initialize' because the commander may not yet exist
|
||||||
|
execute at_time 0.1 seconds relative
|
||||||
|
# if my commander is in the category ENGAGEMENT then we will execute
|
||||||
|
# the emcon/turn-off logic
|
||||||
|
WsfPlatform commander = PLATFORM.Commander();
|
||||||
|
if (commander.IsValid() &&
|
||||||
|
commander.CategoryMemberOf("ENGAGEMENT"))
|
||||||
|
{
|
||||||
|
cEVALUATE_EMCON_TURN_OFF = true;
|
||||||
|
}
|
||||||
|
end_execute
|
||||||
|
|
||||||
|
# evaluate emcon whenever we have a change in assignment or alert level
|
||||||
|
script void on_task_assign(WsfTask aTask, WsfTrack aTrack)
|
||||||
|
ExecuteScriptAtTime(TIME_NOW + RANDOM.Uniform(0.0, 4.0), "EvaluateEmcon");
|
||||||
|
end_script
|
||||||
|
|
||||||
|
script void on_task_cancel(WsfTask aTask)
|
||||||
|
ExecuteScriptAtTime(TIME_NOW + RANDOM.Uniform(0.0, 4.0), "EvaluateEmcon");
|
||||||
|
end_script
|
||||||
|
|
||||||
|
script void on_operating_level_change(string aName)
|
||||||
|
ExecuteScriptAtTime(TIME_NOW + RANDOM.Uniform(0.0, 4.0), "EvaluateEmcon");
|
||||||
|
end_script
|
||||||
|
|
||||||
|
end_processor
|
||||||
308
platforms/red_sam_battery_tactics.txt
Normal file
308
platforms/red_sam_battery_tactics.txt
Normal file
@@ -0,0 +1,308 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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 ****** *
|
||||||
|
# * * ************************************** * *
|
||||||
|
|
||||||
|
# this file defines a task manager implementing a generic sam battery
|
||||||
|
|
||||||
|
include_once weapons/sam/sam_launch_computer.txt
|
||||||
|
|
||||||
|
processor RED_SAM_BATTERY_TASK_MGR WSF_TASK_PROCESSOR
|
||||||
|
|
||||||
|
#script_debug_writes on
|
||||||
|
#show_state_transitions
|
||||||
|
#show_task_messages
|
||||||
|
|
||||||
|
track_update_interval 5.0 sec
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
string SENSOR_NAME;
|
||||||
|
string WEAPON_NAME;
|
||||||
|
|
||||||
|
string ENVELOPE = "full_kinematic";
|
||||||
|
|
||||||
|
# the following variable declares the name of the mode used for tracking
|
||||||
|
string SENSOR_ACQUIRE_MODE = "ACQUIRE";
|
||||||
|
string SENSOR_TRACK_MODE = "TRACK";
|
||||||
|
|
||||||
|
# the following variable declares the minimum track quality to
|
||||||
|
# attempt to engage the target
|
||||||
|
double REQUIRED_TRACK_QUALITY = 0.49;
|
||||||
|
|
||||||
|
int SALVO_SIZE = 2;
|
||||||
|
|
||||||
|
# the following are used internally and should not be modified by the user
|
||||||
|
string mAcquireTaskStr = "Acquire";
|
||||||
|
string mTrackTaskStr = "Track";
|
||||||
|
string mShootTaskStr = "Shoot";
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
# returns true if weapon is still active for given track
|
||||||
|
script bool FiringNow()
|
||||||
|
return (WeaponsActiveFor(TRACK.TrackId()) > 0);
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# return true if intercept results are known
|
||||||
|
# (i.e. weapons have terminated for this TRACK)
|
||||||
|
script bool InterceptResultsKnown()
|
||||||
|
return (TimeSinceWeaponLastTerminatedFor(TRACK.TrackId()) > 0.0);
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# return true if TRACK is inside the intercept envelope
|
||||||
|
script bool InInterceptEnvelopeOf(string aEnvelopeName)
|
||||||
|
extern bool SAM_LaunchComputer(WsfTrack, WsfPlatform, string, double);
|
||||||
|
return SAM_LaunchComputer(TRACK, PLATFORM, aEnvelopeName, 0.0);
|
||||||
|
end_script
|
||||||
|
|
||||||
|
// returns true if acq_radar is tracking
|
||||||
|
script bool HasDetected()
|
||||||
|
return (TRACK.TrackQuality() > 0.55);
|
||||||
|
end_script
|
||||||
|
|
||||||
|
// returns true if TTR is tracking in acquire mode
|
||||||
|
script bool HasAcquired()
|
||||||
|
return (TRACK.TrackQuality() > 0.75);
|
||||||
|
end_script
|
||||||
|
|
||||||
|
// returns true if TTR is tracking in track mode
|
||||||
|
script bool TrackingNow()
|
||||||
|
return (TRACK.TrackQuality() > 0.95);
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# release resources
|
||||||
|
script void ReleaseResources()
|
||||||
|
CancelTask(TRACK.TrackId());
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# select a weapon and launch it
|
||||||
|
# the selected weapon must be available, have sufficient rounds and not busy
|
||||||
|
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))
|
||||||
|
{
|
||||||
|
bool canInterceptNow = InInterceptEnvelopeOf(ENVELOPE);
|
||||||
|
if (canInterceptNow)
|
||||||
|
{
|
||||||
|
platform = sub;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bool launched = false;
|
||||||
|
if ((weapon.IsValid()) && (!platform.IsNull()))
|
||||||
|
{
|
||||||
|
launched = Fire(TRACK, mShootTaskStr, weapon.Name(), SALVO_SIZE, platform);
|
||||||
|
if (launched)
|
||||||
|
{
|
||||||
|
writeln_d("*** T=", TIME_NOW, " ", platform.Name(), " ",
|
||||||
|
TRACK.TargetName(), " R=", platform.SlantRangeTo(TRACK),
|
||||||
|
" FIRE!!!!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return launched;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# returns true if the TRACK has been assigned or the system has
|
||||||
|
# local engage authority
|
||||||
|
script bool IsAssignable()
|
||||||
|
writeln_d(TIME_NOW, " ", PLATFORM.Name(), " IsAssignable()");
|
||||||
|
writeln_d(" TaskReceivedFor(TRACK) ", TasksReceivedFor(TRACK.TrackId()));
|
||||||
|
writeln_d(" OperatingLevelFor(ENGAGE) ", OperatingLevelFor("ENGAGE"));
|
||||||
|
return ((PLATFORM == PLATFORM.Commander()) ||
|
||||||
|
(TasksReceivedFor(TRACK.TrackId()) > 0) ||
|
||||||
|
(OperatingLevelFor("ENGAGE") > 0));
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# determine the number of available weapons
|
||||||
|
script int WeaponsAvailable(WsfPlatform aAssignee)
|
||||||
|
int quantity = 0;
|
||||||
|
WsfWeapon weapon = aAssignee.Weapon(WEAPON_NAME);
|
||||||
|
if (weapon.IsTurnedOn())
|
||||||
|
{
|
||||||
|
quantity = weapon.QuantityRemaining();
|
||||||
|
}
|
||||||
|
return quantity;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# determine total number of available weapons
|
||||||
|
script int TotalWeaponsAvailable()
|
||||||
|
int quantity = 0;
|
||||||
|
foreach (WsfPlatform sub in PLATFORM.Subordinates())
|
||||||
|
{
|
||||||
|
quantity = quantity + WeaponsAvailable(sub);
|
||||||
|
}
|
||||||
|
return quantity;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# begin tracking the current target
|
||||||
|
script bool Engage()
|
||||||
|
bool engaging = false;
|
||||||
|
if (TotalWeaponsAvailable() < 1) return false;
|
||||||
|
writeln_d(TIME_NOW, " ", PLATFORM.Name(), " WeaponsAvailable");
|
||||||
|
foreach (WsfPlatform sub in PLATFORM.Subordinates())
|
||||||
|
{
|
||||||
|
# bypass this subordinate if it already has an assignment for this target
|
||||||
|
writeln_d(" subordinate ", sub.Name());
|
||||||
|
if (TasksAssignedTo(sub, TRACK.TrackId(), mTrackTaskStr) > 0)
|
||||||
|
{
|
||||||
|
writeln_d(" already assigned to ", TRACK.TargetName());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
WsfSensor sensor = sub.Sensor(SENSOR_NAME);
|
||||||
|
if (! sensor.IsValid())
|
||||||
|
{
|
||||||
|
writeln_d(" sensor ", SENSOR_NAME, " invalid");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
# the system can only track so many targets
|
||||||
|
if (sensor.ActiveRequestCount(SENSOR_TRACK_MODE) >=
|
||||||
|
sensor.MaximumRequestCount(SENSOR_TRACK_MODE))
|
||||||
|
{
|
||||||
|
writeln_d(" maximum requests met");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TRACK.BelievedAlive() &&
|
||||||
|
InInterceptEnvelopeOf(ENVELOPE) &&
|
||||||
|
(HasAcquired()))
|
||||||
|
{
|
||||||
|
// track the target
|
||||||
|
engaging = StartTracking(TRACK, mTrackTaskStr, sensor.Name(), SENSOR_TRACK_MODE, sub);
|
||||||
|
if (engaging)
|
||||||
|
{
|
||||||
|
writeln_d(" tracking engaged ", TRACK.TargetName());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
writeln_d(" unable to track target ", TRACK.TargetName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sensor.ActiveRequestCount(SENSOR_ACQUIRE_MODE) >=
|
||||||
|
sensor.MaximumRequestCount(SENSOR_ACQUIRE_MODE)) continue;
|
||||||
|
|
||||||
|
if (TRACK.BelievedAlive() &&
|
||||||
|
InInterceptEnvelopeOf(ENVELOPE) &&
|
||||||
|
(HasDetected()))
|
||||||
|
{
|
||||||
|
// acquire the target
|
||||||
|
engaging = StartTracking(TRACK, mAcquireTaskStr, sensor.Name(), SENSOR_ACQUIRE_MODE, sub);
|
||||||
|
if (engaging) break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
writeln_d(" TRACK.TargetName() ", TRACK.TargetName());
|
||||||
|
writeln_d(" TRACK.BelievedAlive() ", TRACK.BelievedAlive());
|
||||||
|
writeln_d(" InInterceptEnvelopeOf(ENVELOPE) ", InInterceptEnvelopeOf(ENVELOPE));
|
||||||
|
writeln_d(" TRACK.TrackQuality() ", TRACK.TrackQuality());
|
||||||
|
writeln_d(" REQUIRED_TRACK_QUALITY ", REQUIRED_TRACK_QUALITY);
|
||||||
|
writeln_d(" TRACK.TrackQuality() > REQUIRED_TRACK_QUALITY ", TRACK.TrackQuality() > REQUIRED_TRACK_QUALITY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return engaging;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
|
||||||
|
evaluation_interval DETECTED 2.0 sec
|
||||||
|
state DETECTED
|
||||||
|
next_state DETECTED
|
||||||
|
if (TRACK.IFF_Friend())
|
||||||
|
{
|
||||||
|
# cancel any tasks assigned against this track
|
||||||
|
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
|
||||||
|
bool cancel = false;
|
||||||
|
if (TRACK.BelievedDead() ||
|
||||||
|
TRACK.IFF_Friend() ||
|
||||||
|
((TasksAssignedFor(TRACK.TrackId(), "ENGAGE") < 1) &&
|
||||||
|
(! IsAssignable())))
|
||||||
|
{
|
||||||
|
cancel = true;
|
||||||
|
ReleaseResources();
|
||||||
|
}
|
||||||
|
return cancel;
|
||||||
|
end_next_state
|
||||||
|
|
||||||
|
next_state ENGAGE
|
||||||
|
Engage();
|
||||||
|
|
||||||
|
# wait until tracking target
|
||||||
|
return (TrackingNow() &&
|
||||||
|
(TasksAssignedFor(TRACK.TrackId(), mTrackTaskStr) > 0));
|
||||||
|
end_next_state
|
||||||
|
end_state
|
||||||
|
|
||||||
|
evaluation_interval ENGAGE 2.0 sec
|
||||||
|
state ENGAGE
|
||||||
|
next_state ENGAGEABLE
|
||||||
|
bool cancel = false;
|
||||||
|
if (TRACK.BelievedDead() ||
|
||||||
|
(! TrackingNow()) ||
|
||||||
|
(! IsAssignable()))
|
||||||
|
{
|
||||||
|
cancel = true;
|
||||||
|
ReleaseResources();
|
||||||
|
}
|
||||||
|
return cancel;
|
||||||
|
end_next_state
|
||||||
|
|
||||||
|
next_state FIRING
|
||||||
|
bool launched = false;
|
||||||
|
|
||||||
|
if (TRACK.BelievedAlive() &&
|
||||||
|
TrackingNow() &&
|
||||||
|
! FiringNow() &&
|
||||||
|
InInterceptEnvelopeOf(ENVELOPE))
|
||||||
|
{
|
||||||
|
launched = LaunchWeapon();
|
||||||
|
}
|
||||||
|
return launched;
|
||||||
|
end_next_state
|
||||||
|
end_state
|
||||||
|
|
||||||
|
evaluation_interval FIRING 2.0 sec
|
||||||
|
state FIRING
|
||||||
|
next_state ENGAGE
|
||||||
|
return (TRACK.BelievedDead() ||
|
||||||
|
! InInterceptEnvelopeOf(ENVELOPE) ||
|
||||||
|
(! FiringNow() &&
|
||||||
|
(TasksAssignedFor(TRACK.TrackId(), mShootTaskStr) < 1)) ||
|
||||||
|
(TotalWeaponsAvailable() < 1) ||
|
||||||
|
! TrackingNow());
|
||||||
|
end_next_state
|
||||||
|
end_state
|
||||||
|
|
||||||
|
end_processor
|
||||||
14
platforms/sam_players.txt
Normal file
14
platforms/sam_players.txt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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 ****** *
|
||||||
|
# * * ************************************** * *
|
||||||
|
|
||||||
|
include_once platforms/large_sam_battalion.txt
|
||||||
470
platforms/soj.txt
Normal file
470
platforms/soj.txt
Normal file
@@ -0,0 +1,470 @@
|
|||||||
|
# ****************************************************************************
|
||||||
|
# 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 ****** *
|
||||||
|
# * * ************************************** * *
|
||||||
|
|
||||||
|
include_once signatures/fighter_sigs.txt
|
||||||
|
include_once sensors/esm_rwr/ucav_esm.txt
|
||||||
|
include_once weapons/jammer/soj_vhf_jammer.txt
|
||||||
|
include_once weapons/jammer/soj_sband_jammer.txt
|
||||||
|
include_once weapons/jammer/soj_xband_jammer.txt
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# script to make jamming assignemnts based on
|
||||||
|
# frequency band and FOV of the jamming weapons system.
|
||||||
|
|
||||||
|
processor SOJ_TASK_MGR WSF_TASK_PROCESSOR
|
||||||
|
|
||||||
|
#script_debug_writes on
|
||||||
|
#show_state_transitions
|
||||||
|
#show_task_messages
|
||||||
|
|
||||||
|
script_variables
|
||||||
|
# Track time since updated to consider track stale
|
||||||
|
double mTrackUpdateStaleTime = 10.0; # seconds
|
||||||
|
|
||||||
|
# MUST BE DIFFERENT FOR EACH JAMMER TASK MANAGER CONTROLLING DIFFERENT SYSTEMS
|
||||||
|
string mJamTaskStr = "SOJ_JAM"; # Reset to all caps in the on_initialize script below.
|
||||||
|
|
||||||
|
# Map of the previous signal count for the given track Id
|
||||||
|
Map<WsfTrackId, int> mSignalCountMap = Map<WsfTrackId, int>();
|
||||||
|
|
||||||
|
|
||||||
|
# Default technique to assign for threats not defined in mThreatTechniqueMap below
|
||||||
|
string mDefaultTechnique = "noise_jamming";
|
||||||
|
|
||||||
|
# Available types: noise_jamming, random_pulse_jamming, false_target_jamming,
|
||||||
|
# simple_false_target_jamming, track_error, jtos_gain_jamming
|
||||||
|
Map<string, struct> mThreatData = Map<string, struct>();
|
||||||
|
|
||||||
|
// EW Radar
|
||||||
|
struct ew_data = struct();
|
||||||
|
ew_data->mAssign = true;
|
||||||
|
ew_data->mTechnique = "noise_jamming";
|
||||||
|
#ew_data->mTechnique = "false_target_jamming";
|
||||||
|
|
||||||
|
//ACQ Radar
|
||||||
|
struct acq_data = struct();
|
||||||
|
acq_data->mAssign = true;
|
||||||
|
acq_data->mTechnique = "random_pulse_jamming";
|
||||||
|
|
||||||
|
//TTR Radar
|
||||||
|
struct ttr_data = struct();
|
||||||
|
ttr_data->mAssign = true;
|
||||||
|
ttr_data->mTechnique = "jtos_gain_jamming";
|
||||||
|
|
||||||
|
// Create data map for use by scripts
|
||||||
|
# Must be top level names or types, does not drill into sub-types
|
||||||
|
mThreatData["EW_RADAR"] = ew_data;
|
||||||
|
mThreatData["ACQ_RADAR"] = acq_data;
|
||||||
|
mThreatData["TTR_RADAR"] = ttr_data;
|
||||||
|
|
||||||
|
# Must be top level names or types, does not drill into sub-types
|
||||||
|
Map<string, bool> mWeaponAssignMap = Map<string, bool>();
|
||||||
|
mWeaponAssignMap["SOJ_VHF_JAMMER"] = true;
|
||||||
|
mWeaponAssignMap["SOJ_SBAND_JAMMER"] = true;
|
||||||
|
mWeaponAssignMap["SOJ_XBAND_JAMMER"] = true;
|
||||||
|
end_script_variables
|
||||||
|
|
||||||
|
on_initialize
|
||||||
|
mJamTaskStr = Name().Upper();
|
||||||
|
end_on_initialize
|
||||||
|
|
||||||
|
# Script to determine if the given threat is in the list
|
||||||
|
# and its status for assignments
|
||||||
|
script bool AllowTrack()
|
||||||
|
bool allowAssign = false;
|
||||||
|
int emitterCount = TRACK.EmitterCount();
|
||||||
|
for (int i = 0; i < emitterCount; i = i + 1)
|
||||||
|
{
|
||||||
|
string emitterType = TRACK.EmitterType(i);
|
||||||
|
if (emitterType == "")
|
||||||
|
{
|
||||||
|
emitterType = TRACK.TargetType();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mThreatData.Exists(TRACK.TargetName()) &&
|
||||||
|
mThreatData.Get(TRACK.TargetName())->mAssign)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (mThreatData.Exists(emitterType) &&
|
||||||
|
mThreatData.Get(emitterType)->mAssign)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return allowAssign;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# Script to determine if the given jammer is in the list
|
||||||
|
# and its status for assignments
|
||||||
|
# must be top level names or types, does not drill into sub-types
|
||||||
|
script bool AllowWeaponTasking(WsfWeapon aWeapon)
|
||||||
|
bool allowAssign = false;
|
||||||
|
if (aWeapon.IsValid() &&
|
||||||
|
aWeapon.IsA_TypeOf("WSF_RF_JAMMER"))
|
||||||
|
{
|
||||||
|
if (mWeaponAssignMap.Exists(aWeapon.Name()))
|
||||||
|
{
|
||||||
|
allowAssign = mWeaponAssignMap.Get(aWeapon.Name());
|
||||||
|
}
|
||||||
|
else if (mWeaponAssignMap.Exists(aWeapon.Type()))
|
||||||
|
{
|
||||||
|
allowAssign = mWeaponAssignMap.Get(aWeapon.Type());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return allowAssign;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# Script to determine the appropriate jammer types based on frequency
|
||||||
|
# must be top level names or types, does not drill into sub-types
|
||||||
|
script Map<string, bool> JammerTypes(double aFrequency)
|
||||||
|
Map<string, bool> jammerTypes = Map<string, bool>();
|
||||||
|
if (TRACK.FrequencyValid())
|
||||||
|
{
|
||||||
|
for (int i = 0; i < PLATFORM.WeaponCount(); i = i + 1)
|
||||||
|
{
|
||||||
|
WsfWeapon weapon = PLATFORM.WeaponEntry(i);
|
||||||
|
if (AllowWeaponTasking(weapon))
|
||||||
|
{
|
||||||
|
double minFreq = weapon.MinimumFrequency();
|
||||||
|
double maxFreq = weapon.MaximumFrequency();
|
||||||
|
if ((aFrequency >= minFreq) && (aFrequency <= maxFreq))
|
||||||
|
{
|
||||||
|
jammerTypes[weapon.Type()] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return jammerTypes;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# Script to determine the appropriate technique to use based on target type
|
||||||
|
script string TechniqueType(int aSignalIndex)
|
||||||
|
string techniqueType = mDefaultTechnique; // default technique
|
||||||
|
string emitterType = TRACK.SignalEmitterType(aSignalIndex);
|
||||||
|
if (emitterType == "")
|
||||||
|
{
|
||||||
|
emitterType = TRACK.TargetType();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TRACK.IsValid())
|
||||||
|
{
|
||||||
|
if (mThreatData.Exists(TRACK.TargetName()))
|
||||||
|
{
|
||||||
|
techniqueType = mThreatData.Get(TRACK.TargetName())->mTechnique;
|
||||||
|
}
|
||||||
|
else if (mThreatData.Exists(TRACK.TargetType()))
|
||||||
|
{
|
||||||
|
techniqueType = mThreatData.Get(emitterType)->mTechnique;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return techniqueType ;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# Script to determine the appropriate bandwidth to use based on technique
|
||||||
|
# Note: Could also add in the target type if required
|
||||||
|
script double Bandwidth(int aSignalIndex, double aPulsewidth)
|
||||||
|
double bandwidth = 1.e6; // default bandwidth
|
||||||
|
if (TechniqueType(aSignalIndex) == "false_target_jamming")
|
||||||
|
{
|
||||||
|
bandwidth = 1.0e6;
|
||||||
|
if (aPulsewidth > 0.0)
|
||||||
|
{
|
||||||
|
bandwidth = 1 / aPulsewidth;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (TechniqueType(aSignalIndex) == "random_pulse_jamming")
|
||||||
|
{
|
||||||
|
bandwidth = 1.5e6;
|
||||||
|
}
|
||||||
|
return bandwidth;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
// Add spot for the current signal index in the track
|
||||||
|
script bool AddSpot(int aSignalIndex)
|
||||||
|
bool addedSpot = false;
|
||||||
|
WsfWeapon jammer;
|
||||||
|
Map<string, bool> requiredTypes = Map<string, bool>();
|
||||||
|
string jammerType = "";
|
||||||
|
double freq = TRACK.SignalFrequency(aSignalIndex);
|
||||||
|
requiredTypes = JammerTypes(freq);
|
||||||
|
for (int i=0; i < PLATFORM.WeaponCount(); i = i + 1)
|
||||||
|
{
|
||||||
|
jammer = PLATFORM.WeaponEntry(i);
|
||||||
|
jammerType = jammer.Type();
|
||||||
|
if (requiredTypes.Exists(jammerType))
|
||||||
|
{
|
||||||
|
if(PLATFORM.WithinFieldOfView(TRACK, jammer.Name()))
|
||||||
|
{
|
||||||
|
# check to see if any maximum spots have been allocated
|
||||||
|
if ((jammer.QuantityRemaining() > 0) || (jammer.MaximumRequestCount() == 1))
|
||||||
|
{
|
||||||
|
string jamStr = write_str(mJamTaskStr, aSignalIndex);
|
||||||
|
double pulsewidth = TRACK.SignalPW(aSignalIndex);
|
||||||
|
if (StartJamming(TRACK,
|
||||||
|
jamStr,
|
||||||
|
jammer,
|
||||||
|
freq,
|
||||||
|
Bandwidth(aSignalIndex, pulsewidth),
|
||||||
|
TechniqueType(aSignalIndex)))
|
||||||
|
{
|
||||||
|
writeln_d("T=", TIME_NOW, " ", PLATFORM.Name(), ":", jammer.Name(), " started jamming ",
|
||||||
|
TRACK.TargetName(), ":", TRACK.SignalEmitterType(aSignalIndex),
|
||||||
|
", task=", jamStr, " freq=", freq, " BW=", Bandwidth(aSignalIndex,pulsewidth),
|
||||||
|
" Technique=", TechniqueType(aSignalIndex));
|
||||||
|
addedSpot = true;
|
||||||
|
break; # only allow one weapon per assignment for now, script needs work to do more than one
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return addedSpot;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# Script to start jamming a track
|
||||||
|
script bool StartJammingTrack()
|
||||||
|
bool startedJamming = false;
|
||||||
|
int signalCount = TRACK.SignalCount();
|
||||||
|
mSignalCountMap[TRACK.TrackId()] = signalCount; // Update the signal count map
|
||||||
|
for (int signalIndex = 0; signalIndex < signalCount; signalIndex = signalIndex + 1)
|
||||||
|
{
|
||||||
|
if (AddSpot(signalIndex))
|
||||||
|
{
|
||||||
|
startedJamming = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return startedJamming;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# Script to update jamming assignments for a track
|
||||||
|
script void UpdateJammingTrack()
|
||||||
|
string reason = "UNKNOWN";
|
||||||
|
int curSignalCount = TRACK.SignalCount();
|
||||||
|
int prevSignalCount = mSignalCountMap[TRACK.TrackId()];
|
||||||
|
int loopSignalCount = MATH.Max(curSignalCount, prevSignalCount); # use the max to add/remove spots
|
||||||
|
for (int signalIndex = 0; signalIndex < loopSignalCount; signalIndex = signalIndex + 1)
|
||||||
|
{
|
||||||
|
bool addSpot = false;
|
||||||
|
|
||||||
|
string jamStr = write_str(mJamTaskStr, signalIndex);
|
||||||
|
|
||||||
|
WsfTaskList taskList = AssignedTaskList(TRACK.TrackId(), jamStr);
|
||||||
|
if (taskList.Count() == 0)
|
||||||
|
{
|
||||||
|
addSpot = true;
|
||||||
|
reason = "frequency added";
|
||||||
|
}
|
||||||
|
else if (taskList.Count() == 1)
|
||||||
|
{
|
||||||
|
WsfTask task = taskList.Entry(0);
|
||||||
|
bool needToStopJamming = true;
|
||||||
|
if (signalIndex >= curSignalCount)
|
||||||
|
{
|
||||||
|
reason = write_str("signal_", signalIndex, "_invalid");
|
||||||
|
}
|
||||||
|
else if (PLATFORM.WithinFieldOfView(TRACK, task.ResourceName()))
|
||||||
|
{
|
||||||
|
if (task.ResourceFrequency() == TRACK.SignalFrequency(signalIndex))
|
||||||
|
{
|
||||||
|
needToStopJamming = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (needToStopJamming)
|
||||||
|
{
|
||||||
|
reason = "frequency change";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
reason = "FOV limits";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (needToStopJamming)
|
||||||
|
{
|
||||||
|
writeln_d("T=", TIME_NOW, " ", PLATFORM.Name(), ":", task.ResourceName(), " stopped jamming ",
|
||||||
|
TRACK.TargetName(), ":", TRACK.SignalEmitterType(signalIndex),
|
||||||
|
", task=", task.TaskType()," freq=", task.ResourceFrequency(),
|
||||||
|
" due to ", reason);
|
||||||
|
if (CancelTask(task.TrackId(), task.TaskType(), task.ResourceName()))
|
||||||
|
{
|
||||||
|
addSpot = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
# script setup for single jamming task for now, needs work for multiples?
|
||||||
|
writeln("*****WARNING: More than one task found in.", PLATFORM.Name(), " jamming script.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (addSpot)
|
||||||
|
{
|
||||||
|
AddSpot(signalIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mSignalCountMap[TRACK.TrackId()] = curSignalCount;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# script to stop jamming against the current track
|
||||||
|
script void StopJammingTrack(string aReasonStr)
|
||||||
|
WsfTaskList taskList = AssignedTaskList(TRACK.TrackId(), "");
|
||||||
|
foreach(WsfTask task in taskList)
|
||||||
|
{
|
||||||
|
if (task.ResourceIsJammer() && task.TaskType().StartsWith(mJamTaskStr))
|
||||||
|
{
|
||||||
|
writeln_d("T=", TIME_NOW, " ", PLATFORM.Name(), ":", task.ResourceName(), " stopped jamming ",
|
||||||
|
TRACK.TargetName(), ", task=", task.TaskType()," freq=", task.ResourceFrequency(),
|
||||||
|
" due to ", aReasonStr);
|
||||||
|
if (! CancelTask(task.TrackId(), task.TaskType(), task.ResourceName()))
|
||||||
|
{
|
||||||
|
writeln_d("FAILED");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# script to determine if platform is still jamming current track
|
||||||
|
script bool StoppedJammingTrack()
|
||||||
|
bool stoppedJammingTrack = true;
|
||||||
|
WsfTaskList taskList = AssignedTaskList(TRACK.TrackId(),"");
|
||||||
|
foreach(WsfTask task in taskList)
|
||||||
|
{
|
||||||
|
if (task.ResourceIsJammer() && task.TaskType().StartsWith(mJamTaskStr))
|
||||||
|
{
|
||||||
|
stoppedJammingTrack = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stoppedJammingTrack)
|
||||||
|
{
|
||||||
|
writeln_d("T=", TIME_NOW, " ", PLATFORM.Name(), " stopped jamming track ",
|
||||||
|
TRACK.TargetName(), " due to all jamming assignments being stopped");
|
||||||
|
mSignalCountMap.Erase(TRACK.TrackId());
|
||||||
|
}
|
||||||
|
return stoppedJammingTrack;
|
||||||
|
end_script
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
evaluation_interval DETECTED 1.0 sec
|
||||||
|
state DETECTED
|
||||||
|
next_state CAN_JAM
|
||||||
|
return ((TRACK.TimeSinceUpdated() < mTrackUpdateStaleTime) && AllowTrack());
|
||||||
|
end_next_state
|
||||||
|
end_state
|
||||||
|
|
||||||
|
evaluation_interval CAN_JAM 1.0 sec
|
||||||
|
state CAN_JAM
|
||||||
|
next_state DETECTED
|
||||||
|
return (TRACK.TimeSinceUpdated() >= mTrackUpdateStaleTime);
|
||||||
|
end_next_state
|
||||||
|
|
||||||
|
next_state IS_JAMMING
|
||||||
|
return StartJammingTrack();
|
||||||
|
end_next_state
|
||||||
|
end_state
|
||||||
|
|
||||||
|
evaluation_interval IS_JAMMING 1.0 sec
|
||||||
|
state IS_JAMMING
|
||||||
|
next_state CAN_JAM
|
||||||
|
if (TRACK.TimeSinceUpdated() < mTrackUpdateStaleTime)
|
||||||
|
{
|
||||||
|
UpdateJammingTrack();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
StopJammingTrack("STALE_TRACK");
|
||||||
|
}
|
||||||
|
return StoppedJammingTrack();
|
||||||
|
end_next_state
|
||||||
|
end_state
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
platform_type SOJ WSF_PLATFORM
|
||||||
|
icon weasel
|
||||||
|
|
||||||
|
infrared_signature FIGHTER_INFRARED_SIG
|
||||||
|
optical_signature FIGHTER_OPTICAL_SIG
|
||||||
|
radar_signature FIGHTER_RADAR_SIG
|
||||||
|
|
||||||
|
sensor esm UCAV_ESM
|
||||||
|
on
|
||||||
|
internal_link data_mgr
|
||||||
|
ignore_same_side
|
||||||
|
end_sensor
|
||||||
|
|
||||||
|
mover WSF_AIR_MOVER
|
||||||
|
default_radial_acceleration 2.0 g
|
||||||
|
at_end_of_path remove
|
||||||
|
end_mover
|
||||||
|
|
||||||
|
weapon fwd_vhf_jammer SOJ_VHF_JAMMER
|
||||||
|
off
|
||||||
|
ignore_same_side
|
||||||
|
end_weapon
|
||||||
|
|
||||||
|
weapon aft_vhf_jammer SOJ_VHF_JAMMER
|
||||||
|
off
|
||||||
|
yaw 180.0 deg
|
||||||
|
ignore_same_side
|
||||||
|
end_weapon
|
||||||
|
|
||||||
|
weapon fwd_sband_jammer SOJ_SBAND_JAMMER
|
||||||
|
off
|
||||||
|
ignore_same_side
|
||||||
|
end_weapon
|
||||||
|
|
||||||
|
weapon aft_sband_jammer SOJ_SBAND_JAMMER
|
||||||
|
off
|
||||||
|
yaw 180.0 deg
|
||||||
|
ignore_same_side
|
||||||
|
end_weapon
|
||||||
|
|
||||||
|
weapon fwd_xband_jammer SOJ_XBAND_JAMMER
|
||||||
|
off
|
||||||
|
ignore_same_side
|
||||||
|
end_weapon
|
||||||
|
|
||||||
|
weapon aft_xband_jammer SOJ_XBAND_JAMMER
|
||||||
|
off
|
||||||
|
yaw 180.0 deg
|
||||||
|
ignore_same_side
|
||||||
|
end_weapon
|
||||||
|
|
||||||
|
processor data_mgr WSF_TRACK_PROCESSOR
|
||||||
|
purge_interval 60.0 sec
|
||||||
|
end_processor
|
||||||
|
|
||||||
|
processor soj_task_mgr SOJ_TASK_MGR
|
||||||
|
end_processor
|
||||||
|
end_platform_type
|
||||||
|
|
||||||
|
route soj_orbit
|
||||||
|
navigation
|
||||||
|
label start
|
||||||
|
offset 20 0 km speed 450 kts altitude 35000 ft msl
|
||||||
|
radial_acceleration 2 g
|
||||||
|
offset 20 5 km speed 450 kts altitude 35000 ft msl
|
||||||
|
radial_acceleration 2 g
|
||||||
|
offset 0 5 km speed 450 kts altitude 35000 ft msl
|
||||||
|
radial_acceleration 2 g
|
||||||
|
offset 0 0 km speed 450 kts altitude 35000 ft msl
|
||||||
|
radial_acceleration 2 g
|
||||||
|
goto start
|
||||||
|
end_navigation
|
||||||
|
end_route
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user