12#ifndef WSFATA_LAUNCHCOMPUTER_HPP
13#define WSFATA_LAUNCHCOMPUTER_HPP
15#include "wsf_mil_export.h"
37 static std::string
BaseTypeName() {
return "WSF_ATA_LAUNCH_COMPUTER"; }
65 void SetDelta(
double aValue) { mDelta = aValue; }
66 double Delta()
const {
return mDelta; }
67 void SetMin(
double aValue) { mMin = aValue; }
68 double Min()
const {
return mMin; }
69 double Max()
const {
return mMin + mBins * mDelta; }
70 bool BinCenter(
unsigned int aIndex,
double& aValue)
const;
71 bool BinLower(
unsigned int aIndex,
double& aValue)
const;
72 bool BinUpper(
unsigned int aIndex,
double& aValue)
const;
73 bool GetIndex(
double aValue,
unsigned int& aIndex)
const;
78 unsigned int mBins{0};
86 void SetNumBins(
unsigned int aSize) { mValues.resize(aSize + 1, 0.0); }
87 unsigned int GetNumBins()
const {
return static_cast<unsigned int>(mValues.size() - 1); }
88 bool SetValue(
unsigned int aIndex,
double aValue);
89 bool Delta(
unsigned int aIndex,
double& aValue)
const;
90 double Min()
const {
return mValues[0]; }
91 double Max()
const {
return mValues[mValues.size() - 1]; }
92 bool BinCenter(
unsigned int aIndex,
double& aValue)
const;
93 bool BinLower(
unsigned int aIndex,
double& aValue)
const;
94 bool BinUpper(
unsigned int aIndex,
double& aValue)
const;
95 bool GetIndex(
double aValue,
unsigned int& aIndex)
const;
98 std::vector<double> mValues;
106 void AllocateResults(
unsigned int aSize);
107 void ResetAllIndices();
108 void SetResult(
double aValue);
109 bool IncrementRange();
128 unsigned int SizeOfAspectsSet()
const;
129 unsigned int SizeOfAzimuthsSet()
const;
130 unsigned int SizeOfElevationsSet()
const;
131 unsigned int SizeOfRangeRatesSet()
const;
132 unsigned int SizeOfRangeBinsSet()
const;
137 double GetResult()
const {
return mTOFResults.empty() ? 0.0 : mTOFResults[mIterIndex]; }
139 double TableTargetRange()
const;
140 double TableTargetRangeRate()
const;
141 double TableTargetAspect()
const;
142 double TableTargetAzimuth()
const;
143 double TableTargetElevation()
const;
159 mTableRanges.BinCenter(aIndex, value);
177 void ProcessInterceptBlock(UtInputBlock& aInputBlock);
178 void ProcessGenerateBlock(UtInputBlock& aInputBlock);
183 double GetTOF(
double aAspect,
double aAzimuth,
double aElevation,
double aRangeRate,
double aRange);
187 bool IncrementRangeRate();
188 bool IncrementTargetElevation();
189 bool IncrementTargetAzimuth();
190 bool IncrementShotAspect();
192 unsigned int mTableShotAspectIndex;
193 unsigned int mTargetAzIndex;
194 unsigned int mTargetElIndex;
195 unsigned int mRangeRateIndex;
196 unsigned int mRangeIndex;
197 unsigned int mIterIndex;
199 EvenlySpaced mTableShotAspects;
200 EvenlySpaced mTableTargetAzimuths;
201 EvenlySpaced mTableTargetElevations;
202 EvenlySpaced mTableRangeRates;
203 NotEvenlySpaced mTableRanges;
205 std::vector<double> mTOFResults;
Definition WsfATA_LaunchComputer.hpp:59
void SetNumBins(unsigned int aSize)
Definition WsfATA_LaunchComputer.hpp:63
double Min() const
Definition WsfATA_LaunchComputer.hpp:68
double Delta() const
Definition WsfATA_LaunchComputer.hpp:66
void SetMin(double aValue)
Definition WsfATA_LaunchComputer.hpp:67
unsigned int GetNumBins() const
Definition WsfATA_LaunchComputer.hpp:64
double Max() const
Definition WsfATA_LaunchComputer.hpp:69
void SetDelta(double aValue)
Definition WsfATA_LaunchComputer.hpp:65
Definition WsfATA_LaunchComputer.hpp:84
double Min() const
Definition WsfATA_LaunchComputer.hpp:90
void SetNumBins(unsigned int aSize)
Definition WsfATA_LaunchComputer.hpp:86
unsigned int GetNumBins() const
Definition WsfATA_LaunchComputer.hpp:87
double Max() const
Definition WsfATA_LaunchComputer.hpp:91
Definition WsfATA_LaunchComputer.hpp:34
bool TableLookUpUsed() const
Used by the Weapon_Tool during the Launch Computer Generation process.
Definition WsfATA_LaunchComputer.hpp:135
double TableRange(unsigned int aIndex) const
Used by the Weapon_Tool during the Launch Computer Generation process.
Definition WsfATA_LaunchComputer.hpp:156
double TableTargetElevation() const
Used by the Weapon_Tool during the Launch Computer Generation process.
Definition WsfATA_LaunchComputer.cpp:611
bool TableTargetRelHeading(unsigned int aIndex, double &aValue) const
Used by the Weapon_Tool during the Launch Computer Generation process.
Definition WsfATA_LaunchComputer.cpp:760
double TableTargetAzimuth() const
Used by the Weapon_Tool during the Launch Computer Generation process.
Definition WsfATA_LaunchComputer.cpp:603
double TableTargetRangeRate() const
Used by the Weapon_Tool during the Launch Computer Generation process.
Definition WsfATA_LaunchComputer.cpp:587
const NotEvenlySpaced & Ranges()
Used by the Weapon_Tool during the Launch Computer Generation process.
Definition WsfATA_LaunchComputer.hpp:120
unsigned int SizeOfResults() const
Used by the Weapon_Tool during the Launch Computer Generation process.
Definition WsfATA_LaunchComputer.hpp:126
unsigned int RangeRateIndex() const
Used by the Weapon_Tool during the Launch Computer Generation process.
Definition WsfATA_LaunchComputer.hpp:164
static std::string BaseTypeName()
The basic type name (needed by weapon_tools and launch computer processor).
Definition WsfATA_LaunchComputer.hpp:37
const EvenlySpaced & Elevations()
Used by the Weapon_Tool during the Launch Computer Generation process.
Definition WsfATA_LaunchComputer.hpp:116
unsigned int TargetElIndex() const
Used by the Weapon_Tool during the Launch Computer Generation process.
Definition WsfATA_LaunchComputer.hpp:166
double TableMaxRange() const
Used by the Weapon_Tool during the Launch Computer Generation process.
Definition WsfATA_LaunchComputer.hpp:154
unsigned int ShotAspectIndex() const
Used by the Weapon_Tool during the Launch Computer Generation process.
Definition WsfATA_LaunchComputer.hpp:170
WsfATA_LaunchComputer()
Definition WsfATA_LaunchComputer.cpp:30
unsigned int SizeOfAspectsSet() const
Used by the Weapon_Tool during the Launch Computer Generation process.
Definition WsfATA_LaunchComputer.cpp:549
const EvenlySpaced & Azimuths()
Used by the Weapon_Tool during the Launch Computer Generation process.
Definition WsfATA_LaunchComputer.hpp:114
double TableMinRange() const
Used by the Weapon_Tool during the Launch Computer Generation process.
Definition WsfATA_LaunchComputer.hpp:152
const EvenlySpaced & RangeRates()
Used by the Weapon_Tool during the Launch Computer Generation process.
Definition WsfATA_LaunchComputer.hpp:118
WsfATA_LaunchComputer & operator=(const WsfATA_LaunchComputer &)=delete
bool ToolOnlyInitialize(double aSimTime)
Definition WsfATA_LaunchComputer.cpp:778
unsigned int RangeIndex() const
Used by the Weapon_Tool during the Launch Computer Generation process.
Definition WsfATA_LaunchComputer.hpp:123
unsigned int TargetAzIndex() const
Used by the Weapon_Tool during the Launch Computer Generation process.
Definition WsfATA_LaunchComputer.hpp:168
bool TableTargetRange(unsigned int aIndex, double &aValue) const
const EvenlySpaced & Aspects()
Used by the Weapon_Tool during the Launch Computer Generation process.
Definition WsfATA_LaunchComputer.hpp:112
double GetResult() const
Used by the Weapon_Tool during the Launch Computer Generation process.
Definition WsfATA_LaunchComputer.hpp:137
virtual bool InitializeTTIData()
Definition WsfLaunchComputer.cpp:440
WsfLaunchComputer()
Definition WsfLaunchComputer.cpp:44
virtual double EstimatedTimeToIntercept(double aSimTime, const WsfTrack &aTrack, double aLaunchDelayTime)
Definition WsfLaunchComputer.cpp:749
WsfLaunchComputer * Clone() const override
Definition WsfLaunchComputer.cpp:518
bool ProcessInput(UtInput &aInput) override
Definition WsfLaunchComputer.cpp:171
virtual bool Initialize(double aSimTime, WsfWeapon *aWeaponPtr)
Definition WsfLaunchComputer.cpp:393
An object that represents an 'track' (perception) of something.
Definition WsfTrack.hpp:120
Definition WsfWeapon.hpp:63