WSF
WsfLaunchHandoffData.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 2016 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 WSFLAUNCHHANDOFFDATA_HPP
13#define WSFLAUNCHHANDOFFDATA_HPP
14
15#include "wsf_mil_export.h"
16
17#include "UtVec3.hpp"
19#include "WsfGeoPoint.hpp"
22class WsfPlatform;
23class WsfScenario;
25#include "WsfStringId.hpp"
26
41
42// TODO_JAJ At some point some of there can probably be some incorporation of things between
43// this and WsfLaunchComputer. But I don't have time to do it right now.
45{
46protected:
49 enum
50 {
55 cVF_BURN_TIME = 0X0010,
61 cVF_END_TIME = 0X0400,
63 };
64
65 bool ResultIsValidFor(unsigned int aDataMask) const { return (mValidityFlags & aDataMask) != 0; }
66
67public:
68 static WsfLaunchHandoffData& FindOrCreate(WsfPlatform& aPlatform);
69 static WsfLaunchHandoffData* Find(const WsfPlatform& aPlatform);
70
73 ~WsfLaunchHandoffData() override = default;
75
77
78 WsfComponent* CloneComponent() const override { return new WsfLaunchHandoffData(*this); }
79 void* QueryInterface(int aRole) override;
81
82 void SetLaunchPlatformData(WsfPlatform* aPlatformPtr, WsfArticulatedPart* aPartPtr);
83
84 void SetLaunchComputerData(WsfLaunchComputer* aComputerPtr);
85
87
89 double GetLaunchPlatformLat() const { return mLaunchPlatformLat; }
90 double GetLaunchPlatformLon() const { return mLaunchPlatformLon; }
91 double GetLaunchPlatformAlt() const { return mLaunchPlatformAlt; }
92 void GetLaunchPlatformVelNED(double aVelocityNED[3]) const { UtVec3d::Set(aVelocityNED, mLaunchPlatformVelNED); }
95 double GetLaunchPlatformRoll() const { return mLaunchPlatformRoll; }
96
97 void GetLaunchSystemLocation(double aLocation[3]) const { UtVec3d::Set(aLocation, mLaunchSystemLocation); }
98 double GetLaunchSystemYaw() const { return mLaunchSystemYaw; }
99 double GetLaunchSystemPitch() const { return mLaunchSystemPitch; }
100 double GetLaunchSystemRoll() const { return mLaunchSystemRoll; }
101 double GetLaunchSystemTilt() const { return mLaunchSystemTilt; }
102
103 void SetLaunchDeltaV(const double aLaunchDeltaV[3]) { UtVec3d::Set(mLaunchDeltaV, aLaunchDeltaV); }
104 void GetLaunchDeltaV(double aLaunchDeltaV[3]) const { UtVec3d::Set(aLaunchDeltaV, mLaunchDeltaV); }
106
109
115
116 double GetLoftAngle() const { return mLoftAngle; }
117 double GetBurnTime() const { return mBurnTime; }
118 double GetTimeOfFlight() const { return mTimeOfFlight; }
119 double GetInterceptTime() const { return mInterceptTime; }
122
123protected:
124 void SetLoftAngle(double aLoftAngle)
125 {
126 mLoftAngle = aLoftAngle;
128 }
129
130 void SetBurnTime(double aBurnTime)
131 {
132 mBurnTime = aBurnTime;
134 }
135
136 void SetTimeOfFlight(double aTimeOfFlight)
137 {
138 mTimeOfFlight = aTimeOfFlight;
140 }
141
142 void SetInterceptTime(double aInterceptTime)
143 {
144 mInterceptTime = aInterceptTime;
146 }
147
148 void SetInterceptPoint(const WsfGeoPoint& aInterceptPoint)
149 {
150 mInterceptPoint = aInterceptPoint;
152 }
153
155 unsigned int mValidityFlags;
156
158
168
170
177
179
181 double mBurnTime;
186
188
189 double mLaunchDeltaV[3];
191 double mFuelMass;
194};
195
197
198#endif
#define WSF_DECLARE_COMPONENT_ROLE_TYPE(TYPE, ROLE)
Definition WsfComponentRoles.hpp:44
@ cWSF_COMPONENT_LAUNCH_HANDOFF_DATA
Launch handoff data.
Definition WsfMilComponentRoles.hpp:30
WsfSimpleComponentT< WsfPlatformComponent > WsfSimplePlatformComponent
Definition WsfSimpleComponent.hpp:126
Definition WsfArticulatedPart.hpp:36
Definition WsfComponent.hpp:39
virtual void * QueryInterface(int aRole)=0
Definition WsfGeoPoint.hpp:29
Definition WsfLaunchComputer.hpp:35
Definition WsfLaunchHandoffData.hpp:45
double GetTimeOfFlight() const
Definition WsfLaunchHandoffData.hpp:118
double GetLoftAngle() const
Definition WsfLaunchHandoffData.hpp:116
void SetInterceptTime(double aInterceptTime)
Definition WsfLaunchHandoffData.hpp:142
double GetLaunchSystemTilt() const
Definition WsfLaunchHandoffData.hpp:101
double mLaunchDeltaV[3]
Definition WsfLaunchHandoffData.hpp:189
void SetInterceptPoint(const WsfGeoPoint &aInterceptPoint)
Definition WsfLaunchHandoffData.hpp:148
double GetLaunchPlatformHeading() const
Definition WsfLaunchHandoffData.hpp:93
void SetBurnTime(double aBurnTime)
Definition WsfLaunchHandoffData.hpp:130
const WsfGeoPoint & GetInterceptPoint() const
Definition WsfLaunchHandoffData.hpp:120
void SetLoftAngle(double aLoftAngle)
Definition WsfLaunchHandoffData.hpp:124
unsigned int mValidityFlags
Validity flags for optional data.
Definition WsfLaunchHandoffData.hpp:155
double mLaunchPlatformVelNED[3]
Definition WsfLaunchHandoffData.hpp:163
double mTimeOfFlight
Definition WsfLaunchHandoffData.hpp:182
bool LoftAngleIsValid() const
Definition WsfLaunchHandoffData.hpp:110
size_t GetLaunchPlatformIndex() const
Definition WsfLaunchHandoffData.hpp:88
bool ResultIsValidFor(unsigned int aDataMask) const
Definition WsfLaunchHandoffData.hpp:65
double GetBurnTime() const
Definition WsfLaunchHandoffData.hpp:117
void SetLaunchDeltaV(const double aLaunchDeltaV[3])
Definition WsfLaunchHandoffData.hpp:103
double GetLaunchSystemPitch() const
Definition WsfLaunchHandoffData.hpp:99
double GetLaunchPlatformAlt() const
Definition WsfLaunchHandoffData.hpp:91
~WsfLaunchHandoffData() override=default
double mEmptyMass
Definition WsfLaunchHandoffData.hpp:190
WsfComponent * CloneComponent() const override
Definition WsfLaunchHandoffData.hpp:78
double mLaunchSystemYaw
Definition WsfLaunchHandoffData.hpp:172
double mLaunchSystemLocation[3]
Definition WsfLaunchHandoffData.hpp:171
double mLoftAngle
Definition WsfLaunchHandoffData.hpp:180
bool TimeOfFlightIsValid() const
Definition WsfLaunchHandoffData.hpp:112
double mLaunchPlatformRoll
Definition WsfLaunchHandoffData.hpp:166
double GetInterceptTime() const
Definition WsfLaunchHandoffData.hpp:119
WsfLaunchHandoffData & operator=(const WsfLaunchHandoffData &)=delete
void GetLaunchPlatformVelNED(double aVelocityNED[3]) const
Definition WsfLaunchHandoffData.hpp:92
void GetLaunchDeltaV(double aLaunchDeltaV[3]) const
Definition WsfLaunchHandoffData.hpp:104
double mLaunchPlatformAlt
Definition WsfLaunchHandoffData.hpp:162
double GetLaunchPlatformLat() const
Definition WsfLaunchHandoffData.hpp:89
double mLaunchSystemPitch
Definition WsfLaunchHandoffData.hpp:173
double mLaunchPlatformLat
Definition WsfLaunchHandoffData.hpp:160
double mLaunchPlatformHeading
Definition WsfLaunchHandoffData.hpp:164
WsfLaunchHandoffData()
Definition WsfLaunchHandoffData.cpp:42
bool InterceptTimeIsValid() const
Definition WsfLaunchHandoffData.hpp:113
double GetLaunchPlatformRoll() const
Definition WsfLaunchHandoffData.hpp:95
bool InterceptPointIsValid() const
Definition WsfLaunchHandoffData.hpp:114
double mLaunchPlatformPitch
Definition WsfLaunchHandoffData.hpp:165
double mLaunchSystemTilt
Definition WsfLaunchHandoffData.hpp:175
double mLaunchPlatformLon
Definition WsfLaunchHandoffData.hpp:161
double GetLaunchPlatformLon() const
Definition WsfLaunchHandoffData.hpp:90
double GetLaunchSystemYaw() const
Definition WsfLaunchHandoffData.hpp:98
double mFuelMass
Definition WsfLaunchHandoffData.hpp:191
bool BurnTimeIsValid() const
Definition WsfLaunchHandoffData.hpp:111
size_t mLaunchPlatformIndex
Index of the launching platform.
Definition WsfLaunchHandoffData.hpp:159
@ cVF_LOFT_ANGLE
Definition WsfLaunchHandoffData.hpp:54
@ cVF_TIME_OF_FLIGHT
Definition WsfLaunchHandoffData.hpp:56
@ cVF_TARGET_IMPACT_TIME
Definition WsfLaunchHandoffData.hpp:59
@ cVF_END_TIME
Definition WsfLaunchHandoffData.hpp:61
@ cVF_END_POINT
Definition WsfLaunchHandoffData.hpp:62
@ cVF_LAUNCHER_BEARING
Definition WsfLaunchHandoffData.hpp:52
@ cVF_BURN_TIME
Definition WsfLaunchHandoffData.hpp:55
@ cVF_LAUNCHER_ELEVATION
Definition WsfLaunchHandoffData.hpp:53
@ cVF_INTERCEPT_POINT
Definition WsfLaunchHandoffData.hpp:58
@ cVF_TARGET_IMPACT_POINT
Definition WsfLaunchHandoffData.hpp:60
@ cVF_LAUNCH_TIME
Definition WsfLaunchHandoffData.hpp:51
@ cVF_INTERCEPT_TIME
Definition WsfLaunchHandoffData.hpp:57
void SetTimeOfFlight(double aTimeOfFlight)
Definition WsfLaunchHandoffData.hpp:136
double mBurnTime
Definition WsfLaunchHandoffData.hpp:181
void GetLaunchSystemLocation(double aLocation[3]) const
Definition WsfLaunchHandoffData.hpp:97
double GetLaunchPlatformPitch() const
Definition WsfLaunchHandoffData.hpp:94
WsfGeoPoint mInterceptPoint
Definition WsfLaunchHandoffData.hpp:184
double mPayloadMass
Definition WsfLaunchHandoffData.hpp:192
double GetLaunchSystemRoll() const
Definition WsfLaunchHandoffData.hpp:100
double mInterceptTime
Definition WsfLaunchHandoffData.hpp:183
double mLaunchSystemRoll
Definition WsfLaunchHandoffData.hpp:174
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
Copyrights Multiple, All Rights Reserved