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() override;
43 
48  virtual void tick() override;
49 
52  virtual const char* type() const override;
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) override;
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() override;
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 void isClutterChanged() override;
197  virtual bool getLocalDestination(DtVector& local) const;
198  virtual bool getWorldDestination(DtVector& world) const;
199 
202  virtual double distanceSquaredToDestination(const DtVector& current) const;
203  virtual double distanceSquaredToDestination2D(const DtVector& current) const;
204 
208  virtual bool atAltitude(double desiredAltitude) const;
209 
212  virtual bool setupControlPoint();
213 
215  virtual void deleteWorkingControlPoint();
216 
218  virtual void clearTask() override;
219 
220  virtual void updateTaskVisualizations() override;
221 
222  virtual void processEstimatedTotCalculation() override;
223 
225  virtual void processFixedWingLocationChanged();
226 
227 private:
228 
231 
234  const DtFixedWingMoveToController& orig);
235 
238  const DtFixedWingMoveToController& orig);
239 
240 protected:
242  bool myChangedLocation = false;
243 };
244 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
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 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...
virtual const char * type() const override
Returns a string identifies the class type of component. Type values are defined in compTypes...
virtual void tick() override
Only gets actuator values the first time it's called. Call lookupAndCacheProcessSR(), to look up myProcessState, if it hasn't already been found.
const DtFixedWingPilotController & operator=(const DtFixedWingPilotController &orig)
assignment operator; not implemented
virtual void updateTaskVisualizations() override
update visualizations
File: simMsg.h.
Definition: simMessage.h:35
virtual void isClutterChanged()
Called when the is-clutter setting changes.
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:96
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
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:80
virtual void clearTask() override
Overridden to deactivate the port group when this controller completes a task.
virtual void processEstimatedTotCalculation()
calculate estimated tot
void processSetLocation(DtSetDataRequest *set, const DtVertexList &vertices, double position, DtMoveAlongRouteTimeEstimator *est)
bool myFirstTick
Definition: fixedWingMoveToController.h:241
A locally simulated VRF object.
Definition: localObject.h:98

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)