168 throw std::runtime_error(
"Oversample ratio must be >= 1");
172 throw std::runtime_error(
"Oversampling ratios > 8 are not supported with the current fixed filter length "
173 "of 33. Signal attenuation will occur.");
217 throw std::runtime_error(
"Sampling rate must be > 0");
251 params.oversample_ratio = ratio;
297 return std::unexpected(
"Thread count must be >= 1");
312 params.coordinate_frame = frame;
Global configuration file for the project.
double RealType
Type for real numbers.
Header file for the logging system.
@ INFO
Info level for informational messages.
@ DEBUG
Debug level for general debugging information.
unsigned renderThreads() noexcept
Get the number of worker threads.
RealType simSamplingRate() noexcept
Get the simulation sampling rate.
void setRandomSeed(const unsigned seed) noexcept
Set the random seed.
RealType endTime() noexcept
Get the end time for the simulation.
std::expected< void, std::string > setThreads(const unsigned threads) noexcept
Set the number of worker threads.
RealType rate() noexcept
Get the rendering sample rate.
unsigned randomSeed() noexcept
Get the random seed.
RealType startTime() noexcept
Get the start time for the simulation.
RealType boltzmannK() noexcept
Get the Boltzmann constant.
void setTime(const RealType startTime, const RealType endTime) noexcept
Set the start and end times for the simulation.
unsigned oversampleRatio() noexcept
Get the oversampling ratio.
void setRotationAngleUnit(const RotationAngleUnit unit) noexcept
Sets the external rotation angle unit.
double originLongitude() noexcept
Gets the KML/geospatial export origin longitude.
int utmZone() noexcept
Gets the configured KML UTM zone.
void setRate(RealType rateValue)
Set the rendering sample rate.
CoordinateFrame
Defines the coordinate systems supported for KML/geospatial export.
@ UTM
Universal Transverse Mercator.
@ ENU
East-North-Up local tangent plane (default)
@ ECEF
Earth-Centered, Earth-Fixed.
void setOrigin(const double lat, const double lon, const double alt) noexcept
Set the geodetic origin for ENU KML/geospatial export.
void setOversampleRatio(unsigned ratio)
Set the oversampling ratio.
unsigned renderFilterLength() noexcept
Get the render filter length.
void setC(RealType cValue) noexcept
Set the speed of light.
unsigned adcBits() noexcept
Get the ADC quantization bits.
void setSimSamplingRate(const RealType rate) noexcept
Set the simulation sampling rate.
RotationAngleUnit rotationAngleUnit() noexcept
Gets the external rotation angle unit.
void setAdcBits(const unsigned bits) noexcept
Set the ADC quantization bits.
constexpr unsigned maxSupportedOversampleRatio() noexcept
Gets the maximum supported oversampling ratio.
void setCoordinateSystem(const CoordinateFrame frame, const int zone, const bool north) noexcept
Set the coordinate system for KML/geospatial export.
std::optional< RotationAngleUnit > rotationAngleUnitFromToken(const std::string_view token) noexcept
Parses a rotation angle unit from an XML token.
void validateOversampleRatio(const unsigned ratio)
Validates that an oversampling ratio is supported.
CoordinateFrame coordinateFrame() noexcept
Gets the KML/geospatial export coordinate frame.
RotationAngleUnit
Defines the units used at external rotation-path boundaries.
@ Radians
Compass azimuth and elevation expressed in radians.
@ Degrees
Compass azimuth and elevation expressed in degrees.
double originLatitude() noexcept
Gets the KML/geospatial export origin latitude.
bool utmNorthHemisphere() noexcept
Gets the configured KML UTM hemisphere.
Parameters params
Global simulation parameter state.
RealType c() noexcept
Get the speed of light.
constexpr std::string_view rotationAngleUnitToken(const RotationAngleUnit unit) noexcept
Converts a rotation angle unit to its XML token.
double originAltitude() noexcept
Gets the KML/geospatial export origin altitude.
Struct to hold simulation parameters.
static constexpr RealType DEFAULT_BOLTZMANN_K
Boltzmann constant.
RealType rate
Rendering sample rate.
double origin_longitude
KML ENU geodetic origin longitude.
RealType start
Start time for the simulation.
double origin_altitude
KML ENU geodetic origin altitude (in meters)
unsigned render_threads
Number of worker threads to use for parallel tasks.
CoordinateFrame coordinate_frame
KML/geospatial export coordinate frame.
unsigned filter_length
Default render filter length.
RealType end
End time for the simulation.
int utm_zone
KML UTM zone (1-60), if applicable.
unsigned oversample_ratio
Oversampling ratio.
std::optional< unsigned > random_seed
Random seed for simulation.
RealType sim_sampling_rate
Time-step sampling rate for radar pulse simulation.
std::string simulation_name
The name of the simulation, from the XML.
RotationAngleUnit rotation_angle_unit
External rotation angle unit.
RealType boltzmann_k
Boltzmann constant.
RealType c
Speed of light (modifiable)
static constexpr RealType DEFAULT_C
Speed of light (m/s)
unsigned adc_bits
ADC quantization bits.
bool utm_north_hemisphere
KML UTM hemisphere, if applicable.
double origin_latitude
KML ENU geodetic origin latitude.
void reset() noexcept
Resets the parameters to their default-constructed state.