Recommendation ITU-R P.2108 – Python
This page details the installation and usage of the Python version of the U.S. Reference Implementation of Recommendation ITU-R P.2108.
The home page for this model contains language-agnostic background and usage information for the routines implemented by this software, and provides links to additional documentation for implementations in other programming languages.
Installation
This package is not yet being publicly distributed. Check back later, or contact code@ntia.gov.
The following code snippet shows how to import the package and check the installed version:
from ITS.ITU.PSeries import P2108
print(P2108.__version__)
This package has no external Python dependencies.
Documentation
All functions and/or objects provided by this Python package contain built-in docstring help. This means that your Python development editor should be able to provide you with assistance on information such as function description, parameter types and descriptions, and return details. Regardless of your editor, you can always use Python’s help()
function in the console to provide information. For example:
help(P2108.TerrestrialStatisticalModel)
Examples
The following code examples show how each of the three models from Recommendation ITU-R P.2108 can be called from Python.
Height Gain Terminal Correction Model
# define inputs
= 1 # Frequency, in GHz
f__ghz = 1.5 # Antenna height, in meters
h__meter = 27 # Street width, in meters
w_s__meter = 20 # Representative clutter height, in meters
R__meter = 6 # Clutter type, enum
clutter_type
# Call height gain terminal correction model (P.2108 Section 3.1)
= P2108.HeightGainTerminalCorrectionModel(f__ghz, h__meter, w_s__meter, R__meter, clutter_type)
A_h__db assert(A_h__db == 8.769394261533549)
# can also use clutter type IntEnum
= P2108.ClutterType.DenseUrban
clutter_type
# call clutter model
= P2108.HeightGainTerminalCorrectionModel(f__ghz, h__meter, w_s__meter, R__meter, clutter_type)
A_h__db assert(A_h__db == 8.769394261533549)
Terrestrial Statistical Model
# define inputs
= 3 # Frequency, in GHz
f__ghz = 0.5 # Path distance, in km
d__km = 50 # Percentage of locations, in %
p
# call terrestrial statistical model
= P2108.TerrestrialStatisticalModel(f__ghz, d__km, p)
L_ctt__db assert(L_ctt__db == 26.10075036783342)
Aeronautical Statistical Model
# define inputs
= 15 # Frequency, in GHz
f__ghz = 10 # Elevation angle, in degrees
theta__deg = 50 # Percentage of locations, in %
p
# call clutter model
= P2108.AeronauticalStatisticalModel(f__ghz, theta__deg, p)
L_ces__db assert(L_ces__db == 14.333686040067786)