VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
subSurfaceEntitySimpleActuator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2024 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 #pragma once
11 
13 
14 
33 {
34 
35 public:
36 
39  DtLocalObject* owner,
40  DtSimulationServices* simManager,
41  DtComponentDescriptor* desc = 0,
42  DtReaderWriterRegistry* parentRegistry = 0);
43 
48  virtual ~DtSubSurfaceEntitySimpleActuator() override;
49 
52  virtual bool init() override;
53 
56  virtual const char* type() const override;
57 
58 
62  static DtSimComponent * creator(const DtString& name,
63  DtLocalObject* owner,
64  DtSimulationServices* simManager,
65  DtComponentDescriptor* desc = 0,
66  DtReaderWriterRegistry* parentRegistry = 0);
67 
68 protected:
69 
72  virtual bool createPorts() override;
73 
75  virtual void tick() override;
76 
79  virtual double updateVerticalSpeed(const double dt) override;
80 
89  virtual void adjustAttitude(const double newSpeed, const DtVector& position, const double yawRate, double& roll,
90  double& pitch, double& altitude) override;
91 
106  virtual double altitudeFromDepth(double depth, double surfaceAltitude);
107  virtual double depthFromAltitude(double altitude, double surfaceAltitude)
108  {
109  return altitudeFromDepth(altitude, surfaceAltitude);
110  }
111 
112 protected:
113 
116 
119  (const DtSubSurfaceEntitySimpleActuator & orig);
120 
122  const DtSubSurfaceEntitySimpleActuator & operator=
123  (const DtSubSurfaceEntitySimpleActuator & orig);
124 
125 
126 protected:
127 
130 
134 
138 
140 
141  double myDepth;
142 
147 
149 };
150 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
Provides a simple actuator model for surface vessels.
Definition: subSurfaceEntitySimpleActuator.h:31
virtual bool createPorts() override
Creates myAccelerationPort, myClampSpeedPort, myTurnRadiusPort, and myFinalHeadingPort and adds them ...
virtual double updateVerticalSpeed(const double dT)
Update the vertical speed. This is primarily for derived subsurface entities; for the surface entitie...
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
virtual void adjustAttitude(const double newSpeed, const DtVector &position, const double yawRate, double &roll, double &pitch, double &altitudeAdj)
Adjusts the attitude of the entity for improved appearance. Makes the entity roll in turns...
virtual double depthFromAltitude(double altitude, double surfaceAltitude)
Definition: subSurfaceEntitySimpleActuator.h:107
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
double myAltitudeRate
The negative of depthRate on the input port, or 0 if the port isn't active.
Definition: subSurfaceEntitySimpleActuator.h:145
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
DtAnalogInputPort * myClampDepthPort
Final desired depth that entity is trying to change to. This prevents overshoot if dT is unexpectedly...
Definition: subSurfaceEntitySimpleActuator.h:137
double myDepth
Computed and cached within a tick, to avoid recomputation.
Definition: subSurfaceEntitySimpleActuator.h:141
Contains class declarations for DtAnalogInputPort, DtAnalogOutputPort, and DtAnalogPortData.
Definition: analogIOPort.h:25
virtual void tick() override
Calculates new kinematic state.
Provides a simple, kinematics-based model for surface vessels.
Definition: surfaceEntitySimpleActuator.h:42
virtual bool init() override
Calls down to the base class, null checks entity(), calls createPSR(), and then caches the entity's s...
A locally simulated VRF object.
Definition: localObject.h:98
virtual const char * type() const override
Returns a string identifies the class type of component. Type values are defined in compTypes...
DtAnalogInputPort * myDepthRatePort
Desired depth change rate, in m/s. Note that increasing depth is decreasing altitude.
Definition: subSurfaceEntitySimpleActuator.h:133

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)