VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rotaryWingTaskController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1999-2003 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
17 
18 class DtString;
22 class DtAnalogOutputPort;
23 class DtVectorOutputPort;
24 class DtOutputPortGroup;
26 
32 {
33 public:
37  DtLocalObject* owner,
38  DtSimulationServices* simManager,
39  DtComponentDescriptor* desc = 0,
40  DtReaderWriterRegistry* parentRegistry = 0);
41 
43  virtual ~DtRotaryWingTaskController();
44 
46  virtual bool init();
47 
48  virtual void tick();
49 
51  virtual const char* type() const = 0;
52 
55  virtual void clearTask();
56 
59 
60  virtual void setDesiredPosition(const DtVector& pos);
61  virtual void setContinueMovement(const bool continueAtEnd);
62  virtual void setDesiredVelocity(const DtVector& vel);
63  virtual void setDesiredAcceleration(const DtVector& accel);
64  virtual void setDesiredHeading(double heading);
65  virtual void setPositionSelector(double sel);
66  virtual void setVelocitySelector(double sel);
67  virtual void setAccelerationSelector(double sel);
68  virtual void setHeadingSelector(double sel);
69  virtual void setAggressiveness(double agg);
70  virtual void setPowerDown(bool powerDown);
72 
74 
75  virtual DtVectorOutputPort *desiredPositionPort();
76  virtual DtVectorOutputPort *desiredVelocityPort();
77  virtual DtVectorOutputPort *desiredAccelerationPort();
78  virtual DtAnalogOutputPort *desiredHeadingPort();
79  virtual DtAnalogOutputPort *positionSelectorPort();
80  virtual DtBooleanOutputPort *continueMovementPort();
81  virtual DtAnalogOutputPort *velocitySelectorPort();
82  virtual DtAnalogOutputPort *accelerationSelectorPort();
83  virtual DtAnalogOutputPort *headingSelectorPort();
84  virtual DtAnalogOutputPort *aggressivenessPort();
85  virtual DtBooleanOutputPort* powerDownPort();
87 
88 protected:
89 
91  virtual bool createPortGroups();
92 
94  virtual bool createPorts();
95 
97 
98  virtual bool createGuidancePortGroup();
99  virtual bool createDesiredPositionPort();
100  virtual bool createDesiredVelocityPort();
101  virtual bool createDesiredAccelerationPort();
102  virtual bool createDesiredHeadingPort();
103  virtual bool createPositionSelectorPort();
104  virtual bool createContinueMovementPort();
105  virtual bool createVelocitySelectorPort();
106  virtual bool createAccelerationSelectorPort();
107  virtual bool createHeadingSelectorPort();
108  virtual bool createAggressivenessPort();
109  virtual bool createPowerDownPort();
111 
119  virtual void lookupAndCacheProcessSR();
120 
123  virtual bool postAddComponentsInit();
124 
126  virtual void processEstimatedTotCalculation();
127 
129  virtual void updateTaskVisualizations();
130 
131 private:
134 
137  orig);
138 
142 
143 
144 protected:
145 
147 
149 
150 
155 
161 
167 
173 
179 
186 
193 
200 
207 
214 
221 
232 
239 
241  const double DtEstimatedTotCalcInterval = 5.0;
242 
251 
253 };
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
This repository holds all information that is common to all the forms of local rotary wing entities w...
Definition: rotaryWingEntityStateRepository.h:27
double myEstimatedTotValue
the tot value
Definition: rotaryWingTaskController.h:246
DtVectorOutputPort * myDesiredVelocityPort
Output Port Name: desired-velocity Output Port Description: The desired velocity of the entity Output...
Definition: rotaryWingTaskController.h:166
bool myEstimatedTotCalcEnabled
enabled flag for the tot calculations
Definition: rotaryWingTaskController.h:244
DtBooleanOutputPort * myContinueMovementPort
Input Port Name: continue-movement Input Port Description: Indicates that when flying to a position...
Definition: rotaryWingTaskController.h:192
DtAnalogOutputPort * myHeadingSelectorPort
Output Port Name: heading-selector Output Port Description: Determines whether the desired-heading po...
Definition: rotaryWingTaskController.h:213
Instances of DtBooleanOutputPort are output ports through which data producers can send boolean data...
Definition: boolIOPort.h:45
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Definition: rotaryWingTaskController.h:252
DtAnalogOutputPort * myVelocitySelectorPort
Output Port Name: velocity-selector Output Port Description: Determines whether the desired-velocity ...
Definition: rotaryWingTaskController.h:199
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:20
Definition: rotaryWingFlightPSR.h:29
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
DtVector myEstimatedTotTextPos
tot text position
Definition: rotaryWingTaskController.h:250
Definition: readerWriterRegistry.h:39
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
DtOutputPortGroup is a data port group of a data provider. It may contain any number of DtOutputPorts...
Definition: outputPortGroup.h:34
virtual bool init()
Calls setRadio()
DtVectorOutputPort * myDesiredAccelerationPort
Output Port Name: desired-acceleration Output Port Description: The desired acceleration of the entit...
Definition: rotaryWingTaskController.h:172
virtual void clearTask()
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
DtRotaryWingEntityStateRepository * myRotaryWingEntityState
Definition: rotaryWingTaskController.h:146
DtVectorOutputPort * myDesiredPositionPort
Output Port Name: desired-position Output Port Description: The desired position of the entity...
Definition: rotaryWingTaskController.h:160
virtual void updateTaskVisualizations()
Called to update task visualizations after every tick. Implemented by subclasses. ...
Definition: simComponent.h:436
DtOutputPortGroup * myGuidancePortGroup
Output Port Group Name: guidance Output Port Group Description: Group of input ports that define the ...
Definition: rotaryWingTaskController.h:154
Instances of DtAnalogOutputPort are input ports through which data producers can send real numbers...
Definition: analogIOPort.h:45
Instances of DtVectorOutputPort are output ports through which data producers can send a DtVector...
Definition: vectorIOPort.h:52
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
The DtRotaryWingTaskController class creates the rotary-wing-control port group needed to control rot...
Definition: rotaryWingTaskController.h:31
DtAnalogOutputPort * myAccelerationSelectorPort
Output Port Name: acceleration-selector Output Port Description: Determines whether the desired-avvel...
Definition: rotaryWingTaskController.h:206
virtual bool createPortGroups()
Called by init. Derived classes should override this method to create all their input/output port gro...
DtAnalogOutputPort * myDesiredHeadingPort
Output Port Name: desired-heading Output Port Description: Output Port Range: -1. to 1. Output Group Parent: guidance.
Definition: rotaryWingTaskController.h:178
DtRotaryWingFlightPSR * myProcessState
Pointer to a process state repository used to store state data associated with this component...
Definition: rotaryWingTaskController.h:238
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:90
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtBooleanOutputPort * myPowerDownPort
Output Port Name: power-down Output Port Description: Determines whether the control values will all ...
Definition: rotaryWingTaskController.h:230
double myEstimatedTotLastCalcTime
used for tot calculation intervals
Definition: rotaryWingTaskController.h:248
virtual bool postAddComponentsInit()
Calls enableTaskTypes()
DtAnalogOutputPort * myPositionSelectorPort
Output Port Name: position-selector Output Port Description: Determines whether the desired-position ...
Definition: rotaryWingTaskController.h:185
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86
DtAnalogOutputPort * myAggressivenessPort
Output Port Name: aggressiveness Output Port Description: How aggressively the autopilot will move th...
Definition: rotaryWingTaskController.h:220

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)