VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
missileControllerComponent.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1999 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: missileCntlr.h,v $ $Revision: 1.27 $ $State: Exp $
7 *******************************************************************************/
8 
11 
14 
15 #ifndef DtMissileControllerComponent_H_
16 #define DtMissileControllerComponent_H_
17 
18 
20 #include <matrix/vlVector.h>
21 
22 class DtString;
23 class DtSimManager;
27 class DtTaitBryan;
28 class DtMissileFlightPSR;
29 
38 {
39 public:
40 
44  DtVrfObject* owner,
45  DtSimManager* simManager,
46  DtComponentDescriptor* desc = 0,
47  DtReaderWriterRegistry* parentRegistry = 0);
48 
51 
53  virtual bool init();
54 
57  virtual const char* type() const;
58 
59  virtual double distanceToTarget() const;
60 
64  virtual double approximateThrust(double speed) const;
65 
88  virtual void calculateSteering(const DtVector &relativeVelocity,
89  const DtVector &localPosition,
90  const DtVector &targetVelocity,
91  const DtVector &targetPoint,
92  double& maneuverAccelXOut,
93  double& maneuverAccelYOut,
94  double& maneuverAccelZOut) = 0;
95 
100  virtual void calculateSteeringToPoint(const DtVector &relativeVelocity,
101  const DtVector &localPosition,
102  const DtVector &targetPoint,
103  double& maneuverAccelXOut,
104  double& maneuverAccelYOut,
105  double& maneuverAccelZOut);
106 
112  virtual void calculateSteeringUsingPropNav(const DtVector &relativeVelocity,
113  const DtVector &localPosition,
114  const DtVector &targetVelocity,
115  const DtVector &targetPoint,
116  double& maneuverAccelXOut,
117  double& maneuverAccelYOut,
118  double& maneuverAccelZOut);
119 
122  virtual bool createMissileControlPortGroup();
123  virtual bool createThrustPort();
124  virtual bool createManeuverAccelXPort();
125  virtual bool createManeuverAccelYPort();
126  virtual bool createManeuverAccelZPort();
127  virtual bool createSelfDestructPort();
128 
129  virtual DtConstrainedAnalogOutputPort * thrustPort();
130  virtual DtConstrainedAnalogOutputPort * maneuverAccelXPort();
131  virtual DtConstrainedAnalogOutputPort * maneuverAccelYPort();
132  virtual DtConstrainedAnalogOutputPort * maneuverAccelZPort();
133  virtual DtBooleanOutputPort * selfDestructPort();
134 
135 protected:
136 
138  virtual bool createPortGroups();
139 
141  virtual bool createPorts();
142 
150  virtual void calculateTargetErrorOffset();
151 
159  virtual void lookupAndCacheProcessSR();
160 
163  virtual bool postAddComponentsInit();
164 
166  virtual void addRangeItems();
167 
168 protected:
171 
174  orig);
175 
179 
180 
181 protected:
182 
184 
186 
189 
193 
200 
207 
214 
221 
228 
230 
232 
239 };
240 #endif
#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:146
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
DtVector myTargetErrorOffset
Definition: missileControllerComponent.h:231
Instances of DtBooleanOutputPort are output ports through which data producers can send boolean data...
Definition: boolIOPort.h:45
DtMissileFlightPSR * myProcessState
Pointer to a process state repository used to store state data associated with this component...
Definition: missileControllerComponent.h:238
DtConstrainedAnalogOutputPort * myManeuverAccelXPort
Output Port Name: maneuver-accel-x Output Port Description: Output Port Range: -100000.
Definition: missileControllerComponent.h:206
This repository holds all information that is common to all the forms of missile entities within the ...
Definition: missileStateRepository.h:38
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:20
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:42
double myDistanceToTarget
Definition: missileControllerComponent.h:185
Definition: readerWriterRegistry.h:39
virtual const char * type() const =0
Returns a string identifies the class type of component.
DtOutputPortGroup is a data port group of a data provider.
Definition: outputPortGroup.h:30
virtual bool init()
Calls setRadio()
DtConstrainedAnalogOutputPort is a version of DtAnalogOutputPort which will constrain any outgoing va...
Definition: constrainedAnalogIOPort.h:54
DtMissileStateRepository * myMissileState
Definition: missileControllerComponent.h:183
class DtMissileFlightPSR:
Definition: missileFlightPSR.h:37
DtMissileControllerComponent is a controller that contains all of the functionality common to all mis...
Definition: missileControllerComponent.h:37
virtual bool createPorts()
Called by init.
virtual bool createPortGroups()
Called by init.
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtConstrainedAnalogOutputPort * myManeuverAccelYPort
Output Port Name: maneuver-accel-y Output Port Description: Output Port Range: -100000.
Definition: missileControllerComponent.h:213
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:103
DtOutputPortGroup * myMissileControlPortGroup
Output Port Group Name: missile-control Output Port Group Description:
Definition: missileControllerComponent.h:192
DtConstrainedAnalogOutputPort * myManeuverAccelZPort
Output Port Name: maneuver-accel-z Output Port Description: Output Port Range: -100000.
Definition: missileControllerComponent.h:220
DtBooleanOutputPort * mySelfDestructPort
Output Port Name: self-destruct Output Port Description: Output Port Range: Output Port Default Val...
Definition: missileControllerComponent.h:227
DtConstrainedAnalogOutputPort * myThrustPort
Output Port Name: thrust Output Port Description: Output Port Range: Output Port Default Value: Ou...
Definition: missileControllerComponent.h:199

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)