WSF
WsfGuidedMover.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 WSFGUIDEDMOVER_HPP
16#define WSFGUIDEDMOVER_HPP
17
18#include "wsf_mil_export.h"
19
20#include <vector>
21
22#include "UtCloneablePtr.hpp"
23#include "UtECI_Conversion.hpp"
24#include "UtInput.hpp"
25#include "UtRungeKutta.hpp"
26#include "UtTable.hpp"
27class WsfAero;
30#include "WsfPlatform.hpp"
31
43
44class WSF_MIL_EXPORT WsfGuidedMover : public WsfGuidedMoverBase
45{
46public:
47 using CurvePtr = UtCloneablePtr<UtTable::Curve>;
48 using TablePtr = UtCloneablePtr<UtTable::Table>;
49
55
56 WsfGuidedMover(WsfScenario& aScenario, bool aGuidanceOn = true);
57 ~WsfGuidedMover() override = default;
59
61
62 WsfMover* Clone() const override;
63 bool Initialize(double aSimTime) override;
64 bool Initialize2(double aSimTime) override;
65 bool ProcessInput(UtInput& aInput) override;
66 const char* GetScriptClassName() const override;
68
70
71 bool GetPropertyDouble(const std::string& aPropertyName, double& aProperty) override;
73
74 void GetCommandedAttitude(double& aYaw, double& aPitch, double& aRoll) const;
75
76 // Accessors for divert thrust magnitude. Needed for certain maneuver calculations.
77 double GetDivertThrust() const { return mDivertThrust; }
78 double GetDivertFuelMass() const { return mCurState.mDivertFuelMass; }
79
80 // This returns a pointer to the test object. It should only be used in testing.
82
84
85 double GetCurrentThrust() const { return mCurState.mCurrentThrust; }
86 void GetAeroForcesECS(double aAeroForcesECS[3]) const { UtVec3d::Set(aAeroForcesECS, mLastAeroForcesECS); }
87 void GetThrustForcesECS(double aThrustForcesECS[3]) const
88 {
89 UtVec3d::Set(aThrustForcesECS, mCurState.mLastThrustForcesECS);
90 }
91 double GetMaximumLateralAerodynamicForce() const;
92 double GetDynamicPressure() const;
93 double GetGravitationalAcceleration() const;
94
95 // Get the number of stages
96 size_t GetNumStages() const { return mStageList.size(); }
97
98 // Get the empty/fuel/total mass of the current stage (in kg)
99 double GetEmptyMass() const;
100 double GetFuelMass() const;
101 double GetPayloadMass() const;
102 double GetTotalMass() const;
103
104 // Get the empty/fuel/total mass of the stage specified by aStageIndex (in kg)
105 double GetEmptyMass(size_t aStageIndex) const;
106 double GetFuelMass(size_t aStageIndex) const;
107 double GetPayloadMass(size_t aStageIndex) const;
108 double GetTotalMass(size_t aStageIndex) const;
109
110 // Get the current fuel/total mass (in kg)
111 double GetCurrentFuelMass() const { return mCurState.mCurrentFuelMass; }
112 double GetCurrentTotalMass() const { return mCurState.mCurrentFuelMass + GetEmptyMass() + GetPayloadMass(); };
113
114 // Get the current fuel flow rate (in kg/s)
115 double GetCurrentFuelFlowRate() const { return mCurState.mCurrentFuelFlowRate; }
116
117 double GetLevelFlightThrust(double aSimTime, double aAltitude_m, double aMach) const;
118
119 double GetLevelFlightDrag(double aAltitude_m, double aMach, double aWeight_N) const;
120
121 double GetLevelFlightFuelBurnRate(double aSimTime, double aAltitude_m, double aSpeed_mps, double aWeight_N) const;
122
123
125
132
133 class Stage
134 {
135 public:
142
150
156
157 Stage();
158 Stage(const Stage& aSrc);
159 ~Stage();
160 Stage& operator=(const Stage&) = delete;
161
162 bool CompletePairedValues(WsfGuidedMover* aMoverPtr);
163 double ComputeTimeWeightedAverage(const UtTable::Curve& aCurve) const;
164 bool ComputeUnknownValues(WsfGuidedMover* aMoverPtr, int& aRecursionDepth);
165 bool Initialize(double aSimTime, WsfGuidedMover* aMoverPtr, bool aShowStatus);
166 bool ProcessInput(UtInput& aInput);
167 void ShowStatus(WsfGuidedMover* aMoverPtr, ut::log::MessageStream& aMsgStream) const;
168
169 double ComputeSpecificImpulse(double aAmbientPressure, double aSeaLevelPressure) const;
170 double DetermineCurrentThrust(double aAmbientPressure, double aSeaLevelPressure, double aPhaseTime);
171
173
174
177
180
183
187
190 double mFuelMass;
191
195
197 double mThrust;
198
201
204
207
210
213
216
219
222
225
227 double mBurnRate;
228
231
234
237
240
244
247
250
253
256
259
262
265
268
271
274
277
280
283
289
291
292
296 };
297
305 {
306 public:
307 KinematicState() = default;
308 KinematicState(const UtVec3d& aX, const UtVec3d& aY, double aZ)
309 : mX{aX}
310 , mY{aY}
311 , mZ{aZ}
312 {
313 }
314
315 const UtVec3d& GetPosition() const { return mX; }
316 const UtVec3d& GetVelocity() const { return mY; }
317 double GetFuelMass() const { return mZ; }
318
319 const UtVec3d& GetDxDt() const { return mX; }
320 const UtVec3d& GetDvDt() const { return mY; }
321 double GetDmDt() const { return mZ; }
322
323 void SetPosition(const UtVec3d& aPosition) { mX = aPosition; }
324 void SetVelocity(const UtVec3d& aVelocity) { mY = aVelocity; }
325 void SetFuelMass(double aMass) { mZ = aMass; }
326
327 void SetDxDt(const UtVec3d& aDxDt) { mX = aDxDt; }
328 void SetDvDt(const UtVec3d& aDvDt) { mY = aDvDt; }
329 void SetDmDt(double aDmDt) { mZ = aDmDt; }
330
331 KinematicState operator*(double aScaling) const
332 {
333 return KinematicState{mX * aScaling, mY * aScaling, mZ * aScaling};
334 }
335
337 {
338 return KinematicState{mX + aOther.mX, mY + aOther.mY, mZ + aOther.mZ};
339 }
340
341 private:
342 UtVec3d mX{};
343 UtVec3d mY{};
344 double mZ{};
345 };
346
350 class State
351 {
352 public:
353 State();
354 State(const State& aOther) = default;
355 void Print(ut::log::MessageStream& aMsgStream, double aFMM_Time);
356
357 State Advance(double aDeltaT, const KinematicState& aKinematicState) const;
358
359 void UpdateOrientationData(double aSimTime, double aDeltaTime);
360 void UpdateOtherStateData(double aSimTime);
361 void TakeEulerStep(double aDeltaTime,
362 const KinematicState& aDerivatives,
363 const State& aInitialState,
364 bool aIntegrateMass = false);
365 void ComputeDerivatives(const double aAppliedForcesECS[3]);
366 UtVec3d ComputeDerivatives(const double aAppliedForcesECS[3]) const;
367 void ComputeGravitationalForce(double aGravitationalForceWCS[3]) const;
370
371 const WsfGuidedMover* mMoverPtr{nullptr};
372 double mTime;
373 double mWorld_ToECS_Transform[3][3]; // Either WCS->ECS or ECI->ECS
374 double mLocation[3];
375 double mVelocity[3];
376 double mAcceleration[3];
377 double mAppliedForcesECS[3]; // Does not include gravity
380 double mPsi;
381 double mTheta;
382 double mPhi;
383 double mAltitude;
384 double mSpeed; // Always ECEF speed
385 double mMach;
386 double mMass;
393 double mECI_SwitchTime{-1.0E-30};
394 bool mLaunchToOrbit{false};
397 };
398
400 {
401 public:
403 : mName()
404 , mMass(0.0)
405 , mTime(0.0)
406 , mAltitude(0.0)
407 {
408 }
409 std::string mName;
410 double mMass;
411 double mTime;
412 double mAltitude;
413 };
414
415protected:
416 // Declare default copy constructor (for Clone())
417 WsfGuidedMover(const WsfGuidedMover& aSrc);
418
419 void AdvanceTime(double aSimTime, double aBegTime, double& aEndTime, Phase& aNextPhase) override;
420
421 void AdvanceTimeSinglestep(double aSimTime, double aBegTime, double& aEndTime, Phase& aNextPhase);
422
423 void AdvanceTimeMultistep(double aSimTime, double aBegTime, double aEndTime, Phase& aNextPhase);
424
425 void InitiateMotion(double aSimTime, double aCurTime) override;
426
427 bool SeparateStage(double aSimTime, size_t aStageIndex) override;
428
429 bool IgniteStage(double aSimTime, size_t aStageIndex) override;
430
431 void InitiateStage(double aSimTime, double aCurTime, size_t aStageIndex) override;
432
433 void PostUpdate(double aSimTime) override;
434
435 void AdvanceTimeLegacyRK2(double aSimTime, State& aState, const double aAppliedForcesECS[3]);
436
437 void AdvanceTimeLegacyRK4(double aSimTime, State& aState, const double aAppliedForcesECS[3]);
438
439 void AdvanceTimeTrapezoidal(double aSimTime, State& aState, const double aAppliedForcesECS[3]);
440
443 {
444 template<typename Callable>
445 static State Step(double aSimTime, State& aState, Callable&& aRightHandSide)
446 {
447 return ut::RK2_Step<State, KinematicState>(aSimTime, aState, aRightHandSide);
448 }
449 };
450
453 {
454 template<typename Callable>
455 static State Step(double aSimTime, State& aState, Callable&& aRightHandSide)
456 {
457 return ut::RK4_Step<State, KinematicState>(aSimTime, aState, aRightHandSide);
458 }
459 };
460
462 template<typename StepFunction>
463 void AdvanceTimeRK(double aSimTime, double aBegTime, double aEndTime)
464 {
465 Stage& stage = mStageList[mStageIndex];
466
467 mCurState.mMass = GetPlatform()->GetMass();
468 mCurState.mMoverPtr = this;
469
470 double dt = aEndTime - aBegTime;
471 bool first{true};
472 UtVec3d aeroSave;
473 auto rhs = [this, aSimTime, aBegTime, aEndTime, &stage, &first, &aeroSave](State& aState)
474 {
475 ComputeFullForces(aSimTime, aBegTime, aEndTime, aState, stage);
476 if (first)
477 {
478 first = false;
479 UtVec3d::Set(aeroSave.GetData(), aState.mLastAeroForcesECS);
480 }
481 KinematicState retval{};
482 retval.SetDxDt(aState.mVelocity);
483 retval.SetDvDt(aState.mAcceleration);
484 retval.SetDmDt(aState.mCurrentFuelFlowRate);
485 return retval;
486 };
487
488 auto step = StepFunction::Step(dt, mCurState, rhs);
489 mCurState = step;
490 UtVec3d::Set(mLastAeroForcesECS, aeroSave.GetData());
491 }
492
493 void ComputeDivertForces(double aDeltaTime,
494 State& aState,
495 double aCommandedForceY,
496 double aCommandedForceZ,
497 double aAppliedForcesECS[3],
498 double aDivertThrustForcesECS[3]) const;
499
500 void ComputeThrustForces(double aSimTime, double aDeltaTime, State& aState, Stage& aStage, double aThrustForceECS[3]) const;
501
502 double GetHorizontalThrust(double aSimTime,
503 double aDeltaTime,
504 State& aState,
505 double aCommandedThrottle,
506 const double aIV_Values[6],
507 Stage& aCurrentStage) const;
508
509 void ComputeVectoredThrustForces(double aSimTime,
510 double aCommandedForceY,
511 double aCommandedForceZ,
512 const Stage& aStage,
513 double aThrustForceECS[3]) const;
514
515 void ComputeAeroForces(double aSimTime,
516 double aDeltaT,
517 const Stage& aStage,
518 const double aThrustForcesECS[3],
519 double aAeroForcesECS[3]) const;
520
521 void ComputeThrustForCommandedSpeed(double aDeltaT,
522 State& aState,
523 const Stage& aStage,
524 const double aAeroForcesECS[3],
525 double aThrustForcesECS[3]) const;
526
527 double GetTimeConstant(const Stage& aStage) const;
528
529 void ComputeFullForces(double aSimTime, double aBegTime, double aEndTime, State& aRHS_State, Stage& aRHS_Stage) const;
530
531 void IntegrateEOM(double aDeltaTime, const double aAppliedForcesECS[3], State& aOutState, State& aInState1, State& aInState2);
532
533 void JettisonEjectables(double aSimTime);
534
535 bool SelectCoordinateFrame(const State& aState, CoordinateFrame& aTargetFrame) const;
536
537 void SwitchCoordinateFrame(State& aState, CoordinateFrame aTargetFrame);
538
539 void UpdateExternalState(State& aState);
540
541 std::vector<Stage> mStageList;
544 std::vector<Ejectable> mEjectables;
549 UtCloneablePtr<UtTable::Table> mTimeConstantPtr;
557 double mLastYaw;
559 double mLastRoll;
561 double mLastMach;
562 double mLastQ;
563 double mMaxQ;
564 double mIV_Values[6];
569 UtEntity mTempEntity;
570
571 std::unique_ptr<WsfGuidedMoverTestObject> mTestSupportObjectPtr;
572
573 UtECI_Conversion& GetECI_Conversion();
574
575 ut::CloneablePtr<UtECI_Conversion> mECI_ConversionPtr{nullptr};
576 double mECI_UpdateTime{0.0};
578
580};
581
582#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
Definition WsfAero.hpp:30
bool Initialize(double aSimTime) override
Definition WsfGuidedMoverBase.cpp:166
WsfGuidedMoverBase(WsfScenario &aScenario)
Definition WsfGuidedMoverBase.cpp:55
virtual void PostUpdate(double aSimTime)
Definition WsfGuidedMoverBase.cpp:937
bool ProcessInput(UtInput &aInput) override
Definition WsfGuidedMoverBase.cpp:258
virtual void AdvanceTime(double aSimTime, double aBegTime, double &aEndTime, Phase &aNextPhase)=0
size_t mStageIndex
The index of the current stage.
Definition WsfGuidedMoverBase.hpp:210
Phase
Definition WsfGuidedMoverBase.hpp:143
virtual bool SeparateStage(double aSimTime, size_t aStageIndex)
The base mover only supports a single stage.
Definition WsfGuidedMoverBase.cpp:733
virtual void InitiateMotion(double aSimTime, double aCurTime)
Definition WsfGuidedMoverBase.cpp:726
bool Initialize2(double aSimTime) override
Definition WsfGuidedMoverBase.cpp:192
virtual bool IgniteStage(double aSimTime, size_t aStageIndex)
The base mover only supports a single stage.
Definition WsfGuidedMoverBase.cpp:740
virtual void InitiateStage(double aSimTime, double aCurTime, size_t aStageIndex)
Definition WsfGuidedMoverBase.cpp:747
Definition WsfGuidedMoverTestObject.hpp:21
double mMass
Definition WsfGuidedMover.hpp:410
std::string mName
Definition WsfGuidedMover.hpp:409
double mAltitude
Definition WsfGuidedMover.hpp:412
Ejectable()
Definition WsfGuidedMover.hpp:402
double mTime
Definition WsfGuidedMover.hpp:411
Definition WsfGuidedMover.hpp:305
const UtVec3d & GetVelocity() const
Definition WsfGuidedMover.hpp:316
void SetDxDt(const UtVec3d &aDxDt)
Definition WsfGuidedMover.hpp:327
void SetDmDt(double aDmDt)
Definition WsfGuidedMover.hpp:329
void SetFuelMass(double aMass)
Definition WsfGuidedMover.hpp:325
KinematicState operator*(double aScaling) const
Definition WsfGuidedMover.hpp:331
void SetVelocity(const UtVec3d &aVelocity)
Definition WsfGuidedMover.hpp:324
KinematicState operator+(const KinematicState &aOther) const
Definition WsfGuidedMover.hpp:336
const UtVec3d & GetDxDt() const
Definition WsfGuidedMover.hpp:319
const UtVec3d & GetPosition() const
Definition WsfGuidedMover.hpp:315
double GetFuelMass() const
Definition WsfGuidedMover.hpp:317
const UtVec3d & GetDvDt() const
Definition WsfGuidedMover.hpp:320
void SetDvDt(const UtVec3d &aDvDt)
Definition WsfGuidedMover.hpp:328
double GetDmDt() const
Definition WsfGuidedMover.hpp:321
KinematicState(const UtVec3d &aX, const UtVec3d &aY, double aZ)
Definition WsfGuidedMover.hpp:308
void SetPosition(const UtVec3d &aPosition)
Definition WsfGuidedMover.hpp:323
Definition WsfGuidedMover.hpp:134
double mThrustSeaLevel
The thrust (N) at sea level.
Definition WsfGuidedMover.hpp:200
double mLateralThrustGain
Lateral thrust gain for TVC and divert.
Definition WsfGuidedMover.hpp:267
double mPreIgnitionCoastTime
Coast time between separation of previous state and ignition of this stage.
Definition WsfGuidedMover.hpp:239
EngineType mEngineType
The type of the engine.
Definition WsfGuidedMover.hpp:176
double mProbabilityOfSeparation
The probability of separation of this stage from subsequent stages.
Definition WsfGuidedMover.hpp:273
double mMaxTVC_Angle
Maximum TVC angle.
Definition WsfGuidedMover.hpp:264
double mThrustDuration
The engine burn time (sec).
Definition WsfGuidedMover.hpp:236
CurvePtr mVacuumThrustTablePtr
Vacuum thrust as a function of time.
Definition WsfGuidedMover.hpp:212
double mTotalMass
Definition WsfGuidedMover.hpp:194
double mThrust
The thrust (N).
Definition WsfGuidedMover.hpp:197
double mSpecificImpulseSeaLevel
The specific impulse (sec) at sea level.
Definition WsfGuidedMover.hpp:221
double mIntegrationTimestep
The integration timestep.
Definition WsfGuidedMover.hpp:270
double mPayloadMass
Definition WsfGuidedMover.hpp:294
bool mFinalBoostStage
Definition WsfGuidedMover.hpp:287
TablePtr mTimeConstantPtr
The airframe time constant.
Definition WsfGuidedMover.hpp:252
double mThrustVacuum
The thrust (N) in vacuum.
Definition WsfGuidedMover.hpp:203
ThrustReference mThrustReference
Reference for thrust.
Definition WsfGuidedMover.hpp:179
bool mReverseThrust
'true' if the direction of the thrust should be reversed.
Definition WsfGuidedMover.hpp:282
double mBurnRate
The rate of fuel expenditure (Kg/Sec).
Definition WsfGuidedMover.hpp:227
double mMaxTVC_Time
The maximum time that thrust vector control can be used (relative to ignition start).
Definition WsfGuidedMover.hpp:261
bool Initialize(double aSimTime, WsfGuidedMover *aMoverPtr, bool aShowStatus)
Definition WsfGuidedMover.cpp:2608
TablePtr mThrottlePtr
The throttle setting.
Definition WsfGuidedMover.hpp:233
WsfStringId mAeroId
The string ID of the aerodynamic attributes to be used.
Definition WsfGuidedMover.hpp:246
void ShowStatus(WsfGuidedMover *aMoverPtr, ut::log::MessageStream &aMsgStream) const
Definition WsfGuidedMover.cpp:3121
EngineType
Definition WsfGuidedMover.hpp:137
@ cNONE
Definition WsfGuidedMover.hpp:138
@ cJET
Definition WsfGuidedMover.hpp:140
@ cROCKET
Definition WsfGuidedMover.hpp:139
bool ProcessInput(UtInput &aInput)
Definition WsfGuidedMover.cpp:2812
double mNozzleExitArea
The nozzle exit area (m^2).
Definition WsfGuidedMover.hpp:215
TurnMethod mTurnMethod
The visual method for turns (skid or bank).
Definition WsfGuidedMover.hpp:279
double mEmptyMass
Definition WsfGuidedMover.hpp:186
bool CompletePairedValues(WsfGuidedMover *aMoverPtr)
Definition WsfGuidedMover.cpp:2328
CurvePtr mThrustTablePtr
Thrust as a function of time.
Definition WsfGuidedMover.hpp:206
ThrustReference
Definition WsfGuidedMover.hpp:144
@ cPAIRED
Definition WsfGuidedMover.hpp:148
@ cSEA_LEVEL
Definition WsfGuidedMover.hpp:147
@ cVACUUM
Definition WsfGuidedMover.hpp:146
@ cDEFAULT
Definition WsfGuidedMover.hpp:145
double mMinTVC_Time
The minimum time that thrust vector control can be used (relative to ignition start).
Definition WsfGuidedMover.hpp:258
double mPreSeparationCoastTime
Definition WsfGuidedMover.hpp:243
TurnMethod
Definition WsfGuidedMover.hpp:152
@ cBANK_TO_TURN
Definition WsfGuidedMover.hpp:154
@ cSKID_TO_TURN
Definition WsfGuidedMover.hpp:153
Stage()
Definition WsfGuidedMover.cpp:2228
TablePtr mAngleOfAttackPtr
The angle of attack.
Definition WsfGuidedMover.hpp:255
double mSpecificImpulseVacuum
The specific impulse (sec) in vacuum.
Definition WsfGuidedMover.hpp:224
CurvePtr mBurnRateTablePtr
The rate of fuel expenditure as a function of time.
Definition WsfGuidedMover.hpp:230
WsfAero * mAeroPtr
The pointer to the aerodynamic attributes to be used.
Definition WsfGuidedMover.hpp:249
double mSpecificImpulse
The specific impulse (sec).
Definition WsfGuidedMover.hpp:218
double ComputeSpecificImpulse(double aAmbientPressure, double aSeaLevelPressure) const
Definition WsfGuidedMover.cpp:3188
double mFuelMass
Definition WsfGuidedMover.hpp:190
double mProbabilityOfIgnition
The probability of ignition of this stage.
Definition WsfGuidedMover.hpp:276
ThrustReference mImpulseReference
Reference for specific impulse.
Definition WsfGuidedMover.hpp:182
double ComputeTimeWeightedAverage(const UtTable::Curve &aCurve) const
Definition WsfGuidedMover.cpp:2452
CurvePtr mSeaLevelThrustTablePtr
Sea level thrust as a function of time.
Definition WsfGuidedMover.hpp:209
bool ComputeUnknownValues(WsfGuidedMover *aMoverPtr, int &aRecursionDepth)
Definition WsfGuidedMover.cpp:2472
Stage & operator=(const Stage &)=delete
double DetermineCurrentThrust(double aAmbientPressure, double aSeaLevelPressure, double aPhaseTime)
Definition WsfGuidedMover.cpp:3234
Definition WsfGuidedMover.hpp:351
double mCurrentFuelMass
Definition WsfGuidedMover.hpp:391
State()
Definition WsfGuidedMover.cpp:3297
double mSpeed
Definition WsfGuidedMover.hpp:384
double mTime
Definition WsfGuidedMover.hpp:372
double mVelocity[3]
Definition WsfGuidedMover.hpp:375
KinematicState GetDerivatives() const
Definition WsfGuidedMover.cpp:3397
void ComputeDerivatives(const double aAppliedForcesECS[3])
Definition WsfGuidedMover.cpp:1443
void ComputeGravitationalForce(double aGravitationalForceWCS[3]) const
Definition WsfGuidedMover.cpp:1714
State Advance(double aDeltaT, const KinematicState &aKinematicState) const
Definition WsfGuidedMover.cpp:3367
void TakeEulerStep(double aDeltaTime, const KinematicState &aDerivatives, const State &aInitialState, bool aIntegrateMass=false)
Definition WsfGuidedMover.cpp:1775
double mAltitude
Definition WsfGuidedMover.hpp:383
KinematicState GetUnpoweredDerivatives() const
Definition WsfGuidedMover.cpp:3402
void UpdateOtherStateData(double aSimTime)
Definition WsfGuidedMover.cpp:2194
double mThrustDurationExtension
The amount of time the thrust duration is extended due to commanded throttle.
Definition WsfGuidedMover.hpp:389
double mAppliedForcesECS[3]
Definition WsfGuidedMover.hpp:377
bool mMaintainInclination
For launch-to-orbit, maintain the inclination as defined by the launch conditions (latitude and launc...
Definition WsfGuidedMover.hpp:396
void Print(ut::log::MessageStream &aMsgStream, double aFMM_Time)
Definition WsfGuidedMover.cpp:3321
CoordinateFrame mCoordinateFrame
Definition WsfGuidedMover.hpp:392
State(const State &aOther)=default
double mPsi
Definition WsfGuidedMover.hpp:380
double mLocation[3]
Definition WsfGuidedMover.hpp:374
void UpdateOrientationData(double aSimTime, double aDeltaTime)
Definition WsfGuidedMover.cpp:2073
double mMach
Definition WsfGuidedMover.hpp:385
double mLastThrustForcesECS[3]
Definition WsfGuidedMover.hpp:378
bool mLaunchToOrbit
Definition WsfGuidedMover.hpp:394
double mAcceleration[3]
Definition WsfGuidedMover.hpp:376
double mECI_SwitchTime
The time when the WCS->ECI frame switch occurred.
Definition WsfGuidedMover.hpp:393
double mLastAeroForcesECS[3]
Definition WsfGuidedMover.hpp:379
const WsfGuidedMover * mMoverPtr
Definition WsfGuidedMover.hpp:371
double mCurrentFuelFlowRate
Definition WsfGuidedMover.hpp:388
double mPhi
Definition WsfGuidedMover.hpp:382
double mCurrentThrust
Definition WsfGuidedMover.hpp:387
double mDivertFuelMass
Definition WsfGuidedMover.hpp:390
double mWorld_ToECS_Transform[3][3]
Definition WsfGuidedMover.hpp:373
double mTheta
Definition WsfGuidedMover.hpp:381
double mMass
Definition WsfGuidedMover.hpp:386
Definition WsfGuidedMover.hpp:45
State mCurState
The current entity state.
Definition WsfGuidedMover.hpp:565
CoordinateFrame
Definition WsfGuidedMover.hpp:51
@ cCF_ECI
Definition WsfGuidedMover.hpp:53
@ cCF_WCS
Definition WsfGuidedMover.hpp:52
UtCloneablePtr< UtTable::Table > TablePtr
Definition WsfGuidedMover.hpp:48
bool mImplicitStageUsed
'true' if a stage was defined without using 'stage'
Definition WsfGuidedMover.hpp:543
std::vector< Ejectable > mEjectables
The list of eject-able objects.
Definition WsfGuidedMover.hpp:544
UtEntity mTempEntity
Temporary entity for WCS<->ECI conversions.
Definition WsfGuidedMover.hpp:569
void AdvanceTimeLegacyRK2(double aSimTime, State &aState, const double aAppliedForcesECS[3])
Definition WsfGuidedMover.cpp:1344
WsfGuidedMoverTestObject * GetTestSupportObject() const
Definition WsfGuidedMover.hpp:81
void AdvanceTimeMultistep(double aSimTime, double aBegTime, double aEndTime, Phase &aNextPhase)
Definition WsfGuidedMover.cpp:963
bool mVerifyValues
Definition WsfGuidedMover.hpp:553
double mCommandedPitch
Definition WsfGuidedMover.hpp:555
double mIV_Values[6]
Definition WsfGuidedMover.hpp:564
bool mExplicitStageUsed
'true' if a 'stage' command was used
Definition WsfGuidedMover.hpp:542
double mCommandedRoll
Definition WsfGuidedMover.hpp:556
double mDivertThrust
Definition WsfGuidedMover.hpp:545
bool mComputeForcesEachSubstep
Definition WsfGuidedMover.hpp:579
void AdvanceTimeRK(double aSimTime, double aBegTime, double aEndTime)
This method takes a Runge-Kutta step.
Definition WsfGuidedMover.hpp:463
double GetDivertThrust() const
Definition WsfGuidedMover.hpp:77
double mLastQ
For tracking MaxQ for show_status.
Definition WsfGuidedMover.hpp:562
double GetCurrentThrust() const
Definition WsfGuidedMover.hpp:85
void AdvanceTimeSinglestep(double aSimTime, double aBegTime, double &aEndTime, Phase &aNextPhase)
Definition WsfGuidedMover.cpp:872
double GetEmptyMass() const
Definition WsfGuidedMover.cpp:700
bool mGuidanceOn
Definition WsfGuidedMover.hpp:552
double mECI_LastUpdateTime
Definition WsfGuidedMover.hpp:577
size_t GetNumStages() const
Definition WsfGuidedMover.hpp:96
double mLastMach
For tracking Mach 1 crossing for show_status.
Definition WsfGuidedMover.hpp:561
void AdvanceTimeTrapezoidal(double aSimTime, State &aState, const double aAppliedForcesECS[3])
Definition WsfGuidedMover.cpp:1409
void ComputeFullForces(double aSimTime, double aBegTime, double aEndTime, State &aRHS_State, Stage &aRHS_Stage) const
Definition WsfGuidedMover.cpp:1739
double mLastYaw
Definition WsfGuidedMover.hpp:557
double mLastAeroForcesECS[3]
Definition WsfGuidedMover.hpp:560
~WsfGuidedMover() override=default
double mCommandedYaw
Definition WsfGuidedMover.hpp:554
UtECI_Conversion & GetECI_Conversion()
Get the ECI conversion object. You MUST call this method, instead of directly accessing the object.
Definition WsfGuidedMover.cpp:183
double GetDivertFuelMass() const
Definition WsfGuidedMover.hpp:78
State mTempState3
Temporary state for RK4 integration.
Definition WsfGuidedMover.hpp:568
std::unique_ptr< WsfGuidedMoverTestObject > mTestSupportObjectPtr
Definition WsfGuidedMover.hpp:571
ut::CloneablePtr< UtECI_Conversion > mECI_ConversionPtr
Definition WsfGuidedMover.hpp:575
State mTempState2
Temporary state for RK4 integration.
Definition WsfGuidedMover.hpp:567
UtCloneablePtr< UtTable::Curve > CurvePtr
Definition WsfGuidedMover.hpp:47
void GetThrustForcesECS(double aThrustForcesECS[3]) const
Definition WsfGuidedMover.hpp:87
double mDivertFuelFlowRate
Definition WsfGuidedMover.hpp:546
std::vector< Stage > mStageList
The list of stages.
Definition WsfGuidedMover.hpp:541
CoordinateFrame mDesiredCoordinateFrame
Definition WsfGuidedMover.hpp:550
void AdvanceTimeLegacyRK4(double aSimTime, State &aState, const double aAppliedForcesECS[3])
Definition WsfGuidedMover.cpp:1366
double GetPayloadMass() const
Definition WsfGuidedMover.cpp:710
State mTempState1
Temporary state for RK2/RK4 integration.
Definition WsfGuidedMover.hpp:566
double GetCurrentTotalMass() const
Definition WsfGuidedMover.hpp:112
void GetCommandedAttitude(double &aYaw, double &aPitch, double &aRoll) const
Definition WsfGuidedMover.cpp:662
IntegrationMethod
Definition WsfGuidedMover.hpp:127
@ cTRAPEZOIDAL
Definition WsfGuidedMover.hpp:128
@ cRK4
Definition WsfGuidedMover.hpp:130
@ cRK2
Definition WsfGuidedMover.hpp:129
double GetCurrentFuelFlowRate() const
Definition WsfGuidedMover.hpp:115
double mDivertMaxAlt
Definition WsfGuidedMover.hpp:548
WsfGuidedMover(WsfScenario &aScenario, bool aGuidanceOn=true)
Definition WsfGuidedMover.cpp:86
UtCloneablePtr< UtTable::Table > mTimeConstantPtr
airframe time constant
Definition WsfGuidedMover.hpp:549
double GetCurrentFuelMass() const
Definition WsfGuidedMover.hpp:111
double mDivertMinAlt
Definition WsfGuidedMover.hpp:547
void GetAeroForcesECS(double aAeroForcesECS[3]) const
Definition WsfGuidedMover.hpp:86
IntegrationMethod mIntegrationMethod
Definition WsfGuidedMover.hpp:551
double mMaxQ
Definition WsfGuidedMover.hpp:563
double mLastRoll
Definition WsfGuidedMover.hpp:559
double mLastPitch
Definition WsfGuidedMover.hpp:558
WsfGuidedMover & operator=(const WsfGuidedMover &)=delete
double mECI_UpdateTime
Definition WsfGuidedMover.hpp:576
WsfMover * Clone() const override=0
WsfMover()=delete
virtual bool GetPropertyDouble(const std::string &aPropertyName, double &aProperty)
Definition WsfMover.cpp:178
const char * GetScriptClassName() const override
Definition WsfMover.cpp:616
WsfPlatform * GetPlatform() const
Definition WsfPlatformPart.hpp:107
double GetMass() const
Definition WsfPlatform.hpp:440
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
Take a step using second-order Runge-Kutta.
Definition WsfGuidedMover.hpp:443
static State Step(double aSimTime, State &aState, Callable &&aRightHandSide)
Definition WsfGuidedMover.hpp:445
Take a step using fourth-order Runge-Kutta.
Definition WsfGuidedMover.hpp:453
static State Step(double aSimTime, State &aState, Callable &&aRightHandSide)
Definition WsfGuidedMover.hpp:455
Copyrights Multiple, All Rights Reserved