Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
EFontesP90 committed Oct 31, 2024
1 parent 89e2212 commit a81e57d
Show file tree
Hide file tree
Showing 459 changed files with 138,284 additions and 10 deletions.
33 changes: 31 additions & 2 deletions channel_models/geometry/geometry.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
"""
File: geometry.py
Purpose:
This file allows computing for a pair rx (receiver, e.g., user equipment) and tx (transmitter, e.g.,
tbs, abs, or d2d possible forwarding user) their two/three-dimensional distance, their horizontal and vertical angle,
and their relative speeds. In the case of the horizontal angle, the angle computation is implemented for a transmitter
with three symmetric sectors of 120 degrees or four sectors of four symmetric sectors of 90 degrees. In the case of
d2d communication, the antenna pattern is assumed to be omnidirectional.
Author: Ernesto Fontes Pupo / Claudia Carballo González
Date: 2024-10-30
Version: 1.0.0
SPDX-License-Identifier: Apache-2.0
"""

# Third-party imports
import math as ma
import numpy as np

Expand All @@ -8,12 +26,23 @@ class Geometry(object):
06/05/2024
The class Geometry allows us to compute for a pair rx (receiver, e.g., user equipment) and tx (transmitter, e.g.,
tbs, abs, or d2d possible forwarding user) their two/three-dimensional distance, their horizontal and vertical angle,
and their relative speeds. In the case of the horizontal angle, the angle computation is implemented for a transmitter
and their relative speeds. In the case of the horizontal angle, the angle computation is implemented for a transmitter
with three symmetric sectors of 120 degrees or four sectors of four symmetric sectors of 90 degrees. In the case of
d2d communication, the antenna pattern is assumed to be omnidirectional.
Required attributes:
(rx_coord, tx_coord, rx_coord_old, tx_coord_old, t_now, t_old):
(tx_antenna_mode, rx_coord, tx_coord, rx_coord_old, tx_coord_old, t_now, t_old):
Outputs (geometry):
d_2d: Two dimensional distance between the tx and rx.
d_3d: Three dimensional distance between the tx and rx.
speed_rx: Speed of the rx regarding the time interval from t-1 (t_old) to t (t_now).
speed_tx: Speed of the tx regarding the time interval from t-1 (t_old) to t (t_now).
h_angle: Horizontal angle between the tx and the rx.
v_angle: Vertical angle between the tx and the rx.
ds_angle: Doppler shift angle between the tx and rx. The Doppler shift depends on the angle between the direction of
movement of the source/receiver and the line of sight.
"""

def __init__(self, tx_antenna_mode, rx_coord, tx_coord, rx_coord_old, tx_coord_old, t_now, t_old):
Expand Down
34 changes: 28 additions & 6 deletions channel_models/geometry/geometry_ntn.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,43 @@
"""
File: geometry.py
Purpose:
This file allows computing for a pair rx (receiver, e.g., user equipment) and tx (transmitter, a Satellite) their
three-dimensional distance, their elevation angle, their relative speeds and Doppler shift angle.
Author: Ernesto Fontes Pupo / Claudia Carballo González
Date: 2024-10-30
Version: 1.0.0
SPDX-License-Identifier: Apache-2.0
"""

# Third-party imports
import math as ma
import numpy as np

# Local application/library-specific imports
import scenario.sattelites_lla_info as sat_pos


class Geometry_ntn(object):

"""
06/05/2024
The class Geometry allows us to compute for a pair rx (receiver, e.g., user equipment) and tx (transmitter, e.g.,
tbs, abs, or d2d possible forwarding user) their two/three-dimensional distance, their horizontal and vertical angle,
and their relative speeds. In the case of the horizontal angle, the angle computation is implemented for a transmitter
with three symmetric sectors of 120 degrees or four sectors of four symmetric sectors of 90 degrees. In the case of
d2d communication, the antenna pattern is assumed to be omnidirectional.
The class Geometry_ntn allows computing for a pair rx (receiver, e.g., user equipment) and tx (transmitter, a Satellite) their
three-dimensional distance, their elevation angle, their relative speeds and Doppler shift angle.
Required attributes:
(rx_coord, tx_coord, rx_coord_old, tx_coord_old, t_now, t_old):
(grid_lla, grid_xy, rx_coord, tx_lla, rx_coord_old, tx_lla_old, desired_elevation_angle, t_now, t_old):
Outputs (geometry):
d_3d: Three dimensional distance between the tx and rx.
speed_rx: Speed of the rx regarding the time interval from t-1 (t_old) to t (t_now).
speed_tx: Speed of the tx regarding the time interval from t-1 (t_old) to t (t_now).
elevation_angle: Vertical angle between the tx and the rx.
ds_angle: Doppler shift angle between the tx and rx. The Doppler shift depends on the angle between the direction of
movement of the source/receiver and the line of sight.
"""

def __init__(self, grid_lla, grid_xy, rx_coord, tx_lla, rx_coord_old, tx_lla_old, desired_elevation_angle, t_now, t_old):
Expand Down
2 changes: 1 addition & 1 deletion link_computation/link_computation.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Link_computation(object):
(bs_parameters, general_channel_modeling, sub_groups_parameters, general_parameters, df_x, df_y,
df_z, time_map, grid_lla, grid_xy):
Returns (link_computation_bs2d_dl, link_computation_bs2d_ul, link_computation_d2d ):
Outputs (link_computation_bs2d_dl, link_computation_bs2d_ul, link_computation_d2d ):
metrics_dic_bs_dl: Dictionary with the SINR, BLER, and CQI for the downlink of each BS (TN/NTN) regarding each ED.
metrics_dic_d2d: Dictionary with the SINR, BLER, and CQI among the EDs that has enabled the D2D communication.
metrics_dic_bs_ul: Dictionary with the SINR, BLER, and CQI for the uplink of each BS (TN/NTN) regarding each ED.
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
[50, 50, 25, "tbs", "UMa", "three_sectors", "dual", "E", "B", 28, 2, 1, 20, 20, 2, 7, 15, None],
[75, 75, 10, "tbs", "UMi", "three_sectors", "dual", "D", "A", 28, 2, 1, 10, 10, 2, 7, 15, None],
[25, 25, 10, "tbs", "UMi", "three_sectors", "dual", "D", "A", 28, 2, 1, 10, 10, 2, 7, 15, None],
[39.2337738, 9.12153844, 50000, "sat", "HAPS", "Sat_ax", "dual", "C_ntn", "A_ntn", 2, 2, 50, 36, 30, 2, 7, None, 65],
[39.2337738, 9.12153844, 50000, "sat", "HAPS", "Sat_ax", "dual", "C_ntn", "A_ntn", 2, 2, 50, 36, 30, 2, 7, None, 85],
# [39.2137738, 9.1153844, 50000, "sat", "HAPS", "Sat_ax", "dual", "C_ntn", "A_ntn", 2, 2, 50, 36, 30, 2, 7, None, 90],
])
# fast_fading_los_type: TN_los: "D", "E"; NTN: "C_ntn", "D_ntn"
Expand Down
Loading

0 comments on commit a81e57d

Please sign in to comment.