VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
fixedWingFlightCommandController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2011 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
13 
14 class DtString;
16 class DtConstrainedAnalogPort;
17 class boolPort;
18 class DtSimMessage;
19 
36 {
37 
38 public:
39 
43  DtLocalObject* owner,
44  DtSimulationServices* simManager,
45  DtComponentDescriptor* desc = 0,
46  DtReaderWriterRegistry* parentRegistry = 0);
47 
49  virtual ~DtFixedWingFlightCommandController() override;
50 
51  virtual bool init() override;
52 
53  virtual bool beginProcessingTask(const DtTaskMessage& task, DtSimTaskStatePtr taskState) override;
54 
55  virtual void tick() override;
56 
59  virtual const char* type() const override;
60 
63  virtual bool showCurrentTaskInGui() const override;
64 
67 
68  static void taskNotifyCallback(const DtSimTask & task, const DtSimComponent &notifier, void* usr);
69  virtual void processTaskNotify(const DtSimTask & task, const DtSimComponent &notifier);
71 
73 
75 
76  virtual void processSetLocationCallback();
78 
82  static DtSimComponent * creator(const DtString& name,
83  DtLocalObject* owner,
84  DtSimulationServices* simManager,
85  DtComponentDescriptor* desc = 0,
86  DtReaderWriterRegistry* parentRegistry = 0);
87 
96  virtual double calculateTurnRate(double turnAngle, double desiredTurnRate) const override;
97 
98 
99 protected:
100  virtual void clearTask() override;
101 
105  virtual void resetTurnDirection();
106 
107 
108 
109 private:
110 
113 
117 
121 
122 protected:
125  double myNorthAngle;
126 
127  boost::signals2::scoped_connection mySetLocationCompleteConnection;
128 };
129 
bool myResetTurnDirection
Definition: fixedWingFlightCommandController.h:123
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtTime myNextMagNorthUpdateTime
Definition: fixedWingFlightCommandController.h:124
double myNorthAngle
Definition: fixedWingFlightCommandController.h:125
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
User Description: A controller which carries out the "Flight Command" tasks DtFlyHeadingTask, DtFlyAltitudeTask and DtFlyHeadingAndAltitudeTask for fixed wing aircraft. This controller works slightly differently from most task controllers in the way the tasks interact. Specifically, portions of a previous task are remembered if a number of these tasks are issues in succession. For example, if a Fly Heading task is issued, followed by a Fly Altitude task before the Fly Heading task is complete, the aircraft will continue to turn to the original desired heading while also climbing/descending to the new desired altitude. Additionally, this controller will replace the default behavior of the entity following the completion of any of these tasks. Once the aircraft reaches the desired heading and altitude from the task, taskComplete() will be called, and the task will be considered complete (so the next plan statement will be executed, if a plan is in use) however, the controller will continue to fly the aircraft on the heading and altitude specified until another task takes priority.
Definition: fixedWingFlightCommandController.h:35
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
std::shared_ptr< DtSimTaskState > DtSimTaskStatePtr
Definition: taskAndTaskStateDefines.h:18
virtual bool showCurrentTaskInGui() const
DtFixedWingPilotController is a controller that models the capabilities of a fixed-wing pilot...
Definition: fixedWingPilotController.h:47
virtual bool beginProcessingTask(const DtTaskMessage &task, DtSimTaskStatePtr taskState) override
Called by the task manager when this controller should start executing the specified task...
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&#39;s called. Call lookupAndCacheProcessSR(), to look up myProcessState, if it hasn&#39;t already been found.
const DtFixedWingPilotController & operator=(const DtFixedWingPilotController &orig)
assignment operator; not implemented
boost::signals2::scoped_connection mySetLocationCompleteConnection
Definition: fixedWingFlightCommandController.h:127
File: simMsg.h.
Definition: simMessage.h:35
virtual bool init() override
Initializes myFixedWingEntityState.
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
virtual void clearTask() override
Overridden to deactivate the port group when this controller completes a task.
DtSimTask is an abstract base class from which real tasks can derive. It manages the read/write capab...
Definition: simTask.h:30
virtual double calculateTurnRate(double turnAngle, double additionalTurnRate=0) const
Determines the turn rate that will be used to change heading. If the magnitude of the heading change ...
A DtTaskMsg is a DtRadioMsg with a pointer to a task. The type of the taskMsg is just the type of the...
Definition: taskMessage.h:21
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)