|
VR-Engage
2.2
|
DtVreSimpleRadarObjectSensor extends the base radar object sensor to provide target tracking and designation capabilities specifically for air targets. It manages the radar antenna state for tracking, supports different radar modes (TWS - Track While Scan and STT - Single Target Track), and maintains prioritized lists of designated targets.
The sensor provides information about detected targets including their position, velocity, and classification, and supports selecting specific targets for tracking and weapons guidance.
#include <vreSimpleRadarObjectSensor.h>
Public Member Functions | |
| DtVreSimpleRadarObjectSensor (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| virtual | ~DtVreSimpleRadarObjectSensor () override |
| virtual bool | init () override |
| virtual const char * | type () const override |
| virtual void | tick () override |
| virtual bool | detectObject (DtSimObjectReference object, DtRwSensorContactInfo *contactInfo) override |
| virtual ContinueDetectingResult | continueDetectingObject (DtSimObjectReference object, DtRwSensorContactInfo *contactInfo, bool &contactInfoModified) override |
Public Member Functions inherited from makVre::DtVreRadarObjectSensor | |
| DtVreRadarObjectSensor (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| virtual | ~DtVreRadarObjectSensor () override |
| virtual int | sensorType () const override |
| virtual bool | createAndInitSensorMonitors () override |
| virtual bool | createAndInitRadarSettingsMonitor () |
| virtual void | processSetRadarSettings (DtSimMessage *msg) |
Public Member Functions inherited from makVre::DtVreSimComponent< DtRadarObjectSensor > | |
| 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 Public Member Functions | |
| static DtSimComponent * | creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
Static Public Member Functions inherited from makVre::DtVreRadarObjectSensor | |
| static void | setRadarSettingsCallback (DtSimMessage *msg, void *usrData) |
| static DtReaderWriter * | provideDesignatedTargetCallback (void *usrData) |
Protected Member Functions | |
| void | updateAntennaState () |
| void | incrementBar () |
| bool | targetShouldBeDetected (int trackId) |
| double | azimuthToTargetInDegrees (DtSimObjectReference target) |
| double | elevationToTargetInDegrees (DtSimObjectReference target) |
| bool | updateContactData (DtSimObjectReference target, DtRwRadarContactInfo *targetInfo) |
| virtual DtReaderWriter * | processProvideDesignatedTarget () override |
| virtual const char * | defaultPSRType () const override |
| virtual int | trackID (const DtUUID &id) |
| virtual const DtUUID & | uuidFromTrackId (int trackId) |
| std::string | entityLabelFromType (const DtEntityType &) |
| virtual void | setDesignatedTargets (const std::vector< int > &trackId) override |
| virtual void | clearDesignatedTargets () override |
| int | targetPriority (int trackId) const |
| bool | isTargetDesignated (int trackId) const |
| int | nextToShootTarget () const |
| bool | singleTrackTargetMode () const |
Protected Member Functions inherited from makVre::DtVreRadarObjectSensor | |
| virtual void | updateDetectionArea () |
| virtual void | registerAttributeFunctions () override |
Protected Attributes | |
| std::unordered_map< std::string, DtRwString > | myKnownEntityLabels |
| std::unordered_map< int, bool > | myTargetDetectionState |
| DtVreSimpleRadarObjectSensorPSR * | myVreSimpleRadarObjectSensorPsr |
Protected Attributes inherited from makVre::DtVreRadarObjectSensor | |
| DtRadarStateMonitor * | myRadarStateMonitor |
| const DtVreRadarObjectSensorDescriptor * | myRadarObjectDescriptor |
| DtVreRadarObjectSensorPSR * | myRadarObjectPsr |
Private Member Functions | |
| DtVreSimpleRadarObjectSensor () | |
| DtVreSimpleRadarObjectSensor (const DtVreSimpleRadarObjectSensor &orig) | |
| const DtVreSimpleRadarObjectSensor & | operator= (const DtVreSimpleRadarObjectSensor &orig) |
|
private |
Default constructor (not implemented)
Default constructor is private and not implemented to prevent creation of instances without proper initialization.
Referenced by DtVreSimpleRadarObjectSensor(), and operator=().
|
private |
Copy constructor (not implemented)
Copy constructor is private and not implemented to prevent copy construction.
References DtVreSimpleRadarObjectSensor().
| makVre::DtVreSimpleRadarObjectSensor::DtVreSimpleRadarObjectSensor | ( | const DtString & | name, |
| DtLocalObject * | owner, | ||
| DtSimulationServices * | simManager, | ||
| DtComponentDescriptor * | desc = 0, | ||
| DtReaderWriterRegistry * | parentRegistry = 0 ) |
Constructor.
| 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 simple radar object sensor component with the specified parameters.
|
overridevirtual |
Virtual destructor.
Cleans up resources used by the simple radar object sensor component.
|
private |
Assignment operator (not implemented)
Assignment operator is private and not implemented to prevent assignment.
References DtVreSimpleRadarObjectSensor().
|
overridevirtual |
Initializes the radar sensor component.
Performs component initialization, including setting up the radar sensor parameters and process state repository. Called during component creation.
Reimplemented from makVre::DtVreRadarObjectSensor.
|
overridevirtual |
Gets the type identifier for this component.
Implements the DtSimComponent::type() method to return the type identifier for this component.
Reimplemented from makVre::DtVreRadarObjectSensor.
|
overridevirtual |
Updates the radar sensor state each simulation frame.
Updates the antenna state for target tracking and calls the base class tick method to process standard radar operations. Manages target tracking, designation, and updates radar contact information based on current sensor mode and detected objects.
Reimplemented from makVre::DtVreRadarObjectSensor.
|
overridevirtual |
Determines if an object should be detected by the radar.
| object | Reference to the object being evaluated for detection |
| contactInfo | Output parameter to receive contact information if detected |
Evaluates whether the specified object should be detected by the radar sensor based on range, radar cross-section, and other factors. If detected, populates the contactInfo parameter with information about the contact.
|
overridevirtual |
Determines if an already detected object should remain detected.
| object | Reference to the previously detected object |
| contactInfo | Output parameter with contact information to update |
| contactInfoModified | Output parameter indicating if contactInfo was modified |
Evaluates whether a previously detected object should continue to be detected by the radar sensor. Updates contact information if the object remains detected and sets contactInfoModified to true if changes were made.
|
static |
Factory method to create a new instance of this component.
| name | The name for the new component |
| owner | The local object that will own this component |
| simManager | The simulation services manager |
| desc | Optional component descriptor |
| parentRegistry | Optional parent registry for reader/writer functionality |
Static factory method used by the component creation system to instantiate new instances of this component type.
|
protected |
Updates the radar antenna position and state.
Updates the radar antenna position and state based on the current tracking mode and target information. Manages antenna rotation in scanning modes and fixed pointing in single-target tracking mode.
|
protected |
Increments the radar scan bar counter.
Increments the counter that tracks the current scan bar position in the radar scanning pattern. Used to simulate radar scan patterns across elevation bars.
|
protected |
Determines if a tracked target should be detected based on radar modes.
| trackId | The track identifier of the target to check |
Evaluates whether a target with the specified track ID should be detected based on the current radar mode (e.g., in STT mode, only the designated target should be detected).
|
protected |
Calculates the azimuth angle to a target.
| target | Reference to the target object |
Calculates the azimuth angle (horizontal angle) from the radar to the specified target object, in degrees. Used for determining if the target is within the current radar scan sector.
|
protected |
Calculates the elevation angle to a target.
| target | Reference to the target object |
Calculates the elevation angle (vertical angle) from the radar to the specified target object, in degrees. Used for determining if the target is within the current radar scan bar.
|
protected |
Updates the contact information for a detected target.
| target | Reference to the target object |
| targetInfo | Pointer to the contact information to update |
Updates the radar contact information for a detected target with current data such as position, velocity, and track quality. Returns true if any information was changed.
|
overrideprotectedvirtual |
Provides information about the currently designated target.
Implements the base class method to provide information about the currently designated target (highest priority target in the designated target list). Used by other components to identify which target the radar is currently prioritizing for tracking or weapons guidance.
Implements makVre::DtVreRadarObjectSensor.
|
overrideprotectedvirtual |
Gets the default process state repository type.
Returns the default process state repository type for this component. Overrides the base class method to provide the specialized PSR type for the simple radar object sensor.
Reimplemented from makVre::DtVreRadarObjectSensor.
|
protectedvirtual |
Gets the track ID for a target entity.
| id | UUID of the target entity |
Retrieves or assigns a track ID for the entity with the specified UUID. Track IDs are unique identifiers used to reference detected targets in the radar system.
|
protectedvirtual |
Gets the entity UUID corresponding to a track ID.
| trackId | The track ID to look up |
Retrieves the entity UUID associated with the specified track ID. This performs the reverse lookup of trackID(), converting a radar track identifier back to the corresponding entity UUID.
|
protected |
Determines a display label for an entity based on its type.
| DtEntityType | Entity type to get a label for |
Creates a human-readable label for an entity based on its type code. Used to generate display names for radar contacts in the user interface.
|
overrideprotectedvirtual |
Sets the list of designated targets for the radar.
| trackId | Vector of track IDs to designate, in priority order |
Sets the designated targets list and updates the emitter system's track targets. The order of track IDs in the vector represents their priority, with the first element being the highest priority target. Overrides the base class method.
Implements makVre::DtVreRadarObjectSensor.
|
overrideprotectedvirtual |
Clears all designated targets from the radar.
Clears the designated targets list and the emitter system's track targets. This removes all current target designations, restoring the radar to a standard search/track state. Overrides the base class method.
Implements makVre::DtVreRadarObjectSensor.
|
protected |
Gets the priority of a designated target.
| trackId | The track ID to check for priority |
Returns the target's position in the designated targets list, where 1 represents the highest priority target. If the specified track ID is not in the designated targets list, returns -1 to indicate it is not designated.
|
protected |
Checks if a target is in the designated targets list.
| trackId | The track ID to check |
Determines whether the specified track ID is present in the designated targets list. Returns true if the target is designated, false otherwise.
|
protected |
Gets the highest priority designated target's track ID.
Returns the track ID of the first target in the designated targets list, which represents the Next To Shoot (NTS) target with highest priority. This is effectively the only designated target in STT (Single Target Track) mode. Returns -1 if the designated targets list is empty.
|
protected |
Checks if the radar is in Single Track Target mode.
Determines whether the radar is currently in STT (Single Track Target) mode. In this mode, only the designated target (as returned by nextToShootTarget()) should be tracked. This contrasts with TWS (Track While Scan) mode where multiple targets can be tracked simultaneously.
|
protected |
Cache of entity labels by entity type string.
Stores previously looked up entity labels indexed by entity type string. Used to avoid repeating the entity label lookup for commonly encountered entity types.
|
protected |
Map of detection states indexed by track ID.
Tracks the detection state of each target by its track ID. The boolean value indicates whether the target is currently detected (true) or not (false). Used to manage continuity of detection between simulation frames.
|
protected |
Pointer to the radar sensor's process state repository.
Contains the persistent state information for the radar sensor, including tracking settings, antenna position, and designated targets.