522 void* vita49_telemetry_user_data);
578 size_t az_samples,
size_t el_samples,
double frequency_hz);
716 size_t waypoint_count,
char * fers_get_scenario_as_xml(fers_context_t *context)
Serializes the current simulation scenario into a FERS XML string.
int fers_set_vita49_queue_depth(fers_context_t *context, uint32_t queue_depth)
Sets the bounded FERS VITA 49.2 sender queue depth in packets.
int fers_update_antenna_from_json(fers_context_t *context, const char *json)
Updates a single antenna from JSON without full context recreation.
int fers_run_simulation_ex(fers_context_t *context, fers_progress_callback_t progress_callback, void *progress_user_data, fers_cancel_callback_t cancel_callback, void *cancel_user_data, fers_vita49_telemetry_callback_t vita49_telemetry_callback, void *vita49_telemetry_user_data)
Runs the simulation with optional progress, cancellation, and VITA telemetry callbacks.
void fers_free_antenna_pattern_data(fers_antenna_pattern_data_t *data)
Frees the memory allocated for an antenna pattern data structure.
fers_angle_unit_t
Units used for external rotation angles and rates.
void(* fers_progress_callback_t)(const char *message, int current, int total, void *user_data)
A function pointer type for progress reporting callbacks.
void fers_log(fers_log_level_t level, const char *message)
Submits a log message to the library's unified logging system.
int fers_load_scenario_from_xml_file(fers_context_t *context, const char *xml_filepath, int validate)
Loads a scenario into the context from a FERS XML file.
int(* fers_cancel_callback_t)(void *user_data)
A function pointer type for cooperative simulation cancellation.
char * fers_get_last_warning_messages_json()
Returns the last deduplicated rotation-unit warning list for the calling thread as JSON.
int fers_update_waveform_from_json(fers_context_t *context, const char *json)
Updates a single waveform from JSON without full context recreation.
int fers_update_transmitter_from_json(fers_context_t *context, uint64_t id, const char *json)
Updates a single transmitter from JSON without full context recreation.
int fers_use_hdf5_output(fers_context_t *context)
Resets the context output mode to the default HDF5 output.
char * fers_get_last_error_message()
Retrieves the last error message that occurred on the current thread.
int fers_enable_vita49_udp_output(fers_context_t *context, const char *host, uint16_t port)
Enables the FERS VITA 49.2 UDP streaming profile for a context.
void fers_free_interpolated_motion_path(fers_interpolated_path_t *path)
Frees the memory allocated for an interpolated motion path.
void(* fers_log_callback_t)(fers_log_level_t level, const char *line, void *user_data)
A function pointer type for receiving formatted log lines.
int fers_update_parameters_from_json(fers_context_t *context, const char *json)
Updates the global simulation parameters from JSON without full context recreation.
int fers_set_vita49_packet_trace_enabled(fers_context_t *context, int enabled)
Enables or disables FERS VITA 49.2 packet trace telemetry.
int fers_generate_kml(const fers_context_t *context, const char *output_kml_filepath)
Generates a KML file for visualizing the scenario in the context.
fers_log_level_t
Log levels for the FERS library.
@ FERS_LOG_FATAL
Fatal logging for unrecoverable failures.
@ FERS_LOG_DEBUG
Debug-level diagnostic logging.
@ FERS_LOG_ERROR
Error logging for failed operations.
@ FERS_LOG_OFF
Disables logging output.
@ FERS_LOG_INFO
Informational logging.
@ FERS_LOG_TRACE
Trace-level diagnostic logging.
@ FERS_LOG_WARNING
Warning logging for recoverable issues.
char * fers_get_memory_projection_json(fers_context_t *context)
Returns a JSON projection of simulation startup memory and HDF5 payload size.
int fers_set_output_directory(fers_context_t *context, const char *out_dir)
Sets the output directory for simulation results.
int fers_set_vita49_epoch_unix_nanoseconds(fers_context_t *context, uint64_t epoch_unix_nanoseconds)
Sets a deterministic FERS VITA 49.2 stream epoch as Unix nanoseconds.
void fers_context_destroy(fers_context_t *context)
Destroys a FERS simulation context and releases all associated memory.
fers_context_t * fers_context_create()
Creates a new FERS simulation context.
int fers_update_target_from_json(fers_context_t *context, uint64_t id, const char *json)
Updates a single target from JSON without full context recreation.
void fers_free_preview_links(fers_visual_link_list_t *list)
Frees the memory allocated for a preview link list.
fers_interpolated_path_t * fers_get_interpolated_motion_path(const fers_motion_waypoint_t *waypoints, size_t waypoint_count, fers_interp_type_t interp_type, size_t num_points)
Calculates an interpolated motion path from a set of waypoints.
fers_antenna_pattern_data_t * fers_get_antenna_pattern(const fers_context_t *context, uint64_t antenna_id, size_t az_samples, size_t el_samples, double frequency_hz)
Samples the gain pattern of a specified antenna and provides the data.
int fers_update_receiver_from_json(fers_context_t *context, uint64_t id, const char *json)
Updates a single receiver from JSON without full context recreation.
int fers_run_simulation(fers_context_t *context, fers_progress_callback_t callback, void *user_data)
Runs the simulation defined in the provided context.
void fers_free_string(char *str)
Frees a string that was allocated and returned by the libfers API.
fers_log_level_t fers_get_log_level()
Returns the current internal logger level.
fers_visual_link_list_t * fers_calculate_preview_links(const fers_context_t *context, double time)
Calculates visual links for a specific simulation time.
fers_interp_type_t
Defines the interpolation methods available for path generation.
const char * fers_get_version(void)
Returns the library version string.
int fers_configure_logging(fers_log_level_t level, const char *log_file_path)
Configures the internal logger.
void(* fers_vita49_telemetry_callback_t)(const char *stats_json, const char *packet_batch_json, void *user_data)
A function pointer type for VITA 49.2 live telemetry callbacks.
void fers_free_interpolated_rotation_path(fers_interpolated_rotation_path_t *path)
Frees the memory allocated for an interpolated rotation path.
void fers_set_log_callback(fers_log_callback_t callback, void *user_data)
Registers a callback for formatted log lines.
char * fers_get_scenario_as_json(fers_context_t *context)
Serializes the current simulation scenario into a JSON string.
int fers_set_vita49_fullscale(fers_context_t *context, double fullscale)
Sets the fixed ADC full-scale value used by the FERS VITA 49.2 int16 IQ profile.
int fers_update_monostatic_from_json(fers_context_t *context, const char *json)
Updates a monostatic radar from JSON without full context recreation.
fers_interpolated_rotation_path_t * fers_get_interpolated_rotation_path(const fers_rotation_waypoint_t *waypoints, size_t waypoint_count, fers_interp_type_t interp_type, fers_angle_unit_t angle_unit, size_t num_points)
Calculates an interpolated rotation path from a set of waypoints.
int fers_update_platform_from_json(fers_context_t *context, uint64_t id, const char *json)
Updates a single platform's paths and name from JSON without full context recreation.
fers_link_type_t
Type of visual link to render.
@ FERS_LINK_BISTATIC_TX_TGT
@ FERS_LINK_BISTATIC_TGT_RX
int fers_update_timing_from_json(fers_context_t *context, uint64_t id, const char *json)
Updates a single timing source from JSON without full context recreation.
int fers_load_scenario_from_xml_string(fers_context_t *context, const char *xml_content, int validate)
Loads a scenario into the context from a FERS XML string.
int fers_update_scenario_from_json(fers_context_t *context, const char *scenario_json)
Updates the simulation scenario from a JSON string.
char * fers_get_last_output_metadata_json(fers_context_t *context)
Returns JSON metadata for the most recent simulation output files.
int fers_set_vita49_max_udp_payload(fers_context_t *context, uint16_t max_udp_payload)
Sets the FERS VITA 49.2 UDP profile maximum payload size in bytes.
int fers_set_thread_count(unsigned num_threads)
Sets the number of worker threads for the simulation.
fers_link_quality_t
Quality of the radio link based on SNR.
Represents a sampled 2D antenna gain pattern.
size_t el_count
Number of samples along elevation (-90 to +90 deg).
size_t az_count
Number of samples along azimuth (-180 to +180 deg).
double * gains
Flat array of gain values [el_count * az_count].
double max_gain
Peak gain found in the pattern, in linear scale.
A container for an array of interpolated motion path points.
fers_interpolated_point_t * points
Heap-allocated interpolated motion points.
size_t count
Number of interpolated motion points.
Represents a single interpolated point on a motion path.
double vz
Z velocity in m/s.
double x
X position in meters.
double y
Y position in meters.
double z
Z position in meters.
double vx
X velocity in m/s.
double vy
Y velocity in m/s.
A container for an array of interpolated rotation path points.
fers_interpolated_rotation_point_t * points
Heap-allocated interpolated rotation points.
size_t count
Number of interpolated rotation points.
Represents a single interpolated point on a rotation path.
double azimuth
Azimuth angle in compass units.
double elevation
Elevation angle in compass units.
Represents a single waypoint for a motion path.
double x
X coordinate in meters (East in ENU).
double time
Time in seconds.
double y
Y coordinate in meters (North in ENU).
double z
Z coordinate in meters (Up/Altitude in ENU).
Represents a single waypoint for a rotation path.
double azimuth
Azimuth angle in compass units (0=North, pi/2 or 90=East).
double elevation
Elevation angle in compass units (positive up).
double time
Time in seconds.
A container for a list of visual links.
size_t count
Number of visual links in the array.
fers_visual_link_t * links
Heap-allocated visual link array.
Represents a single renderable line segment metadata.
double actual_power_dbm
Received power in dBm with actual RCS applied.
fers_link_quality_t quality
Signal quality (Strong/Weak).
uint64_t dest_id
ID of the destination component (e.g.
double rcs
RCS in m^2 for this path.
uint64_t source_id
ID of the source component (e.g.
fers_link_type_t type
Type of the link (Monostatic, Bistatic, etc.).
double display_value
Numeric value represented by label, in the label's unit.
uint64_t origin_id
ID of the originating Transmitter (for scattered paths).