openworld_radio_twin.models#

Classes

BuildingContextResponse(**data)

BuildingFeature(**data)

BuildingGeometry(**data)

Source-resolved triangle shell, before scene placement.

BuildingGeometryContext(**data)

Solver-coordinate native shells, with no visual offset or vertical scaling.

Coordinate(**data)

CoverageGrid(**data)

EngineName(value)

EnvironmentContext(**data)

GridMapping(**data)

NativeBuildingMesh(**data)

RadioLayer(**data)

SceneBounds(**data)

SceneCenter(**data)

Explicit scene origin; the compiled square is centred here rather than on the first TX.

SceneRequest(**data)

Geometry inputs of a compiled scene, keyed like openworld_radio_twin.rt.load_scene.

SceneResponse(**data)

A compiled, cached scene as the browser displays it.

SearchResult(**data)

SimulationRequest(**data)

SimulationResponse(**data)

SionnaEngineConfig(**data)

Runtime and geometry controls for the built-in Sionna RT adapter.

SurfaceContext(**data)

TerrainContext(**data)

TransmitterConfig(**data)

class openworld_radio_twin.models.EngineName(value)[source]#

Bases: str, Enum

preview = 'preview'#
sionna = 'sionna'#
class openworld_radio_twin.models.Coordinate(**data)[source]#

Bases: BaseModel

latitude: float#
longitude: float#
altitude_m: float#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class openworld_radio_twin.models.TransmitterConfig(**data)[source]#

Bases: BaseModel

position: Coordinate#
frequency_ghz: float#
power_dbm: float#
azimuth_deg: float#
downtilt_deg: float#
antenna_pattern: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class openworld_radio_twin.models.SionnaEngineConfig(**data)[source]#

Bases: BaseModel

Runtime and geometry controls for the built-in Sionna RT adapter.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

device: Literal['auto', 'cuda', 'cpu']#
include_ground: bool#
include_vegetation: bool#
include_paved: bool#
include_water: bool#
include_building_roofs: bool#
include_building_walls: bool#
los: bool#
specular_reflection: bool#
diffuse_reflection: bool#
refraction: bool#
diffraction: bool#
edge_diffraction: bool#
diffraction_lit_region: bool#
class openworld_radio_twin.models.SceneRequest(**data)[source]#

Bases: BaseModel

Geometry inputs of a compiled scene, keyed like openworld_radio_twin.rt.load_scene.

latitude: float#
longitude: float#
radius_m: float#
include_buildings: bool#
building_source: str#
include_terrain: bool#
material_profile: Literal['itu', 'uniform']#
terrain_resolution_m: float#
limit_terrain_grid()[source]#
Return type:

SceneRequest

property buildings_mode: Literal['auto', 'none']#
property terrain_mode: Literal['elevation', 'flat']#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class openworld_radio_twin.models.SceneCenter(**data)[source]#

Bases: BaseModel

Explicit scene origin; the compiled square is centred here rather than on the first TX.

latitude: float#
longitude: float#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class openworld_radio_twin.models.SimulationRequest(**data)[source]#

Bases: BaseModel

transmitters: list[TransmitterConfig]#
scene_center: SceneCenter | None#
engine: str#
engine_config: dict[str, str | int | float | bool]#
radius_m: float#
resolution_m: float#
receiver_height_m: float#
max_depth: int#
samples_per_tx: int#
seed: int#
association_metric: str#
include_buildings: bool#
building_source: str#
include_terrain: bool#
material_profile: Literal['itu', 'uniform']#
terrain_resolution_m: float#
limit_grid_size()[source]#
Return type:

SimulationRequest

property include_surface_materials: bool#

Return whether semantic surface classes are required by this request.

Classes are assigned on the ground grid whether that grid follows the DEM or is a flat plane; only the uniform profile omits them.

property include_environment_grid: bool#

Return whether a gridded ground (DEM or flat) must be acquired for this request.

The planar preview engine ignores materials, so a flat scene only needs the environment grid when Sionna evaluates it.

property reference_transmitter: TransmitterConfig#

First TX; it sets the shared antenna preset and, without scene_center, the origin.

property scene_origin: SceneCenter#

Local ENU origin and coverage-grid centre of the compiled scene.

property scene_request: SceneRequest#

Geometry of the compiled scene this simulation runs in.

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class openworld_radio_twin.models.BuildingGeometry(**data)[source]#

Bases: BaseModel

Source-resolved triangle shell, before scene placement.

Horizontal coordinates use crs; vertex Z and ground_elevation_m use the explicitly named vertical datum, never implicit WGS84 heights.

crs: str#
vertical_datum: str#
lod: str#
ground_elevation_m: float#
vertices: list[tuple[float, float, float]]#
triangles: list[tuple[int, int, int]]#
surface_types: list[str]#
validate_mesh()[source]#
Return type:

BuildingGeometry

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class openworld_radio_twin.models.BuildingFeature(**data)[source]#

Bases: BaseModel

feature_id: str#
source: str#
feature_type: str#
source_dataset_id: str | None#
parent_building_id: str | None#
source_record_id: str | None#
source_release: str | None#
name: str | None#
height_m: float#
min_height_m: float#
height_source: str#
height_uncertainty_m: float | None#
coordinates: list[list[float]]#
holes: list[list[list[float]]]#
geometry: BuildingGeometry | None#
source_attributes: dict[str, object]#
property roof_height_agl_m: float#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class openworld_radio_twin.models.GridMapping(**data)[source]#

Bases: BaseModel

horizontal_datum: str#
local_axes: str#
origin_longitude: float#
origin_latitude: float#
first_sample_east_m: float#
first_sample_north_m: float#
column_step_m: float#
row_step_m: float#
sample_layout: str#
corner_coordinates: list[list[float]]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class openworld_radio_twin.models.RadioLayer(**data)[source]#

Bases: BaseModel

label: str#
unit: str#
values: list[float | None] | None#
minimum: float#
maximum: float#
display_minimum: float#
display_maximum: float#
reduction: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class openworld_radio_twin.models.CoverageGrid(**data)[source]#

Bases: BaseModel

crs: str#
no_data_value: None#
receiver_height_agl_m: float#
grid_mapping: GridMapping#
west: float#
south: float#
east: float#
north: float#
width: int#
height: int#
layers: dict[str, RadioLayer]#
association: list[int] | None#
building_mask: list[bool] | None#
building_heights_m: list[float | None] | None#
building_cell_count: int#
validate_aligned_grids()[source]#
Return type:

CoverageGrid

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class openworld_radio_twin.models.NativeBuildingMesh(**data)[source]#

Bases: BaseModel

feature_id: str#
vertices: list[tuple[float, float, float]]#
triangles: list[tuple[int, int, int]]#
surface_types: list[str]#
lod: str#
placement_rule: str#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class openworld_radio_twin.models.BuildingGeometryContext(**data)[source]#

Bases: BaseModel

Solver-coordinate native shells, with no visual offset or vertical scaling.

origin_longitude: float#
origin_latitude: float#
coordinate_system: str#
meshes: list[NativeBuildingMesh]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class openworld_radio_twin.models.SimulationResponse(**data)[source]#

Bases: BaseModel

simulation_id: str#
engine: str#
elapsed_ms: int#
coverage: CoverageGrid#
buildings: list[BuildingFeature]#
building_geometry: BuildingGeometryContext | None#
warnings: list[str]#
engine_details: dict[str, str | int | float | bool]#
data_provenance: dict[str, str | int | float | bool]#
environment: EnvironmentContext | None#
scene: SceneResponse | None#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class openworld_radio_twin.models.SceneBounds(**data)[source]#

Bases: BaseModel

origin_longitude: float#
origin_latitude: float#
radius_m: float#
wgs84_corners: list[list[float]]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class openworld_radio_twin.models.SceneResponse(**data)[source]#

Bases: BaseModel

A compiled, cached scene as the browser displays it.

scene_id is the cache directory name shared with openworld_radio_twin.rt.load_scene for the same geometry inputs; the buildings and environment are read from that directory.

scene_id: str#
cached: bool#
specification: SceneRequest#
bounds: SceneBounds#
buildings: list[BuildingFeature]#
building_geometry: BuildingGeometryContext | None#
environment: EnvironmentContext | None#
warnings: list[str]#
data_provenance: dict[str, str | int | float | bool]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class openworld_radio_twin.models.TerrainContext(**data)[source]#

Bases: BaseModel

width: int#
height: int#
east_m: list[float]#
north_m: list[float]#
local_elevation_m: list[float]#
origin_elevation_m: float#
minimum_local_elevation_m: float#
maximum_local_elevation_m: float#
model_operations: list[dict[str, object]]#
source: dict[str, object]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class openworld_radio_twin.models.SurfaceContext(**data)[source]#

Bases: BaseModel

width: int#
height: int#
classes: list[int]#
legend: dict[int, str]#
material_profile_version: int#
material_profiles: dict[str, dict[str, str]]#
provenance: dict[str, object]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class openworld_radio_twin.models.EnvironmentContext(**data)[source]#

Bases: BaseModel

terrain: TerrainContext#
surfaces: SurfaceContext#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class openworld_radio_twin.models.BuildingContextResponse(**data)[source]#

Bases: BaseModel

buildings: list[BuildingFeature]#
building_geometry: BuildingGeometryContext | None#
warnings: list[str]#
data_provenance: dict[str, str | int | float | bool]#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class openworld_radio_twin.models.SearchResult(**data)[source]#

Bases: BaseModel

display_name: str#
latitude: float#
longitude: float#
kind: str | None#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].