|
FERS 1.0.0
The Flexible Extensible Radar Simulator
|
Manages radar signal reception and response processing. More...
#include "receiver.h"
Inheritance diagram for radar::Receiver:
Collaboration diagram for radar::Receiver:Public Types | |
| enum class | RecvFlag { FLAG_NODIRECT = 1 , FLAG_NOPROPLOSS = 2 } |
| Enumeration for receiver configuration flags. More... | |
Public Member Functions | |
| Receiver (Platform *platform, std::string name, unsigned seed, OperationMode mode) noexcept | |
| Constructs a Receiver object. | |
| ~Receiver () override=default | |
| Receiver (const Receiver &)=delete | |
| Receiver (Receiver &&)=delete | |
| Receiver & | operator= (const Receiver &)=delete |
| Receiver & | operator= (Receiver &&)=delete |
| void | addResponseToInbox (std::unique_ptr< serial::Response > response) noexcept |
| Adds a response to the receiver's pulsed-mode inbox. | |
| void | addInterferenceToLog (std::unique_ptr< serial::Response > response) noexcept |
| Adds a pulsed interference response to the receiver's CW-mode log. | |
| bool | checkFlag (RecvFlag flag) const noexcept |
| Checks if a specific flag is set. | |
| RealType | getNoiseTemperature () const noexcept |
| Retrieves the noise temperature of the receiver. | |
| RealType | getWindowLength () const noexcept |
| Retrieves the radar window length. | |
| RealType | getWindowPrf () const noexcept |
| Retrieves the pulse repetition frequency (PRF) of the radar window. | |
| RealType | getWindowSkip () const noexcept |
| Retrieves the window skip time. | |
| RealType | getNoiseTemperature (const math::SVec3 &angle) const noexcept override |
| Gets the noise temperature for a specific angle. | |
| RealType | getWindowStart (unsigned window) const |
| Retrieves the start time of a specific radar window. | |
| unsigned | getWindowCount () const noexcept |
| Gets the number of radar windows. | |
| std::mt19937 & | getRngEngine () noexcept |
| Gets the receiver's internal random number generator engine. | |
| OperationMode | getMode () const noexcept |
| Gets the operational mode of the receiver. | |
| bool | isActive () const noexcept |
| Checks if the receiver is currently active (listening). | |
| void | setActive (const bool active) noexcept |
| Sets the active state of the receiver. | |
| std::vector< std::unique_ptr< serial::Response > > | drainInbox () noexcept |
| Moves all responses from the inbox into a RenderingJob. | |
| void | enqueueFinalizerJob (core::RenderingJob &&job) |
| Adds a completed RenderingJob to the finalizer queue. | |
| bool | waitAndDequeueFinalizerJob (core::RenderingJob &job) |
| Waits for and dequeues a RenderingJob from the finalizer queue. | |
| void | setWindowProperties (RealType length, RealType prf, RealType skip) noexcept |
| Sets the properties for radar windows. | |
| void | setFlag (RecvFlag flag) noexcept |
| Sets a receiver flag. | |
| void | setNoiseTemperature (RealType temp) |
| Sets the noise temperature of the receiver. | |
| void | prepareCwData (size_t numSamples) |
| Prepares the internal storage for CW IQ data. | |
| void | setCwSample (size_t index, ComplexType sample) |
| Sets a single IQ sample at a specific index for CW simulation. | |
| const std::vector< ComplexType > & | getCwData () const |
| Retrieves the collected CW IQ data. | |
| std::vector< ComplexType > & | getMutableCwData () |
| Retrieves the collected CW IQ data for modification. | |
| const std::vector< std::unique_ptr< serial::Response > > & | getPulsedInterferenceLog () const |
| Retrieves the log of pulsed interferences for CW mode. | |
| void | setSchedule (std::vector< SchedulePeriod > schedule) |
| Sets the active schedule for the receiver. | |
| const std::vector< SchedulePeriod > & | getSchedule () const noexcept |
| Retrieves the list of active reception periods. | |
| std::optional< RealType > | getNextWindowTime (RealType time) const |
| Determines the next valid window start time at or after the given time. | |
| const Radar * | getAttached () const noexcept |
| Retrieves the attached radar object. | |
| const antenna::Antenna * | getAntenna () const noexcept |
| Gets the antenna associated with this radar. | |
| RealType | getGain (const math::SVec3 &angle, const math::SVec3 &refangle, RealType wavelength) const |
| Calculates the radar gain based on input angles and wavelength. | |
| std::shared_ptr< timing::Timing > | getTiming () const |
| Retrieves the timing source for the radar. | |
| void | setTiming (const std::shared_ptr< timing::Timing > &tim) |
| Sets the timing source for the radar. | |
| void | setAntenna (const antenna::Antenna *ant) |
| Sets the antenna for the radar. | |
| void | setAttached (const Radar *obj) |
| Attaches another radar object to this radar. | |
| math::Vec3 | getPosition (const RealType time) const |
| Retrieves the position of the object. | |
| math::SVec3 | getRotation (const RealType time) const |
| Retrieves the rotation of the object. | |
| Platform * | getPlatform () const noexcept |
| Retrieves the associated platform of the object. | |
| const std::string & | getName () const noexcept |
| Retrieves the name of the object. | |
Protected Attributes | |
| std::shared_ptr< timing::Timing > | _timing |
| Timing source for the radar. | |
Manages radar signal reception and response processing.
Definition at line 35 of file receiver.h.
|
strong |
Enumeration for receiver configuration flags.
| Enumerator | |
|---|---|
| FLAG_NODIRECT | |
| FLAG_NOPROPLOSS | |
Definition at line 42 of file receiver.h.
|
explicitnoexcept |
Constructs a Receiver object.
| platform | The platform associated with this receiver. |
| name | The name of the receiver. |
| seed | The seed for the receiver's internal random number generator. |
| mode | The operational mode (PULSED_MODE or CW_MODE). |
Definition at line 23 of file receiver.cpp.
|
overridedefault |
|
delete |
|
delete |
|
noexcept |
Adds a pulsed interference response to the receiver's CW-mode log.
| response | A unique pointer to the response object. |
Definition at line 34 of file receiver.cpp.
|
noexcept |
Adds a response to the receiver's pulsed-mode inbox.
| response | A unique pointer to the response object. |
Definition at line 28 of file receiver.cpp.
|
noexcept |
Checks if a specific flag is set.
| flag | The flag to check. |
Definition at line 86 of file receiver.h.
Referenced by simulation::calculateDirectPathContribution(), simulation::calculatePreviewLinks(), simulation::calculateReflectedPathContribution(), processing::runPulsedFinalizer(), simulation::solveRe(), simulation::solveReDirect(), and radar::to_json().
Here is the caller graph for this function:
|
noexcept |
Moves all responses from the inbox into a RenderingJob.
Definition at line 40 of file receiver.cpp.
| void radar::Receiver::enqueueFinalizerJob | ( | core::RenderingJob && | job | ) |
Adds a completed RenderingJob to the finalizer queue.
| job | The RenderingJob to enqueue. |
Definition at line 48 of file receiver.cpp.
|
noexceptinherited |
Gets the antenna associated with this radar.
Definition at line 78 of file radar_obj.h.
Referenced by radar::to_json(), and radar::to_json().
Here is the caller graph for this function:
|
noexceptinherited |
Retrieves the attached radar object.
Definition at line 71 of file radar_obj.h.
Referenced by simulation::calculatePreviewLinks(), and simulation::calculateResponse().
Here is the caller graph for this function:| const std::vector< ComplexType > & radar::Receiver::getCwData | ( | ) | const |
Retrieves the collected CW IQ data.
Definition at line 228 of file receiver.h.
|
inherited |
Calculates the radar gain based on input angles and wavelength.
| angle | The radar's pointing angle. |
| refangle | The reference angle for comparison. |
| wavelength | The wavelength of the radar signal. |
Definition at line 26 of file radar_obj.cpp.
References antenna::Antenna::getGain().
Here is the call graph for this function:
|
noexcept |
Gets the operational mode of the receiver.
Definition at line 151 of file receiver.h.
Referenced by radar::to_json().
Here is the caller graph for this function:| std::vector< ComplexType > & radar::Receiver::getMutableCwData | ( | ) |
Retrieves the collected CW IQ data for modification.
Definition at line 234 of file receiver.h.
Referenced by processing::finalizeCwReceiver().
Here is the caller graph for this function:
|
noexceptinherited |
Retrieves the name of the object.
Definition at line 68 of file object.h.
Referenced by simulation::calculatePreviewLinks(), simulation::calculateResponse(), processing::finalizeCwReceiver(), serial::Response::getTransmitterName(), processing::runPulsedFinalizer(), setNoiseTemperature(), radar::to_json(), radar::to_json(), and radar::to_json().
Here is the caller graph for this function:Determines the next valid window start time at or after the given time.
| time | The proposed window start time. |
Definition at line 130 of file receiver.cpp.
|
noexcept |
Retrieves the noise temperature of the receiver.
Definition at line 93 of file receiver.h.
Referenced by simulation::calculatePreviewLinks(), processing::finalizeCwReceiver(), processing::runPulsedFinalizer(), and radar::to_json().
Here is the caller graph for this function:
|
overridevirtualnoexcept |
Gets the noise temperature for a specific angle.
| angle | The angle in spherical coordinates (SVec3). |
Reimplemented from radar::Radar.
Definition at line 73 of file receiver.cpp.
References radar::Radar::getNoiseTemperature().
Here is the call graph for this function:
|
noexceptinherited |
Retrieves the associated platform of the object.
Definition at line 61 of file object.h.
Referenced by simulation::calculateDirectPathContribution(), simulation::calculateReflectedPathContribution(), and simulation::calculateResponse().
Here is the caller graph for this function:
|
inherited |
Retrieves the position of the object.
| time | The time at which to get the position of the object. |
Definition at line 46 of file object.h.
References radar::Platform::getPosition().
Referenced by simulation::calculatePreviewLinks(), simulation::solveRe(), and simulation::solveReDirect().
Here is the call graph for this function:
Here is the caller graph for this function:| const std::vector< std::unique_ptr< serial::Response > > & radar::Receiver::getPulsedInterferenceLog | ( | ) | const |
Retrieves the log of pulsed interferences for CW mode.
Definition at line 240 of file receiver.h.
Referenced by processing::finalizeCwReceiver().
Here is the caller graph for this function:
|
noexcept |
Gets the receiver's internal random number generator engine.
Definition at line 144 of file receiver.h.
Referenced by processing::finalizeCwReceiver(), and processing::runPulsedFinalizer().
Here is the caller graph for this function:
|
inherited |
Retrieves the rotation of the object.
| time | The time at which to get the rotation of the object. |
Definition at line 54 of file object.h.
References radar::Platform::getRotation().
Referenced by radar::FileTarget::getRcs(), and processing::runPulsedFinalizer().
Here is the call graph for this function:
Here is the caller graph for this function:
|
noexcept |
Retrieves the list of active reception periods.
Definition at line 255 of file receiver.h.
Referenced by simulation::calculatePreviewLinks(), and radar::to_json().
Here is the caller graph for this function:
|
inherited |
Retrieves the timing source for the radar.
Definition at line 66 of file radar_obj.cpp.
References radar::Radar::_timing, and LOG.
Referenced by processing::finalizeCwReceiver(), processing::runPulsedFinalizer(), radar::to_json(), and radar::to_json().
Here is the caller graph for this function:
|
noexcept |
Gets the number of radar windows.
Definition at line 96 of file receiver.cpp.
References params::endTime(), and params::startTime().
Here is the call graph for this function:
|
noexcept |
Retrieves the radar window length.
Definition at line 100 of file receiver.h.
Referenced by processing::runPulsedFinalizer(), and radar::to_json().
Here is the caller graph for this function:
|
noexcept |
Retrieves the pulse repetition frequency (PRF) of the radar window.
Definition at line 107 of file receiver.h.
Referenced by processing::runPulsedFinalizer(), and radar::to_json().
Here is the caller graph for this function:
|
noexcept |
Retrieves the window skip time.
Definition at line 114 of file receiver.h.
Referenced by processing::runPulsedFinalizer(), and radar::to_json().
Here is the caller graph for this function:| RealType radar::Receiver::getWindowStart | ( | unsigned | window | ) | const |
Retrieves the start time of a specific radar window.
| window | The index of the window. |
| std::logic_error | If the receiver is not associated with a timing source. |
Definition at line 103 of file receiver.cpp.
References radar::Radar::_timing, logging::FATAL, and LOG.
|
noexcept |
Checks if the receiver is currently active (listening).
Definition at line 157 of file receiver.h.
| void radar::Receiver::prepareCwData | ( | size_t | numSamples | ) |
Prepares the internal storage for CW IQ data.
| numSamples | The total number of samples to allocate memory for. |
Definition at line 114 of file receiver.cpp.
|
noexcept |
Sets the active state of the receiver.
| active | The new active state. |
Definition at line 163 of file receiver.h.
Referenced by core::runEventDrivenSim().
Here is the caller graph for this function:
|
inherited |
Sets the antenna for the radar.
| ant | Pointer to the antenna to set. |
Definition at line 46 of file radar_obj.cpp.
References LOG.
|
inherited |
Attaches another radar object to this radar.
| obj | Pointer to the radar object to attach. |
| std::runtime_error | If another object is already attached. |
Definition at line 56 of file radar_obj.cpp.
References LOG.
| void radar::Receiver::setCwSample | ( | size_t | index, |
| ComplexType | sample | ||
| ) |
Sets a single IQ sample at a specific index for CW simulation.
| index | The index at which to store the sample. |
| sample | The complex IQ sample. |
Definition at line 120 of file receiver.cpp.
|
noexcept |
Sets a receiver flag.
| flag | The flag to set. |
Definition at line 201 of file receiver.h.
| void radar::Receiver::setNoiseTemperature | ( | RealType | temp | ) |
Sets the noise temperature of the receiver.
| temp | The new noise temperature. |
| std::runtime_error | If the noise temperature is negative. |
Definition at line 78 of file receiver.cpp.
References EPSILON, logging::FATAL, radar::Object::getName(), and LOG.
Here is the call graph for this function:| void radar::Receiver::setSchedule | ( | std::vector< SchedulePeriod > | schedule | ) |
Sets the active schedule for the receiver.
| schedule | A vector of active periods. |
Definition at line 128 of file receiver.cpp.
|
inherited |
Sets the timing source for the radar.
| tim | Shared pointer to the timing source to set. |
Definition at line 36 of file radar_obj.cpp.
References radar::Radar::_timing, and LOG.
Sets the properties for radar windows.
| length | The length of the radar window. |
| prf | The pulse repetition frequency. |
| skip | The skip time between windows. |
Definition at line 88 of file receiver.cpp.
References params::oversampleRatio(), and params::rate().
Here is the call graph for this function:| bool radar::Receiver::waitAndDequeueFinalizerJob | ( | core::RenderingJob & | job | ) |
Waits for and dequeues a RenderingJob from the finalizer queue.
This is a blocking call, intended for use by the dedicated finalizer thread.
| job | A reference to a RenderingJob to be filled. |
false if a shutdown signal is received, true otherwise. Definition at line 57 of file receiver.cpp.
References core::RenderingJob::duration.
Referenced by processing::runPulsedFinalizer().
Here is the caller graph for this function:
|
protectedinherited |
Timing source for the radar.
Definition at line 129 of file radar_obj.h.
Referenced by radar::Radar::getTiming(), getWindowStart(), and radar::Radar::setTiming().