forked from stpaine/FERS
-
Notifications
You must be signed in to change notification settings - Fork 1
Radar Object Hierarchy
David Young edited this page Apr 30, 2025
·
1 revision
This defines the core C++ class inheritance structure for simulation entities involved in radar operations.
- A base
Objectclass provides fundamental properties like an associatedPlatform(for position/motion) and aName. - The
Radarclass inherits fromObjectand adds common radar-related attributes: anAntennapointer, aTimingsource pointer, an_attachedpointer (primarily for linkingTransmitterandReceiverin monostatic configurations), and multipath-related flags/pointers (_dual,_multipath_factor). - Specific
TransmitterandReceiverclasses inherit fromRadar, adding properties and methods unique to transmitting or receiving operations (e.g., PRF settings, signal references, windowing parameters, noise temperature).
- Assumes the
Platform*provided duringObjectconstruction is valid and its lifetime exceeds that of theObjectinstance. - Assumes the
Antenna*andTiming*pointers assigned via setter methods (setAntenna,setTiming) are valid and their referenced objects remain valid for theRadarobject's lifetime. - Assumes the multipath dual creation logic (e.g.,
createMultipathDualBase) correctly clones or assigns necessary properties when creating_dualobjects. - Assumes the
setAttachedmethod is primarily intended for and used correctly with Monostatic radar pairs, linking oneRadarobject (e.g., Tx) to another (e.g., Rx).
-
Raw Pointer Ownership (
_attached,_dual): The_attachedmember inRadarand the_dualpointers inTransmitter/Receiverare raw pointers. This creates potential ownership ambiguity β it's unclear if the object holding the pointer owns the pointed-to object or is merely observing it. This complicates lifetime management. -
Raw Pointer Dependencies (
_antenna,_timing,_signal): Key dependencies like_antenna,_timing(inRadar) and potentially_signal(inTransmitter, depending on implementation details not fully shown) are stored as raw pointers. This requires careful external management to ensure the pointed-to objects (Antenna, Timing, Signal) outlive theRadar/Transmitterobjects using them, otherwise dangling pointers can occur. -
Noise Temperature Inheritance: The
Radar::getNoiseTemperaturemethod is virtual. The base implementation delegates to the associated_antenna->getNoiseTemperature(). TheReceiver::getNoiseTemperatureoverride adds its own_noise_temperaturevalue to the antenna's contribution. While functional, this specific inheritance pattern for combining noise sources should be noted.
- Classes:
Object,Radar,Transmitter,Receiver,Platform,Antenna,Timing - Headers:
object.h,radar_obj.h,transmitter.h,receiver.h,platform.h - Logic: Multipath Dual Object Creation
-
Needs Verification:
- Robustness against potential dangling pointers due to lifetime mismatches of dependencies (
Platform,Antenna,Timing,Signal,_attached,_dual). - Correctness of property cloning/sharing during multipath dual object creation.
- Correct behavior of
getNoiseTemperatureinReceivervs. baseRadar. - Proper handling and intended usage of the
_attachedpointer, especially in non-monostatic or complex scenarios.
- Robustness against potential dangling pointers due to lifetime mismatches of dependencies (
-
Key Areas for Validation:
- Test scenarios involving object destruction order (e.g., destroying an Antenna before the Radar using it).
- Test scenarios involving multipath to ensure dual objects have correctly mirrored/assigned properties (
Antenna,Timing, etc.). - Tests explicitly checking the noise temperature calculation via
getNoiseTemperaturefor Receivers with and without inherent noise temp values. - Tests involving monostatic setups to confirm
setAttachedlinkage works as expected.
- Priority: Medium (Core structure exists, but pointer safety and complex interactions warrant validation)