VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
fixedWingEntityStateRepository.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
11 
15 
18 #include <vlutil/vlMachineTypes.h>
19 #include <matrix/vlVector.h>
22 #include <readerWriter/rwReal.h>
23 #include "vrfutil/rwAirSpeedType.h"
24 
26 
28 {
31 };
32 
42 {
43 private:
46 
49 
51  const DtFixedWingEntityStateRepository & operator=
52  (const DtFixedWingEntityStateRepository & orig);
53 
54 public:
55 
58  DtReaderWriterRegistry* parentRegistry = 0);
59 
62 
63  virtual bool init() override;
64 
66  virtual DtString type() const override;
67 
69  virtual const int vrfMovingObjectStateRepositorySubType() const override;
70 
72  virtual const int fixedWingEntityStateRepositorySubType() const;
73 
74  virtual void initializeFromParameters() override;
75  const DtFixedWingEntityParameters* fixedWingEntityParameters() const;
76 
78  virtual DtReal AOA() const;
79  virtual void setAOA (DtReal aoa);
80 
83  virtual DtReal minLiftSpeed() const;
84  virtual void setMinLiftSpeed (DtReal minLiftSpeed);
85 
88  virtual DtReal maxAltitude() const;
89  virtual void setMaxAltitude (DtReal maxAltitude);
90 
93  virtual DtReal maxYawRate() const;
94  virtual void setMaxYawRate (DtReal maxYawRate);
95 
98  virtual DtReal maxPitchRate() const;
99  virtual void setMaxPitchRate (DtReal maxPitchRate);
100 
103  virtual DtReal maxRollRate() const;
104  virtual void setMaxRollRate (DtReal maxRollRate);
105 
107  virtual DtReal maxClimbRate() const;
108  virtual void setMaxClimbRate (DtReal maxClimbRate);
109 
110  virtual DtReal orderedGroundSpeed() const;
111  virtual void setOrderedGroundSpeed (DtReal orderedGroundSpeed);
112 
113  virtual DtReal maxGroundSpeed() const;
114  virtual void setMaxGroundSpeed (DtReal maxGroundSpeed);
115 
116  virtual DtReal maxGroundStoppingDeceleration() const;
117  virtual void setMaxGroundStoppingDeceleration (DtReal maxGroundStoppingDeceleration);
118 
119  virtual DtReal groundTurningRadius() const;
120  virtual void setGroundTurningRadius (DtReal groundTurningRadius);
121 
122  virtual DtReal maxGroundSlope() const;
123  virtual void setMaxGroundSlope (DtReal maxGroundSlope);
124 
128  virtual bool onGround() const;
129 
132  virtual boost::tribool onTerrainSurface() const;
133 
137  virtual void setOnGround(bool onGround);
138 
142  virtual void setCurrentOrderedSpeed(const double currentOrderedSpeed);
143  virtual const double currentOrderedSpeed() const;
144 
145  virtual void setCurrentMaxSpeed(const double currentMaxSpeed);
146  virtual const double currentMaxSpeed() const;
147 
149  virtual DtReal maxSpeed() const;
150 
151  virtual void setCurrentMaxStoppingDeceleration(const double currentMaxStoppingDeceleration);
152  virtual const double currentMaxStoppingDeceleration() const;
153 
154  virtual void setCurrentTurningRadius(const double currentTurningRadius);
155  virtual const double currentTurningRadius() const;
156 
157  virtual bool attachToParent(DtSimObjectReference parent);
158 
159  virtual void setCurrentMaxSlope(const double currentMaxSlope);
160  virtual const double currentMaxSlope() const;
161 
162  virtual void setOnGroundTolerance(double);
163  virtual double onGroundTolerance() const;
164 
165  virtual DtReal orderedAirSpeed() const;
166  virtual void setOrderedAirSpeed(DtReal orderedAirSpeed);
167 
168  virtual void setOrderedAirSpeedType(const DtAirSpeedType &airSpeedType);
169  virtual DtAirSpeedType orderedAirSpeedType() const;
170 
171  void setMaxOrderedIndicatedAirSpeed(DtReal speed);
172  DtReal maxOrderedIndicatedAirSpeed() const;
173 
174  void setMaxOrderedMach(DtReal speed);
175  DtReal maxOrderedMach() const;
176 
201  virtual void place (const DtVector& location, const DtReal heading,
202  bool clampToGroundFlag = true, bool* dataAvailable = 0,
203  bool requireAllData = false) override;
204 
205  virtual void placeAtAltitude (const DtVector& location, const DtReal heading) override;
206 
209  virtual void updateCurrentStateVars();
210 
214  virtual const DtGroundInteractionPt* noseSupport() const;
215  virtual DtGroundInteractionPt* noseSupport();
216  virtual void setNoseSupport(const DtVector& noseSupport);
217 
218  static DtVrfObjectStateRepository* creator (const DtString& name,
219  DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
220 
222  virtual void restoreEntity();
223 
226  virtual void updateAppearanceFromState();
227 
229  bool hasLightingComponent() const;
230 
231 protected:
232 
234  virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths,
235  const DtVariableBindingsList& variableBindings) override;
236 
237 protected:
238  virtual void createLegacyRWData() override;
239  virtual void setToLegacyRWData() override;
240  virtual void restoreFromLegacyRWData() override;
241 
242 protected:
250 
256 
265 
269 
272 
275 
276 public:
280  {
281  return rep->as<DtFixedWingEntityStateRepository>();
282  }
284 };
Definition: rwAirSpeedType.h:32
Definition: fixedWingEntityStateRepository.h:30
DtRwReal myMaxGroundSpeed
Definition: fixedWingEntityStateRepository.h:252
Contains the DtVrfMovingObjectStateRepository class declaration.
virtual bool init() override
Our &#39;virtual&#39; constructor. Calls all the create&lt;&gt;() methods.
Description: This repository holds all information that is common to all the forms of all objects wit...
Definition: vrfMovingObjectStateRepository.h:31
DtRwReal myCurrentMaxStoppingDeceleration
Definition: fixedWingEntityStateRepository.h:262
virtual void place(const DtVector &location, bool *dataAvailable=0, bool requireAllData=false)
Place entity at &#39;location&#39;, on the ground, keeping its current heading. The dataAvailable flag will b...
DtRwReal myOnGroundTolerance
The value (in meters) that if a fixed wing is within this tolerance and the ground, it is considered on ground. This value defaults to 10.
Definition: fixedWingEntityStateRepository.h:268
DtRwReal myMaxAltitude
Definition: fixedWingEntityStateRepository.h:245
DtRwReal myCurrentMaxSlope
Definition: fixedWingEntityStateRepository.h:264
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
static DtVrfObjectStateRepository * creator(const DtString &name, DtLocalObject *vrfObject, DtReaderWriterRegistry *parentRegistry)
DtRwReal myMaxOrderedIas
Definition: fixedWingEntityStateRepository.h:273
Definition: simObjectStateRepository.h:59
DtRwReal myCurrentTurningRadius
Definition: fixedWingEntityStateRepository.h:263
DtRwAirSpeedType myOrderedAirSpeedType
Definition: fixedWingEntityStateRepository.h:271
Definition: readerWriterRegistry.h:39
virtual void restoreEntity()
Called on a setRestore command, sets destroyed to false and sets resources to initial (parameter file...
virtual const int vrfMovingObjectStateRepositorySubType() const
Returns DtVrfMovingObjectStateRepositorySubTypeBase.
Description: This repository is an internal repository accessible only by local objects. It holds all information that is common to all the forms of all entity/aggregate/control objects within VR-Forces.
Definition: vrfObjectStateRepository.h:92
virtual void setToLegacyRWData() override
DtRwReal myMaxOrderedMach
Definition: fixedWingEntityStateRepository.h:274
DtRwReal myMaxRollRate
Definition: fixedWingEntityStateRepository.h:249
static VRF4API_METHOD DtFixedWingEntityStateRepository * isFixedWingEntityStateRepository(DtSimObjectStateRepository *rep)
These are backwards compatible methods that can be used if you define ALLOW_VRF4API in your header fi...
Definition: fixedWingEntityStateRepository.h:279
DtRwReal myMaxYawRate
Definition: fixedWingEntityStateRepository.h:247
DtRwReal myMaxPitchRate
Definition: fixedWingEntityStateRepository.h:248
virtual void restoreFromLegacyRWData() override
virtual bool attachToParent(const DtUUID &parent) override
Looks up the parent state repository using the given echelon ID and puts it in a call to attachToPare...
DtRwReal myMaxClimbRate
Definition: fixedWingEntityStateRepository.h:246
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
virtual DtReal maxSpeed() const
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
This repository holds all information that is common to all the forms of local fixed wing entities wi...
Definition: fixedWingEntityStateRepository.h:41
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
virtual void createLegacyRWData() override
Creates the legacy data used for any pre/put operation. Override this to create your legacy data atta...
DtRwReal myMinLiftSpeed
Definition: fixedWingEntityStateRepository.h:244
DtRwReal myOrderedGroundSpeed
Definition: fixedWingEntityStateRepository.h:251
virtual void initializeFromParameters() override
Definition: fixedWingEntityStateRepository.h:29
Contains the set of readable/writeable parameters assoicated with a fixed-wing entity.
Definition: fixedWingEntityParameters.h:56
DtRwReal myMaxGroundSlope
Definition: fixedWingEntityStateRepository.h:255
virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings) override
Override getSelf to handle mapping of old pre-2.0 oob files. Maps the old variables for local and wor...
DtRwReal myAOA
Definition: fixedWingEntityStateRepository.h:243
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
DtAirSpeedType
Air Speed Type PDU enums.
Definition: rwAirSpeedType.h:24
DtRwReal myCurrentOrderedSpeed
These variables are used to represent the values for the current state of the FWE - for flying or dri...
Definition: fixedWingEntityStateRepository.h:260
virtual DtString type() const override
returns DtSimObjectStateRepositoryType
DtRwReal myGroundTurningRadius
Definition: fixedWingEntityStateRepository.h:254
Class Invariant: The DtGroundInteractionPt class must always have a valid DtAttachedTerrain or DtSimM...
Definition: groundInteractionPt.h:28
DtRwReal myOrderedAirSpeed
Definition: fixedWingEntityStateRepository.h:270
DtFixedWingCurrentState
Definition: fixedWingEntityStateRepository.h:27
const T_SRType * as() const
Convenience function to cast to particular state rep type.
Definition: simObjectStateRepository.h:101
VRF4API_METHOD bool onTerrainSurface() const
Get/Set the activity of the unit. Set in the extended data and in state properties (if exists) ...
DtRwReal myCurrentMaxSpeed
Definition: fixedWingEntityStateRepository.h:261
virtual void placeAtAltitude(const DtVector &location, const DtReal heading)
Places entity at altitude regardless of terrain.
#define VRF4API_METHOD
Include this header file to allow for the definition/usage of the ability to mark something as deprec...
Definition: vrf4XAPI.h:22
DtRwReal myMaxGroundStoppingDeceleration
Definition: fixedWingEntityStateRepository.h:253
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)