hermespy-rt

Minimalistic signal processing ray-tracer in C
git clone https://git.ea.contact/hermespy-rt
Log | Files | Refs

commit 93603f34f6fcce6cb90dd18cf518797fb41c154a
parent 7603bd5bf41b6c774060bb9e645d940344ffdaf9
Author: Egor Achkasov <eaachkasov@edu.hse.ru>
Date:   Wed,  8 Jan 2025 11:21:03 +0100

Enforce GHz bandwidth input

Diffstat:
Mcompute_paths.c | 4++--
Mcompute_paths.h | 2+-
Mcompute_paths_pybind11.cpp | 7++++++-
3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/compute_paths.c b/compute_paths.c @@ -384,7 +384,7 @@ void compute_paths( IN const float *tx_positions, /* shape (num_tx, 3) */ IN const float *rx_velocities, /* shape (num_rx, 3) */ IN const float *tx_velocities, /* shape (num_tx, 3) */ - IN float carrier_frequency, /* > 0.0 */ + IN float carrier_frequency, /* > 0.0 (IN GHz!) */ IN size_t num_rx, /* number of receivers */ IN size_t num_tx, /* number of transmitters */ IN size_t num_paths, /* number of paths */ @@ -399,7 +399,7 @@ void compute_paths( /* Load the scene */ Mesh mesh = load_mesh_ply(mesh_filepath, carrier_frequency); - /* Calculate fibonacci sphere */ + /* Calculate a fibonacci sphere */ Vec3 *ray_directions = (Vec3*)malloc(num_paths * sizeof(Vec3)); float k, phi, theta; for (size_t i = 0; i < num_paths; ++i) { diff --git a/compute_paths.h b/compute_paths.h @@ -34,7 +34,7 @@ void compute_paths( IN const float *tx_positions, /* shape (num_tx, 3) */ IN const float *rx_velocities, /* shape (num_rx, 3) */ IN const float *tx_velocities, /* shape (num_tx, 3) */ - IN float carrier_frequency, /* > 0.0 */ + IN float carrier_frequency, /* > 0.0 (IN GHz!) */ IN size_t num_rx, /* number of receivers */ IN size_t num_tx, /* number of transmitters */ IN size_t num_paths, /* number of paths */ diff --git a/compute_paths_pybind11.cpp b/compute_paths_pybind11.cpp @@ -47,7 +47,7 @@ compute_paths_wrapper( (const float*)tx_pos_info.ptr, // Tx positions (const float*)rx_vel_info.ptr, // Rx velocities (const float*)tx_vel_info.ptr, // Tx velocities - carrier_frequency / 1e9, // Carrier frequency in GHz + carrier_frequency, // Carrier frequency in GHz (size_t)num_rx, (size_t)num_tx, (size_t)num_paths, @@ -91,4 +91,9 @@ PYBIND11_MODULE(rt, m) { py::arg("num_tx"), py::arg("num_paths"), py::arg("num_bounces")); + + // Scene filepaths + m.def("get_scene_fp_box", + []() { return __FILE__ + std::string("/scenes/box.ply"); } + ); }