# ****************************************************************************
# 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.
# ****************************************************************************

# ****************************************************************************
#             WEAPON TOOL INPUT FILE - ATA Launch Computer Generator
# ****************************************************************************
# Example input data file to configure and exercise the ATA Launch Computer
# Generator Weapon Tool.  Examples for all possible input keywords and values
# are given below; however, default values are often sufficient, and when so,
# the input keyword and its corresponding default value is commented out to
# show the input is not mandatory.
# ****************************************************************************

include_once test_medium_range_missile.txt

# *****************************************************************************
# This lethality is "perfect" if within lethal range.  Necessary, because
# for the Tool to work properly we must have a kill if the missile is
# kinematically able to pass within lethal range of its target.
# NOTE:  The weapon's fuse should not have 'hit_proximity_range' set
#        greater than the radius indicated below.

weapon_effects WEAPON_TOOL_LETHALITY WSF_GRADUATED_LETHALITY
   radius_and_pk 25.0 ft 1.00 # All Platforms
end_weapon_effects

# *****************************************************************************
# The following is used as the launch platform type

platform_type LAUNCH_PLATFORM_TYPE WSF_PLATFORM
  icon F-18E
  # (The default weapon fired by all Weapon Tools is the first one
  #  encountered on the launch platform.)
  weapon launching_weapon TEST_MEDIUM_RANGE_MISSILE
  end_weapon
end_platform_type

# *****************************************************************************
# The following is used as a target

platform_type TARGET_PLATFORM_TYPE WSF_PLATFORM
  icon F-18
  //mover WSF_AIR_MOVER end_mover
  mover TARGET_MOVER end_mover
end_platform_type

# *****************************************************************************

tool AIR_TO_AIR_LAUNCH_COMPUTER_GENERATOR # air_to_air_launch_computer_generator

  # === Tool Input Keywords ===

  #tool_debug

  # The inputs below position the test case somewhere
  # on the globe, and indicate the firing conditions

  position 34:54n 117:53w  # Near Edwards AFB

  heading 0.0 deg

  #frame_step            0.5 sec # Time interval between Tool updates

  #target_platform_type TARGET_PLATFORM_TYPE
  #launch_platform_type LAUNCH_PLATFORM_TYPE

  # The default is to select the first weapon on the launch_platform_type
  #weapon_name <first_weapon_on_launch_platform_type> # (No matter what it is named.)

  # (The PK should usually boosted to 1.0 for this generator to work properly.)
  #weapon_effects WEAPON_TOOL_LETHALITY

  # The following two string values are used to assist with naming output
  # objects and files, if the names are not explicitly provided by user input.

  #tool_produces _air_to_air_launch_computer

  #output_file_extension .txt

  # The user may have letter case preferences on file names, or a preferred naming
  # convention, so may choose to explicitly override the two Tool-provided names below:

  # 1. Output object name
  # (If not provided, the default name is to aggregate the two items shown below.)
  #output_object_name <weapon_platform_type><tool_produces>

  # 2. Output file name
  # (If not provided, the default name is to aggregate the two items shown below.)
  #output_file_name   <output_object_name><output_file_extension>

  output_object_name TEST_MEDIUM_RANGE_MISSILE_AIR_TO_AIR_LAUNCH_COMPUTER    # *** TEMPORARY NON_DEFAULT OVERRIDE
  output_file_name test_medium_range_missile_air_to_air_launch_computer.txt  # *** TEMPORARY NON_DEFAULT OVERRIDE

  # === WsfAirtoAirLaunchComputer Input Keywords ===

  maximum_iterations_per_engagement  20
  engagement_range_tolerance         5 m
  start_range_for_increasing    1000.0 m
  start_range_for_decreasing   10000.0 m
 #maximum_rmax_limit           25000.0 m
  maximum_rmax_limit          222240.0 m   ### 120 nm


  # ==== The file included and read in below will specify the independent ====
  # ==== variable engagment conditions for which results are generated    ====

  //load_table test_medium_range_missile_air_to_air_launch_computer_table.txt

  # ====        OR ALTERNATELY, READ IN IV's BELOW                 ====
  # ==== (NO DV's are given here, as the Tool will Generate them.) ====



  launch_computer_table
     no_escape_maneuver 7 g
     independent_variables
        shooter_altitudes 10000 ft 20000 ft 30000 ft end_shooter_altitudes
        shooter_machs 0.8 1.0 1.2 1.4 1.6 1.8 2.0 end_shooter_machs
        target_altitudes 10000 ft 20000 ft 30000 ft end_target_altitudes
        target_machs 0.8 1.0 1.2 1.4 1.6 1.8 2.0  end_target_machs
        target_aspects     0 deg 30 deg 60 deg 90 deg 135 deg 180 deg  end_target_aspects
        target_lead_angles 0 deg 30 deg 60 deg 90 deg 135 deg 180 deg  end_target_lead_angles
     end_independent_variables
  end_launch_computer_table


/*
##   for testing:
  launch_computer_table
     no_escape_maneuver 7 g
     independent_variables
        shooter_altitudes 10000 ft end_shooter_altitudes
        shooter_machs 1.0 end_shooter_machs
        target_altitudes 10000 ft end_target_altitudes
        target_machs 1.0 end_target_machs
        target_aspects 0 deg 20 deg end_target_aspects
        target_lead_angles 0 deg 70 deg end_target_lead_angles
     end_independent_variables
  end_launch_computer_table
*/


  #  ==== --------------------------------- ====

end_tool

# *****************************************************************************
# Define the DIS replay file output, if needed, for post-processing, visualization, etc.
#  (Generation runs much faster if you turn this off...)

#event_pipe
#  file lc_generation.aer
#end_event_pipe

