![]() |
VR-Forces Developer's Guide
|
DtAutomotiveActuatorComponent provides a kinematics-based model of an automotive system.
End User Description: The DtAutomotiveActuatorComponent converts throttle, brake, and steering into orientation, acceleration, velocity, and position.

Public Member Functions | |
| DtAutomotiveActuatorComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| virtual | ~DtAutomotiveActuatorComponent () override |
| virtual bool | init () override |
| virtual const char * | type () const override |
| virtual void | tick () override |
Public Member Functions inherited from DtActuatorComponent | |
| virtual | ~DtActuatorComponent () override |
| virtual DtSimRadio * | radio () |
| virtual bool | tickWhileDestroyed () const override |
Public Member Functions inherited from DtSimComponent | |
| DtSimComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| virtual | ~DtSimComponent () override |
| virtual void | setParentSystem (DtComponentSystem *system) |
| DtComponentSystem * | parentSystem () const |
| virtual bool | postAddComponentsInit () |
| virtual void | registerAttributeFunctions () |
| virtual void | preFirstTickInit () |
| virtual void | postTick () |
| virtual void | timedTick () |
| virtual void | setMinTickPeriod (double minTickPeriod, double minTickPeriodVariance) |
| virtual void | setupFirstTickTime () |
| virtual void | setEntity (DtLocalObject *entity) |
| virtual DtSimComponent * | nextComponent () |
| virtual DtSimComponent * | prevComponent () |
| virtual void | setListItem (DtListItem *item) |
| virtual DtListItem * | listItem () |
| virtual void | putData (std::string &fp, int indentLevel=0) override |
| virtual DtlObjPtr | getData (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings) override |
| virtual void | addInputPort (DtInputPort *port) |
| virtual void | removeInputPort (DtInputPort *port) |
| virtual DtInputPort * | lookupInputPort (const DtString &portName) |
| virtual DtList | inputPortList () const |
| virtual void | addOutputPort (DtOutputPort *port) |
| virtual void | removeOutputPort (DtOutputPort *port) |
| virtual DtOutputPort * | lookupOutputPort (const DtString &portName) |
| virtual DtList | outputPortList () const |
| virtual void | addInputPortGroup (DtInputPortGroup *group) |
| virtual void | removeInputPortGroup (DtInputPortGroup *group) |
| virtual DtInputPortGroup * | lookupInputPortGroup (const DtString &groupName) |
| virtual DtList | inputPortGroupList () const |
| virtual void | addOutputPortGroup (DtOutputPortGroup *group) |
| virtual void | removeOutputPortGroup (DtOutputPortGroup *group) |
| virtual DtOutputPortGroup * | lookupOutputPortGroup (const DtString &groupName) |
| virtual DtList | outputPortGroupList () const |
| virtual int | priority () const |
| virtual void | setPriority (int priority) |
| double | dT () const |
| virtual void | setDT (double deltaT) |
| virtual void | setComponentDescriptor (DtComponentDescriptor *componentDescriptor) |
| virtual const DtComponentDescriptor * | componentDescriptor () const |
| DtString | toString (const DtEntityType &entityType) const |
| DtVrfProcessStateRepositoryManager * | psrManager () |
| virtual const DtSymbolString & | componentFullName () const |
| DtPhysicalWorld * | physicalWorld () |
| const DtPhysicalWorld * | physicalWorld () const |
| const DtAttachedTerrain * | terrainAttachedTo () const |
| DtLocalObject * | entity () |
| const DtLocalObject * | entity () const |
| DtSimulationServices * | simulationServices () |
| const DtSimulationServices * | simulationServices () const |
| const Coordinate_System * | coordinateSystem () const |
| virtual void | isClutterChanged () |
| virtual bool | taskVisualizationsActive () const |
| virtual bool | taskVisualizationsEnabled () const |
| virtual void | onRestore () |
| makVrf::DtTaskVisualizationMap & | taskVisualizations () |
| virtual void | updateImgui () |
| virtual bool | debugActive () const |
| virtual void | enable () |
| virtual void | disable () |
| virtual bool | isEnabled () |
| virtual void | setIsEnabled (bool yesNo) |
| virtual DtOutputStream & | objectConsoleDebug (const DtString &channel="") const |
| virtual DtOutputStream & | objectConsoleVerbose (const DtString &channel="") const |
| virtual DtOutputStream & | objectConsoleInfo (const DtString &channel="") const |
| virtual DtOutputStream & | objectConsoleWarn (const DtString &channel="") const |
| virtual DtOutputStream & | objectConsoleError (const DtString &channel="") const |
| virtual int | notifyLevel () const |
| virtual DtSimResourceManager & | resourceManager () |
| virtual const DtSimResourceManager & | resourceManager () const |
| VRF4API_METHOD const DtSimulationServices * | simManager () const |
Public Member Functions inherited from DtReaderWriter | |
| DtReaderWriter () | |
| DtReaderWriter (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false) | |
| DtReaderWriter (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false) | |
| DtReaderWriter (const DtString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL) | |
| DtReaderWriter (const DtSymbolString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL) | |
| DtReaderWriter (const DtReaderWriter &, DtReaderWriterRegistry *parentRegistry=NULL) | |
| const DtReaderWriter & | operator= (const DtReaderWriter &orig) |
| bool | operator== (const DtReaderWriter &) const |
| bool | operator!= (const DtReaderWriter &rhs) const |
| virtual | ~DtReaderWriter () |
| virtual void | putSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename()) |
| virtual void | postPutSelf () |
| virtual void | prePutSelf () |
| virtual void | getSelf (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference()) |
| virtual void | postGetSelf () |
| virtual void | preGetSelf () |
| virtual void | writeSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename()) |
| virtual DtSymbolString | name () const |
| virtual void | addAlias (const DtSymbolString &alias) |
| virtual void | addAlias (const DtString &alias) |
| virtual bool | hasAlias (const DtSymbolString &alias) |
| virtual const aliasContainer & | aliases () const |
| virtual void | setReadonly (bool flag) |
| bool | isReadonly () const |
| virtual void | reset () |
| virtual int | alignment () const |
| virtual bool | variableIsBound () const |
| virtual void | unbindVariable () |
| virtual void | setName (const DtString &) |
| virtual const char * | readerWriterType () const |
| virtual const char * | xmlType () const |
| virtual DtString | prettyPrint () const |
| std::string | debugText () const |
| virtual void | bindVariables (DtVariableBindingsList variableBindings) |
| virtual std::list < DtVariableNameType > | unboundVariables () const |
| bool | invalid () const |
| virtual bool | hasChild (const DtReaderWriter *p) const |
| virtual bool | hasVariableReference () const |
| virtual void | bindLocalVariables (const DtVariableBindingsList &variableBindings) |
| virtual void | recordUpdateTime () const |
| virtual bool | changedSinceLastChecked () |
| virtual bool | peekChangedSinceLastChecked () const |
| virtual void | setValueSpecified (bool specified, bool recurse=false) |
| virtual bool | valueSpecified () const |
| virtual bool | isVariableReference () const |
| virtual void | setIsVariableReference (bool value) |
| virtual void | clearAllVariableReferenceFlags () |
| virtual DtSymbolString | variableName () const |
| virtual void | setVariableName (const DtSymbolString variableName) |
| virtual const DtReaderWriter * | defaultRWValue () const |
| virtual DtReaderWriter * | defaultRWValue () |
| virtual void | setDefaultRWValue (DtReaderWriter *) |
| virtual bool | checkAndSetDefaultRWValue (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference()) |
| const DtReaderWriterRegistry & | registry () const |
| DtReaderWriterRegistry & | registry () |
| virtual DtPropertyInterface * | property () |
| virtual const DtPropertyInterface * | property () const |
| virtual DtString | toXml () const |
| virtual DtRwVariableBindings * | generateVariableBindings () const |
| virtual bool | toXml (const DtFilename &) const |
| virtual bool | fromXml (const DtString &) |
| virtual bool | fromXmlFile (const DtFilename &) |
| virtual void | putSelf (DtEnvironmentSP, DtEnvValueSP parent) const |
| virtual void | putData (DtEnvironmentSP, DtEnvValueSP value) const |
| virtual void | putVariableReference (DtEnvironmentSP, DtEnvValueSP value) const |
| virtual void | getSelf (const DtEnvironmentSP, const DtEnvValueSP root, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList()) |
| virtual void | getData (const DtEnvironmentSP, const DtEnvValueSP, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList()) |
| virtual void | unrecognizedItem (const DtEnvironmentSP env, const DtEnvValueSP root, const SearchPaths &searchPaths, const DtVariableBindingsList &varBindings) |
| virtual void | getVariableReference (DtEnvironmentSP, DtEnvValueSP value) |
Protected Member Functions | |
| virtual void | updateRepository (const DtVector &localPosition, const DtVector &localVelocity, const DtVector &localAcceleration, const DtTaitBryan &localOrientation, const DtVector &rotationalVelocity, double newHeading) |
| virtual double | calculateMaxDecelerationFromBrake (double brake) |
| virtual double | calculateAccelerationFromEngine (double throttle, double speed, DtAutoTransmissionGear gear, double pitch) |
| virtual void | calculateOrientationAndPosition (const DtVector &newLocalProjectedLocation, double newHeading, DtDcm &newLocalOrientation, DtVector &newLocalPosition) |
| virtual double | calculateHeading (const double oldHeading, const DtAutoTransmissionGear gear, const double steering, const double throttle, const double distanceMovedFwd, const double forwardSpeed, const double maxTractionAcceleration, const double soilDragFactor, const double dT, double &curvature) |
| virtual DtVector | calculateBodyAcceleration (double throttle, DtAutoTransmissionGear gear, double brake, const DtVector &oldBodyVelocity, double oldPitch, double maxTractionAcceleration, double mobilityFactor, double dT) |
| virtual DtVector | calculateBodyVelocity (const DtVector &oldBodyVelocity, const DtVector &newBodyAcceleration, double dT) |
| virtual DtVector | calculateProjectedLocation (const DtVector &oldLocalPosition, const DtVector &newBodyAcceleration, const DtVector &oldBodyVelocity, double newHeading) |
| virtual DtVector | calculateProjectedLocationNoPivot (const DtVector &oldLocalPosition, const DtVector &newBodyAcceleration, const DtVector &oldBodyVelocity, double newHeading, const double signedCurvature) |
| virtual double | calculateMaxSpeed () |
| virtual double | calculateMaxAcceleration () |
| virtual void | calculateDirectionOfLinearMotion (const DtDcm &newLocalOrientation, const DtVector &newLocalPosition, DtDcm &newLocalDirectionOfLinearMotion) |
| virtual bool | createPortGroups () override |
| virtual bool | createPorts () override |
| virtual bool | createPSR () |
| virtual bool | rotationalVelocityShouldBeClamped (const DtVector &bodyRotationalVelocity) |
| virtual bool | checkIfMoveOntoEmbarked (const DtVector &localPosition) |
| virtual bool | checkAndDisembarkIfEmbarked (const DtVector &localPosition) |
Fuel Usage | |
| virtual void | useFuel (double fuelUsed) |
| virtual double | fuelLeft () const |
| virtual double | fuelUsed (double speed) const |
Soil and Weather Effects | |
| virtual double | accelSoilFactor () const |
| virtual double | decelSoilFactor () const |
| virtual DtString | soilTypeString () const |
| virtual const DtSoilFactors * | soilFactors (const DtString &soilType) const |
| virtual void | calculateFactorsFromSoilAndWeather (const DtVector &location, double &tractionFactor, double &dragFactor) |
| virtual double | calculateMaximumTractionAcceleration (const double tractionFactor) |
| virtual double | calculateSoilDragDeceleration (const double dragFactor, const double speed) |
| virtual double | calculateAccelerationFromSlope (double pitch) |
| virtual double | slopeBoostRate () const |
| virtual void | setSlopeBoostRate (const double boost) |
| virtual double | calculateSlopeBoostRate () |
Ground Clamping | |
| virtual bool | useHighFidelityGroundClamping () const |
| virtual bool | useNavDataGroundClamping () |
| bool | groundClamp (double heading, const DtVector &location, DtAttachedTerrain &terrain, DtVector &newNormal, bool &dataAvailable) |
| void | groundClampHighFidelity (double heading, const DtVector &location, DtAttachedTerrain &terrain, DtVector &newNormal, bool &dataAvailable) |
| void | groundClampLowFidelity (double heading, const DtVector &location, DtAttachedTerrain &terrain, DtVector &newNormal, bool &dataAvailable) |
| void | groundClampWithNavData (double heading, const DtVector &location, DtAttachedTerrain &terrain, DtVector &newNormal) |
Terrain Collisions | |
| virtual bool | checkForTerrainCollisions () const |
| virtual bool | foundTerrainCollision (double heading, const DtVector &oldLocalPosition, const DtVector &newLocalPosition, DtVrfChordIntersectionRecord &collisionIntersectionRecord) const |
| virtual bool | createMovementChord (DtChord &movementChord, double heading, const DtVector &oldLocalPosition, const DtVector &newLocalPosition) const |
| virtual bool | terrainPassable (double heading, const DtVrfChordIntersectionRecord &terrainIntersectionRecord) const |
Port Input Values | |
| virtual double | steeringControlValue () const |
| virtual double | throttleControlValue () const |
| virtual double | brakeControlValue () const |
| virtual DtAutoTransmissionGear | gearControlValue () const |
| virtual bool | parkingBrakeControlValue () const |
Protected Member Functions inherited from DtActuatorComponent | |
| DtActuatorComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| virtual void | setRadio (DtSimRadio *radio) |
| DtActuatorComponent () | |
Protected Member Functions inherited from DtSimComponent | |
| virtual void | setupTimedTickLogic (double minTickPeriod, double minTickPeriodVariance) |
| virtual double | computeCurrentTime () |
| bool | testInvariant () const |
| DtVrfProcessStateRepository * | createComponentPsr (const DtString &defaultPsrType, const DtString &defaultPsrName, bool useDescriptorParams=true) |
| virtual void | updateTaskVisualizations () |
| virtual void | destroyTaskVisualizations () |
| virtual void | destroyTaskVisualization (const DtString &name) |
| virtual makVrf::DtPointTaskVisualizationPtr | pointTaskVisualization (const DtString &name) |
| virtual makVrf::DtLineTaskVisualizationPtr | lineTaskVisualization (const DtString &name) |
| virtual makVrf::DtAreaTaskVisualizationPtr | areaTaskVisualization (const DtString &name) |
| virtual makVrf::DtTextTaskVisualizationPtr | textTaskVisualization (const DtString &name) |
| double | calculateNextTaskVisTickTime () const |
| DtVrfObjectStateRepository * | localStateRepository () |
| const DtVrfObjectStateRepository * | localStateRepository () const |
| DtPropertyInterface * | cachedNextFrameStateProperty (DtPropertyInterface **prop, const DtString &propName) |
| template<typename ValType > | |
| void | setCachedNextFrameStatePropertyValue (DtPropertyInterface **prop, const DtString &propName, ValType value) |
| const DtPropertyInterface * | cachedCurrentFrameStateProperty (const DtPropertyInterface **prop, const DtString &propName) const |
| template<typename ValType > | |
| bool | getCachedCurrentFrameStatePropertyValue (const DtPropertyInterface **prop, const DtString &propName, ValType &value) const |
| void | addSimObjectPredicateCallback (DtSimObjectReference simObject, DtVrfObjectPredicateCallbackFunction function, const DtVrfObjectPredicate &predicate, DtTime evaluationPeriod=0, void *userData=0) |
| void | removeSimObjectPredicateCallback (const DtSimObject *simObject, DtVrfObjectPredicateCallbackFunction function, const DtVrfObjectPredicate &predicate, DtTime evaluationPeriod=0, void *userData=0) |
| void | invokeSimObjectPredicateCallbacks () |
| virtual void | clearPredicateCallbacks () |
Protected Member Functions inherited from DtReaderWriter | |
| virtual void | bindToRwAsVariable (const DtReaderWriter *rw) |
Private Member Functions | |
| DtAutomotiveActuatorComponent () | |
| DtAutomotiveActuatorComponent (const DtAutomotiveActuatorComponent &orig) | |
| const DtAutomotiveActuatorComponent & | operator= (const DtAutomotiveActuatorComponent &orig) |
Terrain Change Handler | |
| void | processTerrainChangeNotification (const DtTerrainChangeNotificationInfo &terrainChangeInfo) |
| static void | terainChangeNotification (const DtTerrainChangeNotificationInfo &terrainChangeInfo, void *usr) |
| DtAutomotiveActuatorComponent::DtAutomotiveActuatorComponent | ( | const DtString & | name, |
| DtLocalObject * | owner, | ||
| DtSimulationServices * | simManager, | ||
| DtComponentDescriptor * | desc = 0, |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) |
| name | Reader writer name of this component. |
| owner | The DtLocalObject that owns this component |
| simManager | The simulation manager (provides access to terrain, message interface, simulation clock). |
| desc | The component descriptor used to initialize this component. |
| parentRegistry | Pointer to the parent reader writer registry (the containing object that reads/writes this object). |
|
overridevirtual |
destructor
|
private |
Default constructor; not implemented.
|
private |
Copy constructor; not implemented.
|
overridevirtual |
Calls createPSR() to create our process state repository.
Reimplemented from DtActuatorComponent.
Reimplemented in MyActuatorComponent.
|
overridevirtual |
Returns a string identifies the class type of component. Type values are defined in compTypes.h. DtSimComponent creation functions are registered with the DtSimComponentFactory using the type values as the key. Warning: this function should always return the same pointer and it should be valid forever. This means the data should be static.
Implements DtSimComponent.
Reimplemented in MyActuatorComponent.
|
overridevirtual |
Calculate new kinematic state.
Reimplemented from DtSimComponent.
Reimplemented in MyActuatorComponent.
|
static |
| name | Reader writer name of this component. |
| owner | The DtLocalObject that owns this component |
| simManager | The simulation manager (provides access to terrain, message interface, simulation clock). |
| desc | The component descriptor used to initialize this component. |
| parentRegistry | Pointer to the parent reader writer registry (the containing object that reads/writes this object). |
|
protectedvirtual |
Looks up the resource named “fuel” in the entity's Resource Manager. If the resource is not found, useFuel() just returns. If the resource is found, the amount of fuel passed as the argument to useFuel() is deducted from the resource. When the resource reaches 0, a warning is printed (using DtWarn).
| fuelUsed | Amount of fuel to deplete. |
|
protectedvirtual |
Looks up the resource named “fuel” in the entity's Resource Manager. If the resource is not found, it returns an appropriately large constant to implement unlimited fuel. Otherwise, the value of the resource is returned.
Based on the entities speed, from the fuel efficiency value (m/l) calculate the liter amount of fuel used.
|
protectedvirtual |
Updates the local state repository: It places the position, velocity, acceleration, and orientation arguments into the local repository. It puts the heading into the repository. It calculates the current speed from the velocity vector passed and sets that value in the local repository. It calculates the distance traveled this frame (speed * dT) and uses that and the fuel consumption ground vehicle parameter to determine the fuel used, and then calls useFuel().
| localPosition | Position in local (database) coordinates in meters. |
| localVelocity | Velocity in local (database) coordinates in meters/second. |
| localVelocity | Velocity in local (database) coordinates in meters/second/second. |
| localOrientation | Local orientation of entity in radians. |
| rotationalVelocity | In radians/second. |
| newHeading | In radians. |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Returns the soil type under the groundCenter interaction point.
|
protectedvirtual |
|
protectedvirtual |
Calculates factors affecting drag of the soil and limits on traction based on soil type and weather. The factors are constrained to be between 0.01 and 1.0.
| location | Entity location in local coordinates. |
| tractionFactor | Output factor. 1.0 = perfect traction, 0 = no traction. |
| dragFactor | Output factor. 1.0 = no soil drag; 0 = high soil drag. |
|
protectedvirtual |
Calculates the maximum traction force available. This is the max that can be used for acceleration or braking, or lateral acceleration. Computed from maxStoppingAcceleration * tractionFactor.
|
protectedvirtual |
Calculates the drag acceleration caused by the drag factor. Normally the dragFactor comes from calculateFactorsFromSoilAndWeather. The calculation multiplies a constant by speed^2 x (1-factor)/factor. Factor values below 0.01 are treated as 0.01. The constant in 0.02, estimated empirically.
|
protectedvirtual |
| pitch | is the inclination of the ground as an angle in radians. |
|
protectedvirtual |
Slope boost rate– entity parameters provide a max acceleration, which is related to max power, but also a max slope. If max acceleration indicates the max forward force the vehicle can generate, then that would determine the max slope (i.e. max slope = asin(max acceleration/g)). Since max slope is given separately, that must indicate the force available, apparently through low gearing. The boost rate is the amount that the engine acceleration is boosted to allow the vehicle to maintain at least 1mps on slopes up to the maximum slope. Note that acceleration (torque, really) is limited by traction, so even with this boost the vehicle may not be able to drive on its max slope if the vehicle does not have enough traction.
|
protectedvirtual |
|
protectedvirtual |
Calculate the boost rate for an entity, based on their allowed max acceleration and the maximum slope they are supposed to be able to climb. Since the actuator computes acceleration from a = f(throttle, speed, max acceleration) - slope acceleration, where f is the engine acceleration, we provide a boost to f so that it remains > slope acceleration up to max slope.
Boost = pitch / (max pitch) * (slope acceleration at max slope - f at 1 mps) * throttle. This boost will allow the vehicle to maintain 1 mps speed at full throttle at its max slope. The value of Boost/slope/throttle is computed and set in init().
|
protectedvirtual |
Calculates the orientation and position of the entity, given a new location and heading. Checks for intersections with the terrain, to determine altitude and orientation (from support points) from 1/4 of the height of the entity's bounding volume as a rough approximation of the entity's wheel's or tread (or knees).
|
protectedvirtual |
|
protectedvirtual |
|
protected |
Clamps the entity to the ground at the specified location, and determines the normal of the plane the entity is on at that location.
The type of ground clamping also depends on the entity's configuration. Either high or low fidelity ground clamping is performed as specified.
|
protected |
Uses all four ground interaction points to determine the plane of the entity and the soil type. The left, right, and other support points are used to determine the plane, and the returned normal is the normal to that plane.
|
protected |
Uses only the center ground interaction point. The normal is the normal of the polygon on which the center point sits. And the soil type is also the polygon's. This requires fewer intersection tests with the terrain, but also may return an incorrect normal if the entity is sitting across several polygons.
|
protected |
Uses nav data for ground clamping. Only used in certain circumstances when nav data is not readily available.
|
protectedvirtual |
Determines the new heading given the steering input and speed.
| oldHeading | In radians. |
| gear | DtAutoTransmission value for the current gear. |
| steering | Input value in [-1, 1] for steering. Note that when steering = -1 or 1, the vehicle should steer at its minimum turn radius. |
| throttle | Input value in [0, 1] for throttle setting. This is only used if the vehicle is pivoting. |
| distanceMovedFwd | The distance moved along the body x axis this tick, i.e. v dt + 1/2 a dt^2. Given a turn radius determined by the steering input, this determines how much the heading changes. |
| forwardSpeed | The maximum forward speed this tick. I.e., if the vehicle is accelerating, v +- a dt. This speed is used to determine the minimum turn radius for the tick (considering the max lateral acceleration available). |
| maxTractionAcceleration | The maximum acceleration that can be applied to the ground by the wheels/tracks forward, backward, or laterally. Always positive. |
| soilDragFactor | A value in [0, 1] that indicates the amount of drag caused by the soil, where 1 = no (extra) drag. Used only when the vehicle is pivoting. |
|
protectedvirtual |
Calculates the linear acceleration in body coordinates of the entity in meters/second/second. Calls following functions for components of the acceleration: calculateAccelerationFromEngine() calculateAccelerationFromSlope() calculateMaxDecelerationFromBrake()
|
protectedvirtual |
|
protectedvirtual |
Updates the position of the entity based on the current velocity and acceleration. Returns the new location in local coordinates.
|
protectedvirtual |
Computes the new location for a vehicle that can't pivot. In this case, the point between the rear wheels (support points) is moved.
|
protectedvirtual |
|
protectedvirtual |
Checks the terrain in between the specified old and new positions, along the specified heading for any terrain intersections.
|
protectedvirtual |
Creates a chord along the specified heading, starting at the old position and ending at the new position, but each location is increased by the half height of the entity so that the check is done along the center of the entity's movement. Additionally, the chord is extended in the heading direction by the half-length of the entity to ensure that collision with the front of the entity and not just the center, are detected.
|
protectedvirtual |
Determines if the terrain referenced in the intersection record is "passable" by the entity. Currently, just looks at the slope of the terrain. If the slope is greater than 80 degrees, the terrain is considered impassable.
|
protectedvirtual |
Returns either max speed or max reverse speed from entity parameters. Does not consider soil effects–the max speed reduction factor in the descriptor is no longer used (deprecated). Max speed is instead reduced from the soil drag (acceleration factor).
|
protectedvirtual |
Calculates the maximum acceleration for the entity, considering soil factors.
|
protectedvirtual |
Computes direction of linear motion. In base class, this is equivalent to newLocalOrientation, so it sets newLocalDirectionOfLinearMotion = newLocalOrientation.
|
overrideprotectedvirtual |
Creates the local port groups.
Reimplemented from DtSimComponent.
|
overrideprotectedvirtual |
Creates the input ports and adds them to the component.
Reimplemented from DtSimComponent.
|
protectedvirtual |
Creates myProcessState data member, and adds it to our process state repository manager. Passes in the name and type specified in the component descriptor (if they exist) to the DtVrfProcessStateRepository::createRepository factory method. If name and/or type is not specified, uses the appropriate default strings defined in psrTypes.h.
|
protectedvirtual |
Returns true if given magnitude of body rotational velocity is < 0.0001 radians/sec, false otherwise. Called in tick() to determine whether or not to clamp small values for velocity to zero.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Check to see if there are any entities at the location given that can be moved onto for embarkation. If ther are then check to see if they are intersected. Return true if is.
|
protectedvirtual |
|
staticprotected |
Callback for terrain change notifications.
| terrainChangeInfo | - provides the info for the terrain change - i.e. spatial extent, type of the change |
| usr | this |
|
protected |
Checks to see if entity is within the spatial extents of the terrain change notification and if so sets the terrain change flag so that the correct position and orientation will be set during the tick() method.
| spatExtent | the spatial extents in local coordinates for change |
|
private |
assignment operator; not implemented
|
protected |
Input Port Name: throttle
Input Port Description:
Input Port Range:
Input Port Default Value: 0
Input Group Parent:
|
protected |
Input Port Name: steering
Input Port Description:
Input Port Range: -1.0 to 1.0
Input Port Default Value: 0
Input Group Parent:
|
protected |
Input Port Name: brake
Input Port Description:
Input Port Range: 0.0 to 1.0
Input Port Default Value: 0
Input Group Parent: automotive-control.
|
protected |
Input Port Name: gear
Input Port Description:
Input Port Default Value: 0
Input Port Range: Reverse, Neutral, Forward, Pivot
Input Group Parent: automotive-control.
|
protected |
Input Port Name: parking-brake
Input Port Description:
Input Port Range:
Input Port Default Value: True (Brake On)
Input Group Parent: automotive-control.
|
protected |
Input Port Group Name: automotive-control
Input Port Group Description: Provides input to the automotive actuator (powertrain).
|
protected |
Input Port Name: clamp-to-nav-data
Input Port Description: Tells the actuator that it should temporarily use nav data for ground clamping rather than the terrain.
Input Port Range:
Input Port Default Value: False
.
|
protected |
|
protected |
Container for state data associated with this component. This state is saved and restored as part of a scenario (or checkpoint).
|
protected |
Port group used to set what values should be set into the VRF state repository. All values are in local coordinates.
|
protected |
This flag is used to clarify that an embarked entity is stopped (on its parent). If true, the output position and orientation ports will be set to the current next frame parent values, preventing any drift wrt the parent.
|
protected |
This flag is used to clarify that an embarked entity is stopped (on its parent). If true, the output position and orientation ports will be set to the current next frame parent values, preventing any drift wrt the parent.
|
protected |
This flag is used to clarify that an embarked entity is stopped (on its parent). If true, the output position and orientation ports will be set to the current next frame parent values, preventing any drift wrt the parent.
|
protected |
This flag is used to clarify that an embarked entity is stopped (on its parent). If true, the output position and orientation ports will be set to the current next frame parent values, preventing any drift wrt the parent.
|
protected |
This flag is used to clarify that an embarked entity is stopped (on its parent). If true, the output position and orientation ports will be set to the current next frame parent values, preventing any drift wrt the parent.
|
protected |
This flag is used to clarify that an embarked entity is stopped (on its parent). If true, the output position and orientation ports will be set to the current next frame parent values, preventing any drift wrt the parent.
|
protected |
This flag is used to clarify that an embarked entity is stopped (on its parent). If true, the output position and orientation ports will be set to the current next frame parent values, preventing any drift wrt the parent.
|
protected |
Member to allow for access to platform specific data.
|
protected |
A flag that is set if the terrain has been altered.
|
protected |
A flag to indicate that data was not available when querying terrain during a terrain update so that it will continue to try to adjust for the terrain update when the data is available.
|
protected |
Indicates whether a message has been printed about being stuck.
|
protected |
A flag to indicate that data was not available when querying terrain for soil type so that we do not accidentally return a soil type that halts movement.