forked from stpaine/FERS
-
Notifications
You must be signed in to change notification settings - Fork 1
Multipath Dual Object Creation
David Young edited this page Apr 30, 2025
·
1 revision
This mechanism uses a core template function, createMultipathDualBase, to generate "dual" Transmitter or Receiver objects. These dual objects represent the geometric reflection of an original radar object via a defined MultipathSurface. The process mirrors key properties from the original object to its dual, creates a corresponding dual Platform if one doesn't already exist for the reflection, and handles attached objects (e.g., in a monostatic pair) recursively. These dual objects allow the main simulation loop to calculate single-bounce multipath interactions using the standard simulation functions, simply by treating the dual object as another radar entity located at the reflected position.
- The provided
MultipathSurface* surfpointer is valid and points to a correctly configured surface definition. - The corresponding
Platform::createMultipathDualfunction correctly generates the reflected platform geometry (position and orientation). - Appending
"_dual"to the original object's name results in a unique name within the simulation world. -
dynamic_castcorrectly identifiesTransmitterorReceivertypes for attached objects during recursive creation. - The recursive creation process for attached objects terminates correctly (i.e., no circular attachments exist in the configuration).
-
Raw Pointer Ownership: The function returns ownership of the created dual object via a raw pointer (
dual.release()). This requires careful handling by the caller (typicallyWorld::processMultipath) to avoid memory leaks or dangling pointers. Modern C++ practice would favor returning a smart pointer (e.g.,std::unique_ptr). -
Manual Property Cloning: Key properties (like associated Antenna, Timing, Signal, PRF, etc.) are manually copied from the original object to the dual within the
createMultipathDualBasefunction. If theTransmitterorReceiverclasses are modified to add new properties relevant to the dual's operation, this function must be manually updated to include them in the copy process, making it potentially brittle. -
Implementation Complexity: The implementation uses
constexpr iffor type-specific property copying (distinguishing Tx/Rx properties) andstd::stackwithconst_castfor managing the recursion on attached objects. This adds some complexity to the code compared to alternative approaches.
-
Radar,Transmitter,Receiverclasses (specifically thecreateMultipathDualwrappers defined in their headers) -
Platformclass (createMultipathDualmethod) -
MultipathSurfaceclass -
World::processMultipath(the primary caller of this functionality) -
radar_obj.cpp::createMultipathDualBase(core template implementation) - Multipath Model
- World Multipath Initialization
- Needs Verification: Yes. While the feature is implemented and used for the multipath model, the correctness of the property cloning, recursive handling, and memory management requires specific validation.
-
Key Areas for Validation:
- Verify that all necessary properties (including flags, settings, associated objects like Antenna/Timing) are correctly copied from the original to the dual object for both
TransmitterandReceivertypes. - Confirm correct handling of attached objects (specifically monostatic pairs) during recursive creation, ensuring the attachment is mirrored correctly in the duals.
- Ensure the
_dualnaming convention consistently produces unique names in typical scenarios, especially if multiple multipath surfaces were ever implemented (though currently limited to one). - Validate the memory management around the returned raw pointer within
World::processMultipathto ensure no leaks occur. - Test with various platform motion and rotation types (especially interpolated ones) to ensure the geometric reflection logic within
Platform::createMultipathDualinteracts correctly with the object property cloning performed here.
- Verify that all necessary properties (including flags, settings, associated objects like Antenna/Timing) are correctly copied from the original to the dual object for both
- Priority: High (Core logic enabling the current multipath simulation approach)