WSF
WsfOffsetMover.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// Updated by Infoscitex, a DCS Company.
13// ****************************************************************************
14
15#ifndef WSFOFFSETMOVER_HPP
16#define WSFOFFSETMOVER_HPP
17
18#include "wsf_export.h"
19
20#include "WsfMover.hpp"
22
28
30{
31public:
38
46
47 WsfOffsetMover() = delete;
48 WsfOffsetMover(WsfScenario& aScenario);
50 ~WsfOffsetMover() override;
51
53
54 WsfSpatialDomain GetSpatialDomain() const override;
55 WsfMover* Clone() const override;
56 bool Initialize(double aSimTime) override;
57 bool ProcessInput(UtInput& aInput) override;
58 void Update(double aSimTime) override;
59 void SetPlatform(WsfPlatform* aPlatformPtr) override;
60 void PlatformAdded(double aSimTime, WsfPlatform* aPlatformPtr) override;
61 void PlatformDeleted(WsfPlatform* aPlatformPtr) override;
63
65
66 void OnPlatformUpdated(double aSimTime, WsfPlatform* aPlatformPtr) override;
68
69 virtual void SetReference(double aSimTime, const std::string& aReferenceName);
70
71 virtual void SetOffsetFromReference(double aSimTime, const double aOffsetFromReferenceECS[3]);
72
73protected:
74 WsfOffsetMover(const WsfOffsetMover& aSrc);
75
76 void CopyStateFromReference(double aSimTime, WsfPlatform* aReferencePtr);
77
78 void ExtrapolateState(double aSimTime);
79
80 void UpdateTetheredState(double aSimTime);
81
84
87
90
94
97
100
101private:
103 OrphanAction mOrphanAction;
104
106 double mReferenceDamageFactor;
107
109 bool mLocalUpdateActive;
110
112 bool mReferenceUpdateActive;
113
115 bool mIsLockedOn;
116
117 double mOldRefTime;
118 double mOldRefLocWCS[3];
119 double mOldRefVelWCS[3];
120};
121
122#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
WsfSpatialDomain
A collection of enumerations and type definitions that are used across a number of components.
Definition WsfTypes.hpp:32
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
bool ProcessInput(UtInput &aInput) override
Definition WsfMover.cpp:138
bool Initialize(double aSimTime) override
Definition WsfMover.cpp:108
virtual WsfSpatialDomain GetSpatialDomain() const
Definition WsfMover.cpp:339
WsfMover * Clone() const override=0
WsfMover()=delete
void Update(double aSimTime) override
Definition WsfMover.cpp:310
WsfStringId mReferenceNameId
The name (ID) of the reference platform.
Definition WsfOffsetMover.hpp:86
void ExtrapolateState(double aSimTime)
Definition WsfOffsetMover.cpp:392
virtual void SetReference(double aSimTime, const std::string &aReferenceName)
Definition WsfOffsetMover.cpp:248
double mOffsetFromReferenceECS[3]
The ECS offset from the reference platform.
Definition WsfOffsetMover.hpp:96
WsfOffsetMover & operator=(const WsfOffsetMover &)=delete
void UpdateTetheredState(double aSimTime)
Definition WsfOffsetMover.cpp:399
WsfPlatform * mReferencePtr
Pointer to the reference platform.
Definition WsfOffsetMover.hpp:83
virtual void SetOffsetFromReference(double aSimTime, const double aOffsetFromReferenceECS[3])
Definition WsfOffsetMover.cpp:277
AttachmentType mAttachmentType
The means by which the platforms are attached to each other.
Definition WsfOffsetMover.hpp:89
OrphanAction
What to do if the reference platform is removed.
Definition WsfOffsetMover.hpp:41
@ cOA_REMOVE
Remove from simulation.
Definition WsfOffsetMover.hpp:44
@ cOA_EXTRAPOLATE
Extrapolate from last known position.
Definition WsfOffsetMover.hpp:43
@ cOA_STOP
Stop moving.
Definition WsfOffsetMover.hpp:42
AttachmentType
The type of attachment between the attached platforms.
Definition WsfOffsetMover.hpp:34
@ cAT_TETHER
The platforms appear to be tethered.
Definition WsfOffsetMover.hpp:35
@ cAT_RIGID
The platforms are rigidly attached to each other.
Definition WsfOffsetMover.hpp:36
void CopyStateFromReference(double aSimTime, WsfPlatform *aReferencePtr)
Copy the kinematic state from leader.
Definition WsfOffsetMover.cpp:364
double mReferenceAttachmentTime
Definition WsfOffsetMover.hpp:93
WsfOffsetMover()=delete
double mOffsetMagnitude
The magnitude of the offset vector from the reference platform.
Definition WsfOffsetMover.hpp:99
virtual void PlatformDeleted(WsfPlatform *aPlatformPtr)
Definition WsfPlatformPart.cpp:343
virtual void PlatformAdded(double aSimTime, WsfPlatform *aPlatformPtr)
Definition WsfPlatformPart.cpp:333
virtual void SetPlatform(WsfPlatform *aPlatformPtr)
Definition WsfPlatformPart.hpp:113
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
Definition WsfSinglePlatformObserver.hpp:30
virtual void OnPlatformUpdated(double aSimTime, WsfPlatform *aPlatformPtr)
Called after each mover update.
Definition WsfSinglePlatformObserver.hpp:41
Copyrights Multiple, All Rights Reserved