VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
baseMountingController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1999-2003 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
16 #include <vlpi/disEnums.h>
17 
18 class DtAnalogInputPort;
20 class DtIntegerInputPort;
21 
22 namespace makVrf
23 {
24  class DtArticulatedPartStateRepository;
25 }
26 
37 {
38 
39 public:
40 
44  DtLocalObject* owner,
45  DtSimulationServices* simManager,
46  DtComponentDescriptor* desc = 0,
47  DtReaderWriterRegistry* parentRegistry = 0);
48 
50  virtual ~DtBaseMountingController();
51 
53  virtual bool postAddComponentsInit();
54 
57  virtual const char* type() const;
58 
60  virtual DtOutputPortGroup* mountingControlPortGroup();
61 
63  virtual DtInputPortGroup* azimuthInfoPortGroup();
64 
66  virtual DtInputPortGroup* elevationInfoPortGroup();
67 
69  virtual void tick();
70 
89  virtual void reorientMounting();
90 
94  virtual void setDesiredAzimuth(DtReal desiredAzimuth);
95  virtual DtReal desiredAzimuth();
97 
101  virtual void setDesiredElevation(DtReal desiredElevation);
102  virtual DtReal desiredElevation();
104 
107  virtual void findDesiredAzimuthAndElevation();
108 
115  virtual bool desiredOrientationIsInRange(double& azimuthOutOfRangeBy,
116  double& elevationOutOfRangeBy, double additionalAzimuthMargin = 0.0,
117  double additionalElevationMargin = 0.0);
118 
124  virtual bool azimuthIsInRange(double azimuth, double& outofRangeBy,
125  double additionalMargin = 0.0);
126 
132  virtual bool elevationIsInRange(double elevation, double& outofRangeBy,
133  double additionalMargin = 0.0);
134 
137  virtual bool createAzimuthPort();
138  virtual DtConstrainedAnalogOutputPort * azimuthPort() const;
139 
140  virtual bool createElevationPort();
141  virtual DtConstrainedAnalogOutputPort * elevationPort() const;
142 
144  virtual bool createAzimuthInfoPorts();
145 
147  virtual bool createElevationInfoPorts();
148 
157  virtual double approximateMountSwing(double angleChange, double maxRate);
158 
162  static DtSimComponent * creator(const DtString& name,
163  DtLocalObject* owner,
164  DtSimulationServices* simManager,
165  DtComponentDescriptor* desc = 0,
166  DtReaderWriterRegistry* parentRegistry = 0);
167 
168 protected:
177  virtual double angleErrorGivenRotationLimits(double currentAngle,
178  double desiredAngle, double allowedRotationCenter,
179  double allowedRotationRange);
180 
182  virtual bool createPortGroups();
183 
185  virtual bool createPorts();
186 
187 protected:
188 
191 
194 
197  orig);
198 
199 protected:
200 
203 
208 
215 
222 
229 
236 
241 
248 
255 
262 
269 
274 
282 
290 
292 
296 
301 
306 
309 };
310 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtIntegerInputPort * myElevationPartTypePort
Input Port Name: elevation-part-type Input Port Description: Type of articulated part Input Port Rang...
Definition: baseMountingController.h:268
DtAnalogInputPort * myMaxElevationRatePort
Input Port Name: elevation-rate Input Port Description: Max elevation rate Input Port Range: Input P...
Definition: baseMountingController.h:261
DtReal myAngleApproxMargin
To prevent endless fine adjustments to the azimuth and elevation we&#39;ll use a constant margin to deter...
Definition: baseMountingController.h:305
const DtControllerComponent & operator=(const DtControllerComponent &orig)
assignment operator
virtual bool postAddComponentsInit() override
Calls enableTaskTypes()
DtAnalogInputPort * myElevationRangePort
Input Port Name: elevation-range Input Port Description: Elevation sweep range Input Port Range: Inp...
Definition: baseMountingController.h:254
DtAnalogInputPort * myMaxAzimuthRatePort
Input Port Name: azimuth-rate Input Port Description: Max azimuth rate. Input Port Range: Input Port...
Definition: baseMountingController.h:228
makVrf::DtArticulatedPartStateRepository * myAzimuthMountPart
Definition: baseMountingController.h:293
virtual const char * type() const =0
This returns a string from compTypes.h, and identifies the type of component.
DtConstrainedAnalogOutputPort * myElevationPort
Output Port Name: elevation Output Port Description: A fraction of the actuator&#39;s maximum slew rate a...
Definition: baseMountingController.h:289
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
DtInputPortGroup * myAzimuthInfoPortGroup
Input Port Group Name: azimuth-info Input Port Group Description: Used to get azimuth information fro...
Definition: baseMountingController.h:207
Definition: readerWriterRegistry.h:39
DtOutputPortGroup is a data port group of a data provider. It may contain any number of DtOutputPorts...
Definition: outputPortGroup.h:34
Contains class declarations for DtIntegerInputPort, DtIntegerOutputPort, and DtIntegerPortData.
Definition: integerIOPort.h:25
DtConstrainedAnalogOutputPort is a version of DtAnalogOutputPort which will constrain any outgoing va...
Definition: constrainedAnalogIOPort.h:57
DtAnalogInputPort * myNominalElevationPort
Input Port Name: nominal-elevation Input Port Description: Nominal elevation value. Input Port Range: Input Port Default Value: Input Group Parent: elevation-info.
Definition: baseMountingController.h:247
DtReal myDesiredElevation
Desired elevation angle relative to the body.
Definition: baseMountingController.h:300
DtAnalogInputPort * myNominalAzimuthPort
Input Port Name: nominal-azimuth Input Port Description: Nominal azimuth value. Input Port Range: In...
Definition: baseMountingController.h:214
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
makVrf::DtArticulatedPartStateRepository * myElevationMountPart
Definition: baseMountingController.h:294
makVrf::DtArticulatedPartStateRepository * myChildSimBody
Definition: baseMountingController.h:295
DtReal myDesiredAzimuth
Desired azimuth angle relative to the body.
Definition: baseMountingController.h:298
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Member to allow for access to platform specific data.
Definition: baseMountingController.h:308
DtConstrainedAnalogOutputPort * myAzimuthPort
Output Port Name: azimuth Output Port Description: A fraction of the actuator&#39;s maximum slew rate at ...
Definition: baseMountingController.h:281
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
End User Description: DtControllerComponent is the base class for all controllers components...
Definition: controllerComponent.h:31
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
DtIntegerInputPort * myAzimuthPartTypePort
Input Port Name: azimuth-part-type Input Port Description: Type of articulated part. Input Port Range: Input Port Default Value: Input Group Parent: azimuth-info.
Definition: baseMountingController.h:235
DtInputPortGroup * myElevationInfoPortGroup
Input Port Group Name: elevation-info Input Port Group Description: Used to get elevation information...
Definition: baseMountingController.h:240
The DtArticulatedPartStateRepository class is used to represent articulated parts for an entity...
Definition: articulatedPartStateRepository.h:40
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
DtOutputPortGroup * myMountingControlPortGroup
Output Port Group Name: mounting-control Output Port Group Description: Accepts output from the missi...
Definition: baseMountingController.h:273
DtAnalogInputPort * myAzimuthRangePort
Input Port Name: azimuth-range Input Port Description: Azimuth sweep range. Input Port Range: Input ...
Definition: baseMountingController.h:221
DtBaseMountingController is a controller that generates the azimuth and elevation controls needed to ...
Definition: baseMountingController.h:36
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 Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)