WSF
WsfEW_PowerEffect.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 WSFEW_POWEREFFECT_HPP
13#define WSFEW_POWEREFFECT_HPP
14
15#include "wsf_mil_export.h"
16
17#include <iosfwd>
18#include <map>
19#include <vector>
20
21#include "TblLookup.hpp"
22class UtInput;
23
24class WsfEW_EA;
25class WsfEW_EP;
26#include "WsfEM_Interaction.hpp"
28#include "WsfEW_Types.hpp"
29
30
34
35class WSF_MIL_EXPORT WsfEW_PowerEffect : public WsfEW_RepeaterEffect
36{
37public:
40 ~WsfEW_PowerEffect() override = default;
41 WsfEW_Effect* Clone() const override;
42 bool Initialize(WsfSimulation& aSimulation) override;
43 bool ProcessInput(UtInput& aInput) override;
44
45 void ApplyUnmitigatedEffect(WsfEW_Effects& aEW_Effects) const override;
46
47 void ApplyMitigatedEffect(WsfEW_Effect* aEW_EffectPtr, WsfEW_Effects& aEW_Effects) const override;
48
49 void UpdateEffects(double aSimTime,
50 const WsfEM_Interaction& aTargetInteraction,
51 const WsfEM_Interaction& aJammerToTgtInteraction,
52 const ut::optional<WsfEM_Interaction>& aTgtToJammerInteraction,
53 WsfEW_Effects& aEW_Effects,
54 WsfEW_Effect* aEW_EffectPtr = nullptr) override;
55
57
58
59 double GetJammingPowerGain(WsfStringId aSystemTypeId) const;
60 void SetJammingPowerGain(WsfStringId aSystemTypeId, double aJammingPowerGain);
61
62 double GetModulationGain(WsfStringId aSystemTypeId) const;
63 void SetModulationGain(WsfStringId aSystemTypeId, double aModulaitonGain);
64
65 double GetSignalPowerGain(WsfStringId aSystemTypeId) const;
66 void SetSignalPowerGain(WsfStringId aSystemTypeId, double aSignalPowerGain);
67
68 double GetRcvrNoiseGain(WsfStringId aSystemTypeId) const;
69 void SetRcvrNoiseGain(WsfStringId aSystemTypeId, double aRcvrNoiseGain);
70
71 double GetJtoSGain(WsfStringId aSystemTypeId, Coherency aCoherencyType = cEC_NONE) const;
72 size_t GetJtoSTableSize(WsfStringId aSystemTypeId) const;
73
75
76protected:
78 {
79 public:
81 {
82 TblIndVarU<double> mJtoX;
83 TblDepVar1<double> mGain;
84 };
85
86 PowerData();
87 PowerData& operator=(const PowerData&) = delete;
88 ~PowerData() override = default;
89
90 bool ProcessInput(UtInput& aInput) override;
91 bool Initialize(WsfSimulation& aSimulation) override;
92
93 EW_EffectData* Clone() const override;
94
95 void Reset() override;
96
102
103 protected:
104 PowerData(const PowerData& aSrc) = default;
105 };
106
108
109
111
112 EffectData* NewEffectData() override { return new PowerData(); }
113 EffectData* PropagateEffectDataPtr(WsfStringId aSystemTypeId) override;
115
116
117private:
118 using PowerDataMap = std::map<WsfStringId, PowerData*>;
119
120 PowerDataMap mPowerDataMap;
121
126 double mJammerToSignal[3];
127};
128
129#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
Definition WsfEM_Interaction.hpp:68
Definition WsfEW_EA.hpp:37
Definition WsfEW_EP.hpp:36
Base effect data used to derive from in inheriting effect classes.
Definition WsfEW_Effect.hpp:317
Coherency
The signal coherency the EW effect exhibits on the affected system.
Definition WsfEW_Effect.hpp:74
@ cEC_NONE
Definition WsfEW_Effect.hpp:75
WsfEW_Effect()=default
Definition WsfEW_Effects.hpp:41
Definition WsfEW_PowerEffect.hpp:78
PowerData(const PowerData &aSrc)=default
PowerData()
Definition WsfEW_PowerEffect.cpp:606
double mJammingPowerGain
Definition WsfEW_PowerEffect.hpp:97
double mSignalPowerGain
Definition WsfEW_PowerEffect.hpp:100
~PowerData() override=default
void Reset() override
Definition WsfEW_PowerEffect.cpp:705
double mModulationGain
Definition WsfEW_PowerEffect.hpp:98
double mRcvrNoiseGain
Definition WsfEW_PowerEffect.hpp:101
JtoXGainTable mJtoSGainTable
Table is modulation gain vs. j-to-s ratio.
Definition WsfEW_PowerEffect.hpp:99
PowerData & operator=(const PowerData &)=delete
double GetRcvrNoiseGain(WsfStringId aSystemTypeId) const
Definition WsfEW_PowerEffect.cpp:549
EffectData * NewEffectData() override
Definition WsfEW_PowerEffect.hpp:112
double GetSignalPowerGain(WsfStringId aSystemTypeId) const
Definition WsfEW_PowerEffect.cpp:530
size_t GetJtoSTableSize(WsfStringId aSystemTypeId) const
Definition WsfEW_PowerEffect.cpp:595
double GetJammingPowerGain(WsfStringId aSystemTypeId) const
Definition WsfEW_PowerEffect.cpp:492
double GetJtoSGain(WsfStringId aSystemTypeId, Coherency aCoherencyType=cEC_NONE) const
Definition WsfEW_PowerEffect.cpp:568
WsfEW_PowerEffect & operator=(const WsfEW_PowerEffect &)=delete
void SetRcvrNoiseGain(WsfStringId aSystemTypeId, double aRcvrNoiseGain)
Definition WsfEW_PowerEffect.cpp:559
void SetSignalPowerGain(WsfStringId aSystemTypeId, double aSignalPowerGain)
Definition WsfEW_PowerEffect.cpp:540
WsfEW_PowerEffect()
Definition WsfEW_PowerEffect.cpp:30
void SetModulationGain(WsfStringId aSystemTypeId, double aModulaitonGain)
Definition WsfEW_PowerEffect.cpp:521
void SetJammingPowerGain(WsfStringId aSystemTypeId, double aJammingPowerGain)
Definition WsfEW_PowerEffect.cpp:502
double GetModulationGain(WsfStringId aSystemTypeId) const
Definition WsfEW_PowerEffect.cpp:511
~WsfEW_PowerEffect() override=default
Definition WsfEW_RepeaterEffect.hpp:104
bool ProcessInput(UtInput &aInput) override
Definition WsfEW_RepeaterEffect.cpp:75
WsfEW_Effect * Clone() const override
Definition WsfEW_RepeaterEffect.cpp:56
void UpdateEffects(double aSimTime, const WsfEM_Interaction &aTargetInteraction, const WsfEM_Interaction &aJammerToTgtInteraction, const ut::optional< WsfEM_Interaction > &aTgtToJammerInteraction, WsfEW_Effects &aEW_Effects, WsfEW_Effect *aEW_EffectPtr=nullptr) override
Definition WsfEW_RepeaterEffect.cpp:131
WsfEW_RepeaterEffect()
Definition WsfEW_RepeaterEffect.cpp:35
void ApplyMitigatedEffect(WsfEW_Effect *aEW_EffectPtr, WsfEW_Effects &aEW_Effects) const override
Definition WsfEW_RepeaterEffect.cpp:125
EffectData * PropagateEffectDataPtr(WsfStringId aSystemTypeId) override
Definition WsfEW_RepeaterEffect.cpp:222
void ApplyUnmitigatedEffect(WsfEW_Effects &aEW_Effects) const override
Definition WsfEW_RepeaterEffect.cpp:81
bool Initialize(WsfSimulation &aSimulation) override
Definition WsfEW_RepeaterEffect.cpp:62
The main controller for a simulation.
Definition WsfSimulation.hpp:109
Definition WsfEW_PowerEffect.hpp:81
TblDepVar1< double > mGain
Definition WsfEW_PowerEffect.hpp:83
TblIndVarU< double > mJtoX
Definition WsfEW_PowerEffect.hpp:82
Copyrights Multiple, All Rights Reserved