VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
fixedWingMoveToController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 
13 #pragma once
14 
16 
17 class DtString;
19 class DtConstrainedAnalogPort;
20 class boolPort;
21 class DtSimMessage;
22 
29 {
30 
31 public:
32 
36  DtLocalObject* owner,
37  DtSimulationServices* simManager,
38  DtComponentDescriptor* desc = 0,
39  DtReaderWriterRegistry* parentRegistry = 0);
40 
42  virtual ~DtFixedWingMoveToController();
43 
48  virtual void tick();
49 
52  virtual const char* type() const;
53 
67  bool setMovementStatusFromControlPoint();
68 
71  virtual void doFinishing();
72 
80  virtual void doFinishingForFlying();
81 
85  virtual void doFinishingForTaxiing();
86 
89  virtual void doMoving();
90 
96  virtual void doFlying();
97 
102  virtual void doTaxiing();
103 
108  virtual void doTakeOff();
109 
112  virtual void updateTakeOffDirection();
113 
117  virtual double findDesiredSpeed();
118 
127  virtual bool nearGoal();
128 
133  virtual bool atGoal();
134 
145  virtual bool passedGoal();
146 
150  virtual void taskComplete(bool success = true);
151 
155  static void moveToCallback(DtSimMessage * msg, void * usr);
156  static void moveToAltitudeCallback(DtSimMessage * msg, void * usr);
157  static void setAltitudeCallback(DtSimMessage * msg, void * usrData);
158  static void setLocationCallback(DtSimMessage * msg, void * usrData);
159  static void setRestoreCallback(DtSimMessage * msg, void * usrData);
160  static void waypointChangedCallback(const DtSimObject* msg, void * usr);
162  static void modifyVrfObjectCallback(DtSimMessage * msg, void * usr);
163 
166  virtual void processMoveToTask(DtSimMessage * msg);
167  virtual void processMoveToAltitudeTask(DtSimMessage * msg);
171  virtual void processSetAltitude(DtSimMessage * msg);
172  virtual void processSetLocation(DtSimMessage * msg);
173  virtual void processSetRestore(DtSimMessage * msg);
174  virtual void processWaypointChanged(const DtSimObject* msg);
180  virtual void processModifyVrfObject(DtSimMessage * msg);
181 
184  virtual void registerTaskMsgCallbacks();
185 
189  static DtSimComponent * creator(const DtString& name,
190  DtLocalObject* owner,
191  DtSimulationServices* simManager,
192  DtComponentDescriptor* desc = 0,
193  DtReaderWriterRegistry* parentRegistry = 0);
194 
195 protected:
196  virtual bool getLocalDestination(DtVector& local) const;
197  virtual bool getWorldDestination(DtVector& world) const;
198 
201  virtual double distanceSquaredToDestination(const DtVector& current) const;
202  virtual double distanceSquaredToDestination2D(const DtVector& current) const;
203 
207  virtual bool atAltitude(double desiredAltitude) const;
208 
211  virtual bool setupControlPoint();
212 
214  virtual void deleteWorkingControlPoint();
215 
217  virtual void clearTask();
218 
220 
221  virtual void processEstimatedTotCalculation();
222 
224  virtual void processFixedWingLocationChanged();
225 
226 private:
227 
230 
233  const DtFixedWingMoveToController& orig);
234 
237  const DtFixedWingMoveToController& orig);
238 
239 protected:
241  bool myChangedLocation = false;
242 };
243 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
virtual void clearTask()
Overridden to deactivate the port group when this controller completes a task.
virtual void tick()
Only gets actuator values the first time it's called. Call lookupAndCacheProcessSR(), to look up myProcessState, if it hasn't already been found.
virtual void registerTaskMsgCallbacks()
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
Definition: readerWriterRegistry.h:39
DtFixedWingPilotController is a controller that models the capabilities of a fixed-wing pilot...
Definition: fixedWingPilotController.h:47
virtual void updateTaskVisualizations()
update visualizations
virtual void taskComplete(bool success=true)
If we are currently tasked, this will cause us to notify the entity that we're done and delete the ta...
const DtFixedWingPilotController & operator=(const DtFixedWingPilotController &orig)
assignment operator; not implemented
File: simMsg.h.
Definition: simMessage.h:35
virtual const char * type() const
Returns a string identifies the class type of component. Type values are defined in compTypes...
DtFixedWingMoveToController is a controller used to model the movement of a fixed wing entity to a sp...
Definition: fixedWingMoveToController.h:28
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:95
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:88
virtual void processEstimatedTotCalculation()
calculate estimated tot
void processSetLocation(DtSetDataRequest *set, const DtVertexList &vertices, double position, DtMoveAlongRouteTimeEstimator *est)
bool myFirstTick
Definition: fixedWingMoveToController.h:240
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)