20 #include <boost/ptr_container/ptr_vector.hpp>
35 #define ALTITUDE_CHANGE_INCREMENT 304.8
37 namespace MAKVRinTerra
39 class DtFeatureGeometry;
61 virtual bool init()
override;
64 virtual bool createPSR();
67 virtual const char*
type()
const override;
70 virtual void tick()
override;
78 virtual void setOrderedAltitude(
double altitude,
bool aboveGroundLevel =
false);
93 static bool setHaltMovementForObstacles(
void* controller,
DtReaderWriter* value);
98 static bool setObstacleQueryName(
void* controller,
DtReaderWriter* value);
117 virtual DtVector calculateProjectedLocation(
118 const DtVector& oldLocalPosition,
const DtVector& newBodyVelocity,
122 virtual std::string calculateOrientationAndPosition(
123 const DtVector& newLocalProjectedLocation,
double newHeading,
124 DtDcm& newLocalOrientation, DtVector& newLocalPosition);
128 virtual void calculateFuelUsage(
129 double distanceTraveled,
134 virtual std::string adjustToTerrain(
135 double heading,
const DtVector& location, DtVector& newNormal);
137 virtual void updateRepository(
const DtVector & position,
138 const DtVector & velocity,
const DtVector & acceleration,
139 const DtTaitBryan & localOrientation,
const DtVector& rotationalVelocity);
146 static void setObstacleToIgnore(
DtSimMessage* msg,
void* usr);
150 virtual void processObstacleToIgnore(
DtSimMessage* msg);
163 virtual bool haveSupplies(
ErrorStream &errorStream)
const;
169 virtual double scriptModifier()
const;
173 virtual double scriptAdjustment()
const;
179 double& slope)
const;
182 virtual double retrogradeMovementModifier()
const;
193 virtual bool checkPassedDestination(
const DtVector& currentPosition, DtVector& newLocalProjectedPosition);
211 virtual void setAircraftAirborne(
const DtVector& location);
302 typedef boost::ptr_vector<MobilityArea>
Vector;
324 template <
typename T>
333 return myStream.str();
Represents a set of DtFeature objects or others which conform to the DtFeature concept.
Definition: featureSet.h:105
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
std::string str() const
Definition: aggregatedMovementActuator.h:331
MAKVRinTerra::DtFeatureSet FeatureSet
Feature set type.
Definition: aggregatedMovementActuator.h:293
DtAnalogInputPort * myAltitudeInputPort
Input Port Name: desired-altitude Input Port Description: Desired altitude to move towards (MSL)...
Definition: aggregatedMovementActuator.h:268
Description: This repository holds all information that is common to all the forms of all objects wit...
Definition: vrfMovingObjectStateRepository.h:31
Definition: aggregatedMovementActuatorPSR.h:24
const DtActuatorComponent & operator=(const DtActuatorComponent &orig)
assignment operator
DtSetDataManager * mySetDataManager
Ref to set data manager.
Definition: aggregatedMovementActuator.h:290
End User Description: Actuator for moving aggregated aggregates along the ground. This actuator place...
Definition: aggregatedMovementActuator.h:47
A convenience for recording error messages during a tick.
Definition: aggregatedMovementActuator.h:319
End User Description: DtActuatorComponentDescriptor contains parameters common to all actuator compon...
Definition: actuatorComponentDescriptor.h:47
const MobilityEntry & myEntry
Definition: aggregatedMovementActuator.h:310
bool myErrorCondition
Set to true once the error stream message is displayed, so we don't display over and over...
Definition: aggregatedMovementActuator.h:347
bool empty() const
Definition: aggregatedMovementActuator.h:335
Definition: readerWriter.h:85
const DtActuatorComponentDescriptor * myBaseActuatorDescriptor
Convenience pointers to our descriptors.
Definition: aggregatedMovementActuator.h:285
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
std::unique_ptr< FeatureSet > myEngineeringObjFeatureSet
Set of engineering object features that can affect mobility.
Definition: aggregatedMovementActuator.h:350
DT_DLL_features std::ostream & operator<<(std::ostream &, const DtFeatureTransform &)
std::ostream output.
Definition: readerWriterRegistry.h:39
End User Description: DtActuator is the base class for all actuator model components. Developer Description: The DtActuator base class caches a pointer to the entity's radio for convenience. Derived classes may have articulated parts that are configured from the DtActuatorComponentDescriptor's DtSimArtPartDescriptorList. For each articulated part in the list a DtArticulatedPartStateRepository will be created to store the data for the part such as it's location, rotation and so forth. These are created in the entity's DtVrfObjectStateRepository createParts() function. This call creates all the attached parts for all the actuators. These articulated state repositories are managed by the DtAttachmentManager. They are cached by their partType which is the DIS Enumeration describing the part from the disEnums.h file and was specified in the actuator's DtActuatorComponentDescriptor as descriped above. The partType is used as the category of the DtEntityType used to look up articulated parts in the DtAttachementManager. When an actuator needs access to a particular articulated part it looks it up by the part's object type.
Definition: actuatorComponent.h:47
const DtAggregatedMovementDescriptor * myActuatorDescriptor
Convenience pointers to our descriptors.
Definition: aggregatedMovementActuator.h:286
DtVrfMovingObjectStateRepository * myMovingObjectStateRep
Convenience pointers to our state repository.
Definition: aggregatedMovementActuator.h:280
boost::optional< double > myPrep_desiredAltitude
Definition: aggregatedMovementActuator.h:237
Object which hold the mobility entry and the feature set which represents it.
Definition: aggregatedMovementActuator.h:299
DtVector myPrep_newBodyRotationalVelocity
Definition: aggregatedMovementActuator.h:235
std::stringstream myStream
Definition: aggregatedMovementActuator.h:341
DtAggregateLocalObjectFacade myAggregateLocalObjectFacade
Member to allow for access to aggregate specific data.
Definition: aggregatedMovementActuator.h:363
DtBooleanInputPort * myRetrogradeInputPort
Definition: aggregatedMovementActuator.h:356
File: simMsg.h.
Definition: simMessage.h:35
virtual bool init() override
Overridden to cache a pointer to the entity's radio in this class.
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
DtAnalogInputPort * myMovementDirectionInputPort
Input Port Name: desired-movement-direction Input Port Description: Desired movement direction of the...
Definition: aggregatedMovementActuator.h:249
DtAggregatedMovementDescriptor is the descriptor for DtAggregatedMovementActuator.
Definition: aggregatedMovementDescriptor.h:20
DtTerrainInterface allows access to common terrain calls without having to know the terrain implement...
Definition: terrainInterface.h:93
DtVector myPrep_oldBodyVelocity
Definition: aggregatedMovementActuator.h:232
DtAnalogInputPort * mySpeedInputPort
Input Port Name: desired-speed Input Port Description: Desired speed of the entity in m/s...
Definition: aggregatedMovementActuator.h:256
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
DtTaitBryan myPrep_newLocalOrientationTb
Definition: aggregatedMovementActuator.h:236
virtual bool createPortGroups()
Called by init. Derived classes should override this method to create all their input/output port gro...
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
std::unique_ptr< FeatureSet > myEngineeringObjObstacleFeatureSet
Set of engineering object features that should be considered obstacles for which we should halt...
Definition: aggregatedMovementActuator.h:354
DtVectorInputPort * myDestinationInputPort
Output Port Name: destination Output Port Description: Specifies the current destination of the entit...
Definition: aggregatedMovementActuator.h:275
This class manages the distribution of DtSetDataRequests within a single DtLocalObject. Components of the object, or other parts of the code, register interested in particular types of set data messages and when such a message is processed by the DtSetDataManager, each of the registered parties is notified.
Definition: setDataManager.h:48
ReaderWriter class which represents one terrain mobility entry.
Definition: aggregatedMovementDescriptor.h:24
MobilityArea::Vector myMobilityAreas
List of mobility areas.
Definition: aggregatedMovementActuator.h:315
DtTaitBryan myPrep_oldLocalOrientationTb
Definition: aggregatedMovementActuator.h:231
DtVector myPrep_oldLocalPosition
Values preprocessed for use in tick /////////////////////!
Definition: aggregatedMovementActuator.h:229
bool myEmptyFlag
Definition: aggregatedMovementActuator.h:342
DtAggregatedMovementActuatorPSR * myProcessState
Pointer to a process state repository used to store state data associated with this component...
Definition: aggregatedMovementActuator.h:360
DtVector myPrep_newLocalPosition
Definition: aggregatedMovementActuator.h:233
ErrorStream()
Definition: aggregatedMovementActuator.h:322
std::unique_ptr< FeatureSet > myFeatureSet
Definition: aggregatedMovementActuator.h:311
Definition: vrfAggregateStateRepository.h:21
boost::ptr_vector< MobilityArea > Vector
Definition: aggregatedMovementActuator.h:302
DtAggregatedMovementDescriptor::MobilityEntry MobilityEntry
Type which contains info on one type of mobility area.
Definition: aggregatedMovementActuator.h:296
Represents a feature geometry.
Definition: featureGeometry.h:40
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
DtVector myPrep_newRelativeVelocity
Definition: aggregatedMovementActuator.h:234
A locally simulated VRF object.
Definition: localObject.h:98
DtInputPortGroup * myMovementControlPortGroupInputPortGroup
Input Port Group Name: movement-control Input Port Group Description: Collection of inputs specifying...
Definition: aggregatedMovementActuator.h:261
DtVector myPrep_oldLocalVelocity
Definition: aggregatedMovementActuator.h:230