WsfBMWeaponInterface¶
- WsfBMWeaponInterface
WsfBMWeaponInterface is the script interface for the battle manager’s friendly weapon perception. Assets that have weapons will be able to use this interface to add weapon initialization for those weapons and calling the WsfBMAssetRecord AddWeaponInfo () interface. This interface primarily introspects the referenced AFSIM weapon and passes that on to the appropriate models(hence the getters but no setters).
Methods¶
- void SetSAMInfo(WsfBMAssetRecord asset_record, int weapon_idx)¶
Marks the weapon as a surface-to-air missile and the asset as a SAM system.
Parameters
WsfBMAssetRecord asset_record: asset record that the weapon will be attached to.
string name: Platform name of the referenced asset.
int weapon_idx: Weapon index(0-based) of the WsfWeapon on the reported platform for this assignment.
- void SetAIInfo(WsfBMAssetRecord asset_record, int weapon_idx)¶
Marks the weapon as a air-to-air missile and the asset as an AI system.
Parameters
WsfBMAssetRecord asset_record: asset record that the weapon will be attached to.
string name: Platform name of the referenced asset.
int weapon_idx: Weapon index(0-based) of the WsfWeapon on the reported platform for this assets weapon.
- int GetNumMunitions()¶
Returns the number of munitions on the underlying AFSIM weapon.
- int GetMaxEngagements()¶
Returns the max simulataneous engagements of the underlying AFSIM weapon. WsfWeapon.MaximumRequestCount.
- double GetInterceptSpeed()¶
Returns the intercept speed of the underlying weapon. Since this is not a property of the current AFSIM weapon classes, this interface looks for aux data attached to the weapon with the name of WSF_BM_WSYS_INTERCEPT_SPEED containing the average intercept speed of the weapon in meters/second.
- int GetWsysID()¶
Returns the weapon system id of the weapon. This corresponds to the weapon index(0-based) of the WsfWeapon on the reported platform for this assets weapon.
- void AddMez(WsfZone zone, double priority)¶
Adds zone as a missile engagement zone to the weapon. Multiple zones can be attached to a single weapon.
Parameters
WsfZone zone: Zone definition of the MEZ.
double priority: Zone priority 1.0 being the highest priority.
- void AddFez(:class:,WsfZone, zone, double priority)¶
Adds zone as a fighter engagement zone to the weapon. Multiple zones can be attached to a single weapon. This call is primarily added for symmetry with SAMS. Fighter engagement zones are typically employed at the asset level but this is achieved by adding the same FEZ to all AI weapons.
Parameters
WsfZone zone: Zone definition of the FEZ.
double priority: Zone priority 1.0 being the highest priority.