VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
fixedWingFlightPSR.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
14 #include <readerWriter/rwReal.h>
15 #include "readerWriter/rwVector.h"
16 #include <readerWriter/rwBoolean.h>
17 #include <readerWriter/rwString.h>
19 #include <readerWriter/rwInt.h>
21 #include <vrfutil/rwUUID.h>
23 
27 {
28  DtFWTaxiing = 0, //default if none specified during construction
32 };
33 
40 
42 {
43 public:
44 
47  const DtString& rwName = DtString::nullString(),
48  DtReaderWriterRegistry* parentRegistry = 0);
49 
52  const DtString& rwName = DtString::nullString(),
53  DtReaderWriterRegistry* parentRegistry = 0);
54 
56  virtual ~DtFixedWingFlightPSR();
57 
60 
63  const DtString& rwName = DtString::nullString(),
64  DtReaderWriterRegistry* parentRegistry = 0) const;
65 
68  virtual DtString type() const;
69 
71  virtual void setMaxThrustAccleration(double acceleration);
72  virtual double maxThrustAcceleration() const;
73 
74  virtual void setNormalizedBodyVelocity(const DtVector& velocity);
75  virtual const DtVector& normalizedBodyVelocity() const;
76 
77  virtual void setLocalAngularVelocity(double velocity);
78  virtual double localAngularVelocity() const;
79 
80  virtual void setSpeedRatioSquared(double value);
81  virtual double speedRatioSquared() const;
82 
83  virtual void setFinishing(bool flag);
84  virtual bool isFinishing() const;
85 
86  virtual void setApproachingVertex(bool flag);
87  virtual bool isApproachingVertex() const;
88 
89  virtual void setBanking(bool flag);
90  virtual bool isBanking() const;
91 
92  virtual void setLastDistanceSquared(double value);
93  virtual double lastDistanceSquared() const;
94 
95  virtual void setDistanceSquared(double value);
96  virtual double distanceSquared() const;
97 
98  virtual void setTakeOffDir(const DtVector& takeOffDir);
99  virtual const DtVector& takeOffDir() const;
100 
101  virtual void setTakeoffDestination(const DtVector& takeOffDir);
102  virtual const DtVector& takeoffDestination() const;
103 
104  virtual void setLandingDir(const DtVector& landingDir);
105  virtual const DtVector& landingDir() const;
106 
108  virtual void setEntityToFollow(const DtUUID& objectName);
109  virtual DtSimObjectReference entityToFollow() const;
110 
113  virtual void setFollowOffsetVector(const DtVector& offset);
114  virtual const DtVector& followOffsetVector() const;
115 
118  virtual void setLoiterRadius(double radius);
119  virtual double loiterRadius() const;
120 
123  virtual void setLoiterClockwise(bool flag);
124  virtual bool loiterClockwise() const;
125 
127  virtual void setLoiterCenter(const DtVector& center);
128  virtual const DtVector& loiterCenter() const;
129 
131  virtual void setObjectToOrbit(const DtUUID&);
132 
133  virtual DtSimObjectReference objectToOrbit() const;
134 
136  virtual void setTimeToEndOrbit(double t);
137  virtual double timeToEndOrbit() const;
138 
140  virtual void setControlPoint(const DtUUID&);
141 
143  virtual void setWorldAimingPoint(const DtVector&);
144 
145  virtual const DtRwPositionReference& controlPoint();
146 
148  virtual DtVector localAimingPoint() const;
149  virtual DtVector worldAimingPoint() const;
150 
152  virtual bool createdControlPoint() const;
153 
156  virtual void setMovementStatus(const DtFixedWingMovementStatus movementStatus);
157  virtual const DtFixedWingMovementStatus movementStatus() const;
158 
159  virtual void setPreviousAltitude(const double speed);
160  virtual const double previousAltitude() const;
161 
164  virtual void setFirstWaypoint(const DtUUID&);
165 
167  virtual DtSimObjectReference firstWaypoint() const;
168 
171  virtual void setSecondWaypoint(const DtUUID&);
172 
174  virtual DtSimObjectReference secondWaypoint() const;
175 
177  virtual void setReversePatrol(bool reverse);
178  virtual bool reversePatrol() const;
179 
182  virtual void setRoute(const DtUUID&);
183 
185  virtual DtSimObjectReference route() const;
186 
188  virtual void setUseFixedPitch(bool);
189  virtual bool useFixedPitch() const;
190 
193  virtual void setRouteVertices(const DtLocalVectorIterator& routeIterator);
194  virtual const DtLocalVertexList& routeVertices() const;
195 
197  virtual void emptyRouteVertices();
198 
201  virtual DtLocalVectorIterator* routeState() const;
202 
204  virtual void putSelf(std::string& fp, int indentLevel = 0, bool writeUnspecified = false,
205  const DtFilename& path = DtReaderWriter::appPath());
206 
208  virtual void resetRouteState();
209 
211  virtual void setMovingToAltitude(bool movingToAlt);
213  virtual bool movingToAltitude() const;
214 
216  virtual void setMoveToAltitudeValue(double altitude);
218  virtual double moveToAltitudeValue() const;
219 
222  virtual void setTurningToBeginApproachToRoute(bool);
223  virtual bool turningToBeginApproachToRoute() const;
224 
227 
228  virtual void setWaitingToSetMovementStatus(bool);
229  virtual bool waitingToSetMovementStatus() const;
231 
235  virtual void setInitTime(const double initTime);
236  virtual DtReal initTime() const;
238 
243  virtual void setAltitudeSpecified(const bool isSpecified);
244  virtual const bool isAltitudeSpecified() const;
246 
247 
248 public:
249 
251  static DtVrfProcessStateRepository* creator (const DtString& rwName,
252  DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
253 
254 protected:
256  virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths,
257  const DtVariableBindingsList& variableBindings) override;
258 
259 protected:
260 
264 
269 
273 
275 
280 
284 
291 
297 
301 
305 
313 
318 
326 
340 
344 
346 
348 
350 
353 
360 };
361 
double myMaxThrustAcceleration
Moved here from DtFixedWingPilotController (fixWngPltCtl.h)
Definition: fixedWingFlightPSR.h:268
UUID is a unique ID wrapper class.
Definition: uuid.h:59
DtRwReal myDistanceSquared
Definition: fixedWingFlightPSR.h:279
DtRwReal myPreviousAltitude
Intended to hold the previous altitude when flying or taxiing so the current altitude can be compared...
Definition: fixedWingFlightPSR.h:317
Definition: fixedWingFlightPSR.h:28
DtRwSimObjectReference myEntityToFollow
Moved here from DtFixedWingFollowEntityController (fixWngFolwCtl.h).
Definition: fixedWingFlightPSR.h:289
Definition: fixedWingFlightPSR.h:29
Definition: fixedWingFlightPSR.h:30
virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings) override
Top level to read itself from an input stream. searchPath is passed down to all DtReaderWriter member...
DtLocalVectorIterator * myRouteState
Route state used to get info about the current route we&#39;re trying to follow (e.g. which vertex to mov...
Definition: fixedWingFlightPSR.h:335
DtRwBoolean myBanking
Definition: fixedWingFlightPSR.h:277
DtRwBoolean myTurningToBeginApproachToRoute
Definition: fixedWingFlightPSR.h:345
Holds a position of some form. May be an absolute position, or a reference to another object...
Definition: rwPositionReference.h:21
DtRwReal myInitTime
Definition: fixedWingFlightPSR.h:351
DtRwBoolean myWaitingToSetMovementStatus
Definition: fixedWingFlightPSR.h:349
DtRwBoolean myCreatedControlPoint
Definition: fixedWingFlightPSR.h:352
File: lclVecIter.h.
Definition: localVectorIterator.h:25
DtRwReal myLocalAngularVelocity
Definition: fixedWingFlightPSR.h:271
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
DtRwReal mySpeedRatioSquared
Definition: fixedWingFlightPSR.h:272
DtRwVector myLandingDir
Definition: fixedWingFlightPSR.h:283
Definition: readerWriterRegistry.h:39
DtRwBoolean myApproachingVertex
Definition: fixedWingFlightPSR.h:276
Contains the DtUUID class declaration.
DtRwInt myCurrentVertex
Read/write variables to capture route state.
Definition: fixedWingFlightPSR.h:339
DtRwVector myNormalizedBodyVelocity
Definition: fixedWingFlightPSR.h:270
Definition: rwVector.h:23
Specialized reader/writer version of the shared object reference that will encapsulate the actual sha...
Definition: rwSimObjectReference.h:21
DtLocalVertexList myVertices
my copy of the current route
Definition: fixedWingFlightPSR.h:337
DtRwSimObjectReference myObjectToOrbit
If tasked() is true, this is the name of the object we&#39;re orbiting.
Definition: fixedWingFlightPSR.h:300
class DtFixedWingFlightPSR:
Definition: fixedWingFlightPSR.h:41
DtRwVector myTakeOffDestination
Definition: fixedWingFlightPSR.h:282
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
DtRwReal myTimeToEndOrbit
The time to end the current orbit task. Generally -1, which means the task is indefinite, but can be set when waiting at a hold point.
Definition: fixedWingFlightPSR.h:304
DtRwVector myTakeOffDir
Definition: fixedWingFlightPSR.h:281
Description: Readable, Writable int.
Definition: rwInt.h:25
DtRwVector myLoiterCircleCenter
Location of loiter circle center.
Definition: fixedWingFlightPSR.h:296
DtRwBoolean myClockwise
Definition: fixedWingFlightPSR.h:294
virtual DtVrfProcessStateRepository * clone(const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const =0
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
DtRwSimObjectReference myRoute
Moved here from DtFixedWingMoveAlongController (fixWngMvAlg.h).
Definition: fixedWingFlightPSR.h:332
DtRwReal myLastDistanceSquared
Definition: fixedWingFlightPSR.h:278
DtRwReal myRadius
Moved here from DtFixedWingDefaultController (fixWngDefCtl.h).
Definition: fixedWingFlightPSR.h:293
DtRwSimObjectReference mySecondWaypoint
Definition: fixedWingFlightPSR.h:324
virtual void putSelf(std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
Top level call to write itself to file. If write unspecified is true, will write entries that are uns...
DtRwBoolean myAltitudeSpecified
For the flight-command-controller: indicate whether an altitude has been specified, or the task can complete when the heading is achieved.
Definition: fixedWingFlightPSR.h:358
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
DtRwSimObjectReference myFirstWaypoint
Moved here from DtFixedWingPatrolBetweenController (fixWngPtlBtwn.h)
Definition: fixedWingFlightPSR.h:323
Definition: fixedWingFlightPSR.h:31
Class DtVrfProcessStateRepository: Abstract base class for all process state repositories. Process state repositories represent (potentially) shared, savable information for one or more components functioning together to achieve some process or set of processes; such as aiming and firing a weapon; moving an object; or just waiting a specified amount of time.
Definition: vrfProcessStateRepository.h:45
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
DtRwBoolean myUseFixedPitch
Definition: fixedWingFlightPSR.h:347
DtRwPositionReference myPositionReference
Moved here from DtFixedWingMoveToController (fixWngMvToCtl.h)
Definition: fixedWingFlightPSR.h:311
DtRwBoolean myMovingToAltitude
Indicates that a move-to-altitude is being processed.
Definition: fixedWingFlightPSR.h:342
DtRwVector myOffsetVector
Definition: fixedWingFlightPSR.h:290
DtRwInt myMovementStatus
Definition: fixedWingFlightPSR.h:312
virtual DtString type() const =0
Returns the string type of the repository, as defined in procSRTypes.h.
voidpf uLong offset
Definition: ioapi.h:42
class DtLocalVertexList:
Definition: localVertexList.h:20
DtRwBoolean myFinishing
Definition: fixedWingFlightPSR.h:274
DtFixedWingMovementStatus
Delineates the type of movement being performed by the FW entity during move to or move along tasks...
Definition: fixedWingFlightPSR.h:26
DtRwBoolean myReverseFlag
Definition: fixedWingFlightPSR.h:325
File: rwVector.h.
static const DtFilename & appPath()
Gets the current working directory. The first time this accessor is called, it determines the current...
const DtVrfProcessStateRepository & operator=(const DtVrfProcessStateRepository &orig)
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
DtRwReal myMoveToAltitudeValue
Definition: fixedWingFlightPSR.h:343

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)