Skip to main content

Python Library for Multipath Ray Tracing

Project description

MURT

Multipath Radio Tracer (MURT) is a ray-tracing engine for multipath propagation of radio waves. MURT is a Python package with the ray-tracing core engine implemented in Python C++ Extension. The package also includes utility tools such as the visualizer, path loss calculator, and the scene generator.


Installations

MURT can be installed by pip.

pip install murt

the development version can be installed by the github repository and Make.

git clone https:/github.com/tamsri/murt
cd murt
make all

Examples

1. Call tracing engine.

The core engine reads the triangulated obj files and process the triangles into the engine.

from murt import Tracer

# Scene File Path in obj
SCENE_FILE_PATH = "scene_file_path.obj"

# Initialize Tracer
my_tracer = Tracer(SCENE_FILE_PATH)
# Set transmitting position
tx_pos = [ 0, 15, 0]
# Set receiving position
rx_pos = [-30, 1.5, 45]

# Return the traced paths
result = my_tracer.trace(tx_pos, rx_pos)
# [(2, [(-19.24, 8.56, 28.86)]),
#  (3, (-28.94, 4.22, 62.39)),
#  (3, (-70.80, 7.04, 15.22))]

The result is the list of traced paths. The first position of the tuple indicates types of the paths (1 - direct path, 2 - diffracted path, 3 - reflected path). The second position of the tuple is the detail of the traced paths.

2. Calculate Path Loss.

As the possible paths are traced from the engine. the results from the tracer can be used to

tx_freq = 2.4e9 # 2.4 GHz

scene_permittivity = 5.3 # Concrete's

result = [(2, [(-19.24, 8.56, 28.86)]),
 (3, (-28.94, 4.22, 62.39)),
 (3, (-70.80, 7.04, 15.22))]

losses = my_tracer.get_total_loss(
 tx_pos, rx_pos, result, tx_freq, scene_permittivity)
# {'total_dB': 84.3, 'signals': [[95.50, 1.86e-07], [86.63, 2.91e-07], [89.27, 4.12e-07]]}

The tracer calculates the total path loss according to the theoretical propagation models. In this example, the scene material is considered to be concrete.

3. Visualizing traced paths.

To visualize the traced path, MURT package provides a window to display the scene and the paths by filling the information of the paths into the window's lines_set.

from murt import Tracer
from murt.window import Window
SCENE_FILE_PATH = "scene_file_path.obj"

# load window and scene
my_window = Window()
my_window.load_scene(SCENE_FILE_PATH)

# result from the previous example.
tx_pos = [ 0, 15, 0]
rx_pos = [-30, 1.5, 45]
result = [(2, [(-19.24, 8.56, 28.86)]),
 (3, (-28.94, 4.22, 62.39)),
 (3, (-70.80, 7.04, 15.22))]

# convert results to visualised paths
my_window.lines_set += Tracer.result_to_lines(result, tx_pos, rx_pos)

# run
my_window.run()

The scene can be rotated by click and drag. the result can be shown below.

Example Image

3. Randomly Generate the Scene

MURT also provides an example of application to procedurally generate the scenes for testing the traced paths from the engine. The application can be directly called from murt.apps.

from murt.apps import randomer

RANDOM_SEED = 5555
a = randomer(RANDOM_SEED)
a.run()

The scene can be regenerated by pressing the G button.

Example Image


License

© Supawat Tamsri MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

murt-0.0.4.tar.gz (9.9 MB view details)

Uploaded Source

Built Distributions

murt-0.0.4-py3.8-macosx-10.9-x86_64.egg (78.2 kB view details)

Uploaded Source

murt-0.0.4-cp38-cp38-macosx_10_9_x86_64.whl (66.1 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

Details for the file murt-0.0.4.tar.gz.

File metadata

  • Download URL: murt-0.0.4.tar.gz
  • Upload date:
  • Size: 9.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8

File hashes

Hashes for murt-0.0.4.tar.gz
Algorithm Hash digest
SHA256 d16f9f1ea476a9a9e62644ef773a54c8d6b3dcfba150e2a837040b3e10f33ce9
MD5 b36845a6526d0755df3e9aa27fa5b5f2
BLAKE2b-256 675a2633b46c867463c1d537b20e6b86f7c57d8491af17d8f8909d67ef2cb81d

See more details on using hashes here.

File details

Details for the file murt-0.0.4-py3.8-macosx-10.9-x86_64.egg.

File metadata

  • Download URL: murt-0.0.4-py3.8-macosx-10.9-x86_64.egg
  • Upload date:
  • Size: 78.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8

File hashes

Hashes for murt-0.0.4-py3.8-macosx-10.9-x86_64.egg
Algorithm Hash digest
SHA256 4de44891677452769b99ecaed323bed789897cc34b7b164bbb50deea2b0d46f8
MD5 d06a7e514c464c2c5e5a85208fcfd09d
BLAKE2b-256 8dfa1db18ff94bce53cbb32ee1e838b5c1726b055c9362873b2654caf29d1c92

See more details on using hashes here.

File details

Details for the file murt-0.0.4-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: murt-0.0.4-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 66.1 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8

File hashes

Hashes for murt-0.0.4-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9dfe68a07d60e8f02b6a32a6a67b8d616e93f6b4dc6ff13cbca49b52c3a7779a
MD5 9bd71a1244361dcc6fc4c9c1ccf2d0dd
BLAKE2b-256 321ee36b5b706c4d225e46b7b71aa05acf71c9d59181c3182f8f8c8c8d1e7f35

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page