VR-Forces Developer's Guide
 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) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
17 #include <matrix/vlVector.h>
18 
19 class DtString;
24 class DtTaitBryan;
25 class DtMissileFlightPSR;
26 
34 {
35 public:
36 
40  DtLocalObject* owner,
41  DtSimulationServices* simManager,
42  DtComponentDescriptor* desc = 0,
43  DtReaderWriterRegistry* parentRegistry = 0);
44 
46  virtual ~DtMissileControllerComponent() override;
47 
49  virtual bool init() override;
50 
53  virtual const char* type() const override;
54 
55  virtual double distanceToTarget() const;
56 
60  virtual double approximateThrust(double speed) const;
61 
84  virtual void calculateSteering(const DtVector &relativeVelocity,
85  const DtVector &localPosition,
86  const DtVector &targetVelocity,
87  const DtVector &targetPoint,
88  double& maneuverAccelXOut,
89  double& maneuverAccelYOut,
90  double& maneuverAccelZOut) = 0;
91 
96  virtual void calculateSteeringToPoint(const DtVector &relativeVelocity,
97  const DtVector &localPosition,
98  const DtVector &targetPoint,
99  double& maneuverAccelXOut,
100  double& maneuverAccelYOut,
101  double& maneuverAccelZOut);
102 
108  virtual void calculateSteeringUsingPropNav(const DtVector &relativeVelocity,
109  const DtVector &localPosition,
110  const DtVector &targetVelocity,
111  const DtVector &targetPoint,
112  double& maneuverAccelXOut,
113  double& maneuverAccelYOut,
114  double& maneuverAccelZOut);
115 
118  virtual bool createMissileControlPortGroup();
119  virtual bool createThrustPort();
120  virtual bool createManeuverAccelXPort();
121  virtual bool createManeuverAccelYPort();
122  virtual bool createManeuverAccelZPort();
123  virtual bool createSelfDestructPort();
124 
125  virtual DtConstrainedAnalogOutputPort * thrustPort();
126  virtual DtConstrainedAnalogOutputPort * maneuverAccelXPort();
127  virtual DtConstrainedAnalogOutputPort * maneuverAccelYPort();
128  virtual DtConstrainedAnalogOutputPort * maneuverAccelZPort();
129  virtual DtBooleanOutputPort * selfDestructPort();
130 
131 protected:
132 
134  virtual bool createPortGroups() override;
135 
137  virtual bool createPorts() override;
138 
146  virtual void calculateTargetErrorOffset();
147 
155  virtual void lookupAndCacheProcessSR();
156 
159  virtual bool postAddComponentsInit() override;
160 
162  virtual void addRangeItems();
163 
164 protected:
167 
170  orig);
171 
175 
176 
177 protected:
178 
180 
182 
185 
189 
196 
203 
210 
217 
224 
226 
228 
235 
237 };
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtVector myTargetErrorOffset
Definition: missileControllerComponent.h:227
virtual bool postAddComponentsInit() override
Calls enableTaskTypes()
virtual const char * type() const override=0
Returns a string identifies the class type of component. Type values are defined in compTypes...
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:234
DtConstrainedAnalogOutputPort * myManeuverAccelXPort
Output Port Name: maneuver-accel-x Output Port Description: Output Port Range: -100000. to 100000. Output Port Default Value: Output Group Parent: missile-control.
Definition: missileControllerComponent.h:202
This repository holds all information that is common to all the forms of missile entities within the ...
Definition: missileStateRepository.h:33
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:22
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
double myDistanceToTarget
Definition: missileControllerComponent.h:181
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
DtConstrainedAnalogOutputPort is a version of DtAnalogOutputPort which will constrain any outgoing va...
Definition: constrainedAnalogIOPort.h:57
virtual bool init() override
Calls setRadio()
DtMissileStateRepository * myMissileState
Definition: missileControllerComponent.h:179
class DtMissileFlightPSR:
Definition: missileFlightPSR.h:38
DtMissileLocalObjectFacade myMissileLocalObjectFacade
Definition: missileControllerComponent.h:236
DtMissileControllerComponent is a controller that contains all of the functionality common to all mis...
Definition: missileControllerComponent.h:33
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
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
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtConstrainedAnalogOutputPort * myManeuverAccelYPort
Output Port Name: maneuver-accel-y Output Port Description: Output Port Range: -100000. to 100000. Output Port Default Value: Output Group Parent: missile-control.
Definition: missileControllerComponent.h:209
DtOutputPortGroup * myMissileControlPortGroup
Output Port Group Name: missile-control Output Port Group Description:
Definition: missileControllerComponent.h:188
DtConstrainedAnalogOutputPort * myManeuverAccelZPort
Output Port Name: maneuver-accel-z Output Port Description: Output Port Range: -100000. to 100000. Output Port Default Value: Output Group Parent: missile-control.
Definition: missileControllerComponent.h:216
DtBooleanOutputPort * mySelfDestructPort
Output Port Name: self-destruct Output Port Description: Output Port Range: Output Port Default Val...
Definition: missileControllerComponent.h:223
A locally simulated VRF object.
Definition: localObject.h:98
DtConstrainedAnalogOutputPort * myThrustPort
Output Port Name: thrust Output Port Description: Output Port Range: Output Port Default Value: Ou...
Definition: missileControllerComponent.h:195

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)