VR-Forces 4.8 Class Documentation
 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 
14 
16 #include <vlpi/disEnums.h>
17 
18 class DtAnalogInputPort;
20 class DtIntegerInputPort;
21 
32 {
33 
34 public:
35 
39  DtVrfObject* owner,
40  DtSimManager* simManager,
41  DtComponentDescriptor* desc = 0,
42  DtReaderWriterRegistry* parentRegistry = 0);
43 
45  virtual ~DtBaseMountingController();
46 
48  virtual bool postAddComponentsInit();
49 
52  virtual const char* type() const;
53 
55  virtual DtOutputPortGroup* mountingControlPortGroup();
56 
58  virtual DtInputPortGroup* azimuthInfoPortGroup();
59 
61  virtual DtInputPortGroup* elevationInfoPortGroup();
62 
64  virtual void tick();
65 
84  virtual void reorientMounting();
85 
89  virtual void setDesiredAzimuth(DtReal desiredAzimuth);
90  virtual DtReal desiredAzimuth();
92 
96  virtual void setDesiredElevation(DtReal desiredElevation);
97  virtual DtReal desiredElevation();
99 
102  virtual void findDesiredAzimuthAndElevation();
103 
110  virtual bool desiredOrientationIsInRange(double& azimuthOutOfRangeBy,
111  double& elevationOutOfRangeBy, double additionalAzimuthMargin = 0.0,
112  double additionalElevationMargin = 0.0);
113 
119  virtual bool azimuthIsInRange(double azimuth, double& outofRangeBy,
120  double additionalMargin = 0.0);
121 
127  virtual bool elevationIsInRange(double elevation, double& outofRangeBy,
128  double additionalMargin = 0.0);
129 
132  virtual bool createAzimuthPort();
133  virtual DtConstrainedAnalogOutputPort * azimuthPort() const;
134 
135  virtual bool createElevationPort();
136  virtual DtConstrainedAnalogOutputPort * elevationPort() const;
137 
139  virtual bool createAzimuthInfoPorts();
140 
142  virtual bool createElevationInfoPorts();
143 
152  virtual double approximateMountSwing(double angleChange, double maxRate);
153 
157  static DtSimComponent * creator(const DtString& name,
158  DtVrfObject* owner,
159  DtSimManager* simManager,
160  DtComponentDescriptor* desc = 0,
161  DtReaderWriterRegistry* parentRegistry = 0);
162 
163 protected:
172  virtual double angleErrorGivenRotationLimits(double currentAngle,
173  double desiredAngle, double allowedRotationCenter,
174  double allowedRotationRange);
175 
177  virtual bool createPortGroups();
178 
180  virtual bool createPorts();
181 
182 protected:
183 
186 
189 
192  orig);
193 
194 protected:
195 
198 
203 
210 
217 
224 
231 
236 
243 
250 
257 
264 
269 
277 
285 
287 
291 
296 
301 
302 };
303 
#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:144
DtIntegerInputPort * myElevationPartTypePort
Input Port Name: elevation-part-type Input Port Description: Type of articulated part Input Port Rang...
Definition: baseMountingController.h:263
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
DtAnalogInputPort * myMaxElevationRatePort
Input Port Name: elevation-rate Input Port Description: Max elevation rate Input Port Range: Input P...
Definition: baseMountingController.h:256
DtReal myAngleApproxMargin
To prevent endless fine adjustments to the azimuth and elevation we&#39;ll use a constant margin to deter...
Definition: baseMountingController.h:300
const DtControllerComponent & operator=(const DtControllerComponent &orig)
assignment operator
DtAnalogInputPort * myElevationRangePort
Input Port Name: elevation-range Input Port Description: Elevation sweep range Input Port Range: Inp...
Definition: baseMountingController.h:249
DtAnalogInputPort * myMaxAzimuthRatePort
Input Port Name: azimuth-rate Input Port Description: Max azimuth rate.
Definition: baseMountingController.h:223
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:284
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:42
DtInputPortGroup * myAzimuthInfoPortGroup
Input Port Group Name: azimuth-info Input Port Group Description: Used to get azimuth information fro...
Definition: baseMountingController.h:202
Definition: readerWriterRegistry.h:39
DtOutputPortGroup is a data port group of a data provider.
Definition: outputPortGroup.h:30
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:54
DtAnalogInputPort * myNominalElevationPort
Input Port Name: nominal-elevation Input Port Description: Nominal elevation value.
Definition: baseMountingController.h:242
DtArticulatedPartStateRepository * myAzimuthMountPart
Definition: baseMountingController.h:288
DtReal myDesiredElevation
Desired elevation angle relative to the body.
Definition: baseMountingController.h:295
DtArticulatedPartStateRepository * myChildSimBody
Definition: baseMountingController.h:290
DtAnalogInputPort * myNominalAzimuthPort
Input Port Name: nominal-azimuth Input Port Description: Nominal azimuth value.
Definition: baseMountingController.h:209
virtual void tick()
This gives the thread of control to the component.
DtReal myDesiredAzimuth
Desired azimuth angle relative to the body.
Definition: baseMountingController.h:293
The DtArticulatedPartStateRepository class is used to represent articulated parts for an entity...
Definition: articulatedPartStateRepository.h:29
DtConstrainedAnalogOutputPort * myAzimuthPort
Output Port Name: azimuth Output Port Description: A fraction of the actuator&#39;s maximum slew rate at ...
Definition: baseMountingController.h:276
virtual bool createPorts()
Called by init.
End User Description: DtControllerComponent is the base class for all controllers components...
Definition: controllerComponent.h:29
virtual bool createPortGroups()
Called by init.
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
DtIntegerInputPort * myAzimuthPartTypePort
Input Port Name: azimuth-part-type Input Port Description: Type of articulated part.
Definition: baseMountingController.h:230
DtInputPortGroup * myElevationInfoPortGroup
Input Port Group Name: elevation-info Input Port Group Description: Used to get elevation information...
Definition: baseMountingController.h:235
DtInputPortGroup is a data port group of a data consumer.
Definition: inputPortGroup.h:32
Contains class declarations for DtAnalogInputPort, DtAnalogOutputPort, and DtAnalogPortData.
Definition: analogIOPort.h:25
DtArticulatedPartStateRepository * myElevationMountPart
Definition: baseMountingController.h:289
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:102
DtOutputPortGroup * myMountingControlPortGroup
Output Port Group Name: mounting-control Output Port Group Description: Accepts output from the missi...
Definition: baseMountingController.h:268
DtAnalogInputPort * myAzimuthRangePort
Input Port Name: azimuth-range Input Port Description: Azimuth sweep range.
Definition: baseMountingController.h:216
DtBaseMountingController is a controller that generates the azimuth and elevation controls needed to ...
Definition: baseMountingController.h:31

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)