VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
fixedWingLandingController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 
12 #pragma once
13 
16 
17 class DtString;
18 class DtSimManager;
19 class DtTaskMessage;
22 class DtLocalVertex;
25 
36 
39 {
40 public:
41 
45  DtVrfObject* owner,
46  DtSimManager* simManager,
47  DtComponentDescriptor* desc = 0,
48  DtReaderWriterRegistry* parentRegistry = 0);
49 
52 
54  virtual bool init();
55 
56  virtual bool postAddComponentsInit();
57 
60  virtual const char* type() const;
61 
64  virtual bool tickWhileDestroyed() const;
65 
69  static DtSimComponent * creator(const DtString& name,
70  DtVrfObject* owner,
71  DtSimManager* simManager,
72  DtComponentDescriptor* desc = 0,
73  DtReaderWriterRegistry* parentRegistry = 0);
74 
75 protected:
77  virtual void registerTaskMsgCallbacks();
78 
80  virtual void preFirstTickInit();
81 
83  virtual void tick();
84 
86  virtual void clearCurrentTaskMessage();
87 
89  virtual void clearTask();
90 
92  virtual void removeControlPoint();
93 
95 protected:
96 
102  virtual bool createPSR();
103 
105  DtFixedWingFlightPSR* lookupFixedWingFlightPSR();
106 
108  virtual bool createPorts();
109 
112  static void taskCompleteReportCallback(DtSimMessage * msg, void * usr);
113  virtual void processTaskComplete(DtSimMessage * msg);
114 
117  static void landingStripChanged(const DtVrfObject* obj, void* userData);
118  virtual void processLandingStripChanged(const DtVrfObject*);
119 
123  virtual void processLandingTask(DtSimMessage* msg);
124  static void landingTaskCallback(DtSimMessage* msg, void* usr);
125 
128  static void deleteVrfObjectCallback(const DtVrfObject* msg, void * usr);
129  virtual void processDeleteVrfObjectCallback(const DtVrfObject* obj);
130 
135  virtual bool generateApproachRoute();
136 
140  virtual bool generateLandingRoute();
141 
145 
146  virtual void initRunwayCoordTransform(const DtVector& runwayStartLocal,
147  const DtVector& runwayEndLocal, DtCoordTransform& resultTransform) const;
148 
151  virtual double calculateDecelerationConstant() const;
152 
154  virtual double calculateApproachSpeed() const;
155 
157  virtual void setupExistingConditions();
158 
161  virtual void setApproachSpeed();
162 
165  virtual void flyingAlongApproachRoute(ComponentCriticalSection&);
166 
169  virtual void moveAlongLandingStrip();
170 
172  virtual void movingAlongLandingStrip();
173 
180  virtual bool moveAlongLandingRouteRemainder();
181 
185  virtual bool checkPositionOnFinalLeg();
186 
190  virtual void flyingTowardsApproachRoute();
191 
194  virtual bool createApproachRoutePoints();
195 
199  virtual void setLandingAppearanceState(ComponentCriticalSection&);
200 
203  virtual double decelerationDistance() const;
204 
205 private:
206 
209 
212  orig);
213 
217 
218 protected:
221 
225 
229  bool myWaiting;
231 
234 
241 };
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
virtual bool postAddComponentsInit()
Called after all components have been created, initialized and added to the component manager...
Definition: simComponent.h:144
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
DtFixedWingLandingDescriptor * myFixedWingLandingDescriptor
Definition: fixedWingLandingController.h:226
DtBooleanOutputPort * myLandingGearControlPort
Output Port Name: landing-gear-control Output Port Description: Desired position of the landing gear...
Definition: fixedWingLandingController.h:239
bool myWaiting
Definition: fixedWingLandingController.h:229
Instances of DtBooleanOutputPort are output ports through which data producers can send boolean data...
Definition: boolIOPort.h:45
virtual void registerTaskMsgCallbacks()
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:20
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
virtual const char * type() const =0
Returns a string identifies the class type of component.
virtual bool init()
Calls setRadio()
virtual void clearTask()
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
Scoped guard for use in component tick functions.
Definition: simComponent.h:75
class DtFixedWingFlightPSR:
Definition: fixedWingFlightPSR.h:38
class DtVrfFixedWingLandingPSR:
Definition: vrfFixedWingLandingPSR.h:25
const DtVrfObject * myControlPoint
If this entity islanding, the path the entity is moving on to approach the landing strip...
Definition: fixedWingLandingController.h:220
File: simMsg.h.
Definition: simMessage.h:35
This descriptor defines parameters that are used to create an approach vector to a landing strip...
Definition: fixedWingLandingDescriptor.h:27
This repository holds all information that is common to all the forms of local fixed wing entities wi...
Definition: fixedWingEntityStateRepository.h:37
virtual void tick()
This gives the thread of control to the component.
virtual bool tickWhileDestroyed() const
If the component returns true here, it will be ticked regardless of the destroyed state of the host e...
DtLandingControllerState
Definition: vrfFixedWingLandingPSR.h:28
virtual bool createPorts()
Called by init.
DtFixedWingEntityStateRepository * myFixedWingEntityState
Definition: fixedWingLandingController.h:227
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
DtFixedWingLandingController is a controller that models landing for fixed-wing entities.
Definition: fixedWingLandingController.h:38
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:102
bool myLandingStripChanged
Definition: fixedWingLandingController.h:230
DtVrfFixedWingLandingPSR * myProcessState
Container for state data associated with this component.
Definition: fixedWingLandingController.h:224
DtFixedWingFlightPSR * myFixedWingFlightPSR
Definition: fixedWingLandingController.h:228
A DtTaskMsg is a DtRadioMsg with a pointer to a task.
Definition: taskMessage.h:19
virtual void clearCurrentTaskMessage()
Returns the current subtask with the specified id.

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)