本栏目将对《AFSim 2.9中文参考手册》进行持续更新,欢迎关注交流!

对本书全文和AFSIM其它资料感兴趣的伙伴,可联系作者领取~

全部内容索引请看 ⬇️⬇️⬇️

《AFSim 2.9中文参考手册》-CSDN博客​编辑https://blog.csdn.net/henggesim/article/details/145566384

 AFSIM配套视频教程请看 ⬇️⬇️⬇️afsim2.9官方培训视频教程https://space.bilibili.com/3546837967440641https://space.bilibili.com/3546837967440641


processor <name> WSF_WEAPON_SERVER_PROCESSOR
   processor Commands ...
   Platform Part Commands ...
   External Link Commands ...

   wpn_server_type
   wpn_server_site
   wpn_server_application
   wpn_server_entity
   ack_time_tolerance
   reallocate_on_NACK
   debug

end_processor

概述

WSF_WEAPON_SERVER_PROCESSOR 实现了一个与外部武器服务器的处理器接口。它负责通过指定的网络连接处理向适当武器服务器的武器传输。

背景信息

  • 武器 ID 的唯一性: 在武器分配阶段之前和设置期间,ID 被称为存储 ID。在武器实际分配后,ID 被称为武器 ID。存储 ID 被发送到武器服务器处理器。武器服务器处理器可能会更改存储 ID,这取决于 WSF_EXPLICIT_WEAPON 块中是否为特定 weapon_system_type 设置了 dis_entity_id_offset 值。
weapon USER_WEAPON_TYPE WSF_EXPLICIT_WEAPON
    .
    .
    .
   dis_entity_id_offset 5000
end_weapon
  • 武器 ID 的生成: 在这种情况下,武器服务器处理器将存储 ID 加到 dis_entity_id_offset(如果未提供,则 dis_entity_id_offset 为 0)以形成武器 ID。武器 ID 将被视为武器的数据链或 JU 编号。此值也用于武器的 DisEntityState 实体 ID 字段,并在 SetData PDU 中设置,该 PDU 被传递到 DREAMS 武器服务器。在武器分配时,SetData PDU 被发送到 DREAMS 武器服务器应用程序。如果 DREAMS 武器服务器验证了分配 SetData PDU,它会返回一个响应的 Data PDU,分配字段设置为 1,表示武器已分配,然后武器进入 ALLOCATE (1) 状态,之后武器服务器处理器将发送脐带数据。如果武器服务器应用程序确认了该数据,则过程完成,武器进入 READY (4) 状态。武器只能在 READY 状态下发射,否则 Fire 命令无效。
  • 发射过程: 如果过程成功,并且使用武器 ID 参数执行了 Fire 命令,WSF 应用程序发出的 DisFire PDU 将在 DisFire PDU 实体 ID 字段中插入武器 ID。如果在没有武器 ID 参数的情况下执行发射命令,WSF 使用 WSF ID 方法来标识导弹。很可能在分配序列期间设置的 ID 不匹配,可能会导致发射序列出现问题。
  • 武器分配: 可以使用以下 WsfWeapon 脚本命令分配武器:AllocateTheWeapon()
  • 武器状态: 在发射前必须评估武器状态,并且必须处于 READY 状态(4)才能发射。返回状态为 1 表示武器已分配。返回状态为(3)表示武器从未分配。用户可以检查传出的 weapon_system_type 的 DIS 实体类型是否匹配。
  • 武器发射: 可以使用 WsfWeapon Fire 脚本命令发射武器。
  • 初始设置: 可以使用 WsfWeaponServerProcessor 函数 SetStoreIdTrackPairing_() 设置初始 store_id 值。

注意事项

确保在武器分配和发射过程中正确设置和使用武器 ID,以避免发射序列中的问题。

在发射前,确保武器处于 READY 状态,以确保 Fire 命令的有效性。

DIS 接口文件输入设置

在为 DREAMS 武器服务器设置 DIS 接口文件时,dis_interface 块应按照通常的方式设置,其中 site 和 application 字段应与 XML 输入文件中的 platform 块匹配。以下是设置的关键点:

DIS 接口块设置

  • site: 这个字段应该与 XML 输入文件中 platform 块的 site 字段匹配。它指定了武器服务器所在的站点。
  • application: 这个字段应该与 XML 输入文件中 platform 块的 application 字段匹配。它指定了武器服务器应用程序的标识。

注意事项

  • 确保 site 和 application 字段的值在 dis_interface 块和 platform 块中是一致的,以确保正确的网络连接和数据传输。
  • 在配置 DIS 接口时,确保所有相关的网络参数和标识符都正确设置,以避免通信错误。
  • 通过正确配置这些字段,DREAMS 武器服务器能够通过指定的网络连接正确处理武器的传输和分配。
wsrc_userName.xml input file

.
.
.

<platform>
 <entity-id>
 <site>79</site>
 <appv2000</app>
  .
  .
  .
 </entity-id>
 </platform>

<munition-type-defn>
 <!-- Assign a unique identifier to the munition type  -->
  <name>JDRADM_POD</name>
  <enable>true</enable>
  <entity-type>
   <kind>2</kind>
   <domain>1</domain>
   <country>225</country>
   <category>1</category>
   <subcategory>29</subcategory>
   <specific>0</specific>
   <extra>0</extra>
  </entity-type>
  .
  .
  .
</munition-type-defn>
.
.
.
end of wsrc_userName.xml file.
dis_interface

  site              79
  application 2000
  exercise     1
  port             3456
    .
    .
    .

  //List both the weapon system type and the weapon platform type in the entity_type list
  //in the entity_type list.  Note the entity type match in the munition-type-defn portion
  //of the DREAMS xml file.

  //entity_type_keyword      weapon_server_type      kind do main country cat subcat specific extra

  entity_type            &nbsp
    ;       ATA_POD
            2 1 225 1 29 0 0  // Must match
                            // out_going_weapon_transfer
                            // input line
  entity_type            &nbsp
    ;      ATA_PLATFORM           &nbsp
    ;  2 1 225 1 29 0 0  // Must match the
                           // out_going_weapon_transfer
                           // input line

    .
    .
    .

This is the critical line that does the weapon transfer out and does the fire PDU and drops the weapon on the WSF
side. Add this line for all weapon_system_types that are going to be controlled by the weapon server.

  outgoing_weapon_transfer ATA_POD
  outgoing_weapon_transfer msl_weapon_jassm
  outgoing_weapon_transfer msl_weapon_sdb_new

end_dis_interface

WSF 输入文件更改以适应武器服务器接口

在为 DREAMS 武器服务器配置 WSF 输入文件时,需要进行以下更改:

目标的空间域

空间域设置: 对于每个 DREAMS 武器目标,必须指定 spatial_domain。这用于填充 DREAMS 武器服务器期望的空对地或空对空字段。根据平台类型适当地添加 spatial_domain,例如:

spatial_domain <air | land>

这确保了目标的空间域与武器服务器的期望相匹配。

导弹类型的范围设置

范围设置: 每种导弹类型都有其自己的范围,这通过在 WSF_EXPLICIT_WEAPON 块中使用 dis_entity_id_offset 来设置。例如:

weapon USER_WEAPON_TYPE WSF_EXPLICIT_WEAPON
    dis_entity_id_offset <range_value>
end_weapon

这允许为每种导弹类型指定特定的范围值,以确保在武器服务器中正确配置。

注意事项

确保 spatial_domain 和 dis_entity_id_offset 的设置与武器服务器的需求一致,以避免通信和配置错误。

这些设置对于确保武器服务器能够正确识别和处理目标和导弹类型至关重要。

weapon msl_weapon_jassm WSF_EXPLICIT_WEAPON
  quantity 12
  launched_platform_type msl_platform_jassm
  weapon_effects msl_effects
  dis_entity_id_offset <DisUint16 Value>

  aux_data
   // available fields to set umbilical data
   // 1 = laser; 2 = sensor; 3 = coordinate (default 2)
   int attack_mode = 2

   // To define one of the source target originator fields, use one of the two options
   // 1) use initial_target_index_originator - track information coming from launching platform
   // 2) use third_party_source_number to set a third party as the source of track information.
   // They are mutually exclusive
   // Each option has a bool input that must be set to, true, in order for the field to be
   // set with the assigned data.
   // To use the initial target index originator/target index pair (and NOT the third party
   // source number).
   // Set the associated bool first
   //    bool use_initial_target_index_originator <true | yes | false | no>
   // if omitted will be 0 or false and data field will not get set.
   //
   // bool use_initial_target_index_originator = true
   //
   // Then set data for the the initial target index originator field,
   //    initial_target_index_originator <decimal-track-number>
   // where decimal-track-number = decimal_track_number defined in the l16_computer block.
   //
   // int initial_target_index_originator = 121
   //
   // XOR
   //
   // Set the bool to allow the third_party_source_number field to be filled.
   //    use_third_party_source_number <true | yes | false | no>
   // If omitted or use_third_party_source_number set to <no | false > then the third-party source number
   // will not be used.
   //bool use_third_party_source_number = true
   //
   // Set the third-party source number field
   //    third_party_source_number <decimal-track-number>
   // Where the decimal-track-number = decimal_track_number defined in the l16_computer block.
   int third_party_source_number = 121
   //
   // can reassign the weapon site and application value, else will be site and
   app found in dis text file
   int weapon_site
   int weapon_app
  end_aux_data

 end_weapon

platform platform_name WSF_PLATFORM
 aux_data
  int initial_target_index_originator = 120
  // match decimal_track_number in l16_computer, else will use the platform's index
  int decimal_track_number = 120
 aux_data
end_platform

For Each Platform that is to interact with the weapon server must have a weapon server processor.

processor <name> WSF_WPN_SERVER_PROCESSOR
  available inputs
   <on | off>
   update_interval time
   wpn_server_type <DREAMS | WSF | VENDOR_R>
   wpn_server_site
value
// maps to site macrotag
   wpn_server_application value     // maps to app macrotag
   wpn_server_entity
value              // maps to entity macrotag
   ack_tolerance_time
time             // time it takes before resend if weapon server does not respond
end_processor

 Example shown below:

platform_type weapon_server_type WSF_PLATFORM
   .
   .
   .
 // would have link16 comm set up here also

 // launching platform or at least the one sending the initial
 // allocation data (set data pdus) to the weapon server
 processor wpn_server_proc WSF_WPN_SERVER_PROCESSOR
  on
  update_interval 1 sec
  wpn_server_type DREAMS
  wpn_server_site 11
  wpn_server_application 22
  wpn_server_entity 33
  ack_tolerance_time 3 s
 end_processor
   .
   .
   .
end_platform
Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐