FERS 0.1.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
response.cpp
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 response.cpp
10 * @brief Implementation of the Response class
11 */
12
13#include "response.h"
14
15#include "core/sim_id.h"
16#include "libxml_wrapper.h"
17#include "radar/radar_obj.h"
18#include "radar/transmitter.h"
19#include "signal/radar_signal.h"
20
22
23namespace serial
24{
25 SimId Response::getTransmitterId() const noexcept { return _transmitter->getId(); }
26
27 void Response::addInterpPoint(const InterpPoint& point) { _points.push_back(point); }
28
29 std::vector<ComplexType> Response::renderBinary(RealType& rate, unsigned& size, const RealType fracWinDelay) const
30 {
31 rate = _wave->getRate();
32 return _wave->render(_points, size, fracWinDelay);
33 }
34
35 std::vector<ComplexType> Response::renderSlice(const RealType outputRate, const RealType outputStartTime,
36 const std::size_t sampleCount, const RealType fracWinDelay) const
37 {
39 }
40
42
43 unsigned Response::sampleCount() const noexcept { return _wave->getSampleCount(); }
44}
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.
std::vector< ComplexType > render(const std::vector< interp::InterpPoint > &points, unsigned &size, RealType fracWinDelay) const
Renders the radar signal.
unsigned getSampleCount() const noexcept
Gets the number of native samples in the underlying signal.
SimId getId() const noexcept
Retrieves the unique ID of the transmitter.
Definition transmitter.h:88
void addInterpPoint(const interp::InterpPoint &point)
Adds an interpolation point to the response.
Definition response.cpp:27
RealType sampleRate() const noexcept
Returns the waveform native sample rate.
Definition response.cpp:41
SimId getTransmitterId() const noexcept
Retrieves the ID of the associated transmitter.
Definition response.cpp:25
unsigned sampleCount() const noexcept
Returns the waveform native sample count.
Definition response.cpp:43
std::vector< ComplexType > renderBinary(RealType &rate, unsigned &size, RealType fracWinDelay) const
Renders the response in binary format.
Definition response.cpp:29
std::vector< ComplexType > renderSlice(RealType outputRate, RealType outputStartTime, std::size_t sampleCount, RealType fracWinDelay) const
Renders a bounded absolute-time response slice on the requested output grid.
Definition response.cpp:35
double RealType
Type for real numbers.
Definition config.h:27
Wrapper for managing XML documents and elements using libxml2.
Defines the Radar class and associated functionality.
Classes for handling radar waveforms and signals.
Classes for managing radar signal responses.
uint64_t SimId
64-bit Unique Simulation ID.
Definition sim_id.h:18
math::Vec3 max
Stores data for an interpolation point.
Header file for the Transmitter class in the radar namespace.