VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rotaryWingActuatorComponent.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2022 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
10 
11 #pragma once
12 
16 #include "vrfutil/rwAirSpeedType.h"
17 #include <matrix/LibMatrix.h>
18 #include <vlpi/disEnums.h>
19 #include <boost/signals2.hpp>
20 
21 class DtString;
28 class DtPhysicalWorld;
29 class DtTerrainDatabase;
32 
37 
47 {
48 public:
49 
53  DtSimulationServices* simManager, DtComponentDescriptor* desc = 0, DtReaderWriterRegistry* parentRegistry = 0 );
54 
59 
62  virtual bool init();
63 
66  virtual const char* type() const;
67 
69  virtual void tick();
70 
74  virtual void useFuel(double fuelUsed);
75  virtual double fuelLeft() const;
76 
78  virtual double calculateFuel() const;
79 
85  virtual void fallFromSky();
86 
90  static DtSimComponent * creator(const DtString& name,
91  DtLocalObject* owner,
92  DtSimulationServices* simManager,
93  DtComponentDescriptor* desc = 0,
94  DtReaderWriterRegistry* parentRegistry = 0);
95 
96 protected:
97 
99  virtual bool createPortGroups();
100 
102  virtual bool createPorts();
103 
109  virtual bool createPSR();
110 
112  virtual void clampFrameRate();
113 
115  virtual void setLanded(const DtVector& localIntersectionPoint);
116 
118  virtual bool checkFlyingWithoutFuel();
119 
121  virtual void setYawAcceleration();
122  virtual void calculateYawRate();
123 
125  virtual double calculateOneAxisOfOrientation(const int axis, const double angleInit, const double period, const double portValue, const double maxAccel, const double maxRate);
126 #if 0
127  virtual void calculatePitchAcceleration();
129  virtual void calculatePitchRate();
130 
132  virtual void calculateRollAcceleration();
133  virtual void calculateRollRate();
134 #endif
135  virtual void checkAndDetachIfNecessary();
138 
141  virtual void calculateOrientation();
142 
144  virtual void calculateNormalizedBodyVelocity();
145 
147  virtual void calculateLiftAcceleration();
148 
157  virtual double altitudePowerFactor(const double altitude);
158 
161  virtual void calculateResultantAcceleration();
162 
164  virtual void integrate();
165 
167  virtual void updateRepository();
168 
182  virtual void updateAirspeedToRepository();
183 
185  virtual void updateDisplay();
186 
206  virtual void checkLandedOrCrashed();
207 
211 
219  virtual bool isCrashedIntoGround(const DtVector& localPosition,
220  DtVector& localIntersectionPoint);
221 
224  virtual void sendDetonation(const DtVector& geocentricLocation);
225 
231  virtual bool isSubsurface() const;
232 
241  virtual bool componentInitialized() const;
242 
245  virtual bool engineOperational() const;
246 
249  virtual void updateAppearance();
250 
252  virtual void updateOrderedSpeed();
253 
255  virtual void preFirstTickInit();
256 
257  virtual void processSetLocationCallback();
258 
259 private:
260 
263 
266 
269 
270 
271 protected:
272 
275 
278 
282 
289 
296 
303 
310 
312 
316  DtTaitBryan myOrientation;
326  DtReal mySpeed;
332 
336 
340 
343 
347 
352  double myLastSpeed;
353 
356  boost::signals2::connection mySetLocationCompleteConnection;
357 };
358 
Contains class declarations for DtConstrainedDualAxisInputPort and DtConstrainedDualAxisOutputPort.
Definition: constrainedDualAxisAnalogIOPort.h:27
DtRotaryWingEntityStateRepository * myRotaryWingEntityState
Definition: rotaryWingActuatorComponent.h:273
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtVector myNormalizedBodyVelocity
Definition: rotaryWingActuatorComponent.h:321
This repository holds all information that is common to all the forms of local rotary wing entities w...
Definition: rotaryWingEntityStateRepository.h:27
boost::signals2::connection mySetLocationCompleteConnection
Definition: rotaryWingActuatorComponent.h:356
DtVector myPreviousGroundClampedPosition
Definition: rotaryWingActuatorComponent.h:330
DtVector myBodyLift
Definition: rotaryWingActuatorComponent.h:322
const DtActuatorComponent & operator=(const DtActuatorComponent &orig)
assignment operator
DtRotaryWingActuatorDescriptor; descriptor for the DtRotaryWingActuatorComponent component.
Definition: rotaryWingActuatorDescriptor.h:27
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
virtual bool init()
Overridden to cache a pointer to the entity&#39;s radio in this class.
Contains class declarations for DtConstrainedAnalogInputPort and DtConstrainedAnalogOutputPort.
Definition: constrainedAnalogIOPort.h:30
DtUpdateRepositoryOutputPortGroup * myUpdateRepositoryOutputPortGroup
Port group used to set what values should be set into the VRF state repository. All values are in loc...
Definition: rotaryWingActuatorComponent.h:339
Definition: rotaryWingFlightPSR.h:30
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
DtVector myBodyAcceleration
Definition: rotaryWingActuatorComponent.h:323
DtVector myRelativeAcceleration
Definition: rotaryWingActuatorComponent.h:324
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&#39;s radio for convenience. Derived classes may have articulated parts that are configured from the DtActuatorComponentDescriptor&#39;s DtSimArtPartDescriptorList. For each articulated part in the list a DtArticulatedPartStateRepository will be created to store the data for the part such as it&#39;s location, rotation and so forth. These are created in the entity&#39;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&#39;s DtActuatorComponentDescriptor as descriped above. The partType is used as the category of the DtObjectType 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&#39;s object type.
Definition: actuatorComponent.h:47
DtRotaryWingFlightPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: rotaryWingActuatorComponent.h:335
DtConstrainedAnalogInputPort * myCollectivePort
Input Port Name: collective Input Port Description: Input Port Range: 0. to 1. Input Port Default Va...
Definition: rotaryWingActuatorComponent.h:309
DtReal mySpeedRatioSquared
Definition: rotaryWingActuatorComponent.h:319
DtDcm myBodyToLocalMatrix
Definition: rotaryWingActuatorComponent.h:317
DtInputPortGroup * myRotaryWingControlPortGroup
Input Port Group Name: rotary-wing-control Input Port Group Description:
Definition: rotaryWingActuatorComponent.h:281
The DtPhysicalWorld is the primary interface to and manager of all of the &quot;physical&quot; aspects of the s...
Definition: physicalWorld.h:102
bool myPrintedOutOfFuelMessage
Definition: rotaryWingActuatorComponent.h:331
DtVector myBodyVelocity
Definition: rotaryWingActuatorComponent.h:320
DtReal myAltitudeAGL
Definition: rotaryWingActuatorComponent.h:329
double myHeightAboveGroundSupport
Cached value from heightAboveGroundSupport.
Definition: rotaryWingActuatorComponent.h:342
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
DtVector myBodyRotationRates
Definition: rotaryWingActuatorComponent.h:315
DtDcm myLocalToBodyMatrix
Definition: rotaryWingActuatorComponent.h:318
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Member to allow for access to platform specific data.
Definition: rotaryWingActuatorComponent.h:355
DtTaitBryan myOrientation
Definition: rotaryWingActuatorComponent.h:316
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
DtConstrainedAnalogInputPort * myThrottlePort
Input Port Name: throttle Input Port Description: Input Port Range: 0. to 1. Input Port Default Valu...
Definition: rotaryWingActuatorComponent.h:288
DtAirspeedCalculator * myAirSpeedCalculator
Air Speed Calculator for updating state properties Created in init()
Definition: rotaryWingActuatorComponent.h:346
DtReal mySpeed
Definition: rotaryWingActuatorComponent.h:326
DtConstrainedDualAxisAnalogInputPort * myCyclicPort
Input Port Name: cyclic Input Port Description: Input Port Range: X: -1. to 1. Y: -1...
Definition: rotaryWingActuatorComponent.h:295
class DtAirspeedCalculator:
Definition: airSpeedCalculator.h:23
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:95
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
DtReal myMaxDragAcceleration
Definition: rotaryWingActuatorComponent.h:313
DtVector myRelativeVelocity
Definition: rotaryWingActuatorComponent.h:325
DtConstrainedAnalogInputPort * myPedalPort
Input Port Name: pedal Input Port Description: Input Port Range: -1. to 1. Input Port Default Value:...
Definition: rotaryWingActuatorComponent.h:302
DtVector myLocalPosition
Definition: rotaryWingActuatorComponent.h:327
DtInputPortGroup is a data port group of a data consumer. It may contain any number of DtInputPorts a...
Definition: inputPortGroup.h:35
Definition: terrainDatabase.h:148
The algorithm for updating the kinematic variables and modeling the limiting effects of maximum rotat...
Definition: rotaryWingActuatorComponent.h:46
DtVector myBodyRotationalAcceleration
Definition: rotaryWingActuatorComponent.h:314
DtVector myLocalOrientation
Definition: rotaryWingActuatorComponent.h:328
DtUpdateRepositoryOutputPortGroup is a data port group of a data consumer that contains methods and p...
Definition: updateRepositoryOutputPortGroup.h:31
DtRotaryWingActuatorDescriptor * myRotaryWingActuatorDescriptor
Definition: rotaryWingActuatorComponent.h:274
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
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
double myLastSpeed
myLastSpeed is used in tick() to catch velocity changes while paused, due to setCurrentSpeed() or set...
Definition: rotaryWingActuatorComponent.h:352

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)