Changes between Version 25 and Version 26 of Tutorials/Digital Twins/Geo2Sig Map Getting Started
- Timestamp:
- Jan 27, 2026, 4:10:44 AM (2 weeks ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Tutorials/Digital Twins/Geo2Sig Map Getting Started
v25 v26 89 89 {{{ 90 90 #!python 91 # Core imports 92 import numpy as np 93 import mitsuba as mi 94 import matplotlib as mpl 95 import matplotlib.pyplot as plt 96 import sionna 97 from sionna.rt import load_scene, Camera, Transmitter, Receiver, PlanarArray,\ 98 PathSolver, RadioMapSolver, load_mesh, watt_to_dbm, transform_mesh,\ 99 cpx_abs_square 91 # Core imports 92 import numpy as np 93 import mitsuba as mi 94 from sionna.rt import load_scene, Transmitter, Receiver, RadioMapSolver, transform_mesh 100 95 }}} 101 96 … … 104 99 {{{ 105 100 #!python 106 SCENE_FOLDER = "../scenes/COSMOS" 107 scene = load_scene(f"{SCENE_FOLDER}/scene.xml") 101 import os 102 current_dir = os.getcwd() 103 print(current_dir) 104 SCENE_FOLDER = "../scene/COSMOS" 105 scene = load_scene(f"{SCENE_FOLDER}/scene.xml") 108 106 109 # Interactive 3D visualization and view of the scene110 scene.preview();107 # Interactive 3D visualization and view of the scene 108 scene.preview(); 111 109 }}} 112 110 … … 115 113 {{{ 116 114 #!python 117 # Set the operating frequency (n48 band for 5G)118 scene.frequency = 3.7e9 # 3.7 GHz 115 from sionna.rt import AntennaArray 116 from sionna.rt.antenna_pattern import antenna_pattern_registry 119 117 120 # Define Rx position 121 ue_position = [10.0, 0.0, 0.0] # Rx position (x, y, z in meters) 118 # Set the operating frequency (n48 band for 5G) 119 scene.frequency = 3.7e9 # 3.7 GHz 122 120 123 # Define Tx position124 gnb_position = [0.0, 0.0, 20.0] 121 # Define Rx position 122 ue_position = [20.0, 20.0, 0.0] # Rx position (x, y, z in meters) 125 123 126 # gNB antenna: 3GPP TR 38.901 pattern (AIRSTRAN D 2200) 127 gnb_pattern_factory = antenna_pattern_registry.get("tr38901") 128 gnb_pattern = gnb_pattern_factory(polarization="V") 129 130 # Use isotropic antenna pattern 131 ue_pattern_factory = antenna_pattern_registry.get("iso") 132 # Polarization should match the transmitter 133 ue_pattern = ue_pattern_factory(polarization="V") 124 # Define Tx position 125 gnb_position = [0.0, 0.0, 70.0] 134 126 135 # SISO: Single antenna element at origin [0, 0, 0] for both TX and RX 136 single_element = np.array([[0.0, 0.0, 0.0]]) # Shape: (1, 3) 127 # gNB antenna: 3GPP TR 38.901 pattern (AIRSTRAN D 2200) 128 gnb_pattern_factory = antenna_pattern_registry.get("tr38901") 129 gnb_pattern = gnb_pattern_factory(polarization="V") 137 130 138 # Configure antenna arrays 139 scene.tx_array = AntennaArray( 140 antenna_pattern=gnb_pattern, 141 normalized_positions=single_element.T # Shape: (3, 1) 142 ) 131 # Use isotropic antenna pattern 132 ue_pattern_factory = antenna_pattern_registry.get("iso") 133 # Polarization should match the transmitter 134 ue_pattern = ue_pattern_factory(polarization="V") 143 135 144 scene.rx_array = AntennaArray( 145 antenna_pattern=ue_pattern, 146 normalized_positions=single_element.T # Shape: (3, 1) 147 ) 136 # SISO: Single antenna element at origin [0, 0, 0] for both TX and RX 137 single_element = np.array([[0.0, 0.0, 0.0]]) # Shape: (1, 3) 148 138 149 # Create Rx 150 rx = Receiver(name="ue", position=ue_position, display_radius=0.03) 151 scene.add(rx) 139 # Configure antenna arrays 140 scene.tx_array = AntennaArray( 141 antenna_pattern=gnb_pattern, 142 normalized_positions=single_element.T # Shape: (3, 1) 143 ) 152 144 153 # Create Tx 154 tx = Receiver(name="gnb", position=gnb_position, display_radius=0.03) 155 scene.add(tx) 145 scene.rx_array = AntennaArray( 146 antenna_pattern=ue_pattern, 147 normalized_positions=single_element.T # Shape: (3, 1) 148 ) 156 149 150 # Create Rx 151 rx = Receiver(name="ue", position=ue_position, display_radius=0.03) 152 scene.add(rx) 153 154 # Create Tx 155 tx = Transmitter(name="gnb", position=gnb_position, display_radius=0.03) 156 scene.add(tx) 157 157 }}} 158 158 … … 162 162 #!python 163 163 rm_solver = RadioMapSolver() 164 165 164 166 165 # Create a measurement surface by cloning the terrain … … 174 173 los=True, 175 174 refraction=False, 176 cell_size=( 2., 2.),177 size=[ 512, 512], # Size of the radio map in meters. The number of cells in the x and y directions should be [size/cell_size]175 cell_size=(1.0, 1.0), 176 size=[1000, 1000], # Size of the radio map in meters. The number of cells in the x and y directions should be [size/cell_size] 178 177 # orientation=[0, 0, 0], # Orientation of the radio map plane 179 178 measurement_surface=measurement_surface, # TO BE UDPATED
