VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
fixedWingMoveAlongController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 
13 #pragma once
14 
16 
17 class DtString;
18 class DtSimManager;
19 
20 class DtConstrainedAnalogPort;
21 class boolPort;
22 class DtRouteState;
23 class DtSimMessage;
24 class DtVectorOutputPort;
25 
28 #define DT_LANDING_BUFFER 5.0
29 
49 {
50 
51 public:
52 
56  DtVrfObject* owner,
57  DtSimManager* simManager,
58  DtComponentDescriptor* desc = 0,
59  DtReaderWriterRegistry* parentRegistry = 0);
60 
63 
65  virtual bool init();
66 
72  virtual void preFirstTickInit();
73 
78  virtual void tick();
79 
82  virtual const char* type() const;
83 
86  virtual void doFinishing();
87 
95  virtual void doFinishingForFlying();
96 
100  virtual void doFinishingForTaxiing();
101 
104  virtual void doMoving();
105 
111  virtual void doFlying();
112 
117  virtual void doTaxiing();
118 
123  virtual void doTakeOff();
124 
131  virtual void doLanding();
132 
141  virtual double findDesiredSpeed();
142 
152  virtual bool nearGoal();
153 
159  virtual bool atGoal();
160 
164  virtual bool passedGoal();
165 
171  static void routeChangedCallback(const DtVrfObject* obj, void * usrData);
172  static void routeRemovedCallback(const DtVrfObject* obj, void * usrData);
173  static void setAltitudeCallback(DtSimMessage * msg, void * usrData);
174  static void setLocationCallback(DtSimMessage * msg, void * usrData);
175  static void setRestoreCallback(DtSimMessage * msg, void * usrData);
176  static void modifyVrfObjectCallback(DtSimMessage * msg, void * usr);
177  static void deleteVrfObjectCallback(const DtVrfObject* msg, void * usr);
178 
179  virtual bool processFlyAlongTask(DtSimTask* msg, DtSimTaskStatePtr taskStatePtr);
180 
181  virtual bool processMoveAlongTask(DtSimTask* msg, DtSimTaskStatePtr taskStatePtr);
185  virtual void processRouteChanged(const DtVrfObject* obj);
187  virtual void processRouteRemoved(const DtVrfObject* obj);
191  virtual void processSetAltitude(DtSimMessage * msg);
192  virtual void processSetLocation(DtSimMessage * msg);
193  virtual void processSetRestore(DtSimMessage * msg);
198  virtual void processModifyVrfObject(DtSimMessage * msg);
201  virtual void processDeleteVrfObject(const DtVrfObject *msg);
202 
203  virtual bool setupRoute();
204 
207  virtual void registerTaskMsgCallbacks();
208 
209  static void moveAlongCallback(DtSimMessage* msg, void* usr, DtSimTaskStatePtr taskStatePtr);
210 
212  static DtReaderWriter* provideNextRoutePointIndex(void* c);
213 
216 
217  virtual DtSimTaskStatePtr currentTaskState() const;
218 
222  static DtSimComponent * creator(const DtString& name,
223  DtVrfObject* owner,
224  DtSimManager* simManager,
225  DtComponentDescriptor* desc = 0,
226  DtReaderWriterRegistry* parentRegistry = 0);
227 
228 protected:
229  virtual void processMoveAlong(const DtTaskMessage& msg, DtSimTaskStatePtr taskStatePtr);
230 
233 
236  const DtFixedWingMoveAlongController& orig);
237 
240  const DtFixedWingMoveAlongController& orig);
241 
243  void clearStoredRoute();
244 
248  void updateTakeOffDir();
249  void updateLandingDir();
250 
258  void processEntityLocationChange();
259 
282  virtual bool setMovementStatusFromRoute();
283 
285  virtual void resetValues();
286 
288  virtual void clearTask();
289 
290  virtual void updateTaskVisualizations();
291 
292  virtual void processEstimatedTotCalculation();
293 
294  virtual bool createPorts();
295 
296 protected:
297 
301 
304 
311 };
312 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
virtual void clearTask()
Overridden to deactivate the port group when this controller completes a task.
DtFixedWingFlightPSR * myProcessState
Pointer to a process state repository used to store state data associated with this component...
Definition: fixedWingPilotController.h:487
virtual void tick()
Only gets actuator values the first time it's called.
virtual bool init()
Initializes myFixedWingEntityState.
virtual bool createPorts()
Overridden to create the fixed wing ports.
virtual void registerTaskMsgCallbacks()
bool myRouteHasChanged
Definition: fixedWingMoveAlongController.h:302
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
DtVectorOutputPort * myCurrentVertexLocationOutputPort
Output Port Name: current-vertex-location Output Port Description: Specifies the current vertex locat...
Definition: fixedWingMoveAlongController.h:310
Definition: readerWriter.h:85
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
DtFixedWingPilotController is a controller that models the capabilities of a fixed-wing pilot...
Definition: fixedWingPilotController.h:44
virtual void updateTaskVisualizations()
update visualizations
DtBoost::shared_ptr< DtSimTaskState > DtSimTaskStatePtr
Definition: taskAndTaskStateDefines.h:18
const DtFixedWingPilotController & operator=(const DtFixedWingPilotController &orig)
assignment operator; not implemented
class DtFixedWingFlightPSR:
Definition: fixedWingFlightPSR.h:38
Instances of DtVectorOutputPort are output ports through which data producers can send a DtVector...
Definition: vectorIOPort.h:52
File: simMsg.h.
Definition: simMessage.h:35
const DtVrfObject * myRoute
This is looked up once per tick - assumed unchanging while we have control.
Definition: fixedWingMoveAlongController.h:300
virtual const char * type() const
Returns a string identifies the class type of component.
virtual DtSimTaskStatePtr currentTaskState() const
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
static DtSimComponent * creator(const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
DtFixedWingMoveAlongController is a controller that models the movement of a fixed wing entity along ...
Definition: fixedWingMoveAlongController.h:47
DtSimTask is an abstract base class from which real tasks can derive.
Definition: simTask.h:33
virtual DtFixedWingFlightPSR * getPSR()
Gets the process state repository for purposes of providing attributes.
Definition: fixedWingMoveAlongController.h:215
virtual void processEstimatedTotCalculation()
calculate estimated tot
bool myWarnedForMovementStatus
Definition: fixedWingMoveAlongController.h:303
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:102
void processSetLocation(DtSetDataRequest *set, const DtVertexList &vertices, double position, DtMoveAlongRouteTimeEstimator *est)
These functions handle the standard sets that can affect the time estimates.
A DtTaskMsg is a DtRadioMsg with a pointer to a task.
Definition: taskMessage.h:19

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)