12#ifndef P6DOFFLIGHTCONTROLSYSTEM_H
13#define P6DOFFLIGHTCONTROLSYSTEM_H
15#include "p6dof_export.h"
25#include "UtCloneablePtr.hpp"
74 size_t GetControlSurfaceHandle(
const std::string& aControlSurfaceName)
const;
79 size_t GetControlSurfaceHandleContainingString(
const std::string& aString)
const;
84 size_t GetControlSurfaceHandleContainingTwoStrings(
const std::string& aString1,
const std::string& aString2)
const;
87 std::string GetControlSurfaceName(
size_t aControlSurfaceHandle)
const;
90 double GetControlSurfaceAngle_deg(
size_t aControlSurfaceHandle)
const;
93 double GetControlSurfaceMinAngle_deg(
size_t aControlSurfaceHandle)
const;
96 double GetControlSurfaceMaxAngle_deg(
size_t aControlSurfaceHandle)
const;
99 double GetControlSurfaceValueNormalized(
size_t aControlSurfaceHandle)
const;
104 void SetControlSurfaceAngle_deg(
size_t aControlSurfaceHandle,
double aAngle_deg);
110 size_t GetControlValueHandle(
const std::string& aControlValueName)
const;
113 std::string GetControlValueName(
size_t aControlValueHandle)
const;
116 double GetControlValue(
size_t aControlValueHandle)
const;
122 size_t GetBooleanControlHandle(
const std::string& aControlBooleanName)
const;
125 std::string GetBooleanControlName(
size_t aControlBooleanHandle)
const;
128 bool GetControlBoolean(
size_t aControlBooleanHandle)
const;
131 bool GetControlBooleanLastValue(
size_t aControlBooleanHandle)
const;
136 void ClearAllControlData();
139 size_t NumFlightControlInputs()
const;
145 size_t NumFlightControlSurfaces()
const;
201 UtCloneablePtr<UtTable::Table>
table;
202 UtCloneablePtr<UtTable::Curve>
curve;
230 std::vector<ControlInputGainStream*>::iterator it;
261 std::vector<ControlInputGainStream*>::iterator it;
280 std::vector<ControlInputGainStream*>::iterator it;
292 bool GetControlSurfacesUsingInput(std::vector<ControlSurfaceElement*>& list,
unsigned int aInputHandle);
295 void GetControlSurfaceNames(std::vector<std::string>& list);
299 void GetAllControlSurfaceAndActuatorsAngles(std::vector<double>& aControlSurfaceAngles_deg,
300 std::vector<double>& aActuatorAngles_deg)
const;
304 void SetAllControlSurfaceAndActuatorsAngles(
const std::vector<double>& aControlSurfaceAngles_deg,
305 const std::vector<double>& aActuatorAngles_deg);
308 void SetControlSurfacesBasedOnControlInputs(int64_t aSimTime_nanosec);
311 void SetControlValuesBasedOnControlInputs();
314 void SetControlBooleansBasedOnControlInputs();
322 bool ProcessSignalModifierTable(UtInput& aInput);
325 bool ProcessControlSurfaceInput(UtInput& aInput);
328 bool ProcessControlValueInput(UtInput& aInput);
331 bool ProcessControlBooleanInput(UtInput& aInput);
333 bool ProcessInputSet(UtInput& aInput, ControlSurfaceElement* aActiveControlSurfaceElement);
334 bool ProcessInputSet(UtInput& aInput, ControlValueElement* aActiveControlValueElement);
335 bool ProcessInputSet(UtInput& aInput, ControlBooleanElement* aActiveControlBooleanElement);
337 bool ProcessControlInputs(UtInput& aInput, ControlSurfaceElement* aActiveControlSurfaceElement);
338 bool ProcessControlInputs(UtInput& aInput, ControlValueElement* aActiveControlValueElement);
339 bool ProcessControlInputs(UtInput& aInput, ControlBooleanElement* aActiveControlBooleanElement);
343 bool AddControlSurfaceToList(ControlSurfaceElement* aControlSurface);
347 bool AddControlValueToList(ControlValueElement* aControlValue);
351 bool AddControlBooleanToList(ControlBooleanElement* aControlBoolean);
353 ControlInputValue* GetControlInputByName(
const std::string& aControlInputName)
const;
354 ControlSignalModifier* GetControlSignalModifierByName(
const std::string& aSignalModifierName)
const;
aObjectPtr Update(simTime)
Definition P6DofControlActuator.hpp:21
Definition P6DofFlightControlSystem.hpp:42
ControlSignalModifierType
Definition P6DofFlightControlSystem.hpp:162
@ BetaGainTable
Definition P6DofFlightControlSystem.hpp:170
@ SASChannel
Definition P6DofFlightControlSystem.hpp:166
@ GyLoadMappingTable
Definition P6DofFlightControlSystem.hpp:181
@ ScalarGain
Definition P6DofFlightControlSystem.hpp:164
@ ClampGain
Definition P6DofFlightControlSystem.hpp:165
@ MachMappingTable
Definition P6DofFlightControlSystem.hpp:176
@ GyLoadGainTable
Definition P6DofFlightControlSystem.hpp:172
@ GxLoadGainTable
Definition P6DofFlightControlSystem.hpp:171
@ QMappingTable
Definition P6DofFlightControlSystem.hpp:184
@ KTASMappingTable
Definition P6DofFlightControlSystem.hpp:177
@ AltGainTable
Definition P6DofFlightControlSystem.hpp:174
@ AltMappingTable
Definition P6DofFlightControlSystem.hpp:183
@ AlphaMappingTable
Definition P6DofFlightControlSystem.hpp:178
@ MachGainTable
Definition P6DofFlightControlSystem.hpp:167
@ SignalMappingTable
Definition P6DofFlightControlSystem.hpp:185
@ Undefined
Definition P6DofFlightControlSystem.hpp:163
@ KTASGainTable
Definition P6DofFlightControlSystem.hpp:168
@ QGainTable
Definition P6DofFlightControlSystem.hpp:175
@ AlphaGainTable
Definition P6DofFlightControlSystem.hpp:169
@ GzLoadMappingTable
Definition P6DofFlightControlSystem.hpp:182
@ GzLoadGainTable
Definition P6DofFlightControlSystem.hpp:173
@ GxLoadMappingTable
Definition P6DofFlightControlSystem.hpp:180
@ BetaMappingTable
Definition P6DofFlightControlSystem.hpp:179
P6DofKinematicState mState
Definition P6DofFlightControlSystem.hpp:366
P6DofFlightControlSystem & operator=(const P6DofFlightControlSystem &other)=delete
std::vector< ControlValueElement * > mControlValueList
Definition P6DofFlightControlSystem.hpp:362
P6DofFlightControlSystem(P6DofScenario *aScenario)
Definition P6DofFlightControlSystem.cpp:26
std::vector< ControlSurfaceElement * > mControlSurfaceList
Definition P6DofFlightControlSystem.hpp:361
bool ProcessInput(UtInput &aInput)
Definition P6DofFlightControlSystem.cpp:434
int64_t mLastUpdateSimTime_nanosec
Definition P6DofFlightControlSystem.hpp:365
bool Initialize(int64_t aSimTime_nanosec)
Definition P6DofFlightControlSystem.cpp:1336
void ConnectInputsWithOutputs()
Definition P6DofFlightControlSystem.cpp:210
std::vector< ControlSignalModifier * > mControlSignalModifiersList
Definition P6DofFlightControlSystem.hpp:360
std::vector< ControlBooleanElement * > mControlBooleanList
Definition P6DofFlightControlSystem.hpp:363
P6DofPilotManager * mP6DofPilotManager
Definition P6DofFlightControlSystem.hpp:357
std::vector< ControlInputValue * > mControlInputList
Definition P6DofFlightControlSystem.hpp:359
P6DofPilotObject * mP6DofPilotObjectPtr
Definition P6DofFlightControlSystem.hpp:356
void SetLastUpdateSimTime(int64_t aLastUpdateSimTime_nanosec)
Definition P6DofFlightControlSystem.hpp:59
Definition P6DofKinematicState.hpp:31
P6DofObject(P6DofScenario *aScenario)
Definition P6DofObject.cpp:17
P6DofObject * Clone() const
Definition P6DofObject.cpp:24
Definition P6DofPilotManager.hpp:38
Definition P6DofPilotObject.hpp:37
Definition P6DofScenario.hpp:25
Definition P6DofVehicle.hpp:53
Simple
Definition P6DofVehicleData.hpp:25
Definition P6DofVehicleData.hpp:66
Definition P6DofFlightControlSystem.hpp:272
std::string controlValueName
Definition P6DofFlightControlSystem.hpp:273
~ControlBooleanElement()
Definition P6DofFlightControlSystem.hpp:278
double thresholdValue
Definition P6DofFlightControlSystem.hpp:275
std::vector< ControlInputGainStream * > controlInputList
Definition P6DofFlightControlSystem.hpp:274
bool currentValue
Definition P6DofFlightControlSystem.hpp:276
bool lastValue
Definition P6DofFlightControlSystem.hpp:277
double scalarGain
Definition P6DofFlightControlSystem.hpp:203
ControlSignalModifier()
Definition P6DofFlightControlSystem.hpp:190
double maxClamp
Definition P6DofFlightControlSystem.hpp:205
UtCloneablePtr< UtTable::Curve > curve
Definition P6DofFlightControlSystem.hpp:202
UtCloneablePtr< UtTable::Table > table
Definition P6DofFlightControlSystem.hpp:201
std::string name
Definition P6DofFlightControlSystem.hpp:199
ControlSignalModifierType type
Definition P6DofFlightControlSystem.hpp:200
double minClamp
Definition P6DofFlightControlSystem.hpp:204
Definition P6DofFlightControlSystem.hpp:219
std::string controlSurfaceName
Definition P6DofFlightControlSystem.hpp:220
double minAngle_deg
Definition P6DofFlightControlSystem.hpp:226
UtTable::Curve * angleMappingAuto
Definition P6DofFlightControlSystem.hpp:222
~ControlSurfaceElement()
Definition P6DofFlightControlSystem.hpp:228
double currentAngle_deg
Definition P6DofFlightControlSystem.hpp:225
UtTable::Curve * angleMappingManual
Definition P6DofFlightControlSystem.hpp:223
std::vector< ControlInputGainStream * > controlInputList
Definition P6DofFlightControlSystem.hpp:221
double maxAngle_deg
Definition P6DofFlightControlSystem.hpp:227
P6DofControlActuator * actuator
Definition P6DofFlightControlSystem.hpp:224
Definition P6DofFlightControlSystem.hpp:253
std::string controlValueName
Definition P6DofFlightControlSystem.hpp:254
double maxValue
Definition P6DofFlightControlSystem.hpp:258
double currentValue
Definition P6DofFlightControlSystem.hpp:256
~ControlValueElement()
Definition P6DofFlightControlSystem.hpp:259
double minValue
Definition P6DofFlightControlSystem.hpp:257
std::vector< ControlInputGainStream * > controlInputList
Definition P6DofFlightControlSystem.hpp:255