WSF
RunConfig.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI//REL TO USA ONLY
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// Updated by Infoscitex, a DCS Company.
13// ****************************************************************************
14
15#ifndef RUNCONFIG_HPP
16#define RUNCONFIG_HPP
17
18class UtInput;
19
20#include "OutputConfig.hpp"
21#include "SiteConfig.hpp"
22#include "TargetConfig.hpp"
23#include "Utilities.hpp"
24
25namespace engage
26{
27
28class InputConfig;
29class Simulation;
30class Task;
31
33{
34public:
35 typedef std::list<OutputConfig> OutputList;
36
37 RunConfig(const InputConfig& aInputConfig);
38
39 bool Complete(int aRunIndex, int aBaseTaskIndex);
40
41 bool ProcessInput(UtInput& aInput);
42
44 const OutputList& GetOutputList() const { return mOutputList; }
45
47 const SiteConfig& GetSiteConfig() const { return mSiteConfig; }
48
50 const TargetConfig& GetTargetConfig() const { return mTargetConfig; }
51
52 std::string GetRecordFileName(const Task& aTask) const;
53
54 std::string GetEventOutputFileName(const Task& aTask) const;
55
57 int GetRepetitionCount() const { return mRepetitionCount; }
58
60 int GetRunIndex() const { return mRunIndex; }
61
63 int GetTaskCount() const { return mTaskCount; }
64
66 const Utilities& GetUtilities() const { return mUtilities; }
67
68 bool CreatePlatforms(Simulation& aSimulation, const Task& aTask) const;
69
70 Task MakeTask(int aTaskIndex) const;
71
73 std::string GetPkTargetType() const { return mPkTargetType; }
74
76 std::string GetPkSiteType() const { return mPkSiteType; }
77
79 bool IsPkTableGen() const { return mEnablePkTableGen; }
80
82 bool IsSiteGrid() const { return mSiteGridRun; }
83
85 std::string GetPkPath() const { return mPkOutputPath; }
86
88 bool IsPkPeriodicFlush() const { return mPkPeriodicFlush; }
89
91 std::string GetPkLengthUnit() const { return mPkLengthUnits; }
92
94 std::string GetPkVelocityUnit() const { return mPkVelocityUnits; }
95
96private:
97 const InputConfig& mInputConfig;
98 int mRepetitionCount; // REPS, 1.0
99 bool mRunAllRepetitions; // REPALL, 1
100 bool mRunUntilNonZeroPk; // FINDPK, 0
101 double mTrackDetectDelayTime; // FDEL, 2.0
102 double mFirstEngageAttemptTime; // FTOL, 0.0
103 double mLastEngageAttemptTime; // LTOL, 0.0
104 double mEngagementInterval; // RATE, 10.0 sec
105 bool mPerformFlyouts; // EXEFLY, 'true' if weapon flyouts are to be performed
106 int mSiteShotLimit; // NSHOT, 1,
107 bool mShootLookShoot; // SLSTYP, 2
108 double mSalvoDelay; // SLSDEL, 5.0
109 double mSalvoDelay2; // SLST2, 3.0
110 std::string mRecordFileBaseName;
111 std::string mEventOutputFileBaseName;
112
113 double mAzCueingError; // AZCUER, 0.0
114 double mElCueingError; // ELCUER, 0.0
115
116 int mPkTermType; // FINDPK, 0.0, 0=Run all, 1=stop after Pk>0.
117 OutputList mOutputList;
118 SiteConfig mSiteConfig;
119 TargetConfig mTargetConfig;
120 Utilities mUtilities;
121
122 int mRunIndex;
123 int mBaseTaskIndex;
124 int mTaskCount;
125
126 std::string mPkTargetType;
127 std::string mPkSiteType;
128 bool mEnablePkTableGen;
129 bool mSiteGridRun;
130 std::string mPkOutputPath;
131 bool mPkPeriodicFlush;
132 std::string mPkLengthUnits;
133 std::string mPkVelocityUnits;
134};
135
136} // namespace engage
137
138#endif
Definition InputConfig.hpp:33
std::list< OutputConfig > OutputList
Definition RunConfig.hpp:35
const SiteConfig & GetSiteConfig() const
Return a reference to the SiteConfig object.
Definition RunConfig.hpp:47
std::string GetPkTargetType() const
Return the target type for Pk Table generation.
Definition RunConfig.hpp:73
std::string GetRecordFileName(const Task &aTask) const
Definition RunConfig.cpp:250
const OutputList & GetOutputList() const
Return a reference to the OutputConfig object.
Definition RunConfig.hpp:44
std::string GetEventOutputFileName(const Task &aTask) const
Definition RunConfig.cpp:264
std::string GetPkPath() const
Return the Pk table output directory path.
Definition RunConfig.hpp:85
Task MakeTask(int aTaskIndex) const
Definition RunConfig.cpp:296
int GetTaskCount() const
Return the number of tasks needed to complete this run.
Definition RunConfig.hpp:63
std::string GetPkSiteType() const
Return the site type for Pk table generation.
Definition RunConfig.hpp:76
bool IsPkPeriodicFlush() const
Return if the grid should be periodically flushed.
Definition RunConfig.hpp:88
bool Complete(int aRunIndex, int aBaseTaskIndex)
This is called when all of the input has been read.
Definition RunConfig.cpp:112
int GetRunIndex() const
Return the run index for this run.
Definition RunConfig.hpp:60
std::string GetPkLengthUnit() const
Return the units used for Pk table length output.
Definition RunConfig.hpp:91
bool ProcessInput(UtInput &aInput)
Definition RunConfig.cpp:142
bool IsPkTableGen() const
Return if Pk table generation is enabled for this run.
Definition RunConfig.hpp:79
const Utilities & GetUtilities() const
Return a reference to the utilities object for coordinate conversions.
Definition RunConfig.hpp:66
std::string GetPkVelocityUnit() const
Return the units used for Pk table speed output.
Definition RunConfig.hpp:94
int GetRepetitionCount() const
Get the repetition count for this run.
Definition RunConfig.hpp:57
RunConfig(const InputConfig &aInputConfig)
Definition RunConfig.cpp:32
bool IsSiteGrid() const
Return if the grid is a site grid.
Definition RunConfig.hpp:82
bool CreatePlatforms(Simulation &aSimulation, const Task &aTask) const
Definition RunConfig.cpp:283
const TargetConfig & GetTargetConfig() const
Return a reference to the TargetConfig object.
Definition RunConfig.hpp:50
Definition Simulation.hpp:34
Definition SiteConfig.hpp:31
Definition TargetConfig.hpp:31
Definition Task.hpp:47
Definition Utilities.hpp:24
Definition ApplicationExtension.cpp:26
Copyrights Multiple, All Rights Reserved