differt2d.utils module

Utilities.

P0: float = 100.0

Received power at zero distance from transmitter when using default parameter values, see received_power.

received_power(transmitter, receiver, path, interacting_objects, r_coef=0.5, height=0.1)[source]

Returns the received power for a given path between some transmitter and some receiver.

Here, the power decreases with the square of the path length, and each interaction introduces some reflection coefficient.

Parameters:
  • transmitter (Point) – The transmitting node, ignored.

  • receiver (Point) – The receiving node, ignored.

  • path (Path) – The ray path.

  • interacting_objects (Sequence[Interactable]) – The sequence of interacting objects, ignored.

  • r_coef (float, default: 0.5) – The reflection coefficient, with 0 <= r_coef <= 1.

  • height (float, default: 0.1) –

    The TX antenna height to avoid division by zero when transmitter and receiver are located at the same coordinates.

    Warning

    This parameter is not physically correct, as it is only valid for a line-of-sight path. For a more accurate simulation, a third dimension should be considered when computing the path.

    In practice, this parameter should be set to a small value.

Return type:

Array, '']

Returns:

The received power.