WSF
WsfExplicitWeaponEffects.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2003-2015 The Boeing Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WSFEXPLICITWEAPONEFFECTS_HPP
13#define WSFEXPLICITWEAPONEFFECTS_HPP
14
15#include "wsf_mil_export.h"
16
17class WsfPlatform;
18#include "WsfWeaponEffects.hpp"
19
22
23class WSF_MIL_EXPORT WsfExplicitWeaponEffects : public WsfWeaponEffects
24{
25public:
27 ~WsfExplicitWeaponEffects() override = default;
28
29 WsfWeaponEffects* Clone() const override;
30
31 bool ProcessInput(UtInput& aInput) override;
32
34 virtual double MaximumEffectiveRadiusSquared() const;
35
37 virtual double MaximumEffectiveRadius() const;
38
40 void SetMaxiumEffectiveRadius(double aRadius) { mMaxRadius = aRadius; }
41
42protected:
44
45 void CalcInterceptPk(double aSimTime, WsfPlatform* aTargetPtr) override;
46
47 void CalcPkParameters(WsfPlatform* aTargetPtr,
48 double& aAzimuth,
49 double& aElevation,
50 double& aMissileSpeed,
51 double& aTargetSpeed) override;
52
53 // Overrides base class implementation, and adds a second range radius test.
54 bool IsVulnerable(WsfPlatform* aTargetPtr) override;
55
58 double LastTestRadiusSquared() const { return mRadiusSquared; }
59
60 void CalcInterceptGeometry(WsfPlatform* aTargetPtr, double& aRangeRate, double& aApproachAngle);
61
62private:
65
66 void CalcInterceptGeometry(const double aInterceptorVel[],
67 const double aTargetVel[],
68 double& aRangeRate,
69 double& aApproachAngle);
70
71 // This is a time saver... derived weapon effect functions
72 // will not be evaluated when target and weapon are more than this radius apart.
73 double mMaxRadius;
74 double mRadiusSquared;
75};
76
77#endif
Definition WsfExplicitWeaponEffects.hpp:24
void SetMaxiumEffectiveRadius(double aRadius)
Set the radius beyond which the weapon has no effect.
Definition WsfExplicitWeaponEffects.hpp:40
virtual double MaximumEffectiveRadiusSquared() const
Access the miss radius squared beyond which the weapon has no effect.
Definition WsfExplicitWeaponEffects.cpp:47
virtual double MaximumEffectiveRadius() const
Access the miss radius beyond which the weapon has no effect.
Definition WsfExplicitWeaponEffects.cpp:55
WsfExplicitWeaponEffects(WsfScenario &aScenario)
Definition WsfExplicitWeaponEffects.cpp:29
~WsfExplicitWeaponEffects() override=default
double LastTestRadiusSquared() const
Definition WsfExplicitWeaponEffects.hpp:58
WsfExplicitWeaponEffects(const WsfExplicitWeaponEffects &aSrc)=default
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
virtual void CalcInterceptPk(double aSimTime, WsfPlatform *aTargetPtr)
Definition WsfWeaponEffects.cpp:640
bool ProcessInput(UtInput &aInput) override
Definition WsfWeaponEffects.cpp:178
virtual void CalcPkParameters(WsfPlatform *aTargetPtr, double &aAzimuth, double &aElevation, double &aMissileSpeed, double &aTargetSpeed)
Definition WsfWeaponEffects.cpp:886
WsfWeaponEffects & operator=(const WsfWeaponEffects &aRhs)
virtual bool IsVulnerable(WsfPlatform *aOtherPlatformPtr)
Definition WsfWeaponEffects.cpp:670
WsfWeaponEffects * Clone() const override=0
WsfWeaponEffects(WsfScenario &aScenario)
Definition WsfWeaponEffects.cpp:51
Copyrights Multiple, All Rights Reserved