WSF
WsfSA_Predict.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 2020 Infoscitex, a DCS 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 WSFSA_PREDICT_HPP
13#define WSFSA_PREDICT_HPP
14
15#include "wsf_air_combat_export.h"
16
17#include "WsfSA_Module.hpp"
18class WsfSA_Processor;
19
20enum class TurnDirection
21{
24}; // TODO add one for closest turn direction?
25
27class WSF_AIR_COMBAT_EXPORT WsfSA_Predict : WsfSA_Module
28{
29public:
30 friend class WsfSA_Processor;
31
35
37 // Starter functions, intended to be overridden in script by users with
38 // strong preferences for how to capture assumptions about an entity's behavior.
39
40 // Provides a best-guess for the entity's location (WCS) at some time in the future
41 virtual const WsfGeoPoint ProjectPositionInTime(double aSimTime, const WsfSA_EntityPerception& aEntity);
42
44 // Geometric approximations of where an entity might be if it carries out a particular maneuver.
45
46 virtual const WsfGeoPoint ProjectPositionForward(double aSimTime, const WsfSA_EntityPerception& aEntity);
47
48 virtual const WsfGeoPoint ProjectPositionLevelTurn(double aSimTime,
49 const WsfSA_EntityPerception& aEntity,
50 double aGLimit,
51 TurnDirection aDirection);
52
53 virtual const WsfGeoPoint ProjectPositionTurnToHeading(double aSimTime,
54 const WsfSA_EntityPerception& aEntity,
55 double aHeading,
56 double aGLimit);
57
58 virtual const WsfGeoPoint ProjectPositionGoToPoint(double aSimTime,
59 const WsfSA_EntityPerception& aEntity,
60 WsfGeoPoint aPointOfInterest,
61 double aGLimit);
62
63 virtual const WsfGeoPoint ProjectPositionRollAndPull(double aSimTime,
64 const WsfSA_EntityPerception& aEntity,
65 double aHeading_deg,
66 double aRollAngle_deg,
67 double aGLimit);
68
69 virtual const WsfGeoPoint ProjectPositionRollAndPull(double aSimTime,
70 const WsfSA_EntityPerception& aEntity,
71 double aRollAngle_deg,
72 double aGLimit);
73
74 virtual const WsfGeoPoint ProjectPositionSplitS(double aSimTime, const WsfSA_EntityPerception& aEntity, double aGLimit);
75
76protected:
77 WsfSA_Predict(const WsfSA_Predict& aSrc);
78
79 void Initialize(double aSimTime);
80
81 bool GetPerceivedState(const WsfSA_EntityPerception& aEntity, UtVec3dX& aLocationWCS, UtVec3dX& aVelocityWCS);
82
83 bool CheckRequestedTime(double aSimTime, const WsfSA_EntityPerception& aEntity);
84
85private:
86 // Script overrides for the prefab functionality
87
88 UtScript* mGenericProjectionScriptPtr{nullptr};
89
90 UtScript* mGoForwardScriptPtr{nullptr};
91 UtScript* mLevelTurnLeftScriptPtr{nullptr};
92 UtScript* mLevelTurnRightScriptPtr{nullptr};
93 UtScript* mTurnToHeadingScriptPtr{nullptr};
94 UtScript* mGoToPointScriptPtr{nullptr};
95 UtScript* mRollAndPullScriptPtr{nullptr};
96 UtScript* mRollAndPullToHeadingScriptPtr{nullptr};
97 UtScript* mSplitEssScriptPtr{nullptr};
98};
99
100#endif
TurnDirection
Definition WsfSA_Predict.hpp:21
@ cRIGHT
Definition WsfSA_Predict.hpp:23
@ cLEFT
Definition WsfSA_Predict.hpp:22
Definition WsfGeoPoint.hpp:29
Definition WsfSA_EntityPerception.hpp:37
WsfSA_Module(WsfSA_Processor *aSA_ProcPtr, WsfSA_Processor::PerceiveData *aDataPtr)
Definition WsfSA_Module.cpp:14
virtual const WsfGeoPoint ProjectPositionForward(double aSimTime, const WsfSA_EntityPerception &aEntity)
Prediction Primatives.
Definition WsfSA_Predict.cpp:237
virtual const WsfGeoPoint ProjectPositionLevelTurn(double aSimTime, const WsfSA_EntityPerception &aEntity, double aGLimit, TurnDirection aDirection)
Definition WsfSA_Predict.cpp:299
friend class WsfSA_Processor
Definition WsfSA_Predict.hpp:30
virtual const WsfGeoPoint ProjectPositionSplitS(double aSimTime, const WsfSA_EntityPerception &aEntity, double aGLimit)
Definition WsfSA_Predict.cpp:748
bool CheckRequestedTime(double aSimTime, const WsfSA_EntityPerception &aEntity)
Definition WsfSA_Predict.cpp:184
void Initialize(double aSimTime)
Definition WsfSA_Predict.cpp:33
virtual const WsfGeoPoint ProjectPositionTurnToHeading(double aSimTime, const WsfSA_EntityPerception &aEntity, double aHeading, double aGLimit)
Definition WsfSA_Predict.cpp:411
virtual const WsfGeoPoint ProjectPositionGoToPoint(double aSimTime, const WsfSA_EntityPerception &aEntity, WsfGeoPoint aPointOfInterest, double aGLimit)
Definition WsfSA_Predict.cpp:540
virtual const WsfGeoPoint ProjectPositionInTime(double aSimTime, const WsfSA_EntityPerception &aEntity)
Generic Prediction Methods.
Definition WsfSA_Predict.cpp:199
WsfSA_Predict(WsfSA_Processor *aSA_ProcPtr, WsfSA_Processor::PerceiveData *aDataPtr)
Definition WsfSA_Predict.cpp:21
WsfSA_Predict & operator=(const WsfSA_Predict &)=delete
virtual const WsfGeoPoint ProjectPositionRollAndPull(double aSimTime, const WsfSA_EntityPerception &aEntity, double aHeading_deg, double aRollAngle_deg, double aGLimit)
Definition WsfSA_Predict.cpp:581
bool GetPerceivedState(const WsfSA_EntityPerception &aEntity, UtVec3dX &aLocationWCS, UtVec3dX &aVelocityWCS)
Definition WsfSA_Predict.cpp:143
Definition WsfSA_Processor.hpp:60
Definition WsfSA_Processor.hpp:86
Copyrights Multiple, All Rights Reserved