WSF
WsfAttitudeController.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 2017 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 WSFATTITUDECONTROLLER_HPP
13#define WSFATTITUDECONTROLLER_HPP
14
15#include "wsf_space_export.h"
16
17#include <memory>
18#include <string>
19
20class UtInput;
21#include "UtVec3.hpp"
22#include "WsfObject.hpp"
25
30class WSF_SPACE_EXPORT WsfAttitudeController : public WsfObject
31{
32public:
35 ~WsfAttitudeController() override = default;
36
38
40 virtual void SetTargetOrientationECI(double aPsiECI, double aThetaECI, double aPhiECI) = 0;
41
44 void SetTargetOrientation(double aYawECS,
45 double aPitchECS,
46 double aRollECS,
47 const UtVec3d& aX_AxisOrientationECI,
48 const UtVec3d& aZ_AxisConstraintECI);
49
51 virtual void GetTargetOrientationECI(double& aPsiECI, double& aThetaECI, double& aPhiECI) const = 0;
52
55 virtual void UpdateOrientation(double aDeltaT) = 0;
56
58 virtual bool CalculateOrientation(double& aPsi, double& aTheta, double& aPhi) const;
59
61 void Update(double aDeltaT);
62
64 virtual bool AtTargetOrientation() const = 0;
65
67 WsfAttitudeController* Clone() const override = 0;
68
69 bool ProcessInput(UtInput& aInput) override;
70
72 void SetMover(WsfSpaceMoverBase* aMover) { mMover = aMover; }
73
75 WsfSpaceMoverBase* GetMover() const { return mMover; }
76
77 void SetOrientation(std::unique_ptr<wsf::space::Orientation> aOrientationPtr);
78
79 WSF_SPACE_DEPRECATED bool SetOrientation(const std::string& aOrientation);
80
81private:
82 WsfSpaceMoverBase* mMover;
83 std::unique_ptr<wsf::space::Orientation> mOrientationPtr;
85 std::string mGeoPoint;
86};
87
88#endif // WSFATTITUDECONTROLLER_HPP
aObjectPtr Update(simTime)
virtual bool CalculateOrientation(double &aPsi, double &aTheta, double &aPhi) const
Calculate the updated orientation target.
Definition WsfAttitudeController.cpp:125
WsfSpaceMoverBase * GetMover() const
Return the mover to which this attitude controller is attached.
Definition WsfAttitudeController.hpp:75
void SetMover(WsfSpaceMoverBase *aMover)
Set the mover to which this is attached.
Definition WsfAttitudeController.hpp:72
WsfAttitudeController()
Definition WsfAttitudeController.cpp:24
WsfAttitudeController & operator=(const WsfAttitudeController &aSrc)=delete
~WsfAttitudeController() override=default
virtual bool AtTargetOrientation() const =0
Has the mover reached the target orientation.
virtual void GetTargetOrientationECI(double &aPsiECI, double &aThetaECI, double &aPhiECI) const =0
Get the current orientation target for this attitude controller.
WsfAttitudeController * Clone() const override=0
Clone this object.
virtual void SetTargetOrientationECI(double aPsiECI, double aThetaECI, double aPhiECI)=0
Set the orientation target for this attitude controller.
virtual void UpdateOrientation(double aDeltaT)=0
void SetTargetOrientation(double aYawECS, double aPitchECS, double aRollECS, const UtVec3d &aX_AxisOrientationECI, const UtVec3d &aZ_AxisConstraintECI)
Definition WsfAttitudeController.cpp:40
WsfObject()
This is the constructor for the WsfObject class.
Definition WsfObject.cpp:88
virtual bool ProcessInput(UtInput &aInput)
Definition WsfObject.cpp:140
Definition WsfSpaceMoverBase.hpp:70
Copyrights Multiple, All Rights Reserved