FERS 1.0.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
waveform_factory.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 waveform_factory.h
10 * @brief Interface for loading waveform data into RadarSignal objects.
11 */
12
13#pragma once
14
15#include <memory>
16#include <string>
17
18#include "core/config.h"
19
20namespace fers_signal
21{
22 class RadarSignal;
23}
24
25namespace serial
26{
27 /**
28 * @brief Loads a radar waveform from a file and returns a RadarSignal object.
29 *
30 * @param name The name of the radar signal.
31 * @param filename The path to the file containing the waveform data.
32 * @param power The power of the radar signal in the waveform.
33 * @param carrierFreq The carrier frequency of the radar signal.
34 * @return A unique pointer to a RadarSignal object loaded with the waveform data.
35 * @throws std::runtime_error If the file cannot be opened or the file format is unrecognized.
36 */
37 [[nodiscard]] std::unique_ptr<fers_signal::RadarSignal>
38 loadWaveformFromFile(const std::string& name, const std::string& filename, RealType power, RealType carrierFreq);
39}
Global configuration file for the project.
double RealType
Type for real numbers.
Definition config.h:27
std::unique_ptr< RadarSignal > loadWaveformFromFile(const std::string &name, const std::string &filename, const RealType power, const RealType carrierFreq)
Loads a radar waveform from a file and returns a RadarSignal object.