WSF
WsfStraightLineMover.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 WSFSTRAIGHTLINEMOVER_HPP
13#define WSFSTRAIGHTLINEMOVER_HPP
14
15#include "wsf_mil_export.h"
16
17#include "TblLookup.hpp"
18class UtInput;
19#include "WsfMover.hpp"
20
31
32class WSF_MIL_EXPORT WsfStraightLineMover : public WsfMover
33{
34public:
36 ~WsfStraightLineMover() override = default;
38
40
41 WsfMover* Clone() const override;
42 bool Initialize(double aSimTime) override;
43 bool ProcessInput(UtInput& aInput) override;
44 void Update(double aSimTime) override;
46
48
50 double DistanceTraveled() const { return mDistanceTrav; }
51
53 double CurrentTimeOfFlight() const { return mLastUpdateTime - mLaunchTime; }
54
56 double CurrentSpeed() const { return mCurrentSpeed; }
57
58protected:
59 // Declare default copy constructor (for Clone())
61
62 void GetSpeed(double aSimTime);
63
64private:
65 enum GuidanceMode
66 {
67 cPURE_PURSUIT,
68 cLEAD_PURSUIT,
69 cPRONAV
70 };
71
72 GuidanceMode mGuidanceMode;
73 bool mGuideToTruth;
74 TblIndVarU<double> mIVs;
75 TblDepVar1<double> mDVs;
76 TblLookupLU<double> mLU;
77
78 double mUnitVelDirWCS[3];
79 double mCurrentSpeed;
80 double mDistanceTrav;
81 double mLaunchTime;
82 double mAvgSpeed;
83 double mMaxLatAccel;
84 double mProNavGain;
85 double mMissileTimeConst;
86 bool mHOBSenabled;
88 double mHOBSangle;
89 double mHOBSdisableTime;
90};
91
92#endif
WsfSpatialDomain
A collection of enumerations and type definitions that are used across a number of components.
Definition WsfTypes.hpp:32
@ WSF_SPATIAL_DOMAIN_AIR
Cars, trucks, buildings, etc.
Definition WsfTypes.hpp:35
bool ProcessInput(UtInput &aInput) override
Definition WsfMover.cpp:138
bool Initialize(double aSimTime) override
Definition WsfMover.cpp:108
double mLastUpdateTime
The simulation time when Update was last called.
Definition WsfMover.hpp:351
WsfMover * Clone() const override=0
WsfMover()=delete
void Update(double aSimTime) override
Definition WsfMover.cpp:310
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
Definition WsfStraightLineMover.hpp:33
WsfSpatialDomain GetSpatialDomain() const override
Definition WsfStraightLineMover.hpp:47
double CurrentSpeed() const
Returns the current speed of the missile.
Definition WsfStraightLineMover.hpp:56
WsfStraightLineMover & operator=(const WsfStraightLineMover &)=delete
double CurrentTimeOfFlight() const
Returns the simulated elapsed time since launch for this missile.
Definition WsfStraightLineMover.hpp:53
double DistanceTraveled() const
Returns the curvilinear distance traveled thus far during the trajectory.
Definition WsfStraightLineMover.hpp:50
WsfStraightLineMover(WsfScenario &aScenario)
Definition WsfStraightLineMover.cpp:28
~WsfStraightLineMover() override=default
Copyrights Multiple, All Rights Reserved