VR-Forces 5.0.2 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 
12 #include "vrfobjcore/simObject.h"
13 #include <readerWriter/rwReal.h>
14 #include "readerWriter/rwVector.h"
15 #include <readerWriter/rwBoolean.h>
16 #include <readerWriter/rwString.h>
18 #include <readerWriter/rwInt.h>
20 #include <vrfutil/rwUUID.h>
21 
25 {
26  DtFWTaxiing = 0, //default if none specified during construction
30 };
31 
38 
41 {
42 public:
43 
46  const DtString& rwName = DtString::nullString(),
47  DtReaderWriterRegistry* parentRegistry = 0);
48 
51  const DtString& rwName = DtString::nullString(),
52  DtReaderWriterRegistry* parentRegistry = 0);
53 
55  virtual ~DtFixedWingFlightPSR();
56 
59 
62  const DtString& rwName = DtString::nullString(),
63  DtReaderWriterRegistry* parentRegistry = 0) const;
64 
67  virtual DtString type() const;
68 
70  virtual void setMaxThrustAccleration(double acceleration);
71  virtual double maxThrustAcceleration() const;
72 
73  virtual void setNormalizedBodyVelocity(const DtVector& velocity);
74  virtual const DtVector& normalizedBodyVelocity() const;
75 
76  virtual void setLocalAngularVelocity(double velocity);
77  virtual double localAngularVelocity() const;
78 
79  virtual void setSpeedRatioSquared(double value);
80  virtual double speedRatioSquared() const;
81 
82  virtual void setFinishing(bool flag);
83  virtual bool isFinishing() const;
84 
85  virtual void setApproachingVertex(bool flag);
86  virtual bool isApproachingVertex() const;
87 
88  virtual void setBanking(bool flag);
89  virtual bool isBanking() const;
90 
91  virtual void setLastDistanceSquared(double value);
92  virtual double lastDistanceSquared() const;
93 
94  virtual void setDistanceSquared(double value);
95  virtual double distanceSquared() const;
96 
97  virtual void setTakeOffDir(const DtVector& takeOffDir);
98  virtual const DtVector& takeOffDir() const;
99 
100  virtual void setLandingDir(const DtVector& landingDir);
101  virtual const DtVector& landingDir() const;
102 
104  virtual void setEntityToFollow(const DtUUID& objectName);
105  virtual DtSimObjectReference entityToFollow() const;
106 
109  virtual void setFollowOffsetVector(const DtVector& offset);
110  virtual const DtVector& followOffsetVector() const;
111 
114  virtual void setLoiterRadius(double radius);
115  virtual double loiterRadius() const;
116 
119  virtual void setLoiterClockwise(bool flag);
120  virtual bool loiterClockwise() const;
121 
123  virtual void setLoiterCenter(const DtVector& center);
124  virtual const DtVector& loiterCenter() const;
125 
127  virtual void setObjectToOrbit(const DtUUID&);
128 
129  virtual DtSimObjectReference objectToOrbit() const;
130 
132  virtual void setTimeToEndOrbit(double t);
133  virtual double timeToEndOrbit() const;
134 
137  virtual void setControlPoint(const DtUUID&);
138 
140  virtual DtSimObjectReference controlPoint() const;
141 
143  virtual void setCreatedControlPoint(bool);
144  virtual bool createdControlPoint() const;
145 
148  virtual void setMovementStatus(const DtFixedWingMovementStatus movementStatus);
149  virtual const DtFixedWingMovementStatus movementStatus() const;
150 
151  virtual void setPreviousAltitude(const double speed);
152  virtual const double previousAltitude() const;
153 
156  virtual void setFirstWaypoint(const DtUUID&);
157 
159  virtual DtSimObjectReference firstWaypoint() const;
160 
163  virtual void setSecondWaypoint(const DtUUID&);
164 
166  virtual DtSimObjectReference secondWaypoint() const;
167 
169  virtual void setReversePatrol(bool reverse);
170  virtual bool reversePatrol() const;
171 
174  virtual void setRoute(const DtUUID&);
175 
177  virtual DtSimObjectReference route() const;
178 
180  virtual void setUseFixedPitch(bool);
181  virtual bool useFixedPitch() const;
182 
185  virtual void setRouteVertices(const DtLocalVectorIterator& routeIterator);
186  virtual const DtLocalVertexList& routeVertices() const;
187 
189  virtual void emptyRouteVertices();
190 
193  virtual DtLocalVectorIterator* routeState() const;
194 
196  virtual void putSelf(std::string& fp, int indentLevel = 0, bool writeUnspecified = false,
197  const DtFilename& path = DtReaderWriter::appPath());
198 
200  virtual void resetRouteState();
201 
205  virtual void setWorldAimingPoint(const DtVector& pnt);
206  virtual const DtVector& worldAimingPoint() const;
207 
209  virtual void setMovingToAltitude(bool movingToAlt);
211  virtual bool movingToAltitude() const;
212 
214  virtual void setMoveToAltitudeValue(double altitude);
216  virtual double moveToAltitudeValue() const;
217 
220  virtual void setTurningToBeginApproachToRoute(bool);
221  virtual bool turningToBeginApproachToRoute() const;
222 
225 
226  virtual void setWaitingToSetMovementStatus(bool);
227  virtual bool waitingToSetMovementStatus() const;
229 
233  virtual void setInitTime(const double initTime);
234  virtual DtReal initTime() const;
236 
241  virtual void setAltitudeSpecified(const bool isSpecified);
242  virtual const bool isAltitudeSpecified() const;
244 
245 
246 public:
247 
249  static DtVrfProcessStateRepository* creator (const DtString& rwName,
250  DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
251 
252 protected:
253 
257 
262 
266 
268 
273 
276 
283 
289 
293 
297 
305 
310 
318 
332 
335 
339 
341 
343 
345 
348 
355 };
356 
double myMaxThrustAcceleration
Moved here from DtFixedWingPilotController (fixWngPltCtl.h)
Definition: fixedWingFlightPSR.h:261
UUID is a unique ID wrapper class.
Definition: rwUUID.h:229
DtRwVector myWorldAimingPoint
World point for move to location tasks.
Definition: fixedWingFlightPSR.h:334
DtRwReal myDistanceSquared
Definition: fixedWingFlightPSR.h:272
DtRwReal myPreviousAltitude
Intended to hold the previous altitude when flying or taxiing so the current altitude can be compared...
Definition: fixedWingFlightPSR.h:309
Definition: fixedWingFlightPSR.h:26
DtRwSimObjectReference myEntityToFollow
Moved here from DtFixedWingFollowEntityController (fixWngFolwCtl.h).
Definition: fixedWingFlightPSR.h:281
Definition: fixedWingFlightPSR.h:27
Definition: fixedWingFlightPSR.h:28
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:327
DtRwBoolean myBanking
Definition: fixedWingFlightPSR.h:270
DtRwBoolean myTurningToBeginApproachToRoute
Definition: fixedWingFlightPSR.h:340
DtRwReal myInitTime
Definition: fixedWingFlightPSR.h:346
DtRwBoolean myWaitingToSetMovementStatus
Definition: fixedWingFlightPSR.h:344
DtRwBoolean myCreatedControlPoint
Definition: fixedWingFlightPSR.h:347
File: lclVecIter.h.
Definition: localVectorIterator.h:25
DtRwReal myLocalAngularVelocity
Definition: fixedWingFlightPSR.h:264
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:265
DtRwVector myLandingDir
Definition: fixedWingFlightPSR.h:275
Definition: readerWriterRegistry.h:39
DtRwBoolean myApproachingVertex
Definition: fixedWingFlightPSR.h:269
Contains the DtUUID class declaration.
DtRwInt myCurrentVertex
Read/write variables to capture route state.
Definition: fixedWingFlightPSR.h:331
DtRwVector myNormalizedBodyVelocity
Definition: fixedWingFlightPSR.h:263
Definition: rwVector.h:23
Specialized reader/writer version of the shared object reference that will encapsulate the actual sha...
Definition: simObjectReference.h:74
DtLocalVertexList myVertices
my copy of the current route
Definition: fixedWingFlightPSR.h:329
DtRwSimObjectReference myObjectToOrbit
If tasked() is true, this is the name of the object we&#39;re orbiting.
Definition: fixedWingFlightPSR.h:292
class DtFixedWingFlightPSR:
Definition: fixedWingFlightPSR.h:40
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
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:296
DtRwVector myTakeOffDir
Definition: fixedWingFlightPSR.h:274
Description: Readable, Writable int.
Definition: rwInt.h:25
DtRwVector myLoiterCircleCenter
Location of loiter circle center.
Definition: fixedWingFlightPSR.h:288
DtRwBoolean myClockwise
Definition: fixedWingFlightPSR.h:286
virtual DtVrfProcessStateRepository * clone(const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const =0
DtRwSimObjectReference myRoute
Moved here from DtFixedWingMoveAlongController (fixWngMvAlg.h).
Definition: fixedWingFlightPSR.h:324
DtRwReal myLastDistanceSquared
Definition: fixedWingFlightPSR.h:271
DtRwReal myRadius
Moved here from DtFixedWingDefaultController (fixWngDefCtl.h).
Definition: fixedWingFlightPSR.h:285
DtRwSimObjectReference mySecondWaypoint
Definition: fixedWingFlightPSR.h:316
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:353
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
DtRwSimObjectReference myFirstWaypoint
Moved here from DtFixedWingPatrolBetweenController (fixWngPtlBtwn.h)
Definition: fixedWingFlightPSR.h:315
Definition: fixedWingFlightPSR.h:29
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:342
DtRwBoolean myMovingToAltitude
Indicates that a move-to-altitude is being processed.
Definition: fixedWingFlightPSR.h:337
DtRwVector myOffsetVector
Definition: fixedWingFlightPSR.h:282
DtRwInt myMovementStatus
Definition: fixedWingFlightPSR.h:304
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:267
DtFixedWingMovementStatus
Delineates the type of movement being performed by the FW entity during move to or move along tasks...
Definition: fixedWingFlightPSR.h:24
DtRwBoolean myReverseFlag
Definition: fixedWingFlightPSR.h:317
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
DtRwSimObjectReference myControlObject
Moved here from DtFixedWingMoveToController (fixWngMvToCtl.h)
Definition: fixedWingFlightPSR.h:303
DtRwReal myMoveToAltitudeValue
Definition: fixedWingFlightPSR.h:338

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)