VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fixedWingFollowEntityController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2003 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 #pragma once
12 
13 
15 
16 #include <vlutil/vlString.h>
17 #include <matrix/vlVector.h>
18 
19 class DtSimManager;
20 class DtSimMessage;
21 
22 
33 {
34 
35 public:
36 
40  DtVrfObject* owner,
41  DtSimManager* simManager,
42  DtComponentDescriptor* desc = 0,
43  DtReaderWriterRegistry* parentRegistry = 0);
46 
49  virtual const char* type() const;
50 
54  virtual void tick();
55 
57  virtual void doMoving();
58  virtual void doFlying();
59  virtual void doTaxiing();
60 
64  static void followEntityCallback(DtSimMessage * msg, void * usrData);
65  virtual void processFollowEntityTask(DtSimMessage * msg);
66 
67  virtual const DtUUID& entityToFollow() const;
68  virtual void setEntityToFollow(const DtUUID& entity);
69 
70  virtual const DtVector& offsetVector() const;
71  virtual void setOffsetVector(const DtVector& offsets);
72 
76  static DtSimComponent * creator(const DtString& name,
77  DtVrfObject* owner,
78  DtSimManager* simManager,
79  DtComponentDescriptor* desc = 0,
80  DtReaderWriterRegistry* parentRegistry = 0);
81 
82 protected:
86 
89  orig);
90 
94 
96  virtual void registerTaskMsgCallbacks();
97 
102  virtual bool setupControlPoint();
103 
114  virtual bool getCurrentLeaderState(DtVector& localPosition,
115  DtVector& localVelocity, DtTaitBryan& topoOrientation,
116  DtVector& topoRotationRate);
117 
119  virtual double findDesiredFlyingSpeed(
120  const double leaderSpeed,
121  const double forwardPositionError);
122 
128  virtual double flyingControlSpeed(double targetSpeed,
129  double targetDistance);
130 
146  virtual double calculateControlTurnRate(
147  double desiredHeading, double distanceFromLine, double dt);
148 
157  virtual double calculateControlClimbRate(double altitudeDiff,
158  DtVector& topoEntityCurrentVelocity,
159  DtVector& topoNextTickVelocity,
160  double dt);
161 
181  virtual double desiredHeading(double estimatedTurnRadius,
182  DtVector& topoEntityToGoal,
183  DtVector& topoGoalHorizDirection,
184  DtVector& topoEntityVelocity, DtVector& topoNextVelocity,
185  double dt);
186 
190  DtVector predictedMove(const DtVector& vInitial,
191  const DtVector& vFinal, double dt);
192 
194  virtual double findDesiredSpeed();
195 
196  virtual double lastHeadingError() const;
197  virtual void setLastHeadingError(const double error);
198 
201  virtual double integratedHorizontalError() const;
202  virtual void setIntegratedHorizontalError(const double error);
205  virtual void updateIntegratedHorizontalError(const double currentError,
206  const double dt, const double decayRate);
208 
209 protected:
210 
213 
216 
221  double myStationSpeed;
225 
228 
232 
235 };
236 

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)