# ****************************************************************************
# 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.
# ****************************************************************************
# =============================================================================
#                             A generic SAR sensor
#
# The user of this definition is responsible for setting the installation
# location and orientation using the 'location', 'yaw' and 'pitch' commands
# in the instantiation of the sensor on the platform(_type).
#
# This implementation supports both spot and strip modes in a high and low
# resolution.
#
#          mode         resolution
#     -------------     ----------
#     SPOT_HI_RES          1 m       (default mode)
#     SPOT_LO_RES          5 m
#     STRIP_HI_RES         1 m
#     STRIP_LO_RES         5 m
#
# The default implementation does not automatically turn off for spot mode.
# If the user desires this capability, they should specify
#
#     sensor sar GENERIC_SAR
#        location ...
#        pitch    ...
#        yaw      ...
#        automatic_turn_off            # <---- Add this
#     end_sensor
# =============================================================================

antenna_pattern GENERIC_SAR_ANTENNA
   circular_pattern
      beamwidth                        3.17 deg
      peak_gain                        34.7 db
end_antenna_pattern

sensor GENERIC_SAR WSF_SAR_SENSOR

   slew_mode                           azimuth_and_elevation
   azimuth_slew_limits                 -70 deg 70 deg
   elevation_slew_limits               -70 deg 70 deg

   mode_template
      azimuth_field_of_view            -1.58 deg 1.58 deg
      elevation_field_of_view          -1.58 deg 1.58 deg
      maximum_range                    200 km

      electronic_beam_steering         azimuth_and_elevation
      electronic_beam_steering_limit   70.0 deg            # same as slew limits
      electronic_beam_steering_loss_exponent 1.4

      doppler_filter_broadening_factor 1.20                # Ka
      doppler_foldover_margin_factor   1.20                # Kd - or azimuth_overcollect_ratio

      transmitter
         antenna_pattern               GENERIC_SAR_ANTENNA
         power                         6 kw
         frequency                     10 ghz
         pulse_width                   50 us
         pulse_compression_ratio       7500 absolute
         # pulse_repetition_frequency  xxxx hz             # The PRF will be dynamically chosen
         internal_loss                 6.5 db
         attenuation_model             earce
      end_transmitter

      receiver
         antenna_pattern               GENERIC_SAR_ANTENNA
         # Bandwidth assumes a matched filter for a pulse width of 50 us (i.e.: 1 / pulse_width)
         bandwidth                     20 khz
         noise_figure                  4 db
      end_receiver

      detection_threshold              6 db

      reports_location
   end_mode_template

   mode SPOT_HI_RES
      operating_mode                   spot
      resolution                       1 m
   end_mode

   mode SPOT_LO_RES
      operating_mode                   spot
      resolution                       5 m
   end_mode

   mode STRIP_HI_RES
      operating_mode                   strip
      resolution                       1 m
   end_mode

   mode STRIP_LO_RES
      operating_mode                   strip
      resolution                       5 m
   end_mode

end_sensor
