pycasx.scenario

Scenario generation module for pycasx.

Submodules

Package Contents

Classes

WayPointConfig

Configuration of a single waypoint.

GeographicCoordinates

The latitude and longitude of an aircraft.

Functions

convert(…)

Convert a value to a specific unit.

Attributes

ureg

GEOD

SPDX_FILE_COPYRIGHT_TEXT

SPDX_LICENSE_IDENTIFIER

HEADLESS_OPTIONS

pycasx.scenario.ureg
pycasx.scenario.GEOD
pycasx.scenario.SPDX_LICENSE_IDENTIFIER = 'SPDX-License-Identifier: MIT'
pycasx.scenario.HEADLESS_OPTIONS = Multiline-String
Show Value
"""# HEADLESS-START
--geometry=1x1
--disable-sound
--disable-terrasync
--disable-splash-screen
--fog-fastest
--disable-specular-highlight
--disable-random-objects
--disable-clouds
--disable-clouds3d
--disable-distance-attenuation
--disable-real-weather-fetch
--disable-random-vegetation
--disable-random-buildings
--disable-horizon-effect
--prop:/sim/rendering/particles=0
--prop:/sim/rendering/multi-sample-buffers=1
--prop:/sim/rendering/multi-samples=2
--prop:/sim/rendering/draw-mask/clouds=false
--prop:/sim/rendering/draw-mask/aircraft=false
--prop:/sim/rendering/draw-mask/models=false
--prop:/sim/rendering/draw-mask/terrain=false
--prop:/sim/rendering/random-vegetation=0
--prop:/sim/rendering/random-buildings=0
--prop:/sim/rendering/texture-compression=off
--prop:/sim/rendering/quality-level=0
--prop:/sim/rendering/shaders/quality-level=0
# HEADLESS-END
"""
class pycasx.scenario.WayPointConfig

Configuration of a single waypoint.

name

Name of the waypoint

Type:

str

lat

The waypoint’s latitude

Type:

float

lon

The waypoint’s longitude

Type:

float

alt

The aircraft’s true altitude

Type:

float

ktas

The the aircraft’s true airspeed

Type:

float

on_ground

Whether the aircraft in on the ground

Type:

bool

gear_down

Whether the gear is down

Type:

bool

flaps_down

Whether the flaps are down

Type:

bool

name: str
lat: float
lon: float
alt: float
ktas: float
on_ground: bool
gear_down: bool
flaps_down: bool
class pycasx.scenario.GeographicCoordinates

The latitude and longitude of an aircraft.

lat

the latitude of the aircraft.

Type:

float

lon

the longitude of the aircraft.

Type:

float

lat: float
lon: float
pycasx.scenario.convert(value: int | float) float
pycasx.scenario.convert(value: int | float, unit: str) float
pycasx.scenario.convert(value: str, unit: str) float

Convert a value to a specific unit.

This function takes a value and a unit and converts the value to the given unit. If the value is already a number (int | float), it is directly returned. If the value is a string, it is converted to a quantity and then to the given unit. This is useful to read values from the configuration file and convert them to the correct unit.

Parameters:
  • value (int | float | str) – The value to convert

  • unit (str) – The unit to convert to

Returns:

The converted value

Return type:

float