WSF
WsfSixDOF_PilotManager.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 2020 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 WSFSIXDOFPILOTMANAGER_HPP
13#define WSFSIXDOFPILOTMANAGER_HPP
14
15#include "wsf_six_dof_export.h"
16
17#include <cinttypes>
18#include <list>
19#include <string>
20#include <unordered_map>
21
22class UtInput;
23
24namespace wsf
25{
26namespace six_dof
27{
29class PilotObject;
30
31// The PilotManager manages the PilotObjects on a vehicle.
32// Note that it does *not* include an Update function.
33class WSF_SIX_DOF_EXPORT PilotManager
34{
35public:
36 PilotManager() = default;
37 virtual ~PilotManager() = default;
38
39 PilotManager& operator=(const PilotManager& other) = delete;
40
41 // This will initialize all pilot objects
42 virtual bool Initialize(int64_t aSimTime_nanosec) = 0;
43
44 virtual void SetLastSimTime(int64_t aLastSimTime_nanosec) = 0;
45
46 // virtual void SetParentVehicle(SixDOF_Vehicle* aParentVehicle) = 0;
47
48 // This returns the active pilot object
50
51 // If a manual pilot is the active pilot, it will be returned.
52 // Otherwise, this function will return null.
54
55 // If a manual pilot is the active pilot, it will be returned.
56 // Otherwise, this function will return null.
58
59 // If a synthetic pilot is the active pilot, it will be returned.
60 // Otherwise, this function will return null.
62
63 // This makes the manual pilot the active pilot. Returns true if succeeds.
64 virtual bool MakeSimpleManualPilotActive() = 0;
65
66 // This makes the manual pilot the active pilot. Returns true if succeeds.
68
69 // This makes the synthetic pilot the active pilot. Returns true if succeeds.
70 virtual bool MakeSyntheticPilotActive() = 0;
71
72 // This is called each time step by Mover. The PilotObjects pass these
73 // values to their autopilot, where values can be integrated to determine
74 // deltaRoll, for example.
75 virtual void InputAngleDeltasToPilotObjects(const double& aYaw_rad, const double& aPitch_rad, const double& aRoll_rad) = 0;
76
77 // This enables/disables controls for all pilot objects. When controls are
78 // disabled, all control inputs are set to zero.
79 virtual void EnableControls(bool aEnabled) = 0;
80
81 // This returns the controls enabled/disabled state of the active pilot object.
82 virtual bool AreControlsEnabled() const = 0;
83
84 // This function is called by Mover when the vehicle is destroyed in
85 // flight. The aPitchInputModifier and aRollInputModifier arguments vary between
86 // +/-1 and control the pitch and roll control when destroyed.
87 virtual void SetDestroyed(double aPitchInputModifier, double aRollInputModifier) = 0;
88
89 // This provides a reference to the special common controller, which is used to access
90 // the functions such as GetAlphaVsMachCL(), GetStickForZeroMomentVsMachAlpha(),
91 // and GetEffectiveCLVsMachAlpha() which are used in testing.
92 virtual const CommonController* GetSpecialCommonController() const = 0;
93};
94} // namespace six_dof
95} // namespace wsf
96
97#endif
Definition WsfSixDOF_CommonController.hpp:38
virtual void SetLastSimTime(int64_t aLastSimTime_nanosec)=0
virtual bool MakeSimpleManualPilotActive()=0
virtual bool Initialize(int64_t aSimTime_nanosec)=0
virtual PilotObject * GetActiveSimpleManualPilot()=0
virtual void EnableControls(bool aEnabled)=0
virtual const CommonController * GetSpecialCommonController() const =0
virtual bool MakeAugmentedManualPilotActive()=0
virtual PilotObject * GetActiveAugmentedManualPilot()=0
virtual void InputAngleDeltasToPilotObjects(const double &aYaw_rad, const double &aPitch_rad, const double &aRoll_rad)=0
PilotManager & operator=(const PilotManager &other)=delete
virtual PilotObject * GetActiveSyntheticPilot()=0
virtual ~PilotManager()=default
virtual bool AreControlsEnabled() const =0
virtual void SetDestroyed(double aPitchInputModifier, double aRollInputModifier)=0
virtual bool MakeSyntheticPilotActive()=0
virtual PilotObject * GetActivePilot()=0
Definition WsfSixDOF_PilotObject.hpp:39
Definition WsfSA_Processor.hpp:35
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved