33A Python module for radar simulation
44
55This module provides Cython wrapper functions for interfacing with the C++
6- radar simulation engine. It contains optimized functions for:
7-
8- - Point target creation and management
9- - Radar system configuration and setup
10- - Complex target modeling with mesh support
11- - Radar cross-section (RCS) calculations
12- - Time-varying parameter handling
13-
14- The module is designed for high-performance radar simulation applications
15- with support for both trial and full versions with appropriate limitations.
6+ radar simulation engine.
167
178---
189
@@ -34,16 +25,18 @@ with support for both trial and full versions with appropriate limitations.
3425from radarsimpy.includes.radarsimc cimport Radar
3526from radarsimpy.includes.radarsimc cimport TargetsManager
3627from radarsimpy.includes.radarsimc cimport PointsManager
37- from radarsimpy.includes.type_def cimport float_t, int_t
38- from libcpp.complex cimport complex as cpp_complex
28+ from radarsimpy.includes.type_def cimport float_t
3929from libcpp.memory cimport shared_ptr
4030
4131
4232# ============================================================================
4333# Core Conversion Functions
4434# ============================================================================
4535
46-
36+ # Add a point scatterer to the points manager for simulation
37+ # Converts Python point parameters (location, speed, RCS, phase, shape) to C++
38+ # Validates input parameters and updates the internal points collection
39+ # Raises TypeError for invalid parameter types, ValueError for invalid values
4740cdef void cp_AddPoint(location, speed, rcs, phase, shape, PointsManager[float_t] * points_manager) except *
4841
4942# Create a Radar system object for simulation
@@ -56,33 +49,8 @@ cdef shared_ptr[Radar[double, float_t]] cp_Radar(radar, frame_start_time) except
5649# Raises ValueError for invalid params, RuntimeError for mesh/FreeTier issues
5750cdef void cp_RCS_Target(target, mesh_module, TargetsManager[float_t] * targets_manager) except *
5851
52+ # Add a complex target to the targets manager for radar simulation
53+ # Converts Python target config to C++ with mesh processing and validation
54+ # Handles time-varying parameters and applies transformations at given timestamp
55+ # Raises ValueError for invalid target params, RuntimeError for mesh/FreeTier issues
5956cdef void cp_AddTarget(radar, target, timestamp, mesh_module, TargetsManager[float_t] * targets_manager) except *
60-
61- # ============================================================================
62- # Helper Functions for Internal Use
63- # ============================================================================
64-
65- # Validate that an input vector has exactly 3 elements
66- # Raises TypeError if not array-like, ValueError if wrong size
67- cdef void _validate_vector_3d(object vector, str name) except *
68-
69- # Safely convert unit string to scale factor
70- # Supports 'm', 'cm', 'mm' units, raises ValueError for unsupported units
71- cdef float_t _safe_unit_conversion(str unit) except *
72-
73- # Check mesh size limits for free tier with detailed error messages
74- # Raises RuntimeError if FreeTier limitations are exceeded
75- cdef void _validate_mesh_for_free_tier(int_t num_faces) except *
76-
77- # Convert permittivity value to complex float with validation
78- # Handles both 'PEC' string and numeric values
79- # Raises ValueError for invalid permittivity values
80- cdef cpp_complex[float_t] _convert_permittivity(object permittivity) except *
81-
82- # Convert permeability value to complex float with validation
83- # Raises ValueError for invalid permeability values
84- cdef cpp_complex[float_t] _convert_permeability(object permeability) except *
85-
86- # Issue standardized deprecation warnings for renamed parameters
87- # Provides clear migration guidance and consistent warning format
88- cdef void _warn_deprecated_parameter(str old_param, str new_param) except *
0 commit comments