Jet1090¶
tangram_jet1090
¶
router
module-attribute
¶
router = APIRouter(
prefix="/jet1090",
tags=["jet1090"],
responses={404: {"description": "Not found"}},
)
plugin
module-attribute
¶
plugin = Plugin(
frontend_path="dist-frontend",
routers=[router],
config_class=PlanesConfig,
frontend_config_class=PlanesFrontendConfig,
into_frontend_config_function=into_frontend,
)
TrailColorOptions
dataclass
¶
Source code in packages/tangram_jet1090/src/tangram_jet1090/__init__.py
217 218 219 220 221 222 223 224 | |
by_attribute
class-attribute
instance-attribute
¶
by_attribute: Annotated[
Literal[
"altitude", "groundspeed", "vertical_rate", "track"
],
FrontendMutable(),
] = "altitude"
__init__
¶
__init__(
by_attribute: Annotated[
Literal[
"altitude",
"groundspeed",
"vertical_rate",
"track",
],
FrontendMutable(),
] = "altitude",
min: Annotated[float, FrontendMutable()] = 0.0,
max: Annotated[float, FrontendMutable()] = 45000.0,
) -> None
PlanesConfig
dataclass
¶
Source code in packages/tangram_jet1090/src/tangram_jet1090/__init__.py
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | |
history_control_channel
class-attribute
instance-attribute
¶
history_control_channel: str = 'history:control'
aircraft_db_url
class-attribute
instance-attribute
¶
aircraft_db_url: str = "https://jetvision.de/resources/sqb_databases/basestation.zip"
path_cache
class-attribute
instance-attribute
¶
history_flush_interval_secs
class-attribute
instance-attribute
¶
history_flush_interval_secs: int = 5
history_optimize_interval_secs
class-attribute
instance-attribute
¶
history_optimize_interval_secs: int = 120
history_optimize_target_file_size
class-attribute
instance-attribute
¶
history_optimize_target_file_size: int = 134217728
history_vacuum_interval_secs
class-attribute
instance-attribute
¶
history_vacuum_interval_secs: int = 120
history_vacuum_retention_period_secs
class-attribute
instance-attribute
¶
history_vacuum_retention_period_secs: int | None = 120
history_checkpoint_interval
class-attribute
instance-attribute
¶
history_checkpoint_interval: int = 10
__init__
¶
__init__(
jet1090_channel: str = "jet1090",
history_table_name: str = "jet1090",
history_control_channel: str = "history:control",
search_channel: str = "jet1090:search",
state_vector_expire: int = 20,
stream_interval_secs: float = 1.0,
aircraft_db_url: str = "https://jetvision.de/resources/sqb_databases/basestation.zip",
jet1090_url: str = "http://localhost:8080",
path_cache: Path = Path(
user_cache_dir("tangram_jet1090")
),
log_level: str = "INFO",
show_route_lines: bool = True,
history_buffer_size: int = 100000,
history_flush_interval_secs: int = 5,
history_optimize_interval_secs: int = 120,
history_optimize_target_file_size: int = 134217728,
history_vacuum_interval_secs: int = 120,
history_vacuum_retention_period_secs: int | None = 120,
history_checkpoint_interval: int = 10,
topbar_order: int = 50,
sidebar_order: int = 50,
trail_type: Literal["line", "curtain"] = "line",
trail_color: str | TrailColorOptions = "#600000",
trail_alpha: float = 0.6,
enable_3d: bool = False,
) -> None
PlanesFrontendConfig
dataclass
¶
Bases: HasTopbarUiConfig, HasSidebarUiConfig
Source code in packages/tangram_jet1090/src/tangram_jet1090/__init__.py
257 258 259 260 261 262 263 264 265 266 267 268 | |
trail_type
instance-attribute
¶
trail_type: Annotated[
Literal["line", "curtain"], FrontendMutable()
]
trail_color
instance-attribute
¶
trail_color: (
Annotated[str, FrontendMutable(kind="color")]
| TrailColorOptions
)
__init__
¶
__init__(
search_channel: str,
show_route_lines: Annotated[bool, FrontendMutable()],
topbar_order: Annotated[int, FrontendMutable()],
sidebar_order: Annotated[int, FrontendMutable()],
trail_type: Annotated[
Literal["line", "curtain"], FrontendMutable()
],
trail_color: Annotated[
str, FrontendMutable(kind="color")
]
| TrailColorOptions,
trail_alpha: Annotated[
float, Ge(0), Le(1), FrontendMutable()
],
enable_3d: Annotated[bool, FrontendMutable()],
) -> None
get_trajectory_data
async
¶
get_trajectory_data(
icao24: str, backend_state: InjectBackendState
) -> Response
Get the full trajectory for a given ICAO24 address.
Source code in packages/tangram_jet1090/src/tangram_jet1090/__init__.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | |
search_flights
async
¶
search_flights(
q: str, backend_state: InjectBackendState
) -> Response
Source code in packages/tangram_jet1090/src/tangram_jet1090/__init__.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | |
get_history_slice
async
¶
get_history_slice(
icao24: str,
start_timestamp: int,
end_timestamp: int,
backend_state: InjectBackendState,
) -> Response
Source code in packages/tangram_jet1090/src/tangram_jet1090/__init__.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | |
get_route_data
async
¶
get_route_data(
callsign: str, backend_state: InjectBackendState
) -> ORJSONResponse
Source code in packages/tangram_jet1090/src/tangram_jet1090/__init__.py
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | |
get_sensors_data
async
¶
get_sensors_data(
backend_state: InjectBackendState,
) -> ORJSONResponse
Source code in packages/tangram_jet1090/src/tangram_jet1090/__init__.py
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | |
into_frontend
¶
into_frontend(config: PlanesConfig) -> PlanesFrontendConfig
Source code in packages/tangram_jet1090/src/tangram_jet1090/__init__.py
271 272 273 274 275 276 277 278 279 280 281 | |
get_aircraft_db
async
¶
Source code in packages/tangram_jet1090/src/tangram_jet1090/__init__.py
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | |
run_planes
async
¶
run_planes(backend_state: BackendState) -> None
Source code in packages/tangram_jet1090/src/tangram_jet1090/__init__.py
336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 | |
tangram_jet1090._planes
¶
Aircraft
¶
PlanesConfig
¶
history_vacuum_retention_period_secs
property
writable
¶
history_vacuum_retention_period_secs: Optional[int]
__new__
¶
__new__(
redis_url: str,
jet1090_channel: str,
history_table_name: str,
history_control_channel: str,
state_vector_expire: int,
stream_interval_secs: float,
aircraft_db: Mapping[str, Aircraft],
history_buffer_size: int,
history_flush_interval_secs: int,
history_optimize_interval_secs: int,
history_optimize_target_file_size: int,
history_vacuum_interval_secs: int,
history_vacuum_retention_period_secs: Optional[int],
history_checkpoint_interval: int,
search_channel: str,
) -> PlanesConfig