pycasx.conf

Configuration module for pycasx.

Also, list of all configuration dictionaries for typed hydra.

As hydra does not support type annotations from __future__ import, we have to use the plain old typing module for Python 3.8 and 3.9 support.

Package Contents

Classes

AutoavoidConfig

Configuration for the autoavoid subsystem.

GenericConnection

Generic connection config.

TelnetConfig

Configuration for the telnet connection.

LoggerConfig

Configuration for the logger subcommand.

ACASXConfig

Configuration for the ACAS X.

WindowConfig

General configuration for a window.

CopyConfig

Configuration for the copy command.

LaunchConfig

Configuration for the launch command.

IntruderConfig

A simple intruder config for the scenario generation.

WeightsConfig

A simple dataclass to represent the weights for the scenario generation.

BetaDistributionConfig

A simple dataclass to represent a beta distribution.

MinMaxConfig

A simple dataclass to represent the min and max values.

CollidingConfig

A simple dataclass to represent the colliding scenario.

ParallelConfig

A simple dataclass to represent the parallel scenario.

ScenarioConfig

Configuration for the launch command.

ONNXConfig

Configuration for the onnx command.

RunConfig

Configuration for the run command.

class pycasx.conf.AutoavoidConfig

Configuration for the autoavoid subsystem.

active

If true, the autoavoid subsystem is active.

Type:

bool

mode

The mode to use.

Type:

Optional[Literal[“hcas”, “vcas”]]

active: bool
mode: Literal[hcas, vcas] | None
class pycasx.conf.GenericConnection

Generic connection config.

host

Host address.

Type:

str

port

Port.

Type:

int

host: str
port: int
class pycasx.conf.TelnetConfig

Configuration for the telnet connection.

Mirror of the telnet configuration in pycasx.conf.launch.

port

The port to connect to.

Type:

int

rate

The rate to connect at.

Type:

int

port: int
rate: int
class pycasx.conf.LoggerConfig

Configuration for the logger subcommand.

active

If true, the logger is active.

Type:

bool

log_folder

The folder to log to.

Type:

str

include_date

If true, include the date in the log file.

Type:

bool

files

The files to log to.

Type:

Dict[str, str]

active: bool
log_folder: str
include_date: bool
files: Dict[str, str]
class pycasx.conf.ACASXConfig

Configuration for the ACAS X.

Mirror of the ACAS X configuration in pycasx.conf.acasx.

update_rate

The update rate of the ACAS X.

Type:

float

backend

The neural network backend to use for the CAS.

Type:

str

autoavoid

The autoavoid configuration.

Type:

AutoavoidConfig

adsb

The ADS-B configuration.

Type:

GenericConnection

api

The API configuration.

Type:

GenericConnection

update_rate: float
backend: str
autoavoid: AutoavoidConfig
logger: LoggerConfig
adsb: GenericConnection
api: GenericConnection
class pycasx.conf.WindowConfig

General configuration for a window.

width

The width of the window.

Type:

int

height

The height of the window.

Type:

int

width: int
height: int
class pycasx.conf.CopyConfig

Configuration for the copy command.

Mirror of the copy configuration in pycasx.conf.copy.

fg_root

The FlightGear root directory.

Type:

Optional[str]

fg_root: str | None
class pycasx.conf.LaunchConfig

Configuration for the launch command.

Mirror of the launch configuration in pycasx.conf.launch.

background

If true, run FlightGear in the background.

Type:

bool

disable_sound

If true, disable sound.

Type:

bool

fg_root

The FlightGear root directory.

Type:

Optional[str]

fgfs

The path to the FlightGear executable.

Type:

Optional[str]

timeout

The timeout after which to kill FlightGear. Works only in non-background mode.

Type:

float

fgfsrc

The path to the fgfsrc file.

Type:

Optional[str]]

httpd

The httpd port.

Type:

Optional[int]

telnet

The telnet configuration.

Type:

Optional[TelnetConfig]

aircraft

The aircraft to use.

Type:

Optional[str]

altitude

The altitude of the ownship.

Type:

Optional[float]

heading

The heading of the ownship.

Type:

Optional[float]

lat

The latitude of the ownship.

Type:

Optional[float]

lon

The longitude of the ownship.

Type:

Optional[float]

pitch

The pitch of the ownship.

Type:

Optional[float]

roll

The roll of the ownship.

Type:

Optional[float]

vc

The vertical speed of the ownship.

Type:

Optional[float]

config

The FlightGear configuration files to use.

Type:

Optional[List[str]]

prop

The FlightGear properties to set.

Type:

Optional[Dict[str, Any]]

timeofday

The time of day.

Type:

Optional[str]

wind

The wind.

Type:

Optional[str]

ai_scenario

The AI scenario to use.

Type:

Optional[str]

background: bool
disable_sound: bool
fg_root: str | None
fgfs: str | None
timeout: float
fgfsrc: str | None
httpd: int | None
telnet: TelnetConfig | None
aircraft: str | None
altitude: float | None
heading: float | None
lat: float | None
lon: float | None
pitch: float | None
roll: float | None
vc: float | None
config: List[str] | None
prop: Dict[str, Any] | None
timeofday: str | None
wind: str | None
ai_scenario: str | None
class pycasx.conf.IntruderConfig

A simple intruder config for the scenario generation.

type_

The aircraft type

Type:

str

class_

The aircraft class

Type:

str

model

The path to the xml model file

Type:

str

type_: str
class_: str
model: str
class pycasx.conf.WeightsConfig

A simple dataclass to represent the weights for the scenario generation.

colliding

The weight for the colliding scenario

Type:

float

parallel

The weight for the parallel scenario

Type:

float

skewed

The weight for the skewed scenario

Type:

float

colliding: float
parallel: float
skewed: float
class pycasx.conf.BetaDistributionConfig

A simple dataclass to represent a beta distribution.

spread

The spread of the distribution. If the value is a string, it will be interpreted by pint as a quantity.

Type:

float | str

alpha

The alpha parameter

Type:

float

beta

The beta parameter

Type:

float

spread: float | str
alpha: float
beta: float
class pycasx.conf.MinMaxConfig

A simple dataclass to represent the min and max values.

min

The minimum value. If the value is a string, it will be interpreted by pint as a quantity.

Type:

float | str

max

The maximum value. If the value is a string, it will be interpreted by pint as a quantity.

Type:

float | str

min_: float | str
max_: float | str
class pycasx.conf.CollidingConfig

A simple dataclass to represent the colliding scenario.

altitude

The altitude distribution

Type:

BetaDistributionConfig

heading

The heading distribution

Type:

MinMaxConfig

speed

The speed distribution

Type:

MinMaxConfig

altitude: BetaDistributionConfig
heading: MinMaxConfig
speed: MinMaxConfig
class pycasx.conf.ParallelConfig

A simple dataclass to represent the parallel scenario.

altitude

The altitude distribution

Type:

BetaDistributionConfig

horizontal

The horizontal distribution

Type:

BetaDistributionConfig

speed

The speed distribution

Type:

MinMaxConfig

altitude: BetaDistributionConfig
horizontal: BetaDistributionConfig
speed: MinMaxConfig
class pycasx.conf.ScenarioConfig

Configuration for the launch command.

Mirror of the launch configuration in pycasx.conf.launch.

dest_folder

The destination folder for the scenarios.

Type:

str

n_scenarios

The number of scenarios to generate.

Type:

int

sort_by_uuid

Sort scenarios by UUID into separate folders.

Type:

bool

time_to_cpa

The time to CPA for the colliding scenario. If the value is a string, it will be interpreted by pint as a quantity.

Type:

float | str

weights

The weights for the scenario generation.

Type:

WeightsConfig

colliding

The colliding scenario configuration.

Type:

CollidingConfig

parallel

The parallel scenario configuration.

Type:

ParallelConfig

headless

If true, run FlightGear in the background.

Type:

bool

disable_sound

If true, disable sound.

Type:

bool

httpd

The httpd port.

Type:

int

telnet

The telnet configuration.

Type:

TelnetConfig

aircraft

The aircraft to use.

Type:

str

altitude

The altitude of the ownship. If the value is a string, it will be interpreted by pint as a quantity.

Type:

float | str

heading

The heading of the ownship. If the value is a string, it will be interpreted by pint as a quantity.

Type:

float | str

lat

The latitude of the ownship. If the value is a string, it will be interpreted by pint as a quantity.

Type:

float | str

lon

The longitude of the ownship. If the value is a string, it will be interpreted by pint as a quantity.

Type:

float | str

pitch

The pitch of the ownship. If the value is a string, it will be interpreted by pint as a quantity.

Type:

float | str

roll

The roll of the ownship. If the value is a string, it will be interpreted by pint as a quantity.

Type:

float | str

vc

The vertical speed of the ownship. If the value is a string, it will be interpreted by pint as a quantity.

Type:

float | str

config

The FlightGear configuration files to use.

Type:

List[str]

prop

The FlightGear properties to set.

Type:

Dict[str, Any]

timeofday

The time of day.

Type:

str

wind

The wind.

Type:

str

min_intruders

The minimum number of intruders.

Type:

int

max_intruders

The maximum number of intruders.

Type:

int

intruder

The intruder configuration.

Type:

IntruderConfig

dest_folder: str
n_scenarios: int
sort_by_uuid: bool
time_to_cpa: float | str
weights: WeightsConfig
colliding: CollidingConfig
parallel: ParallelConfig
headless: bool
disable_sound: bool
httpd: int | None
telnet: TelnetConfig | None
aircraft: str
altitude: float | str
heading: float | str
lat: float | str
lon: float | str
pitch: float | str
roll: float | str
vc: float | str
config: List[str]
prop: Dict[str, Any]
timeofday: str
wind: str
min_intruders: int
max_intruders: int
intruder: IntruderConfig
class pycasx.conf.ONNXConfig

Configuration for the onnx command.

Mirror of the onnx configuration in pycasx.conf.onnx.

hcas

The path to the hcas folder.

Type:

Optional[str]

vcas

The path to the vcas folder.

Type:

Optional[str]

hcas: str | None
vcas: str | None
class pycasx.conf.RunConfig

Configuration for the run command.

Mirror of the run configuration in cas.conf.run.

Parameters:
  • timeout (float) – The timeout after which to kill FlightGear.

  • venv_path (Optional[str]) – The path to the virtual environment.

timeout: float
venv_path: str | None