VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
parachuteController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
12 #include <matrix/vlVector.h>
13 
14 class DtString;
16 class DtVectorOutputPort;
20 class DtOutputPortGroup;
21 class DtAnalogInputPort;
22 class DtStringInputPort;
23 class DtBooleanInputPort;
25 
35 {
36 public:
37 
40  DtParachuteController(const DtString& name,
41  DtLocalObject* owner,
42  DtSimulationServices* simManager,
43  DtComponentDescriptor* desc = 0,
44  DtReaderWriterRegistry* parentRegistry = 0);
45 
47  virtual ~DtParachuteController();
48 
51  virtual bool init();
52 
54  virtual void tick();
55 
58  virtual const char* type() const;
59 
63  static DtSimComponent * creator(const DtString& name, DtLocalObject* owner,
64  DtSimulationServices* simManager, DtComponentDescriptor* desc = 0,
65  DtReaderWriterRegistry* parentRegistry = 0);
66 
67 protected:
68 
69  virtual bool createPortGroups();
70 
71  virtual bool createPorts();
72 
73  virtual bool createPSR();
74 
76 
77  static void parachuteToLocationTaskCallback(DtSimMessage* msg, void* usrData);
78  virtual void processParachuteTolocationTask(DtSimMessage* msg);
80 
81  static void setDeployElapsedTimeCallback(DtSimMessage *msg, void * usrData);
82  virtual void processSetDepolyElapsedTime(DtSimMessage *msg);
83 
84  static void setDeployAltitudeCallback(DtSimMessage* msg, void* usrData);
85  virtual void processSetDeployAltitude(DtSimMessage* msg);
86 
88  virtual bool tickWhileDestroyed() const;
89 
91  virtual bool isFallingApplicable() const;
92 
95  virtual double findDesiredHeading(const DtVector& localDestination);
96 
98  virtual void calculateSteering(double currentHeading, const DtVector& targetLocation,
99  double& leftToggle, double& rightToggle);
100 
104  virtual DtVector projectLandingLocation(const DtSimObject* entity);
105 
107  virtual bool deployParachute(const DtSimObject* targetObject);
108 
110  virtual bool taskVisualizationsActive() const;
111 
113  virtual void updateTaskVisualizations();
114 
115  void setDeployAltitude(double orderedAltitude, bool isAgl);
116 
117  void setDeployAtElapsedTime(double elapsedTime, bool deployAtElapsedTime);
118 
120  virtual void clearTask();
121 
122 private:
125 
128  orig);
129 
131  const DtParachuteController & operator=(const
132  DtParachuteController & orig);
133 
134 protected:
138 
141 
147 
150 
152 
155 
157 };
158 
DtParachuteControllerDescriptor * myDescriptor
Contains initial values.
Definition: parachuteController.h:140
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
Task controller for Parachuting.
Definition: parachuteController.h:34
class DtParachuteControllerPSR:
Definition: parachuteControllerPSR.h:26
Instances of DtBooleanOutputPort are output ports through which data producers can send boolean data...
Definition: boolIOPort.h:45
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:20
Contains class declarations for DtStringInputPort, DtStringOutputPort, and DtStringPortData.
Definition: stringIOPort.h:27
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
DtConstrainedAnalogOutputPort * myLeftToggleOutputPort
Definition: parachuteController.h:145
Definition: readerWriterRegistry.h:39
virtual bool taskVisualizationsActive() const
Returns true if task visualizations are currently active for this component. Default behavior for tas...
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
DtConstrainedAnalogOutputPort * myRightToggleOutputPort
Definition: parachuteController.h:146
virtual bool init()
Calls setRadio()
Definition: parachuteControllerDescriptor.h:17
DtConstrainedAnalogOutputPort is a version of DtAnalogOutputPort which will constrain any outgoing va...
Definition: constrainedAnalogIOPort.h:57
DtAnalogInputPort * myMaxTurnRateInputPort
Definition: parachuteController.h:148
virtual void clearTask()
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
virtual void updateTaskVisualizations()
Called to update task visualizations after every tick. Implemented by subclasses. ...
Definition: simComponent.h:436
Instances of DtVectorOutputPort are output ports through which data producers can send a DtVector...
Definition: vectorIOPort.h:52
File: simMsg.h.
Definition: simMessage.h:35
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
Contains class declarations for DtBooleanInputPort, DtBooleanOutputPort, and DtBooleanPortData.
Definition: boolIOPort.h:25
virtual bool tickWhileDestroyed() const
If the component returns true here, it will be ticked regardless of the destroyed state of the host e...
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
virtual bool createPortGroups()
Called by init. Derived classes should override this method to create all their input/output port gro...
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:90
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:79
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtParachuteControllerPSR * myProcessState
Stores the current state of the controller which is saved out with the order of battle file...
Definition: parachuteController.h:137
DtBooleanOutputPort * myDeployedOutputPort
Definition: parachuteController.h:144
DtBooleanInputPort * myFallingInputPort
Definition: parachuteController.h:149
Contains class declarations for DtAnalogInputPort, DtAnalogOutputPort, and DtAnalogPortData.
Definition: analogIOPort.h:25
DtStringInputPort * myFollowTargetInputPort
Definition: parachuteController.h:153
DtOutputPortGroup * myParachuteControlOutputPortGroup
Definition: parachuteController.h:151
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
DtTime myTimeToDeploy
Definition: parachuteController.h:156

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)