ITU-R P.2108 – Python

Published

June 25, 2024

Modified

June 25, 2024

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.

Model Home

Installation

Package Not Yet Available

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
f__ghz = 1          # Frequency, in GHz
h__meter = 1.5      # Antenna height, in meters
w_s__meter = 27     # Street width, in meters
R__meter = 20       # Representative clutter height, in meters
clutter_type = 6    # Clutter type, enum

# Call height gain terminal correction model (P.2108 Section 3.1)
A_h__db = P2108.HeightGainTerminalCorrectionModel(f__ghz, h__meter, w_s__meter, R__meter, clutter_type)
assert(A_h__db == 8.769394261533549)

# can also use clutter type IntEnum
clutter_type = P2108.ClutterType.DenseUrban

# call clutter model
A_h__db = P2108.HeightGainTerminalCorrectionModel(f__ghz, h__meter, w_s__meter, R__meter, clutter_type)
assert(A_h__db == 8.769394261533549)

Terrestrial Statistical Model

# define inputs
f__ghz = 3          # Frequency, in GHz
d__km = 0.5         # Path distance, in km
p = 50              # Percentage of locations, in %

# call terrestrial statistical model
L_ctt__db = P2108.TerrestrialStatisticalModel(f__ghz, d__km, p)
assert(L_ctt__db == 26.10075036783342)

Aeronautical Statistical Model

# define inputs
f__ghz = 15         # Frequency, in GHz
theta__deg = 10     # Elevation angle, in degrees
p = 50              # Percentage of locations, in %

# call clutter model
L_ces__db = P2108.AeronauticalStatisticalModel(f__ghz, theta__deg, p)
assert(L_ces__db == 14.333686040067786)