VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
surfaceEntityActuator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 #pragma once
11 
14 
15 class DtString;
23 
47 {
48 
49 public:
50 
54  DtSurfaceEntityActuator (const DtString& name,
55  DtLocalObject* owner,
56  DtSimulationServices* simManager,
57  DtComponentDescriptor* desc = 0,
58  DtReaderWriterRegistry* parentRegistry = 0);
59 
64  virtual ~DtSurfaceEntityActuator() override;
65 
68  virtual bool init() override;
69 
72  virtual const char* type() const override;
73 
76  virtual bool postAddComponentsInit() override;
77 
80  virtual void initProcessSR();
81 
106  virtual void tick() override;
107 
113  virtual double calculateRudderYawAcceleration();
114 
119  virtual double calculateResistanceYawAcceleration();
120 
128  virtual const DtVector calculateThrottleAcceleration();
129 
134  virtual const DtVector calculateDragAcceleration();
135 
141  virtual bool clampSmallVelocityToZero();
142 
145  virtual double stoppingSpeed();
146 
153  virtual void useFuel(double fuelUsed);
154 
160  virtual double fuelLeft() const;
161 
165  static DtSimComponent * creator(const DtString& name,
166  DtLocalObject* owner,
167  DtSimulationServices* simManager,
168  DtComponentDescriptor* desc = 0,
169  DtReaderWriterRegistry* parentRegistry = 0);
170 
171 protected:
173  virtual double fuelUsed(double speed) const;
174 
177  virtual bool createPortGroups() override;
178 
181  virtual bool createPorts() override;
182 
187  virtual void integratePosition(double dT);
188 
195  virtual void integrateOrientation(double dT);
196 
200  void constrainYawAcceleration(double& yawAcceleration, double yawRate,
201  double maxYawRate, double dT);
202 
206  virtual void updateRepository();
207 
208  DtSurfaceEntityStateRepository * surfaceEntityState (void) const;
209 
215  virtual bool createPSR();
216 
217 protected:
218 
221 
224  (const DtSurfaceEntityActuator & orig);
225 
227  const DtSurfaceEntityActuator & operator=
228  (const DtSurfaceEntityActuator & orig);
229 
230 
231 protected:
232 
235 
238 
242 
249 
256 
261 
263 
266 
267  DtVector myLocalPosition;
270  DtTaitBryan myOrientation;
273 
277 
279 
283 
286 };
287 
DtSurfaceEntityStateRepository * mySurfaceEntityState
Definition: surfaceEntityActuator.h:233
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
virtual bool postAddComponentsInit()
Called after all components have been created, initialized and added to the component manager...
Definition: simComponent.h:126
DtSurfaceMovementPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: surfaceEntityActuator.h:276
DtSurfaceEntityActuatorDescriptor * mySurfaceEntityActuatorDescriptor
Definition: surfaceEntityActuator.h:234
Instances of DtBooleanOutputPort are output ports through which data producers can send boolean data...
Definition: boolIOPort.h:45
DtDcm myBodyToLocalMatrix
Definition: surfaceEntityActuator.h:264
Definition: surfaceMovementPSR.h:59
Contains class declarations for DtConstrainedAnalogInputPort and DtConstrainedAnalogOutputPort.
Definition: constrainedAnalogIOPort.h:30
DtVector myRelativeAcceleration
Definition: surfaceEntityActuator.h:269
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
DtUpdateRepositoryOutputPortGroup * myUpdateRepositoryOutputPortGroup
Port group used to set what values should be set into the VRF state repository. All values are in loc...
Definition: surfaceEntityActuator.h:282
Definition: readerWriterRegistry.h:39
DtBooleanOutputPort * mySmallVelocityClampedPort
Output Port Name: clamp-small-vel-zero Output Port Description: Output Port Default Value: True ...
Definition: surfaceEntityActuator.h:260
DtVector myBodyRotationRates
Definition: surfaceEntityActuator.h:271
End User Description: DtActuator is the base class for all actuator model components. Developer Description: The DtActuator base class caches a pointer to the entity's radio for convenience. Derived classes may have articulated parts that are configured from the DtActuatorComponentDescriptor's DtSimArtPartDescriptorList. For each articulated part in the list a DtArticulatedPartStateRepository will be created to store the data for the part such as it's location, rotation and so forth. These are created in the entity's DtVrfObjectStateRepository createParts() function. This call creates all the attached parts for all the actuators. These articulated state repositories are managed by the DtAttachmentManager. They are cached by their partType which is the DIS Enumeration describing the part from the disEnums.h file and was specified in the actuator's DtActuatorComponentDescriptor as descriped above. The partType is used as the category of the DtEntityType used to look up articulated parts in the DtAttachementManager. When an actuator needs access to a particular articulated part it looks it up by the part's object type.
Definition: actuatorComponent.h:47
DtConstrainedAnalogInputPort * myRudderPort
Input Port Name: rudder Input Port Description: Input Port Range: -1.0 to 1.0 Input Port Default Val...
Definition: surfaceEntityActuator.h:255
DtConstrainedAnalogInputPort * myThrottlePort
Input Port Name: throttle Input Port Description: Input Port Range: 0.0 to 1.0 Input Port Default Va...
Definition: surfaceEntityActuator.h:248
Provides a simple, kinematics-based model for surface vessels.
Definition: surfaceEntityActuator.h:46
DtTaitBryan myOrientation
Definition: surfaceEntityActuator.h:270
DtVector myLocalPosition
Definition: surfaceEntityActuator.h:267
bool myOutOfFuelWarningPrinted
Definition: surfaceEntityActuator.h:278
DtInputPortGroup * mySurfaceControlPortGroup
Input Port Group Name: surface-control Input Port Group Description:
Definition: surfaceEntityActuator.h:241
virtual bool init() override
Overridden to cache a pointer to the entity's radio in this class.
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
This repository holds all information that is common to all the forms of local surface entities withi...
Definition: surfaceEntityStateRepository.h:26
DtVector myBodyRotationalAcceleration
Definition: surfaceEntityActuator.h:272
DtDcm myLocalToBodyMatrix
Definition: surfaceEntityActuator.h:265
DtVector myRelativeVelocity
Definition: surfaceEntityActuator.h:268
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
Contains class declaration for DtSurfaceEntityActuatorDescriptor, descriptor for the DtSurfaceEntityA...
Definition: surfaceEntityActuatorDescriptor.h:24
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:96
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
DtInputPortGroup is a data port group of a data consumer. It may contain any number of DtInputPorts a...
Definition: inputPortGroup.h:35
DtUpdateRepositoryOutputPortGroup is a data port group of a data consumer that contains methods and p...
Definition: updateRepositoryOutputPortGroup.h:31
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Member to allow for access to platform specific data.
Definition: surfaceEntityActuator.h:285
A locally simulated VRF object.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)