VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
passiveSonarSensor.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
13 
14 class DtVrfEmitterSystem;
17 class DtSimMessage;
18 class DtVrfObjectMessage;
20 
32 {
33 private:
36 
39  orig);
40 
42  const DtPassiveSonarSensor & operator=(const
43  DtPassiveSonarSensor & orig);
44 
45 public:
46 
49  DtPassiveSonarSensor(const DtString& name,
50  DtLocalObject* owner,
51  DtSimulationServices* simManager,
52  DtComponentDescriptor* desc = 0,
53  DtReaderWriterRegistry* parentRegistry = 0);
54 
56  virtual ~DtPassiveSonarSensor() override;
57 
58  virtual bool init() override;
59 
60  virtual void tick() override;
61 
64  virtual const char* type() const override;
65 
67  virtual int sensorType() const override;
68 
69  static void setSonarDepthCallback(DtSimMessage * msg, void * usrData);
70  virtual void processSetSonarDepth(DtSimMessage * msg);
71 
72  virtual double sonarDepth() const;
73  virtual void setSonarDepth(double depth);
74  virtual void setSonarToEntityDepth();
75 
76  virtual DtVector localSonarLocation() const;
77 
78  virtual bool sonarInWater() const;
79 
81  virtual double apparentSignature(DtSimObjectReference object,
82  bool losValueIfTerrainUnavailable, double sensorSensitivity) const override;
83 
87  static DtSimComponent * creator(const DtString& name,
88  DtLocalObject* owner,
89  DtSimulationServices* simManager,
90  DtComponentDescriptor* desc = 0,
91  DtReaderWriterRegistry* parentRegistry = 0);
92 
93 protected:
96  virtual bool detectObject(DtSimObjectReference object, DtRwSensorContactInfo* contactInfo) override;
97 
101  DtRwSensorContactInfo* contactInfo,
102  bool& contactInfoModified) override;
103 
105  virtual const char* defaultPSRType() const override;
106 
107 protected:
108 
113  virtual bool sonarCanDetectObjects();
114 
115 protected:
120 
124 };
const DtSignatureObjectSensor & operator=(const DtSignatureObjectSensor &orig)
assignment operator; not implemented
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
virtual const char * defaultPSRType() const override
DtPassiveSonarSensorPSR * myPassiveSonarPSR
DtObjectSensor's myProcessState cast to our PSR type. This class will not new or delete this object...
Definition: passiveSonarSensor.h:119
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
bool mySonarCanDetectThisTickCalculated
Definition: passiveSonarSensor.h:123
Definition: readerWriterRegistry.h:39
This class represents the data gathered by a sensor about a particular single sensor contact...
Definition: rwSensorContactInfo.h:68
virtual double apparentSignature(DtSimObjectReference object, bool losValueIfTerrainUnavailable, double sensorSensitivity) const
Returns the apparent signature of the specified object using sensorSignatureManager::apparentObjectSi...
Process State Repository for the DtPassiveRadarSensor component.
Definition: passiveSonarSensorPSR.h:16
DtVrfEmitterSystem manages a VR-Link emitter system publisher, and sets all the values associated wit...
Definition: vrfEmitterSystem.h:40
virtual void tick() override
Overridden from base class to update myLocalSensorPosition (using localSensorPosition()) at the start...
DtPassiveSonarSensorDescriptor; descriptor for the DtPassiveSonarSensor component.
Definition: passiveSonarSensorDescriptor.h:19
A sensor component which uses the VR-Forces Sensor Signature model for detecting object.
Definition: signatureObjectSensor.h:41
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
File: simMsg.h.
Definition: simMessage.h:35
bool mySonarCanDetectThisTick
flag used to optimize multiple calls to sonarCanDetectObjects() in a single tick
Definition: passiveSonarSensor.h:122
The base class for all messages to/from a specific DtVrfObject. Various subclasses of this class will...
Definition: vrfObjectMessage.h:30
virtual bool init() override
Calls createPSR(), createDetectableObjectList(), createAndInitSensorMonitor() and initSensorGeometry(...
virtual const char * type() const override
Returns a string identifies the class type of component. Type values are defined in compTypes...
ContinueDetectingResult
Definition: objectSensor.h:69
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
The central class of a DtLocalObject for all communications to and from the object. This class manages all communications on a specific DtLocalObject, though both simulation internal communication, and communication though the simulated radios of the object. All communication is done though the use of the DtVrfObjectMessage class and its subclasses. Callbacks can be registered on this interface which will be called on receipt of a message by this entity. Messages can be sent from this entity by using the message sending functions. These messages may be sent though the SimInternal message mechanism, or the radio message system. Radios will not exist until createRadiosFromDescriptorList() or createRadiosFromDescriptorList(const DtRadioDescriptorList& descList) is called.
Definition: vrfObjectCommunicationInterface.h:40
virtual bool detectObject(DtSimObjectReference object, DtRwSensorContactInfo *contactInfo) override
Returns true if object is detected. Calls apparentSignature to determine what the object's signature ...
const DtPassiveSonarSensorDescriptor * myPassiveSonarSensorDescriptor
Definition: passiveSonarSensor.h:116
virtual int sensorType() const override
Returns the enumerated type of this sensor. It is based on the sensor domain string. "radar" maps to DtSenorTypeRadar. "visual" maps to DtSensorTypeVisual. "sonar" maps to DtSensorTypeSonar. "infrared" maps to DtSensorTypeInfrared. Anything else maps to DtSensorTypeUnknown.
virtual ContinueDetectingResult continueDetectingObject(DtSimObjectReference object, DtRwSensorContactInfo *contactInfo, bool &contactInfoModified) override
Same as detectObject except it is checking for objects we had previously detected. In this case the amount of time that this object has been detected by the sensor will be factored in when determining the identification level. Again returns true if the object is still detected and the contact info is updated. If there were changes in the contact info, contactInfoModified will be true.
DtPassiveSonarSensor.
Definition: passiveSonarSensor.h:31
A locally simulated VRF object.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)