WSF
WsfATG_LaunchComputer.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 WSFATG_LAUNCHCOMPUTER_HPP
13#define WSFATG_LAUNCHCOMPUTER_HPP
14
15#include "wsf_mil_export.h"
16
17#include <list>
18#include <vector>
19
20class UtInput;
21#include "WsfATG_WeaponLAR.hpp"
22#include "WsfLaunchComputer.hpp"
23class WsfPlatform;
24class WsfTrack;
25#include "WsfTrackId.hpp"
26class WsfWeapon;
27
37
38class WSF_MIL_EXPORT WsfATG_LaunchComputer : public WsfLaunchComputer
39{
40public:
41 using ATGWeaponLARCollection = std::vector<WsfATG_WeaponLAR*>;
42
44 static std::string BaseTypeName() { return "WSF_ATG_LAUNCH_COMPUTER"; }
45
47 ~WsfATG_LaunchComputer() override;
48
49 WsfLaunchComputer* Clone() const override;
50 bool Initialize(double aSimTime, WsfWeapon* aWeaponPtr) override;
51 bool ProcessInput(UtInput& aInput) override;
52
53 void Update(double aSimTime) override;
54
55 double EstimatedTimeToIntercept(double aSimTime, const WsfTrack& aTrack, double aLaunchDelayTime) override;
56
57 void SelectLAR(double aLaunchAlt, double aLaunchSpeed);
58
59 const ATGWeaponLARCollection& GetWeaponLARs() { return mWeaponLARs; }
60 int GetBestFitLAR_Index() { return mBestFitLAR; }
61 WsfATG_WeaponLAR* GetBestFitLAR() { return mWeaponLARs[mBestFitLAR]; }
62
63protected:
65 WsfATG_LaunchComputer& operator=(const WsfATG_LaunchComputer&) = delete; // Not implemented
66
67 bool InitializeTTIData() override;
68 bool WithinConstraintsAt(double aSimTime, double aFutureInterceptTime, const WsfTrack& aTrack) override;
69
70private:
71 ATGWeaponLARCollection mWeaponLARs;
72 int mBestFitLAR;
73 double mLastUpdate;
74 bool mDebugLARs{false};
75};
76
77#endif
Definition WsfATG_LaunchComputer.hpp:39
WsfATG_WeaponLAR * GetBestFitLAR()
Definition WsfATG_LaunchComputer.hpp:61
static std::string BaseTypeName()
The basic type name (needed by weapon_tools and launch computer processor).
Definition WsfATG_LaunchComputer.hpp:44
int GetBestFitLAR_Index()
Definition WsfATG_LaunchComputer.hpp:60
WsfATG_LaunchComputer & operator=(const WsfATG_LaunchComputer &)=delete
std::vector< WsfATG_WeaponLAR * > ATGWeaponLARCollection
Definition WsfATG_LaunchComputer.hpp:41
const ATGWeaponLARCollection & GetWeaponLARs()
Definition WsfATG_LaunchComputer.hpp:59
WsfATG_LaunchComputer()
Definition WsfATG_LaunchComputer.cpp:31
A class for specifying Weapon Launch Acceptable Regions (LARs) for Air-to-Ground weapons.
Definition WsfATG_WeaponLAR.hpp:28
Definition WsfLaunchComputer.hpp:35
virtual bool InitializeTTIData()
Definition WsfLaunchComputer.cpp:440
virtual void Update(double aSimTime)
Definition WsfLaunchComputer.cpp:512
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 WithinConstraintsAt(double aSimTime, double aFutureInterceptTime, const WsfTrack &aTrack)
Definition WsfLaunchComputer.cpp:654
virtual bool Initialize(double aSimTime, WsfWeapon *aWeaponPtr)
Definition WsfLaunchComputer.cpp:393
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
An object that represents an 'track' (perception) of something.
Definition WsfTrack.hpp:120
Definition WsfWeapon.hpp:63
Copyrights Multiple, All Rights Reserved