VR-Forces Developer's Guide
 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 
17 
18 class DtString;
20 class DtTaskMessage;
23 class DtLocalVertex;
26 
37 
40 {
41 public:
42 
46  DtLocalObject* owner,
47  DtSimulationServices* simManager,
48  DtComponentDescriptor* desc = 0,
49  DtReaderWriterRegistry* parentRegistry = 0);
50 
52  virtual ~DtFixedWingLandingController() override;
53 
55  virtual bool init() override;
56 
57  virtual bool postAddComponentsInit() override;
58 
61  virtual const char* type() const override;
62 
65  virtual bool tickWhileDestroyed() const override;
66 
70  static DtSimComponent * creator(const DtString& name,
71  DtLocalObject* owner,
72  DtSimulationServices* simManager,
73  DtComponentDescriptor* desc = 0,
74  DtReaderWriterRegistry* parentRegistry = 0);
75 
76 protected:
78  virtual void registerTaskMsgCallbacks() override;
79 
81  virtual void preFirstTickInit() override;
82 
84  virtual void tick() override;
85 
87  virtual void clearCurrentTaskMessage() override;
88 
90  virtual void clearTask() override;
91 
93  virtual void removeControlPoint();
94 
96 protected:
97 
103  virtual bool createPSR();
104 
106  DtFixedWingFlightPSR* lookupFixedWingFlightPSR();
107 
109  virtual bool createPorts() override;
110 
113  static void taskCompleteReportCallback(DtSimMessage * msg, void * usr);
114  virtual void processTaskComplete(DtSimMessage * msg);
115 
118  virtual void processLandingStripChanged(const DtSimObject*);
119 
123  virtual void processLandingTask(DtSimMessage* msg);
124  static void landingTaskCallback(DtSimMessage* msg, void* usr);
125 
130  virtual bool generateApproachRoute();
131 
135  virtual bool generateLandingRoute();
136 
140 
141  virtual void initRunwayCoordTransform(const DtVector& runwayStartLocal,
142  const DtVector& runwayEndLocal, DtCoordTransform& resultTransform) const;
143 
146  virtual double calculateDecelerationConstant() const;
147 
149  virtual double calculateApproachSpeed() const;
150 
152  virtual void setupExistingConditions();
153 
156  virtual void setApproachSpeed();
157 
160  virtual void flyingAlongApproachRoute();
161 
164  virtual void moveAlongLandingStrip();
165 
167  virtual void movingAlongLandingStrip();
168 
175  virtual bool moveAlongLandingRouteRemainder();
176 
180  virtual bool checkPositionOnFinalLeg();
181 
185  virtual void flyingTowardsApproachRoute();
186 
188  virtual std::vector<DtVector> createApproachRoutePoints() const;
189 
193  virtual void setLandingAppearanceState();
194 
197  virtual double decelerationDistance() const;
198 
199 private:
200 
203 
206  orig);
207 
211 
212 protected:
218 
222  bool myWaiting;
224 
227 
234 
237 };
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtFixedWingLandingDescriptor * myFixedWingLandingDescriptor
Definition: fixedWingLandingController.h:219
DtSimObjectReference myLandingStrip
If this entity islanding, the path the entity is moving on to approach the landing strip...
Definition: fixedWingLandingController.h:214
virtual bool postAddComponentsInit() override
Calls enableTaskTypes()
DtBooleanOutputPort * myLandingGearControlPort
Output Port Name: landing-gear-control Output Port Description: Desired position of the landing gear...
Definition: fixedWingLandingController.h:232
virtual const char * type() const override=0
Returns a string identifies the class type of component. Type values are defined in compTypes...
bool myWaiting
Definition: fixedWingLandingController.h:222
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:22
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
virtual bool init() override
Calls setRadio()
class DtFixedWingFlightPSR:
Definition: fixedWingFlightPSR.h:41
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Member to allow for access to platform specific data.
Definition: fixedWingLandingController.h:236
class DtVrfFixedWingLandingPSR:
Definition: vrfFixedWingLandingPSR.h:26
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:41
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
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:29
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
DtFixedWingEntityStateRepository * myFixedWingEntityState
Definition: fixedWingLandingController.h:220
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
DtFixedWingLandingController is a controller that models landing for fixed-wing entities.
Definition: fixedWingLandingController.h:39
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
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
virtual void clearTask() override
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
bool myLandingStripChanged
Definition: fixedWingLandingController.h:223
DtVrfFixedWingLandingPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: fixedWingLandingController.h:217
DtFixedWingFlightPSR * myFixedWingFlightPSR
Definition: fixedWingLandingController.h:221
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
virtual void clearCurrentTaskMessage()
Returns the current subtask with the specified id. Also returns the controller that is responsible...
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)