WSF
ATA_LaunchComputerGenerator.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 ATA_LAUNCHCOMPUTERGENERATOR_HPP
13#define ATA_LAUNCHCOMPUTERGENERATOR_HPP
14
15#include <fstream>
16#include <string>
17#include <vector>
18
19#include "WeaponToolsExport.hpp"
20
22#include "Tool.hpp"
23
59
61{
62public:
66 Tool* Clone() const override;
68 bool Initialize(WsfSimulation& aSimulation) override;
69 bool ProcessInput(UtInput& aInput) override;
70 void Update(double aSimTime) override;
71
72protected:
73 void WriteOutputFile();
74 void ResolveNames() override;
75
76private:
78 enum StateType
79 {
80 cUNINITIALIZED = 0,
81 cINITIALIZED,
82 cENVELOPE_GENERATION,
83 cDONE
84 };
85
86 void ErrorBailout() override;
87
88 void Finish()
89 {
90 mState = cDONE;
91 mDone = true;
92 mObserver.SetAllDone();
93 }
94
95 bool FireNewWeapon(double aSimTime) override;
96
97 bool PlaceNewTarget(double aSimTime, WsfTrack& aTrack);
98
99 int mTargetCount;
100 size_t mTgtIndex;
101 int mQuantityLaunched;
102 int mHitCount;
103 int mMissCount;
104
105 double mSpeed;
106 double mSavedMinRange;
107 double mSavedMaxRange;
108 double mSavedMaxAzimuth;
109 double mSavedMaxElevation;
110 double mSavedMinElevation;
111 double mSavedMaxRangeRate;
112 double mSavedMinRangeRate;
113 double mSavedMaxBoresight;
114
115 // --- Varying State Values
116 bool mFirstTime;
117 bool mFirstPass;
118 bool mHitAtShortestRange;
119 bool mHitAtLongestRange;
120
121 StateType mState;
122 std::ofstream mOutFile;
123 std::string mGenTime;
124
125 // Most of the functionality required is in the
126 // software object that this tool creates:
127 WsfATA_LaunchComputer* mATALCPtr;
128};
129
130#endif
#define WT_EXPORT
Definition WeaponToolsExport.hpp:26
ATA_LaunchComputerGenerator & operator=(const ATA_LaunchComputerGenerator &)=delete
ATA_LaunchComputerGenerator(WsfScenario &aScenario)
Definition ATA_LaunchComputerGenerator.cpp:42
void WriteOutputFile()
Output a data file defining the Launch Computer just generated.
Definition ATA_LaunchComputerGenerator.cpp:349
virtual bool Initialize(WsfSimulation &aSimulation)
Definition Tool.cpp:206
bool ProcessInput(UtInput &aInput) override
Definition Tool.cpp:103
Tool(const Tool &aSrc)
Definition Tool.cpp:65
virtual void Update(double aSimTime)
Definition Tool.cpp:336
virtual void ErrorBailout()
Definition Tool.hpp:84
virtual void ResolveNames()
Method called to determine what the output objects and file names are called.
Definition Tool.cpp:360
Tool * Clone() const override=0
virtual bool FireNewWeapon(double aSimTime)=0
Definition WsfATA_LaunchComputer.hpp:34
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
The main controller for a simulation.
Definition WsfSimulation.hpp:109
Copyrights Multiple, All Rights Reserved