DtVreGimbalController extends the base sensor gimbal controller with VRE-specific functionality. It manages the rotation of sensor gimbals to aim sensors at targets, handles laser designation, and provides mechanisms for object tracking. The controller supports both joystick-controlled and AI-controlled gimbal movement.
#include <vreGimbalController.h>
|
| | DtVreGimbalController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
| |
| virtual | ~DtVreGimbalController () override |
| |
| virtual const char * | type () const override |
| |
| virtual void | calcAndSetPortValues (const DtString &functionGroup, const DtString &function, double value, bool repeat) override |
| |
| virtual bool | findLocationOfSensorAiming (const DtVector &location, const DtTaitBryan &orientation, DtVector &aimingPoint) const override |
| |
| virtual const makVrf::DtLaserDesignatorStateComponent * | lookupDesignator () const |
| |
| virtual void | processSetAimGimbal (DtSimMessage *msg) override |
| |
| virtual void | updateDesignatorLocation () |
| |
| virtual void | tick () override |
| |
| virtual bool | targetPoint (const DtTaitBryan &orientation, DtVector &location) const override |
| |
| | DtVreSimComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
| |
| virtual | ~DtVreSimComponent () |
| |
| bool | isPlayerControlled (const std::string &role="") const |
| |
| DtString | entitySystemName () const |
| |
|
| static DtSimComponent * | creator (const DtString &name, DtLocalObject *object, DtSimulationServices *simManager, DtComponentDescriptor *compDescriptor, DtReaderWriterRegistry *parentRegistry) |
| |
◆ DtVreGimbalController() [1/3]
| makVre::DtVreGimbalController::DtVreGimbalController |
( |
const DtString & | name, |
|
|
DtLocalObject * | owner, |
|
|
DtSimulationServices * | simManager, |
|
|
DtComponentDescriptor * | desc = 0, |
|
|
DtReaderWriterRegistry * | parentRegistry = 0 ) |
Constructor.
- Parameters
-
| name | The name of this component |
| owner | The local object that owns this component |
| simManager | The simulation services manager |
| desc | Component descriptor with configuration parameters |
| parentRegistry | Optional parent registry for reader/writer functionality |
Creates a new gimbal controller component with the specified parameters.
Referenced by DtVreGimbalController(), and operator=().
◆ ~DtVreGimbalController()
| virtual makVre::DtVreGimbalController::~DtVreGimbalController |
( |
| ) |
|
|
overridevirtual |
Virtual destructor.
Cleans up resources used by the gimbal controller component.
◆ DtVreGimbalController() [2/3]
| makVre::DtVreGimbalController::DtVreGimbalController |
( |
| ) |
|
|
private |
Default constructor (not implemented)
Default constructor is private and not implemented to prevent creation of instances without proper initialization.
◆ DtVreGimbalController() [3/3]
Copy constructor (not implemented)
Copy constructor is private and not implemented to prevent copy construction.
References DtVreGimbalController().
◆ type()
| virtual const char * makVre::DtVreGimbalController::type |
( |
| ) |
const |
|
overridevirtual |
Gets the type identifier for this component.
- Returns
- String identifying the component type (DtVreGimbalControllerType)
Implements the DtSimComponent::type() method to return the type identifier for this component.
◆ calcAndSetPortValues()
| virtual void makVre::DtVreGimbalController::calcAndSetPortValues |
( |
const DtString & | functionGroup, |
|
|
const DtString & | function, |
|
|
double | value, |
|
|
bool | repeat ) |
|
overridevirtual |
Calculates and sets port values based on function input.
- Parameters
-
| functionGroup | The function group identifier |
| function | The specific function name |
| value | The input value to process |
| repeat | Flag indicating whether the function should repeat |
Processes input from function ports (typically joystick inputs) and applies the appropriate transforms to control the gimbal movement.
◆ findLocationOfSensorAiming()
| virtual bool makVre::DtVreGimbalController::findLocationOfSensorAiming |
( |
const DtVector & | location, |
|
|
const DtTaitBryan & | orientation, |
|
|
DtVector & | aimingPoint ) const |
|
overridevirtual |
Finds the world location that a sensor is aiming at.
- Parameters
-
| location | The geocentric location of the sensor |
| orientation | The orientation of the sensor |
| aimingPoint | Output parameter that will contain the aiming point if found |
- Returns
- True if an aiming point was successfully found, false otherwise
Determines the world location that a sensor is currently aiming at, based on the sensor's location, orientation, and internal configuration.
◆ lookupDesignator()
| virtual const makVrf::DtLaserDesignatorStateComponent * makVre::DtVreGimbalController::lookupDesignator |
( |
| ) |
const |
|
virtual |
Chooses an appropriate laser designator object as the target to engage.
- Returns
- Pointer to the selected designator component, or NULL if no valid target found
Searches for and selects an appropriate laser designator object to engage as a target. Uses targetDesignatorValid() to check if each potential target is valid. This method enables sensors to track laser-designated targets.
◆ processSetAimGimbal()
| virtual void makVre::DtVreGimbalController::processSetAimGimbal |
( |
DtSimMessage * | msg | ) |
|
|
overridevirtual |
Processes a message to set the gimbal aim direction.
- Parameters
-
| msg | Pointer to the simulation message containing aim parameters |
Handles messages requesting to set the aiming direction of the gimbal. Extracts the target aiming information from the message and applies it to the gimbal controller.
◆ updateDesignatorLocation()
| virtual void makVre::DtVreGimbalController::updateDesignatorLocation |
( |
| ) |
|
|
virtual |
Updates the current laser designator target location.
Refreshes the stored location of the current laser designator target. This keeps the gimbal controller's understanding of the target position up to date for accurate tracking.
◆ tick()
| virtual void makVre::DtVreGimbalController::tick |
( |
| ) |
|
|
overridevirtual |
Updates the controller state each simulation frame.
Overridden to allow object tracking while in joystick mode. This method is called each simulation frame to update the gimbal orientation based on current tracking targets and input controls.
◆ targetPoint()
| virtual bool makVre::DtVreGimbalController::targetPoint |
( |
const DtTaitBryan & | orientation, |
|
|
DtVector & | location ) const |
|
overridevirtual |
Determines the target point based on orientation and maximum laser range.
- Parameters
-
| orientation | The orientation to calculate the target point from |
| location | Output parameter that will contain the target point if found |
- Returns
- True if a target point was successfully found, false otherwise
Overridden to respect the maximum range of the laser when determining target points. Calculates the point in world space that corresponds to the given orientation and the configured maximum laser range.
◆ aimSensorAtPoint()
| virtual void makVre::DtVreGimbalController::aimSensorAtPoint |
( |
const DtVector & | worldLocation | ) |
|
|
overrideprotectedvirtual |
Aims the sensor at a specified world location.
- Parameters
-
| worldLocation | The geocentric world location to aim at |
Attempts to adjust the gimbal orientation so that the sensor is aimed at the specified world location. Calculates the appropriate azimuth and elevation angles to achieve the desired aiming point.
◆ operator=()
Assignment operator (not implemented)
- Returns
- Reference to this object
Assignment operator is private and not implemented to prevent assignment.
References DtVreGimbalController().
◆ creator()
| static DtSimComponent * makVre::DtVreGimbalController::creator |
( |
const DtString & | name, |
|
|
DtLocalObject * | object, |
|
|
DtSimulationServices * | simManager, |
|
|
DtComponentDescriptor * | compDescriptor, |
|
|
DtReaderWriterRegistry * | parentRegistry ) |
|
static |
Factory method to create a new instance of this component.
- Parameters
-
| name | The name for the new component |
| object | The local object that will own this component |
| simManager | The simulation services manager |
| compDescriptor | Optional component descriptor |
| parentRegistry | Optional parent registry for reader/writer functionality |
- Returns
- Pointer to the newly created component
Static factory method used by the component creation system to instantiate new instances of this component type.
◆ checkDistance()
| double makVre::DtVreGimbalController::checkDistance |
( |
| ) |
const |
|
protected |
Gets the current terrain check distance.
- Returns
- The current distance to check for terrain intersections
Returns the current distance value used for terrain intersection checks. Used to handle terrain loading latency issues by progressively checking at different distances.
◆ increaseCheckDistance()
| void makVre::DtVreGimbalController::increaseCheckDistance |
( |
| ) |
const |
|
protected |
Increases the terrain check distance.
Increments the terrain check distance when a previous check fails. Helps handle terrain loading latency by progressively increasing the check distance until terrain is found or the maximum is reached.
◆ resetCheckDistance()
| void makVre::DtVreGimbalController::resetCheckDistance |
( |
| ) |
const |
|
protected |
Resets the terrain check distance to the minimum value.
Resets the terrain check distance back to the minimum configured value. Called when starting a new series of terrain checks.
◆ myVreGimbalDescriptor
| DtVreGimbalControllerDescriptor* makVre::DtVreGimbalController::myVreGimbalDescriptor |
|
protected |
Pointer to the gimbal controller descriptor.
Contains the configuration parameters for this gimbal controller component.
◆ myMinCheckDistance
| double makVre::DtVreGimbalController::myMinCheckDistance |
|
protected |
Minimum distance for terrain intersection checks.
The starting (minimum) distance used for terrain intersection checks. This is the initial value used when resetting the check distance.
◆ myCurrentCheckDistance
| double makVre::DtVreGimbalController::myCurrentCheckDistance |
|
mutableprotected |
Current distance for terrain intersection checks.
The current distance being used for terrain intersection checks. May be modified during runtime as checks are performed.
◆ myMaxCheckDistance
| double makVre::DtVreGimbalController::myMaxCheckDistance |
|
protected |
Maximum distance for terrain intersection checks.
The maximum distance to use for terrain intersection checks. Once this value is reached, no further increases will occur.
◆ myLaserCode
| int makVre::DtVreGimbalController::myLaserCode |
|
protected |
Laser code for designation.
The code used for laser designation. This helps identify specific laser designators when multiple are present in the simulation.
◆ myContinuousTrack
| bool makVre::DtVreGimbalController::myContinuousTrack |
|
protected |
Flag indicating whether continuous tracking is enabled.
When true, indicates that the gimbal should continuously track the target, even in joystick control mode.
The documentation for this class was generated from the following file: