12#ifndef WSFAIRTOAIRLAUNCHCOMPUTER_HPP
13#define WSFAIRTOAIRLAUNCHCOMPUTER_HPP
15#include "wsf_mil_export.h"
20#include "UtAtmosphere.hpp"
40 static std::string
BaseTypeName() {
return "WSF_AIR_TO_AIR_LAUNCH_COMPUTER"; }
65 double aShooterInMach,
68 double aTargetInAspect,
70 double& aShooterOutAlt,
71 double& aShooterOutMach,
72 double& aTargetOutAlt,
73 double& aTargetOutMach,
74 double& aTargetOutAspect,
75 double& aTargetOutLead,
94 void Stream(std::ostream& aStream)
const;
113 bool IndexToIndices(
size_t aResultIndex,
114 size_t& aShooterAltIndex,
115 size_t& aShooterMachIndex,
116 size_t& aTargetAltIndex,
117 size_t& aTargetMachIndex,
118 size_t& aTargetAspectIndex,
119 size_t& aTargetLeadIndex)
const;
121 bool IndicesToIndex(
size_t aShooterAltIndex,
122 size_t aShooterMachIndex,
123 size_t aTargetAltIndex,
124 size_t aTargetMachIndex,
125 size_t aTargetAspectIndex,
126 size_t aTargetLeadIndex,
127 size_t& aResultIndex)
const;
129 bool IndexToValues(
size_t aResultIndex,
131 double& aShooterMach,
134 double& aTargetAspect,
135 double& aTargetLead)
const;
137 bool ValuesToIndices(
double aShooterAlt,
141 double aTargetAspect,
143 size_t& aShooterAltIndex,
144 size_t& aShooterMachIndex,
145 size_t& aTargetAltIndex,
146 size_t& aTargetMachIndex,
147 size_t& aTargetAspectIndex,
148 size_t& aTargetLeadIndex)
const;
150 bool GetResult(
size_t aResultIndex, Result& aResult)
const;
152 bool SetResult(
size_t aResultIndex,
const Result& aResult);
154 bool FindNearestIndex(
double aValue,
const std::vector<double>& aArray,
size_t& aIndex)
const;
158 bool Load(
const std::string& aFileName,
bool aDebugEnabled);
161 void Stream(std::ostream& aStream,
const std::string& aResultsFilename)
const;
162 void StreamResults(std::ostream& aStream,
const std::string& aResultsFilename)
const;
176 void StreamIndependentBlock(std::ostream& aStream)
const;
177 bool IVArraysOk(UtInput& aInput);
178 bool ArrayOk(UtInput& aInput,
const std::vector<double>& aArray,
const std::string& aArrayType,
double aMinimumDelta)
const;
179 bool ProcessIndependentBlock(UtInputBlock& aInputBlock);
180 void ProcessInterceptResults(UtInputBlock& aInputBlock);
206 std::shared_ptr<ATA_InterceptTable> mAirToAirTablePtr;
208 UtAtmosphere mAtmosphere;
void Load(PakI &aBuff, WsfXIO_PlatformPartInfo *&aPtr)
Definition WsfXIO_ObjectInfo.cpp:345
Definition WsfAirToAirLaunchComputer.hpp:86
const std::vector< double > & ShooterMachs() const
Definition WsfAirToAirLaunchComputer.hpp:167
size_t SizeOfTargetAspectSet() const
Definition WsfAirToAirLaunchComputer.hpp:106
std::vector< double > mTargetMachs
Definition WsfAirToAirLaunchComputer.hpp:186
size_t SizeOfShooterMachSet() const
Definition WsfAirToAirLaunchComputer.hpp:109
double NoEscapeManeuverAcceleration() const
Definition WsfAirToAirLaunchComputer.hpp:156
ATA_InterceptTable()
Definition WsfAirToAirLaunchComputer.cpp:294
size_t ResultsSize() const
Definition WsfAirToAirLaunchComputer.hpp:173
std::vector< double > mShooterAlts
Definition WsfAirToAirLaunchComputer.hpp:183
std::vector< double > mShooterMachs
Definition WsfAirToAirLaunchComputer.hpp:184
size_t SizeOfShooterAltSet() const
Definition WsfAirToAirLaunchComputer.hpp:110
std::vector< Result > mResults
Definition WsfAirToAirLaunchComputer.hpp:189
const std::vector< double > & TargetLeads() const
Definition WsfAirToAirLaunchComputer.hpp:171
size_t SizeOfResultsSet() const
Definition WsfAirToAirLaunchComputer.hpp:111
const std::vector< double > & TargetAspects() const
Definition WsfAirToAirLaunchComputer.hpp:170
size_t SizeOfTargetAltSet() const
Definition WsfAirToAirLaunchComputer.hpp:108
std::vector< double > mTargetLeads
Definition WsfAirToAirLaunchComputer.hpp:188
const std::vector< double > & TargetAlts() const
Definition WsfAirToAirLaunchComputer.hpp:168
size_t SizeOfTargetMachSet() const
Definition WsfAirToAirLaunchComputer.hpp:107
double mRNE_ManeuverAccel
Definition WsfAirToAirLaunchComputer.hpp:182
const std::vector< double > & TargetMachs() const
Definition WsfAirToAirLaunchComputer.hpp:169
std::vector< double > mTargetAlts
Definition WsfAirToAirLaunchComputer.hpp:185
const std::vector< double > & ShooterAlts() const
Definition WsfAirToAirLaunchComputer.hpp:166
std::vector< double > mTargetAspects
Definition WsfAirToAirLaunchComputer.hpp:187
Definition WsfAirToAirLaunchComputer.hpp:37
~WsfAirToAirLaunchComputer() override=default
bool ToolOnlyInitialize(double aSimTime)
Definition WsfAirToAirLaunchComputer.cpp:881
WsfAirToAirLaunchComputer & operator=(const WsfAirToAirLaunchComputer &)=delete
static constexpr double cNOT_SET
Definition WsfAirToAirLaunchComputer.hpp:200
bool LookupResult(const WsfTrack &aTrack, double &aRmax, double &aRmaxTOF, double &aRne, double &aRneTOF, double &aRmin, double &aRminTOF)
Definition WsfAirToAirLaunchComputer.cpp:73
static std::string BaseTypeName()
The basic type name (needed by weapon_tools and launch computer processor).
Definition WsfAirToAirLaunchComputer.hpp:40
WsfAirToAirLaunchComputer(const UtAtmosphere &aAtmosphere)
Definition WsfAirToAirLaunchComputer.cpp:35
ATA_InterceptTable & GetTable()
Definition WsfAirToAirLaunchComputer.hpp:194
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
Result()
Definition WsfAirToAirLaunchComputer.cpp:1061
double mRne
Definition WsfAirToAirLaunchComputer.hpp:98
double mRneTOF
Definition WsfAirToAirLaunchComputer.hpp:99
double mRmaxTOF
Definition WsfAirToAirLaunchComputer.hpp:97
double mRmin
Definition WsfAirToAirLaunchComputer.hpp:100
double mRminTOF
Definition WsfAirToAirLaunchComputer.hpp:101
bool IsNull() const
Definition WsfAirToAirLaunchComputer.cpp:1081
void Stream(std::ostream &aStream) const
Definition WsfAirToAirLaunchComputer.cpp:1086
double mRmax
Definition WsfAirToAirLaunchComputer.hpp:96
void Reset()
Definition WsfAirToAirLaunchComputer.cpp:1071