FERS 0.1.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
receiver.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-only
2//
3// Copyright (c) 2006-2008 Marc Brooker and Michael Inggs
4// Copyright (c) 2008-present FERS Contributors (see AUTHORS.md).
5//
6// See the GNU GPLv2 LICENSE file in the FERS project root for more information.
7
8/**
9 * @file receiver.h
10 * @brief Radar Receiver class for managing signal reception and response handling.
11 */
12
13#pragma once
14
15#include <condition_variable>
16#include <cstdint>
17#include <functional>
18#include <memory>
19#include <mutex>
20#include <optional>
21#include <queue>
22#include <random>
23#include <span>
24#include <string>
25#include <string_view>
26#include <vector>
27
28#include "core/rendering_job.h"
29#include "core/sim_id.h"
31#include "radar_obj.h"
32#include "serial/response.h"
33#include "signal/if_resampler.h"
34
35namespace pool
36{
37 class ThreadPool;
38}
39
40namespace radar
41{
42 /**
43 * @class Receiver
44 * @brief Manages radar signal reception and response processing.
45 */
46 class Receiver final : public Radar
47 {
48 public:
49 using FmcwIfOutputCallback = std::function<void(std::span<const ComplexType>, std::uint64_t)>;
50
51 /**
52 * @enum RecvFlag
53 * @brief Enumeration for receiver configuration flags.
54 */
55 enum class RecvFlag : std::uint8_t
56 {
57 FLAG_NODIRECT = 1, ///< Disable direct-path reception.
58 FLAG_NOPROPLOSS = 2 ///< Disable propagation-loss scaling.
59 };
60
61 /// Receiver-side FMCW dechirping mode.
62 enum class DechirpMode : std::uint8_t
63 {
64 None, ///< Output raw pre-mix streaming IQ.
65 Physical, ///< Preserve timing phase-noise decorrelation in the IF output.
66 Ideal ///< Ignore timing phase noise during the dechirp mix.
67 };
68
69 /// Source used to construct the receiver LO reference.
70 enum class DechirpReferenceSource : std::uint8_t
71 {
72 None, ///< No reference configured.
73 Attached, ///< Use the attached transmitter.
74 Transmitter, ///< Use a named transmitter.
75 Custom ///< Use a named top-level waveform with the receiver schedule.
76 };
77
78 /// Parsed and resolved dechirp reference details.
80 {
82 std::string name; ///< Parsed transmitter or waveform name when applicable.
83 SimId transmitter_id = 0; ///< Resolved transmitter ID for attached/transmitter references.
84 std::string transmitter_name; ///< Resolved transmitter name for attached/transmitter references.
85 SimId waveform_id = 0; ///< Resolved waveform ID for custom references.
86 std::string waveform_name; ///< Resolved waveform name for custom references.
87 };
88
89 /// Receiver-local FMCW IF-chain request parsed from scenario input.
91 {
92 std::optional<RealType> sample_rate_hz = std::nullopt; ///< Requested IF ADC sample rate in hertz.
93 std::optional<RealType> filter_bandwidth_hz = std::nullopt; ///< One-sided IF passband edge in hertz.
94 std::optional<RealType> filter_transition_width_hz =
95 std::nullopt; ///< Optional IF filter transition width in hertz.
96 };
97
98 /**
99 * @brief Constructs a Receiver object.
100 *
101 * @param platform The platform associated with this receiver.
102 * @param name The name of the receiver.
103 * @param seed The seed for the receiver's internal random number generator.
104 * @param mode The operational mode (PULSED_MODE, CW_MODE, or FMCW_MODE).
105 */
106 explicit Receiver(Platform* platform, std::string name, unsigned seed, OperationMode mode,
107 const SimId id = 0) noexcept;
108
110
112
114
116
118
119 /**
120 * @brief Adds a response to the receiver's pulsed-mode inbox.
121 * @param response A unique pointer to the response object.
122 */
124
125 /**
126 * @brief Adds a pulsed interference response to the receiver's streaming-mode log.
127 * @param response A unique pointer to the response object.
128 */
130
131 /**
132 * @brief Checks if a specific flag is set.
133 *
134 * @param flag The flag to check.
135 * @return True if the flag is set, false otherwise.
136 */
137 [[nodiscard]] bool checkFlag(RecvFlag flag) const noexcept { return (_flags & static_cast<int>(flag)) != 0; }
138
139 /**
140 * @brief Retrieves the unique ID of the receiver.
141 *
142 * @return The receiver SimId.
143 */
145
146 /**
147 * @brief Retrieves the noise temperature of the receiver.
148 *
149 * @return The noise temperature.
150 */
151 [[nodiscard]] RealType getNoiseTemperature() const noexcept { return _noise_temperature; }
152
153 /**
154 * @brief Retrieves the radar window length.
155 *
156 * @return The radar window length.
157 */
158 [[nodiscard]] RealType getWindowLength() const noexcept { return _window_length; }
159
160 /**
161 * @brief Retrieves the pulse repetition frequency (PRF) of the radar window.
162 *
163 * @return The PRF of the radar window.
164 */
165 [[nodiscard]] RealType getWindowPrf() const noexcept { return _window_prf; }
166
167 /**
168 * @brief Retrieves the window skip time.
169 *
170 * @return The window skip time.
171 */
172 [[nodiscard]] RealType getWindowSkip() const noexcept { return _window_skip; }
173
174 /**
175 * @brief Gets the noise temperature for a specific angle.
176 *
177 * @param angle The angle in spherical coordinates (SVec3).
178 * @return The noise temperature at the given angle.
179 */
180 [[nodiscard]] RealType getNoiseTemperature(const math::SVec3& angle) const noexcept override;
181
182 /**
183 * @brief Retrieves the start time of a specific radar window.
184 *
185 * @param window The index of the window.
186 * @return The start time of the specified window.
187 * @throws std::logic_error If the receiver is not associated with a timing source.
188 */
189 [[nodiscard]] RealType getWindowStart(unsigned window) const;
190
191 /**
192 * @brief Gets the number of radar windows.
193 *
194 * @return The total number of radar windows.
195 */
196 [[nodiscard]] unsigned getWindowCount() const noexcept;
197
198 /**
199 * @brief Gets the receiver's internal random number generator engine.
200 * @return A mutable reference to the RNG engine.
201 */
202 [[nodiscard]] std::mt19937& getRngEngine() noexcept { return _rng; }
203
204 /**
205 * @brief Gets the operational mode of the receiver.
206 *
207 * @return The operational mode (PULSED_MODE, CW_MODE, or FMCW_MODE).
208 */
210
211 /// Gets the configured dechirp mode.
212 [[nodiscard]] DechirpMode getDechirpMode() const noexcept { return _dechirp_mode; }
213
214 /// Returns true when the receiver emits dechirped IF data.
215 [[nodiscard]] bool isDechirpEnabled() const noexcept { return _dechirp_mode != DechirpMode::None; }
216
217 /// Gets the configured dechirp reference.
218 [[nodiscard]] const DechirpReference& getDechirpReference() const noexcept { return _dechirp_reference; }
219
220 /// Gets the optional receiver-local FMCW IF-chain request.
221 [[nodiscard]] const FmcwIfChainRequest& getFmcwIfChainRequest() const noexcept { return _fmcw_if_chain; }
222
223 /// Gets the receiver-local FMCW IF sample rate in Hz.
224 [[nodiscard]] std::optional<RealType> getIfSampleRate() const noexcept { return _fmcw_if_chain.sample_rate_hz; }
225
226 /// Gets the receiver-local FMCW IF filter bandwidth in Hz.
227 [[nodiscard]] std::optional<RealType> getIfFilterBandwidth() const noexcept
228 {
229 return _fmcw_if_chain.filter_bandwidth_hz;
230 }
231
232 /// Gets the receiver-local FMCW IF filter transition width in Hz.
234 {
235 return _fmcw_if_chain.filter_transition_width_hz;
236 }
237
238 /// Returns true when this receiver requests IF-rate FMCW output.
239 [[nodiscard]] bool hasFmcwIfSampleRate() const noexcept { return _fmcw_if_chain.sample_rate_hz.has_value(); }
240
241 /// Returns true when this receiver is using the online FMCW IF resampling sink.
242 [[nodiscard]] bool hasFmcwIfResamplingSink() const noexcept { return _fmcw_if_sink != nullptr; }
243
244 /// Gets the active or most recently used IF resampling plan, if any.
245 [[nodiscard]] const std::optional<fers_signal::FmcwIfResamplerPlan>& getFmcwIfResamplerPlan() const noexcept
246 {
247 return _fmcw_if_plan;
248 }
249
250 /// Gets resolved receive-time LO source segments.
251 [[nodiscard]] const std::vector<core::ActiveStreamingSource>& getDechirpSources() const noexcept
252 {
253 return _dechirp_sources;
254 }
255
256 /**
257 * @brief Checks if the receiver is currently active (listening).
258 * @return True if active, false otherwise.
259 */
260 [[nodiscard]] bool isActive() const noexcept { return _is_active; }
261
262 /**
263 * @brief Sets the active state of the receiver.
264 * @param active The new active state.
265 */
266 void setActive(const bool active) noexcept { _is_active = active; }
267
268 /**
269 * @brief Sets the operational mode of the receiver.
270 * @param mode The operational mode (PULSED_MODE, CW_MODE, or FMCW_MODE).
271 */
272 void setMode(OperationMode mode) noexcept;
273
274 /// Sets the receiver-side dechirp mode.
275 void setDechirpMode(DechirpMode mode) noexcept;
276
277 /// Stores the unresolved dechirp reference parsed from scenario input.
278 void setDechirpReference(DechirpReference reference);
279
280 /// Stores the receiver-local FMCW IF-chain request.
281 void setFmcwIfChainRequest(FmcwIfChainRequest request) noexcept;
282
283 /// Creates the online FMCW IF resampling sink and clears the output buffer.
285
286 /// Advances the continuous IF resampling timeline to the next active segment start.
288
289 /// Feeds one completed high-rate dechirped block into the online IF sink.
290 void consumeFmcwIfBlock(std::span<const ComplexType> block, RealType block_start_time);
291
292 /// Routes emitted IF samples to a live consumer instead of the HDF5 accumulation buffer.
294
295 /// Marks the current scheduled IF segment inactive.
297
298 /// Flushes remaining samples from the online IF sink into the output buffer.
300
301 /// Replaces resolved receive-time LO source segments.
302 void setResolvedDechirpSources(std::vector<core::ActiveStreamingSource> sources);
303
304 /// Clears resolved dechirp source segments.
305 void clearResolvedDechirpSources() noexcept { _dechirp_sources.clear(); }
306
307 /**
308 * @brief Moves all responses from the inbox into a RenderingJob.
309 * @return A vector of unique pointers to the responses.
310 */
311 std::vector<std::unique_ptr<serial::Response>> drainInbox() noexcept;
312
313 /**
314 * @brief Adds a completed RenderingJob to the finalizer queue.
315 * @param job The RenderingJob to enqueue.
316 */
317 void enqueueFinalizerJob(core::RenderingJob&& job);
318
319 /**
320 * @brief Waits for and dequeues a RenderingJob from the finalizer queue.
321 *
322 * This is a blocking call, intended for use by the dedicated finalizer thread.
323 *
324 * @param job A reference to a RenderingJob to be filled.
325 * @return `false` if a shutdown signal is received, `true` otherwise.
326 */
327 bool waitAndDequeueFinalizerJob(core::RenderingJob& job);
328
329 /**
330 * @brief Sets the properties for radar windows.
331 *
332 * @param length The length of the radar window.
333 * @param prf The pulse repetition frequency.
334 * @param skip The skip time between windows.
335 */
337
338 /**
339 * @brief Sets a receiver flag.
340 *
341 * @param flag The flag to set.
342 */
343 void setFlag(RecvFlag flag) noexcept { _flags |= static_cast<int>(flag); }
344
345 /**
346 * @brief Clears a receiver flag.
347 *
348 * @param flag The flag to clear.
349 */
350 void clearFlag(RecvFlag flag) noexcept { _flags &= ~static_cast<int>(flag); }
351
352 /**
353 * @brief Sets the noise temperature of the receiver.
354 *
355 * @param temp The new noise temperature.
356 * @throws std::runtime_error If the noise temperature is negative.
357 */
359
360 /**
361 * @brief Retrieves the log of pulsed interferences for streaming modes.
362 * @return A const reference to the vector of interference responses.
363 */
364 [[nodiscard]] const std::vector<std::unique_ptr<serial::Response>>& getPulsedInterferenceLog() const
365 {
366 return _pulsed_interference_log;
367 }
368
369 /// Removes logged pulsed interference responses that ended before a receive time.
371
372 /**
373 * @brief Sets the active schedule for the receiver.
374 * @param schedule A vector of active periods.
375 */
376 void setSchedule(std::vector<SchedulePeriod> schedule);
377
378 /**
379 * @brief Retrieves the list of active reception periods.
380 * @return A const reference to the schedule vector.
381 */
382 [[nodiscard]] const std::vector<SchedulePeriod>& getSchedule() const noexcept { return _schedule; }
383
384 /**
385 * @brief Determines the next valid window start time at or after the given time.
386 *
387 * @param time The proposed window start time.
388 * @return The actual start time, or nullopt if no valid time exists in the schedule.
389 */
390 [[nodiscard]] std::optional<RealType> getNextWindowTime(RealType time) const;
391
392 private:
393 /// Appends IF resampler output at the current absolute output cursor.
394 void appendFmcwIfOutput(std::vector<ComplexType> emitted);
395
396 /// Advances the IF output cursor over known zero samples.
397 void advanceFmcwIfOutputZeros(std::size_t sample_count);
398
399 /// Feeds zero-valued high-rate samples until the absolute input cursor reaches the target.
400 void consumeFmcwIfZerosUntil(std::size_t target_input_cursor);
401
402 // --- Common Members ---
403 bool _is_active = false; ///< True while the receiver is active.
404 RealType _noise_temperature = 0; ///< The noise temperature of the receiver.
405 int _flags = 0; ///< Flags for receiver configuration.
406 OperationMode _mode; ///< The operational mode of the receiver.
407 std::mt19937 _rng; ///< Per-object random number generator for statistical independence.
408 std::vector<SchedulePeriod> _schedule; ///< The schedule of active periods.
409
410 // --- Pulsed Mode Members ---
411 RealType _window_length = 0; ///< The length of the radar window.
412 RealType _window_prf = 0; ///< The pulse repetition frequency (PRF) of the radar window.
413 RealType _window_skip = 0; ///< The skip time between radar windows.
414 std::vector<std::unique_ptr<serial::Response>>
415 _inbox; ///< Mailbox for incoming Response objects during a receive window.
416 std::mutex _inbox_mutex; ///< Mutex guarding the pulsed receive inbox.
417 std::queue<core::RenderingJob> _finalizer_queue; ///< Completed windows waiting for final processing.
418 std::mutex _finalizer_queue_mutex; ///< Mutex guarding the finalizer queue.
419 std::condition_variable _finalizer_queue_cv; ///< Condition variable for finalizer queue updates.
420
421 // --- CW Mode Members ---
422 std::vector<std::unique_ptr<serial::Response>>
423 _pulsed_interference_log; ///< Log of pulsed signals that interfere with CW reception.
424 std::mutex _interference_log_mutex; ///< Mutex guarding the pulsed interference log.
425 DechirpMode _dechirp_mode{DechirpMode::None}; ///< FMCW dechirp mode.
426 DechirpReference _dechirp_reference{}; ///< Configured/resolved LO reference.
427 std::vector<core::ActiveStreamingSource> _dechirp_sources; ///< Resolved LO sources.
428 FmcwIfChainRequest _fmcw_if_chain{}; ///< Optional receiver-local IF-chain request.
429 std::optional<fers_signal::FmcwIfResamplerPlan> _fmcw_if_plan; ///< Active IF resampling plan.
430 std::unique_ptr<fers_signal::FmcwIfResamplingSink> _fmcw_if_sink; ///< Online IF resampling state.
431 FmcwIfOutputCallback _fmcw_if_output_callback; ///< Optional live IF-output consumer.
432 std::uint64_t _fmcw_if_samples_to_discard = 0; ///< Remaining startup IF samples to suppress.
433 std::size_t _fmcw_if_input_cursor = 0; ///< Absolute high-rate input samples consumed by the IF sink.
434 std::size_t _fmcw_if_output_cursor = 0; ///< Absolute output-sample cursor for IF insertion.
435 bool _fmcw_if_segment_active = false; ///< True while one scheduled IF segment is open.
436 };
437
438 /// Converts a dechirp mode to its scenario token.
439 [[nodiscard]] std::string_view dechirpModeToken(Receiver::DechirpMode mode) noexcept;
440
441 /// Parses a dechirp mode scenario token.
443
444 /// Converts a dechirp reference source to its scenario token.
445 [[nodiscard]] std::string_view dechirpReferenceSourceToken(Receiver::DechirpReferenceSource source) noexcept;
446
447 /// Parses a dechirp reference source scenario token.
449}
A class representing a vector in spherical coordinates.
Represents a simulation platform with motion and rotation paths.
Definition platform.h:32
Represents a radar system on a platform.
Definition radar_obj.h:50
SimId getId() const noexcept
Retrieves the unique ID of the radar object.
Definition radar_obj.h:86
Manages radar signal reception and response processing.
Definition receiver.h:47
void addInterferenceToLog(std::unique_ptr< serial::Response > response) noexcept
Adds a pulsed interference response to the receiver's streaming-mode log.
Definition receiver.cpp:122
std::mt19937 & getRngEngine() noexcept
Gets the receiver's internal random number generator engine.
Definition receiver.h:202
void clearResolvedDechirpSources() noexcept
Clears resolved dechirp source segments.
Definition receiver.h:305
std::optional< RealType > getIfSampleRate() const noexcept
Gets the receiver-local FMCW IF sample rate in Hz.
Definition receiver.h:224
void setMode(OperationMode mode) noexcept
Sets the operational mode of the receiver.
Definition receiver.cpp:179
bool hasFmcwIfResamplingSink() const noexcept
Returns true when this receiver is using the online FMCW IF resampling sink.
Definition receiver.h:242
void setActive(const bool active) noexcept
Sets the active state of the receiver.
Definition receiver.h:266
void prunePulsedInterferenceEndingBefore(RealType cutoff_time) noexcept
Removes logged pulsed interference responses that ended before a receive time.
Definition receiver.cpp:128
bool checkFlag(RecvFlag flag) const noexcept
Checks if a specific flag is set.
Definition receiver.h:137
std::optional< RealType > getIfFilterTransitionWidth() const noexcept
Gets the receiver-local FMCW IF filter transition width in Hz.
Definition receiver.h:233
std::vector< std::unique_ptr< serial::Response > > drainInbox() noexcept
Moves all responses from the inbox into a RenderingJob.
Definition receiver.cpp:135
void setFlag(RecvFlag flag) noexcept
Sets a receiver flag.
Definition receiver.h:343
const FmcwIfChainRequest & getFmcwIfChainRequest() const noexcept
Gets the optional receiver-local FMCW IF-chain request.
Definition receiver.h:221
void initializeFmcwIfResampling(fers_signal::FmcwIfResamplerPlan plan)
Creates the online FMCW IF resampling sink and clears the output buffer.
Definition receiver.cpp:223
const std::vector< SchedulePeriod > & getSchedule() const noexcept
Retrieves the list of active reception periods.
Definition receiver.h:382
std::optional< RealType > getIfFilterBandwidth() const noexcept
Gets the receiver-local FMCW IF filter bandwidth in Hz.
Definition receiver.h:227
bool isActive() const noexcept
Checks if the receiver is currently active (listening).
Definition receiver.h:260
DechirpReferenceSource
Source used to construct the receiver LO reference.
Definition receiver.h:71
@ Transmitter
Use a named transmitter.
@ Attached
Use the attached transmitter.
@ None
No reference configured.
@ Custom
Use a named top-level waveform with the receiver schedule.
unsigned getWindowCount() const noexcept
Gets the number of radar windows.
Definition receiver.cpp:364
void setDechirpReference(DechirpReference reference)
Stores the unresolved dechirp reference parsed from scenario input.
Definition receiver.cpp:206
bool isDechirpEnabled() const noexcept
Returns true when the receiver emits dechirped IF data.
Definition receiver.h:215
const std::vector< core::ActiveStreamingSource > & getDechirpSources() const noexcept
Gets resolved receive-time LO source segments.
Definition receiver.h:251
void setResolvedDechirpSources(std::vector< core::ActiveStreamingSource > sources)
Replaces resolved receive-time LO source segments.
Definition receiver.cpp:351
void consumeFmcwIfBlock(std::span< const ComplexType > block, RealType block_start_time)
Feeds one completed high-rate dechirped block into the online IF sink.
Definition receiver.cpp:243
RealType getWindowStart(unsigned window) const
Retrieves the start time of a specific radar window.
Definition receiver.cpp:371
std::function< void(std::span< const ComplexType >, std::uint64_t)> FmcwIfOutputCallback
Definition receiver.h:49
void clearFlag(RecvFlag flag) noexcept
Clears a receiver flag.
Definition receiver.h:350
void beginFmcwIfResamplingSegment(RealType segment_start_time)
Advances the continuous IF resampling timeline to the next active segment start.
Definition receiver.cpp:233
std::optional< RealType > getNextWindowTime(RealType time) const
Determines the next valid window start time at or after the given time.
Definition receiver.cpp:384
void setDechirpMode(DechirpMode mode) noexcept
Sets the receiver-side dechirp mode.
Definition receiver.cpp:189
bool hasFmcwIfSampleRate() const noexcept
Returns true when this receiver requests IF-rate FMCW output.
Definition receiver.h:239
const DechirpReference & getDechirpReference() const noexcept
Gets the configured dechirp reference.
Definition receiver.h:218
const std::optional< fers_signal::FmcwIfResamplerPlan > & getFmcwIfResamplerPlan() const noexcept
Gets the active or most recently used IF resampling plan, if any.
Definition receiver.h:245
const std::vector< std::unique_ptr< serial::Response > > & getPulsedInterferenceLog() const
Retrieves the log of pulsed interferences for streaming modes.
Definition receiver.h:364
void endFmcwIfResamplingSegment()
Marks the current scheduled IF segment inactive.
Definition receiver.cpp:306
void setSchedule(std::vector< SchedulePeriod > schedule)
Sets the active schedule for the receiver.
Definition receiver.cpp:382
void enqueueFinalizerJob(core::RenderingJob &&job)
Adds a completed RenderingJob to the finalizer queue.
Definition receiver.cpp:143
SimId getId() const noexcept
Retrieves the unique ID of the receiver.
Definition receiver.h:144
RealType getNoiseTemperature() const noexcept
Retrieves the noise temperature of the receiver.
Definition receiver.h:151
OperationMode getMode() const noexcept
Gets the operational mode of the receiver.
Definition receiver.h:209
RealType getWindowPrf() const noexcept
Retrieves the pulse repetition frequency (PRF) of the radar window.
Definition receiver.h:165
bool waitAndDequeueFinalizerJob(core::RenderingJob &job)
Waits for and dequeues a RenderingJob from the finalizer queue.
Definition receiver.cpp:152
RealType getWindowSkip() const noexcept
Retrieves the window skip time.
Definition receiver.h:172
void setWindowProperties(RealType length, RealType prf, RealType skip) noexcept
Sets the properties for radar windows.
Definition receiver.cpp:356
void setFmcwIfOutputCallback(FmcwIfOutputCallback callback)
Routes emitted IF samples to a live consumer instead of the HDF5 accumulation buffer.
Definition receiver.cpp:266
void addResponseToInbox(std::unique_ptr< serial::Response > response) noexcept
Adds a response to the receiver's pulsed-mode inbox.
Definition receiver.cpp:116
DechirpMode
Receiver-side FMCW dechirping mode.
Definition receiver.h:63
@ Ideal
Ignore timing phase noise during the dechirp mix.
@ None
Output raw pre-mix streaming IQ.
@ Physical
Preserve timing phase-noise decorrelation in the IF output.
RecvFlag
Enumeration for receiver configuration flags.
Definition receiver.h:56
@ FLAG_NODIRECT
Disable direct-path reception.
@ FLAG_NOPROPLOSS
Disable propagation-loss scaling.
DechirpMode getDechirpMode() const noexcept
Gets the configured dechirp mode.
Definition receiver.h:212
void setFmcwIfChainRequest(FmcwIfChainRequest request) noexcept
Stores the receiver-local FMCW IF-chain request.
Definition receiver.cpp:212
void setNoiseTemperature(RealType temp)
Sets the noise temperature of the receiver.
Definition receiver.cpp:169
void flushFmcwIfResampling()
Flushes remaining samples from the online IF sink into the output buffer.
Definition receiver.cpp:315
RealType getWindowLength() const noexcept
Retrieves the radar window length.
Definition receiver.h:158
double RealType
Type for real numbers.
Definition config.h:27
Internal FMCW IF rational resampler planning and streaming sink.
std::string_view dechirpReferenceSourceToken(const Receiver::DechirpReferenceSource source) noexcept
Converts a dechirp reference source to its scenario token.
Definition receiver.cpp:76
OperationMode
Defines the operational mode of a radar component.
Definition radar_obj.h:39
Receiver::DechirpReferenceSource parseDechirpReferenceSourceToken(const std::string_view token)
Parses a dechirp reference source scenario token.
Definition receiver.cpp:92
std::string_view dechirpModeToken(const Receiver::DechirpMode mode) noexcept
Converts a dechirp mode to its scenario token.
Definition receiver.cpp:45
Receiver::DechirpMode parseDechirpModeToken(const std::string_view token)
Parses a dechirp mode scenario token.
Definition receiver.cpp:59
Defines the Radar class and associated functionality.
Defines the data packet for asynchronous receiver finalization.
Classes for managing radar signal responses.
uint64_t SimId
64-bit Unique Simulation ID.
Definition sim_id.h:18
math::Vec3 max
Defines the global state for the event-driven simulation engine.
Parsed and resolved dechirp reference details.
Definition receiver.h:80
std::string name
Parsed transmitter or waveform name when applicable.
Definition receiver.h:82
DechirpReferenceSource source
Reference source type.
Definition receiver.h:81
std::string transmitter_name
Resolved transmitter name for attached/transmitter references.
Definition receiver.h:84
SimId transmitter_id
Resolved transmitter ID for attached/transmitter references.
Definition receiver.h:83
SimId waveform_id
Resolved waveform ID for custom references.
Definition receiver.h:85
std::string waveform_name
Resolved waveform name for custom references.
Definition receiver.h:86
Receiver-local FMCW IF-chain request parsed from scenario input.
Definition receiver.h:91
std::optional< RealType > sample_rate_hz
Requested IF ADC sample rate in hertz.
Definition receiver.h:92
std::optional< RealType > filter_transition_width_hz
Optional IF filter transition width in hertz.
Definition receiver.h:94
std::optional< RealType > filter_bandwidth_hz
One-sided IF passband edge in hertz.
Definition receiver.h:93