VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
baseParachuteActuator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2019 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 #pragma once
11 
14 
15 #include <matrix/LibMatrix.h>
16 #include <vlpi/disEnums.h>
17 
18 class DtString;
22 class DtAnalogInputPort;
23 class DtBooleanInputPort;
24 class DtInputPortGroup;
25 class DtVectorInputPort;
27 class DtAnalogOutputPort;
30 
38 {
39 
40 public:
41 
45  DtLocalObject* owner,
46  DtSimulationServices* simManager,
47  DtComponentDescriptor* desc = 0,
48  DtReaderWriterRegistry* parentRegistry = 0);
49 
53  virtual ~DtBaseParachuteActuator();
54 
57  virtual bool init();
58 
61  virtual const char* type() const;
62 
63  virtual void tick();
64 
68  static DtSimComponent* creator(const DtString& name,
69  DtLocalObject* owner,
70  DtSimulationServices* simManager,
71  DtComponentDescriptor* desc = 0,
72  DtReaderWriterRegistry* parentRegistry = 0);
73 
74 
75 protected:
76  virtual bool createPortGroups();
77  virtual bool createPorts();
78 
80  virtual bool isFallingApplicable();
81 
82  virtual bool checkFallingApplicable(bool& dataAvailable);
83 
85 
86  virtual double horizontalDragCoefficient() const;
87  virtual double verticalDragCoefficient() const;
88  virtual double windDragCoefficient() const;
89  virtual double turningRate() const;
91 
92  virtual void calculateOrientation(const DtDcm&
93  oldLocalOrientation, const DtVector& newBodyRotationRates,
94  DtDcm& newLocalOrientation);
95 
96  virtual DtVector calculateDragForces(const DtVector& oldLocalPosition,
97  const DtVector& oldLocalVelocity);
98 
99  virtual double dragAccelerationFromSpeed(double curSpeed, double coefficient) const;
100 
101  virtual double calcPitch(DtVector geocLoc, DtTaitBryan geocOri);
102 
103  virtual double calcRoll(DtVector geocLoc, DtTaitBryan geocOri);
104 
105  virtual void processLanding();
106 
107  virtual void processChuteDeployment();
108 
109  virtual void processFreeFall();
110 
111 
112 private:
113 
116 
119 
123 
124 protected:
125 
127  virtual void fallFromSky();
128 
130  //virtual void executeSetPosture(DtLifeformState lifeformState);
131 
133  virtual bool checkForLandingDamage() const;
134 
136  virtual double downwardSpeed() const;
137 
139  virtual bool createPSR();
140 
142  virtual bool isCargoDoorOpen(const DtSimObject* entity) const;
143 
146  virtual double percentDeployed() const;
147 
148 protected:
149 
151 
158 
161 
164 
166 
169 };
virtual void calculateOrientation(const DtDcm &oldLocalOrientation, const DtVector &newBodyRotationRates, DtDcm &newLocalOrientation)
Uses current local orientation, rotationRates in SR, and dT. Results placed in object pointed to by o...
DtBaseParachuteActuator modifies the falling from sky actuator to have a stowed and deployed state...
Definition: baseParachuteActuator.h:37
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
Description: This repository holds all information that is common to all the forms of all objects wit...
Definition: vrfMovingObjectStateRepository.h:31
Instances of DtBooleanOutputPort are output ports through which data producers can send boolean data...
Definition: boolIOPort.h:45
DtInputPortGroup * myParachuteControlInputPortGroup
Ports and port groups.
Definition: baseParachuteActuator.h:157
Contains class declarations for DtConstrainedAnalogInputPort and DtConstrainedAnalogOutputPort.
Definition: constrainedAnalogIOPort.h:30
virtual DtVector calculateDragForces(const DtVector &oldLocalPosition, const DtVector &oldLocalVelocity)
Calculates acceleration from Drag forces–In this case wind.
const DtFallingFromSkyActuatorComponent & operator=(const DtFallingFromSkyActuatorComponent &orig)
assignment operator; not implemented
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
Definition: readerWriterRegistry.h:39
Contains class declarations for DtVectorInputPort, DtVectorOutputPort, and DtVectorPortData.
Definition: vectorIOPort.h:27
DtBooleanInputPort * myDeployedPort
Ports and port groups.
Definition: baseParachuteActuator.h:154
virtual bool isFallingApplicable()
Determines if this actuator is applicable. For the base actuator, it is only applicable if the entity...
virtual void fallFromSky()
Causes the entity to fall from the sky. Takes into account drag coefficient from descriptor.
virtual double dragAccelerationFromSpeed(double curSpeed) const
Calculates acceleration of object given current speed.
Instances of DtAnalogOutputPort are input ports through which data producers can send real numbers...
Definition: analogIOPort.h:45
virtual void tick()
Calls isFallingApplicable to determine if it should do anything, and if so calls fallFromSky.
DtBooleanOutputPort * myFallingOutputPort
Ports and port groups.
Definition: baseParachuteActuator.h:160
DtParachuteActuatorDescriptor * myParachuteActuatorDescriptor
Definition: baseParachuteActuator.h:150
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Member to allow for access to platform specific data.
Definition: baseParachuteActuator.h:168
virtual bool createPortGroups()
Called by init. Derived classes should override this method to create all their input/output port gro...
Contains class declarations for DtBooleanInputPort, DtBooleanOutputPort, and DtBooleanPortData.
Definition: boolIOPort.h:25
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
DtParachuteActuatorPSR * myProcessState
Definition: baseParachuteActuator.h:165
DtConstrainedAnalogInputPort * myLeftToggleInputPort
Ports and port groups.
Definition: baseParachuteActuator.h:155
DtAnalogOutputPort * myMaxTurnRateOutputPort
Ports and port groups.
Definition: baseParachuteActuator.h:159
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
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:88
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
double calcRoll(const DtVector &geocLoc, const DtTaitBryan &geocOri)
DtInputPortGroup is a data port group of a data consumer. It may contain any number of DtInputPorts a...
Definition: inputPortGroup.h:35
Contains class declarations for DtAnalogInputPort, DtAnalogOutputPort, and DtAnalogPortData.
Definition: analogIOPort.h:25
DtAnalogInputPort * myAglInputPort
Ports and port groups.
Definition: baseParachuteActuator.h:162
virtual bool init()
to get access to the entity&#39;s localStateRepository, which this component will update, and then connect to the controller&#39;s ports.
DtFallingFromSkyActuatorComponent provides a simple, kinematics-based model for air motion based on t...
Definition: fallingFromSkyActuatorComponent.h:34
Definition: parachuteActuatorDescriptor.h:17
virtual const char * type() const
Returns a string identifies the class type of component. Type values are defined in compTypes...
DtConstrainedAnalogInputPort * myRightToggleInputPort
Ports and port groups.
Definition: baseParachuteActuator.h:156
double calcPitch(const DtVector &geocLoc, const DtTaitBryan &geocOri)
class DtParachuteActuatorPSR:
Definition: parachuteActuatorPSR.h:26
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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)