WSF
WsfTabulatedLethality.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 WSFTABULATEDLETHALITY_HPP
13#define WSFTABULATEDLETHALITY_HPP
14
15#include "wsf_mil_export.h"
16
17#include <map>
18#include <vector>
19
21
47
49{
50public:
52 ~WsfTabulatedLethality() override = default;
53 WsfWeaponEffects* Clone() const override;
54 bool PreInitialize() override;
55 bool Initialize(double aSimTime, const WsfWeaponEngagement* aEngagementPtr) override;
56
57 bool ProcessInput(UtInput& aInput) override;
58
59 class Point
60 {
61 public:
63 : mCEP(0.0)
64 , mPk(0.0)
65 {
66 }
67 Point(double aCEP, double aPk)
68 : mCEP(aCEP)
69 , mPk(aPk)
70 {
71 }
72
73 double CEP() const { return mCEP; }
74 double Pk() const { return mPk; }
75
76 bool operator<=(const Point& rhs) const { return mCEP <= rhs.mCEP; } // Required for sort (SGI only).
77 bool operator>=(const Point& rhs) const { return mCEP >= rhs.mCEP; } // Required for sort (SGI only).
78 bool operator>(const Point& rhs) const { return mCEP > rhs.mCEP; } // Required for sort (SGI only).
79 bool operator<(const Point& rhs) const { return mCEP < rhs.mCEP; } // Required for sort.
80
81 private:
82 double mCEP; // Independent Variable
83 double mPk; // Dependent Variable
84 };
85
86protected:
87 void CalcInterceptPk(double aSimTime, WsfPlatform* aTargetPtr) override;
88
91
92private:
93 using Cell = std::vector<Point>;
94 using Targets = std::map<WsfStringId, Cell>;
95
96 Targets mTargets;
97 WsfStringId mInputTargetId;
98};
99
100#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
void CalcInterceptPk(double aSimTime, WsfPlatform *aTargetPtr) override
Definition WsfExplicitWeaponEffects.cpp:90
bool ProcessInput(UtInput &aInput) override
Definition WsfExplicitWeaponEffects.cpp:65
WsfExplicitWeaponEffects(WsfScenario &aScenario)
Definition WsfExplicitWeaponEffects.cpp:29
WsfWeaponEffects * Clone() const override
Definition WsfExplicitWeaponEffects.cpp:39
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
Point()
Definition WsfTabulatedLethality.hpp:62
bool operator>=(const Point &rhs) const
Definition WsfTabulatedLethality.hpp:77
bool operator<(const Point &rhs) const
Definition WsfTabulatedLethality.hpp:79
double CEP() const
Definition WsfTabulatedLethality.hpp:73
bool operator<=(const Point &rhs) const
Definition WsfTabulatedLethality.hpp:76
double Pk() const
Definition WsfTabulatedLethality.hpp:74
bool operator>(const Point &rhs) const
Definition WsfTabulatedLethality.hpp:78
Point(double aCEP, double aPk)
Definition WsfTabulatedLethality.hpp:67
WsfTabulatedLethality & operator=(const WsfTabulatedLethality &)=delete
WsfTabulatedLethality(const WsfTabulatedLethality &aSrc)=default
WsfTabulatedLethality(WsfScenario &aScenario)
Definition WsfTabulatedLethality.cpp:24
~WsfTabulatedLethality() override=default
virtual bool Initialize(double aSimTime, const WsfWeaponEngagement *aEngagementPtr)
Definition WsfWeaponEffects.cpp:150
virtual bool PreInitialize()
Definition WsfWeaponEffects.cpp:125
WsfWeaponEffects(WsfScenario &aScenario)
Definition WsfWeaponEffects.cpp:51
Definition WsfWeaponEngagement.hpp:43
Copyrights Multiple, All Rights Reserved