# ****************************************************************************
# 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.
# ****************************************************************************
###############################################################################
#               *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *
#               All information below is representative only,
#               and is estimated or obtained from open sources.
#               It is not yet substantiated or corroborated by
#               definitive data.
#               *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *
###############################################################################

#############################################################################
#                    Define the aerodynamic characteristics
#############################################################################

radar_signature BLUE_GPS_BOMB_1_RADAR_SIGNATURE
   constant 1 m^2
end_radar_signature

aero BLUE_GPS_BOMB_1_AERO WSF_AERO
  # Note:  Values for Mk-82-like slick bomb.
  cd_zero_subsonic    0.100
  cd_zero_supersonic  0.40
  mach_begin_cd_rise  0.800
  mach_end_cd_rise    1.200
  mach_max_supersonic 2.000
  reference_area      0.059 m2 # 273mm body dia
  cl_max             10.400    # unknown
  aspect_ratio        4.000    # unknown
end_aero

###############################################################################
#                 Define the explicit platforms for the bombs
###############################################################################

platform_type BLUE_GPS_BOMB_1 WSF_PLATFORM
  icon jdam
  #radar_signature BLUE_GPS_BOMB_1_RADAR_SIGNATURE

mover WSF_GUIDED_MOVER
   integration_timestep               0.01 s
   integration_method                 rk4
   compute_all_forces_each_substep    true
   coordinate_frame                   wcs
   align_heading_with_velocity       true
   check_for_ground_impact
   show_status
   show_trajectory

   stage 1
      aero        BLUE_GPS_BOMB_1_AERO

      total_mass  176.8 kg
      empty_mass  176.8 kg
      fuel_mass   1000.0 kg
      thrust 1000 kgf

      #         specific_impulse + burn_rate           burn_rate:
      burn_rate  0.05 kg/s    #   0.05 kg/s                  
      thrust_vectoring_angle_limit  10 deg

      bank_to_turn

      angle_of_attack curve
         independent_variable time units sec
         dependent_variable units deg
            0.0   2.0
           74.1   2.0
           75.1   0.0
      end_curve
   end_stage
end_mover

  processor guidance_computer WSF_GUIDANCE_COMPUTER
      proportional_navigation_gain  10.0
      velocity_pursuit_gain         10.0
      g_bias                         1.0
      maximum_commanded_g          25.0 g
      guidance_delay                0.0 sec
  end_processor

  processor fuse WSF_GROUND_TARGET_FUSE
#      proximity_cancel_on_loss_of_target
  end_processor
end_platform_type

###############################################################################
#                          Define the weapon lethality
###############################################################################

weapon_effects BLUE_GPS_BOMB_1_EFFECT WSF_SPHERICAL_LETHALITY
  allow_incidental_damage
  minimum_radius   25.0 m   # largest blast radius at which damage inflicted is maximum.
  maximum_radius   30.0 m   # blast radius beyond which the damage inflicted is Zero.
  maximum_damage   1.0      # maximum damage level achievable upon the target.
  minimum_damage   0.1      # damage level acheived at the maximum radius.
  threshold_damage 0.2      # initial damage level which must be acheived
                            # before effects begin to accumulate upon the target
  exponent         1.0      # exponent of proportionality of damage with radius.
                            # ( e = 1.0 ==> linear damage within blast region,
                            #   e > 1.0 ==> more damaging within the blast region,
                            #   0.0 < e < 1.0 ==> less damaging within blast region. )
end_weapon_effects

###############################################################################
#                           Define the weapon types
###############################################################################

# *** NOTE:  If the ejector rack imparts initial velocity to the bomb, it should
#            be specified in the weapons below as keyword "launch_delta_v", and
#            the launch computers and LARs will need to be re-generated.

weapon BLUE_GPS_BOMB_1 WSF_EXPLICIT_WEAPON
   launched_platform_type BLUE_GPS_BOMB_1
   aux_data
      double lar_meters = 18520 # meters = 10 nm
   end_aux_data

   weapon_effects         BLUE_GPS_BOMB_1_EFFECT
end_weapon

