|
FERS 1.0.0
The Flexible Extensible Radar Simulator
|
Functions | |
| void | advanceTimingModel (timing::Timing *timing_model, const radar::Receiver *receiver, RealType rate) |
| Advances the receiver's timing model to the start of the next processing window. | |
| std::tuple< RealType, RealType > | calculateJitteredStart (RealType ideal_start, RealType first_phase_noise, RealType carrier_freq, RealType rate) |
| Calculates the jittered start time and fractional delay from a phase noise sample. | |
| void | applyCwInterference (std::span< ComplexType > window, RealType actual_start, RealType dt, const radar::Receiver *receiver, const std::vector< radar::Transmitter * > &cw_sources, const std::vector< std::unique_ptr< radar::Target > > *targets) |
| Applies continuous-wave interference to a time window. | |
| void | applyPulsedInterference (std::vector< ComplexType > &iq_buffer, const std::vector< std::unique_ptr< serial::Response > > &interference_log) |
| Renders and applies pulsed interference to a continuous-wave IQ buffer. | |
| void | addPhaseNoiseToWindow (std::span< const RealType > noise, std::span< ComplexType > window) |
| Applies a pre-generated sequence of phase noise samples to an I/Q buffer. | |
| RealType | applyDownsamplingAndQuantization (std::vector< ComplexType > &buffer) |
| Downsamples and quantizes an IQ buffer. | |
| void | exportCwToHdf5 (const std::string &filename, const std::vector< ComplexType > &iq_buffer, RealType fullscale, RealType ref_freq, const core::OutputFileMetadata *metadata=nullptr) |
| Exports a finalized continuous-wave IQ buffer to an HDF5 file. | |
| void processing::pipeline::addPhaseNoiseToWindow | ( | std::span< const RealType > | noise, |
| std::span< ComplexType > | window | ||
| ) |
Applies a pre-generated sequence of phase noise samples to an I/Q buffer.
This function performs the complex multiplication IQ_out = IQ_in * e^(j*phase_noise) for each sample in the window, effectively modulating the phase of the signal.
| noise | A span of phase noise samples in radians. |
| window | The I/Q buffer to be modified. |
Definition at line 124 of file finalizer_pipeline.cpp.
Referenced by processing::finalizeCwReceiver(), and processing::runPulsedFinalizer().
Here is the caller graph for this function:| void processing::pipeline::advanceTimingModel | ( | timing::Timing * | timing_model, |
| const radar::Receiver * | receiver, | ||
| RealType | rate | ||
| ) |
Advances the receiver's timing model to the start of the next processing window.
This function handles the "dead time" between receive windows. For sync-on-pulse models, it resets the phase and skips to the window's start offset. For free-running models, it skips the number of samples corresponding to the inter-pulse period.
| timing_model | The stateful timing model instance to advance. |
| receiver | The receiver whose properties (sync mode, PRF, etc.) determine how to advance the model. |
| rate | The oversampled simulation rate, used to calculate samples to skip. |
Definition at line 29 of file finalizer_pipeline.cpp.
References timing::Timing::getSyncOnPulse(), radar::Receiver::getWindowLength(), radar::Receiver::getWindowPrf(), radar::Receiver::getWindowSkip(), timing::Timing::isEnabled(), timing::Timing::reset(), and timing::Timing::skipSamples().
Referenced by processing::runPulsedFinalizer().
Here is the call graph for this function:
Here is the caller graph for this function:| void processing::pipeline::applyCwInterference | ( | std::span< ComplexType > | window, |
| RealType | actual_start, | ||
| RealType | dt, | ||
| const radar::Receiver * | receiver, | ||
| const std::vector< radar::Transmitter * > & | cw_sources, | ||
| const std::vector< std::unique_ptr< radar::Target > > * | targets | ||
| ) |
Applies continuous-wave interference to a time window.
Iterates through each sample of a processing window, calculating the combined direct and reflected path contributions from all active CW sources at that precise moment in time. The resulting complex sample is added to the window.
| window | The I/Q buffer for the receive window to which interference will be added. |
| actual_start | The jittered, sample-aligned start time of the window. |
| dt | The time step between samples (1.0 / rate). |
| receiver | The receiver being interfered with. |
| cw_sources | A list of currently active CW transmitters. |
| targets | The list of all targets for calculating reflected paths. |
Definition at line 76 of file finalizer_pipeline.cpp.
References simulation::calculateDirectPathContribution(), simulation::calculateReflectedPathContribution(), radar::Receiver::checkFlag(), and radar::Receiver::FLAG_NODIRECT.
Referenced by processing::runPulsedFinalizer().
Here is the call graph for this function:
Here is the caller graph for this function:| RealType processing::pipeline::applyDownsamplingAndQuantization | ( | std::vector< ComplexType > & | buffer | ) |
Downsamples and quantizes an IQ buffer.
This function performs the final processing steps. If oversampling is enabled, it first downsamples the buffer to the final output rate. It then simulates an ADC by quantizing and scaling the data.
| buffer | The I/Q buffer to be processed. This is an in-out parameter; it will be replaced by the downsampled buffer if applicable. |
Definition at line 132 of file finalizer_pipeline.cpp.
References fers_signal::downsample(), params::oversampleRatio(), and processing::quantizeAndScaleWindow().
Referenced by processing::finalizeCwReceiver(), and processing::runPulsedFinalizer().
Here is the call graph for this function:
Here is the caller graph for this function:| void processing::pipeline::applyPulsedInterference | ( | std::vector< ComplexType > & | iq_buffer, |
| const std::vector< std::unique_ptr< serial::Response > > & | interference_log | ||
| ) |
Renders and applies pulsed interference to a continuous-wave IQ buffer.
Processes a log of Response objects that represent pulsed signals received during a CW receiver's operation. Each response is rendered into a temporary buffer and then added to the main CW IQ buffer at the correct time offset.
| iq_buffer | The main, simulation-long IQ buffer for the CW receiver. |
| interference_log | A list of Response objects representing the pulsed interference. |
Definition at line 102 of file finalizer_pipeline.cpp.
References params::startTime().
Referenced by processing::finalizeCwReceiver().
Here is the call graph for this function:
Here is the caller graph for this function:| std::tuple< RealType, RealType > processing::pipeline::calculateJitteredStart | ( | RealType | ideal_start, |
| RealType | first_phase_noise, | ||
| RealType | carrier_freq, | ||
| RealType | rate | ||
| ) |
Calculates the jittered start time and fractional delay from a phase noise sample.
Converts the first phase noise sample (in radians) of a window into a time jitter offset. It then decomposes the resulting "actual" start time into a component aligned with the sample clock and a fractional delay to be handled by the rendering engine's interpolation filter.
| ideal_start | The perfect, jitter-free start time of the window. |
| first_phase_noise | The first phase noise sample (radians) for this window. |
| carrier_freq | The carrier frequency, needed to convert phase to time. |
| rate | The sampling rate, used for sample clock alignment. |
Definition at line 67 of file finalizer_pipeline.cpp.
References PI.
Referenced by processing::runPulsedFinalizer().
Here is the caller graph for this function:| void processing::pipeline::exportCwToHdf5 | ( | const std::string & | filename, |
| const std::vector< ComplexType > & | iq_buffer, | ||
| RealType | fullscale, | ||
| RealType | ref_freq, | ||
| const core::OutputFileMetadata * | metadata = nullptr |
||
| ) |
Exports a finalized continuous-wave IQ buffer to an HDF5 file.
Creates an HDF5 file, splits the complex buffer into real (I) and imaginary (Q) components, writes them as separate datasets, and adds relevant simulation parameters (sample rate, start time, etc.) as file attributes.
| filename | The path to the output HDF5 file. |
| iq_buffer | The final, processed I/Q data to write. |
| fullscale | The full-scale value from quantization, saved as metadata. |
| ref_freq | The reference carrier frequency, saved as metadata. |
Definition at line 141 of file finalizer_pipeline.cpp.
References logging::FATAL, serial::hdf5_global_mutex, logging::INFO, LOG, params::rate(), params::startTime(), and serial::writeOutputFileMetadataAttributes().
Referenced by processing::finalizeCwReceiver().
Here is the call graph for this function:
Here is the caller graph for this function: