99 virtual std::vector<ComplexType>
render(
const std::vector<interp::InterpPoint>& points,
unsigned&
size,
103 [[
nodiscard]]
virtual std::vector<ComplexType>
renderSlice(
const std::vector<interp::InterpPoint>& points,
105 std::size_t sampleCount,
112 std::vector<ComplexType> _data;
126 [[
nodiscard]] std::tuple<double, double, double, int>
127 calculateWeightsAndDelays(std::vector<interp::InterpPoint>::const_iterator
iter,
128 std::vector<interp::InterpPoint>::const_iterator next,
double sampleTime,
163 std::unique_ptr<Signal>
signal,
const SimId id = 0);
285 std::
optional<std::
string> _filename;
319 std::size_t step_index = 0;
320 std::size_t sweep_index = 0;
330 std::optional<std::size_t> sweep_count = std::nullopt);
363 return static_cast<RealType>(_step_count) * _step_period;
392 std::size_t _step_count{};
395 std::optional<std::size_t> _sweep_count;
404 RealType start_frequency_offset = 0.0, std::optional<std::size_t> chirp_count = std::nullopt,
438 return isDownChirp() ? -_chirp_rate : _chirp_rate;
467 std::vector<ComplexType> render(
const std::vector<interp::InterpPoint>& points,
unsigned&
size,
477 std::optional<std::size_t> _chirp_count;
488 std::optional<std::size_t> triangle_count = std::nullopt);
532 std::vector<ComplexType> render(
const std::vector<interp::InterpPoint>& points,
unsigned&
size,
541 std::optional<std::size_t> _triangle_count;
Continuous-wave signal implementation.
~CwSignal() override=default
CwSignal(CwSignal &&) noexcept=delete
CwSignal(const CwSignal &) noexcept=delete
CwSignal & operator=(const CwSignal &) noexcept=delete
FMCW linear chirp signal implementation.
bool isFmcwFamily() const noexcept override
Returns true when this signal belongs to the FMCW waveform family.
RealType getChirpDuration() const noexcept
Gets the chirp duration in seconds.
~FmcwChirpSignal() override=default
FmcwChirpSignal(FmcwChirpSignal &&) noexcept=delete
RealType getChirpPeriod() const noexcept
Gets the chirp period in seconds.
bool isTriangle() const noexcept
Returns false for linear chirps; triangles override this shape predicate.
FmcwChirpSignal & operator=(const FmcwChirpSignal &) noexcept=delete
FmcwChirpSignal(const FmcwChirpSignal &) noexcept=delete
bool isDownChirp() const noexcept
Returns true when this chirp sweeps downward.
FmcwChirpDirection getDirection() const noexcept
Gets the FMCW sweep direction.
const std::optional< std::size_t > & getChirpCount() const noexcept
Gets the optional finite chirp count.
RealType getSignedChirpRate() const noexcept
Gets the signed chirp rate in hertz per second.
RealType getChirpRate() const noexcept
Gets the chirp rate in hertz per second.
bool isActiveAt(RealType time_since_segment_start) const noexcept
Returns true when the signal is inside an active chirp at the specified time.
RealType getStartFrequencyOffset() const noexcept
Gets the start frequency offset relative to carrier in hertz.
FMCW symmetric triangular modulation signal implementation.
RealType getStartFrequencyOffset() const noexcept
Gets the start frequency offset relative to carrier in hertz.
RealType getChirpRate() const noexcept
Gets the chirp rate magnitude in hertz per second.
~FmcwTriangleSignal() override=default
const std::optional< std::size_t > & getTriangleCount() const noexcept
Gets the optional finite triangle count.
RealType getChirpDuration() const noexcept
Gets the per-leg chirp duration in seconds.
bool isFmcwFamily() const noexcept override
Returns true when this signal belongs to the FMCW waveform family.
RealType getTrianglePeriod() const noexcept
Gets the full up/down triangle period in seconds.
FmcwTriangleSignal(FmcwTriangleSignal &&) noexcept=delete
FmcwTriangleSignal(const FmcwTriangleSignal &) noexcept=delete
RealType getDeltaPhiUp() const noexcept
Gets the full, unreduced phase accumulated by one leg.
bool isTriangle() const noexcept
Returns true for triangular FMCW waveforms.
FmcwTriangleSignal & operator=(const FmcwTriangleSignal &) noexcept=delete
Class representing a radar signal with associated properties.
SimId getId() const noexcept
Gets the unique ID of the radar signal.
const class SteppedFrequencySignal * getSteppedFrequencySignal() const noexcept
Gets the stepped-frequency implementation, if this signal owns one.
void setFilename(const std::string &filename) noexcept
Sets the filename associated with this signal.
RadarSignal(const RadarSignal &) noexcept=delete
RadarSignal & operator=(const RadarSignal &) noexcept=delete
const std::optional< std::string > & getFilename() const noexcept
Gets the filename associated with this signal.
std::vector< ComplexType > renderSlice(const std::vector< interp::InterpPoint > &points, RealType outputStartTime, RealType outputSampleRate, std::size_t sampleCount, RealType fracWinDelay) const
Renders a bounded absolute-time slice on the requested output grid.
RealType getRate() const noexcept
Gets the sample rate of the radar signal.
const class FmcwTriangleSignal * getFmcwTriangleSignal() const noexcept
Gets the FMCW triangle implementation, if this signal owns one.
std::vector< ComplexType > render(const std::vector< interp::InterpPoint > &points, unsigned &size, RealType fracWinDelay) const
Renders the radar signal.
RadarSignal(RadarSignal &&) noexcept=delete
const std::string & getName() const noexcept
Gets the name of the radar signal.
bool isFmcwTriangle() const noexcept
Returns true when this signal is an FMCW triangular modulation signal.
RealType getCarrier() const noexcept
Gets the carrier frequency of the radar signal.
bool isFmcwFamily() const noexcept
Returns true when this signal belongs to the FMCW waveform family.
RealType getLength() const noexcept
Gets the length of the radar signal.
const Signal * getSignal() const noexcept
Gets the underlying signal object.
bool isSteppedFrequency() const noexcept
Returns true when this signal is a stepped-frequency CW waveform.
bool isFmcwChirp() const noexcept
Returns true when this signal is an FMCW linear chirp signal.
bool isCw() const noexcept
Returns true when this signal is a continuous-wave signal.
const class FmcwChirpSignal * getFmcwChirpSignal() const noexcept
Gets the FMCW chirp implementation, if this signal owns one.
unsigned getSampleCount() const noexcept
Gets the number of native samples in the underlying signal.
RealType getPower() const noexcept
Gets the power of the radar signal.
Class for handling radar waveform signal data.
RealType getRate() const noexcept
Gets the sample rate of the signal.
virtual ~Signal()=default
Signal(Signal &&)=default
virtual std::vector< ComplexType > renderSlice(const std::vector< interp::InterpPoint > &points, RealType outputStartTime, RealType outputSampleRate, std::size_t sampleCount, RealType fracWinDelay) const
Renders a bounded absolute-time slice on the requested output grid.
void clear() noexcept
Clears the internal signal data.
Signal & operator=(const Signal &)=delete
Signal(const Signal &)=delete
unsigned getSampleCount() const noexcept
Gets the number of native samples held by this signal.
void load(std::span< const ComplexType > inData, unsigned samples, RealType sampleRate)
Loads complex radar waveform data.
virtual bool isFmcwFamily() const noexcept
Returns true when this signal belongs to the FMCW waveform family.
virtual std::vector< ComplexType > render(const std::vector< interp::InterpPoint > &points, unsigned &size, double fracWinDelay) const
Renders the signal data based on interpolation points.
Signal & operator=(Signal &&)=default
Stepped-frequency continuous-wave signal implementation.
RealType getSweepPeriod() const noexcept
Gets full sweep period in seconds.
const std::optional< std::size_t > & getSweepCount() const noexcept
Gets optional finite sweep count.
RealType getStepSize() const noexcept
Gets the uniform frequency step in hertz.
SteppedFrequencySignal(const SteppedFrequencySignal &) noexcept=delete
SteppedFrequencySignal & operator=(const SteppedFrequencySignal &) noexcept=delete
std::size_t getStepCount() const noexcept
Gets the number of steps per sweep.
RealType getStepPeriod() const noexcept
Gets step repetition period in seconds.
RealType getDwellTime() const noexcept
Gets active dwell time per step in seconds.
SteppedFrequencySignal(SteppedFrequencySignal &&) noexcept=delete
~SteppedFrequencySignal() override=default
Global configuration file for the project.
double RealType
Type for real numbers.
std::complex< RealType > ComplexType
Type for complex numbers.
FmcwChirpDirection parseFmcwChirpDirection(const std::string_view direction)
Parses a schema chirp direction token.
std::string_view fmcwChirpDirectionToken(const FmcwChirpDirection direction) noexcept
Converts a chirp direction to the schema token.
FmcwChirpDirection
Sweep direction for a linear FMCW chirp.
@ Down
Instantaneous baseband frequency decreases over the chirp.
@ Up
Instantaneous baseband frequency increases over the chirp.
uint64_t SimId
64-bit Unique Simulation ID.
Active SFCW dwell selected for one local waveform time.