VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
groundAutoControllerComponent.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 #pragma once
12 
14 
15 class DtString;
16 class DtSimManager;
18 class DtTaskMessage;
19 class DtSoilFactors;
20 class DtAutomotivePSR;
24 
34 {
35 public:
36 
40  DtVrfObject* owner,
41  DtSimManager* simManager,
42  DtComponentDescriptor* desc = 0,
43  DtReaderWriterRegistry* parentRegistry = 0);
44 
47 
49  virtual bool init();
50 
53  virtual const char* type() const;
54 
57  virtual void clearTask();
58 
79  virtual double approximateThrottle(double desiredSpeed, double headingError = 0.0);
80  virtual double headingErrorRequiringMinTurnRadius() { return 0.5; }
81 
90  virtual double calculateSteering(double currentHeading, double
91  desiredHeading) const;
92 
93 
94  virtual double calculateCurrentBrakingDistance() const;
95 
98  virtual bool createAutomotiveControlPortGroup();
99  virtual bool createThrottlePort();
100  virtual bool createSteeringPort();
101  virtual bool createBrakePort();
102  virtual bool createGearPort();
103  virtual bool createParkingBrakePort();
104 
105  virtual DtConstrainedAnalogOutputPort * throttlePort();
106  virtual DtConstrainedAnalogOutputPort * steeringPort();
107  virtual DtConstrainedAnalogOutputPort * brakePort();
108  virtual DtConstrainedIntegerOutputPort * gearPort();
109  virtual DtBooleanOutputPort * parkingBrakePort();
110 
111  virtual double decelerationSoilFactor() const;
112 
118  virtual double calcSteeringForTurnInPlace();
119 
123  virtual double calcThrottleForTurnInPlace();
124 
127  virtual double calcBrakeForTurnInPlace();
128 
136  virtual int calcGearForTurnInPlace();
137 
141  virtual double calcSteeringForPivot();
142 
146  virtual double calcThrottleForPivot();
147 
151  virtual double calcSteeringForKTurn();
152 
156  virtual double calcThrottleForKTurn();
157 
161  virtual double calcBrakeForKTurn();
162 
168  virtual double findSpeedForKTurn();
169 
173  virtual double findHeadingForKTurn();
174 
176  virtual void setHeadingToTurnTo(double headingToTurnTo);
177  virtual double headingToTurnTo() const;
178 
180  virtual double calculateHeadingToTurnTo();
181 
183  virtual void setTurnToMode(int headingToTurnTo);
184  virtual int turnToMode() const;
185 
189  virtual void setKTurnReverseGoalHeading(double kTurnReverseGoalHeading);
190  virtual double kTurnReverseGoalHeading() const;
191 
195  virtual void setKTurnReverseComplete(bool kTurnReverseComplete);
196  virtual bool kTurnReverseComplete() const;
197 
198 protected:
200  virtual bool createPorts();
201 
203  virtual bool createPortGroups();
204 
212  virtual void lookupAndCacheProcessSR();
213 
216  virtual bool postAddComponentsInit();
217 
218  virtual DtSoilFactors * currentSoilFactors() const;
219 
222  virtual bool decideToGiveUpTask() const;
223 
224 private:
225 
228 
231  orig);
232 
236 
237 
238 protected:
239 
241 
244 
251 
258 
265 
272 
278 
283 
285 
292 
297 
302 };
DtConstrainedIntegerOutputPort is a version of DtIntegerOutputPort which will constrain any outgoing ...
Definition: constrainedIntegerIOPort.h:53
virtual double headingErrorRequiringMinTurnRadius()
Definition: groundAutoControllerComponent.h:80
#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
DtConstrainedIntegerOutputPort * myGearPort
Output Port Name: gear Output Port Description: Output Port Range: Output Port Default Value: Outp...
Definition: groundAutoControllerComponent.h:271
Description: This repository holds all information that is common to all the forms of local ground en...
Definition: groundVehicleStateRepository.h:32
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
DtAutomotivePSR * myProcessState
Pointer to a process state repository used to store state data associated with this component...
Definition: groundAutoControllerComponent.h:291
DtConstrainedAnalogOutputPort * mySteeringPort
Output Port Name: steering Output Port Description: Output Port Range: -1.0 to 1.0 Output Port Default Value: Output Group Parent: automotive-control.
Definition: groundAutoControllerComponent.h:257
double myMaxMinRadiusSpeed
Caches the value sqrt(max lateral acceleration * min turn radius) for use in the approximateThrottle ...
Definition: groundAutoControllerComponent.h:301
Instances of DtBooleanOutputPort are output ports through which data producers can send boolean data...
Definition: boolIOPort.h:45
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
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
virtual void clearTask()
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
double mySpeedLastTick
For derivative control in approximateThrottle.
Definition: groundAutoControllerComponent.h:296
Instances of DtAutomotivePSR are used to hold the shared/checkpointable data for an automotive system...
Definition: automotivePSR.h:36
virtual bool createPorts()
Called by init.
virtual bool decideToGiveUpTask() const
This function is used to determine if the controller should give up trying to execute the current tas...
class DtSoilFactors:
Definition: soilFactors.h:31
virtual bool createPortGroups()
Called by init.
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:102
DtConstrainedAnalogOutputPort * myBrakePort
Output Port Name: brake Output Port Description: Output Port Range: 0.
Definition: groundAutoControllerComponent.h:264
DtConstrainedAnalogOutputPort * myThrottlePort
Output Port Name: throttle Output Port Description: Output Port Range: 0.
Definition: groundAutoControllerComponent.h:250
DtOutputPortGroup * myAutomotiveControlPortGroup
Output Port Group Name: automotive-control Output Port Group Description: Collection of control outpu...
Definition: groundAutoControllerComponent.h:282
DtBooleanOutputPort * myParkingBrakePort
Output Port Name: parking-brake Output Port Description: Output Port Default Value: True Output Grou...
Definition: groundAutoControllerComponent.h:277
A DtTaskMsg is a DtRadioMsg with a pointer to a task.
Definition: taskMessage.h:19
DtGroundVehicleStateRepository * myGroundVehicleState
Definition: groundAutoControllerComponent.h:240
DtGroundAutoControllerComponent is a base controller that holds capabilitites common to all automotiv...
Definition: groundAutoControllerComponent.h:33

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)