|
FERS 0.1.0
The Flexible Extensible Radar Simulator
|
Namespaces | |
| namespace | pipeline |
Classes | |
| struct | FixedFullscaleIqSample |
| One complex Cartesian IQ sample scaled for VITA-style signed 16-bit transport. More... | |
| struct | FixedFullscaleScalingResult |
| Result of fixed-fullscale IQ scaling. More... | |
Functions | |
| core::OutputFileMetadata | buildStreamingOutputMetadata (const radar::Receiver *receiver, const std::string &output_path, std::size_t total_samples, const std::vector< core::ActiveStreamingSource > &streaming_sources, RealType output_sample_rate) |
| Builds HDF5 file metadata for a streaming receiver result emitted through the output sink. | |
| core::ReceiverStreamDescriptor | buildReceiverStreamDescriptor (const radar::Receiver *receiver, RealType sample_rate, std::span< const core::ActiveStreamingSource > streaming_sources={}) |
| Builds the receiver stream descriptor used by output sinks. | |
| core::ReceiverSampleBlock | buildReceiverSampleBlock (const radar::Receiver *receiver, RealType first_sample_time, RealType sample_rate, std::span< const ComplexType > samples, std::uint64_t sample_start, std::shared_ptr< const core::OutputFileMetadata > file_metadata=nullptr) |
| Builds a non-owning output sample block over contiguous processed complex samples. | |
| core::ReceiverSampleBlock | buildReceiverSampleBlock (const radar::Receiver *receiver, RealType first_sample_time, RealType sample_rate, std::span< const ComplexType > samples, std::uint64_t sample_start, std::span< const core::ActiveStreamingSource > streaming_sources, std::shared_ptr< const core::OutputFileMetadata > file_metadata) |
| Builds a sample block with active streaming-source context for VITA Context packets. | |
| void | runPulsedFinalizer (radar::Receiver *receiver, const std::vector< std::unique_ptr< radar::Target > > *targets, const std::shared_ptr< core::ProgressReporter > &reporter, const std::string &output_dir, const std::shared_ptr< core::OutputMetadataCollector > &metadata_collector=nullptr, core::ReceiverOutputSink *output_sink=nullptr) |
| The main function for a dedicated pulsed-mode receiver finalizer thread. | |
| void | renderWindow (std::vector< ComplexType > &window, RealType length, RealType start, RealType fracDelay, std::span< const std::unique_ptr< serial::Response > > responses) |
| Renders a time-window of I/Q data from a collection of raw radar responses. | |
| void | applyThermalNoise (std::span< ComplexType > window, RealType noiseTemperature, std::mt19937 &rngEngine) |
| Applies thermal (Johnson-Nyquist) noise to a window of I/Q samples. | |
| void | applyThermalNoiseAtSampleRate (std::span< ComplexType > window, RealType noiseTemperature, std::mt19937 &rngEngine, RealType sampleRateHz) |
| Applies circular complex thermal noise using a caller-specified complex-baseband sample rate. | |
| RealType | quantizeAndScaleWindow (std::span< ComplexType > window) |
| Simulates ADC quantization and scales a window of complex I/Q samples. | |
| FixedFullscaleScalingResult | scaleToInt16FixedFullscale (std::span< const ComplexType > samples, RealType fullscale) |
| Scales complex samples against a fixed full-scale to signed int16 IQ. | |
| void processing::applyThermalNoise | ( | std::span< ComplexType > | window, |
| RealType | noiseTemperature, | ||
| std::mt19937 & | rngEngine | ||
| ) |
Applies thermal (Johnson-Nyquist) noise to a window of I/Q samples.
Simulates the addition of white Gaussian noise based on the receiver's noise temperature and the simulation bandwidth.
| window | A span of I/Q data to which noise will be added. |
| noiseTemperature | The effective noise temperature in Kelvin. |
| rngEngine | A random number generator engine to use for noise generation. |
Definition at line 142 of file signal_processor.cpp.
References b, params::boltzmannK(), max, params::oversampleRatio(), and params::rate().
Here is the call graph for this function:| void processing::applyThermalNoiseAtSampleRate | ( | std::span< ComplexType > | window, |
| const RealType | noiseTemperature, | ||
| std::mt19937 & | rngEngine, | ||
| const RealType | sampleRateHz | ||
| ) |
Applies circular complex thermal noise using a caller-specified complex-baseband sample rate.
Definition at line 163 of file signal_processor.cpp.
References params::boltzmannK(), and max.
Referenced by runPulsedFinalizer().
Here is the call graph for this function:
Here is the caller graph for this function:| core::ReceiverSampleBlock processing::buildReceiverSampleBlock | ( | const radar::Receiver * | receiver, |
| const RealType | first_sample_time, | ||
| const RealType | sample_rate, | ||
| const std::span< const ComplexType > | samples, | ||
| const std::uint64_t | sample_start, | ||
| std::shared_ptr< const core::OutputFileMetadata > | file_metadata | ||
| ) |
Builds a non-owning output sample block over contiguous processed complex samples.
Definition at line 702 of file finalizer.cpp.
References buildReceiverSampleBlock(), and receiver.
Referenced by buildReceiverSampleBlock(), and runPulsedFinalizer().
Here is the call graph for this function:
Here is the caller graph for this function:| core::ReceiverSampleBlock processing::buildReceiverSampleBlock | ( | const radar::Receiver * | receiver, |
| const RealType | first_sample_time, | ||
| const RealType | sample_rate, | ||
| const std::span< const ComplexType > | samples, | ||
| const std::uint64_t | sample_start, | ||
| const std::span< const core::ActiveStreamingSource > | streaming_sources, | ||
| std::shared_ptr< const core::OutputFileMetadata > | file_metadata | ||
| ) |
Builds a sample block with active streaming-source context for VITA Context packets.
Definition at line 713 of file finalizer.cpp.
References buildReceiverStreamDescriptor(), max, receiver, core::ReceiverStreamDescriptor::sample_rate, and core::ReceiverSampleBlock::stream.
Here is the call graph for this function:| core::ReceiverStreamDescriptor processing::buildReceiverStreamDescriptor | ( | const radar::Receiver * | receiver, |
| const RealType | sample_rate, | ||
| const std::span< const core::ActiveStreamingSource > | streaming_sources | ||
| ) |
Builds the receiver stream descriptor used by output sinks.
Definition at line 679 of file finalizer.cpp.
References params::adcBits(), max, receiver, and core::ReceiverStreamDescriptor::receiver_id.
Referenced by buildReceiverSampleBlock(), and runPulsedFinalizer().
Here is the call graph for this function:
Here is the caller graph for this function:| core::OutputFileMetadata processing::buildStreamingOutputMetadata | ( | const radar::Receiver * | receiver, |
| const std::string & | output_path, | ||
| const std::size_t | total_samples, | ||
| const std::vector< core::ActiveStreamingSource > & | streaming_sources, | ||
| const RealType | output_sample_rate | ||
| ) |
Builds HDF5 file metadata for a streaming receiver result emitted through the output sink.
Definition at line 668 of file finalizer.cpp.
| RealType processing::quantizeAndScaleWindow | ( | std::span< ComplexType > | window | ) |
Simulates ADC quantization and scales a window of complex I/Q samples.
This function first finds the maximum absolute value in the I/Q data to determine the full-scale range. It then simulates the quantization process based on the configured number of ADC bits. If no quantization is specified (adc_bits=0), it normalizes the data to a maximum amplitude of 1.0.
| window | The window of complex I/Q samples to quantize and scale. |
Definition at line 182 of file signal_processor.cpp.
References params::adcBits(), and max.
Referenced by processing::pipeline::applyDownsamplingAndQuantization(), serial::Hdf5OutputSink::Impl::closeStreamingStream(), and serial::Hdf5OutputSink::Impl::writePulsedBlock().
Here is the call graph for this function:
Here is the caller graph for this function:| void processing::renderWindow | ( | std::vector< ComplexType > & | window, |
| RealType | length, | ||
| RealType | start, | ||
| RealType | fracDelay, | ||
| std::span< const std::unique_ptr< serial::Response > > | responses | ||
| ) |
Renders a time-window of I/Q data from a collection of raw radar responses.
This function orchestrates the process of converting abstract Response objects into a concrete vector of complex I/Q samples for a specific time window. It handles the superposition of multiple signals arriving at the receiver during the window and can use a thread pool for parallel processing.
| window | The output vector where the rendered I/Q samples will be added. |
| length | The duration of the time window in seconds. |
| start | The start time of the window in seconds. |
| fracDelay | A fractional sample delay to apply for fine-grained timing. |
| responses | A span of unique pointers to the Response objects to be rendered. |
Definition at line 110 of file signal_processor.cpp.
References max, params::oversampleRatio(), and params::rate().
Referenced by runPulsedFinalizer().
Here is the call graph for this function:
Here is the caller graph for this function:| void processing::runPulsedFinalizer | ( | radar::Receiver * | receiver, |
| const std::vector< std::unique_ptr< radar::Target > > * | targets, | ||
| const std::shared_ptr< core::ProgressReporter > & | reporter, | ||
| const std::string & | output_dir, | ||
| const std::shared_ptr< core::OutputMetadataCollector > & | metadata_collector = nullptr, |
||
| core::ReceiverOutputSink * | output_sink = nullptr |
||
| ) |
The main function for a dedicated pulsed-mode receiver finalizer thread.
This function runs in a loop, dequeuing and processing RenderingJobs for a specific receiver. It handles all expensive rendering, signal processing, and I/O for that receiver's data.
| receiver | A pointer to the pulsed-mode receiver to process. |
| targets | A pointer to the world's list of targets for interference calculation. |
| reporter | Shared pointer to the progress reporter for status updates. |
| output_dir | Output directory for the simulation files. |
Definition at line 731 of file finalizer.cpp.
References processing::pipeline::addPhaseNoiseToWindow(), processing::pipeline::advanceTimingModel(), processing::pipeline::applyDownsampling(), processing::pipeline::applyStreamingInterference(), applyThermalNoiseAtSampleRate(), buildReceiverSampleBlock(), buildReceiverStreamDescriptor(), processing::pipeline::calculateJitteredStart(), logging::FATAL, logging::INFO, LOG, max, params::oversampleRatio(), params::rate(), receiver, and renderWindow().
Here is the call graph for this function:| FixedFullscaleScalingResult processing::scaleToInt16FixedFullscale | ( | std::span< const ComplexType > | samples, |
| RealType | fullscale | ||
| ) |
Scales complex samples against a fixed full-scale to signed int16 IQ.
This helper is intended for real-time receiver-output sinks, where scanning a complete future window to derive full-scale would change hardware-like behavior.
| samples | Input complex samples in physical units. |
| fullscale | Positive fixed full-scale magnitude for both I and Q channels. |
| std::invalid_argument | when fullscale is not positive. |
Definition at line 207 of file signal_processor.cpp.
References processing::FixedFullscaleIqSample::i, and max.