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() override;
51 
53  virtual bool postAddComponentsInit() override;
54 
57  virtual const char* type() const override;
58 
60  virtual DtOutputPortGroup* mountingControlPortGroup();
61 
63  virtual DtInputPortGroup* azimuthInfoPortGroup();
64 
66  virtual DtInputPortGroup* elevationInfoPortGroup();
67 
69  virtual void tick() override;
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 minimumAngle, double maximumAngle);
179 
181  virtual bool createPortGroups() override;
182 
184  virtual bool createPorts() override;
185 
186 protected:
187 
190 
193 
196  orig);
197 
198 protected:
199 
202 
207 
214 
221 
228 
235 
242 
247 
254 
261 
268 
275 
282 
287 
295 
303 
305 
309 
314 
319 
322 };
323 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtAnalogInputPort * myMaximumAzimuthPort
Input Port Name: maximum-azimuth Input Port Description: The maximum azimuth angle. Input Port Range: Input Port Default Value: Input Group Parent: azimuth-info.
Definition: baseMountingController.h:220
DtIntegerInputPort * myElevationPartTypePort
Input Port Name: elevation-part-type Input Port Description: Type of articulated part Input Port Rang...
Definition: baseMountingController.h:281
DtAnalogInputPort * myMinimumAzimuthPort
Input Port Name: minimal-azimuth Input Port Description: The minimum azimuth angle. Input Port Range: Input Port Default Value: Input Group Parent: azimuth-info.
Definition: baseMountingController.h:227
DtAnalogInputPort * myMaxElevationRatePort
Input Port Name: elevation-rate Input Port Description: Max elevation rate Input Port Range: Input P...
Definition: baseMountingController.h:274
DtReal myAngleApproxMargin
To prevent endless fine adjustments to the azimuth and elevation we&#39;ll use a constant margin to deter...
Definition: baseMountingController.h:318
const DtControllerComponent & operator=(const DtControllerComponent &orig)
assignment operator
virtual bool postAddComponentsInit() override
Calls enableTaskTypes()
DtAnalogInputPort * myMaxAzimuthRatePort
Input Port Name: azimuth-rate Input Port Description: Max azimuth rate. Input Port Range: Input Port...
Definition: baseMountingController.h:234
DtAnalogInputPort * myRestingElevationPort
Input Port Name: resting-elevation Input Port Description: Resting elevation value. Should return to this angle when not aiming. Input Port Range: Input Port Default Value: Input Group Parent: elevation-info.
Definition: baseMountingController.h:253
makVrf::DtArticulatedPartStateRepository * myAzimuthMountPart
Definition: baseMountingController.h:306
DtConstrainedAnalogOutputPort * myElevationPort
Output Port Name: elevation Output Port Description: A fraction of the actuator&#39;s maximum slew rate a...
Definition: baseMountingController.h:302
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:206
virtual const char * type() const override=0
This returns a string from compTypes.h, and identifies the type of component.
DtAnalogInputPort * myRestingAzimuthPort
Input Port Name: resting-azimuth Input Port Description: Resting azimuth value. Should return to this...
Definition: baseMountingController.h:213
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
DtReal myDesiredElevation
Desired elevation angle relative to the body.
Definition: baseMountingController.h:313
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:307
makVrf::DtArticulatedPartStateRepository * myChildSimBody
Definition: baseMountingController.h:308
DtReal myDesiredAzimuth
Desired azimuth angle relative to the body.
Definition: baseMountingController.h:311
DtAnalogInputPort * myMaximumElevationPort
Input Port Name: maximum-elevation Input Port Description: The maximum elevation angle. Input Port Range: Input Port Default Value: Input Group Parent: elevation-info.
Definition: baseMountingController.h:260
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Member to allow for access to platform specific data.
Definition: baseMountingController.h:321
DtConstrainedAnalogOutputPort * myAzimuthPort
Output Port Name: azimuth Output Port Description: A fraction of the actuator&#39;s maximum slew rate at ...
Definition: baseMountingController.h:294
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:96
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
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:241
DtInputPortGroup * myElevationInfoPortGroup
Input Port Group Name: elevation-info Input Port Group Description: Used to get elevation information...
Definition: baseMountingController.h:246
DtAnalogInputPort * myMinimumElevationPort
Input Port Name: minimal-elevation Input Port Description: The minimum elevation angle. Input Port Range: Input Port Default Value: Input Group Parent: elevation-info.
Definition: baseMountingController.h:267
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:286
DtBaseMountingController is a controller that generates the azimuth and elevation controls needed to ...
Definition: baseMountingController.h:36
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)