:py:mod:`pycasx.conf` ===================== .. py:module:: pycasx.conf .. autoapi-nested-parse:: 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 ~~~~~~~ .. autoapisummary:: pycasx.conf.AutoavoidConfig pycasx.conf.GenericConnection pycasx.conf.TelnetConfig pycasx.conf.LoggerConfig pycasx.conf.ACASXConfig pycasx.conf.WindowConfig pycasx.conf.CopyConfig pycasx.conf.LaunchConfig pycasx.conf.IntruderConfig pycasx.conf.WeightsConfig pycasx.conf.BetaDistributionConfig pycasx.conf.MinMaxConfig pycasx.conf.CollidingConfig pycasx.conf.ParallelConfig pycasx.conf.ScenarioConfig pycasx.conf.ONNXConfig pycasx.conf.RunConfig .. py:class:: AutoavoidConfig Configuration for the autoavoid subsystem. .. attribute:: active If true, the autoavoid subsystem is active. :type: bool .. attribute:: mode The mode to use. :type: Optional[Literal["hcas", "vcas"]] .. py:attribute:: active :type: bool .. py:attribute:: mode :type: Optional[Literal[hcas, vcas]] .. py:class:: GenericConnection Generic connection config. .. attribute:: host Host address. :type: str .. attribute:: port Port. :type: int .. py:attribute:: host :type: str .. py:attribute:: port :type: int .. py:class:: TelnetConfig Configuration for the telnet connection. Mirror of the telnet configuration in pycasx.conf.launch. .. attribute:: port The port to connect to. :type: int .. attribute:: rate The rate to connect at. :type: int .. py:attribute:: port :type: int .. py:attribute:: rate :type: int .. py:class:: LoggerConfig Configuration for the logger subcommand. .. attribute:: active If true, the logger is active. :type: bool .. attribute:: log_folder The folder to log to. :type: str .. attribute:: include_date If true, include the date in the log file. :type: bool .. attribute:: files The files to log to. :type: Dict[str, str] .. py:attribute:: active :type: bool .. py:attribute:: log_folder :type: str .. py:attribute:: include_date :type: bool .. py:attribute:: files :type: Dict[str, str] .. py:class:: ACASXConfig Configuration for the ACAS X. Mirror of the ACAS X configuration in pycasx.conf.acasx. .. attribute:: update_rate The update rate of the ACAS X. :type: float .. attribute:: backend The neural network backend to use for the CAS. :type: str .. attribute:: autoavoid The autoavoid configuration. :type: AutoavoidConfig .. attribute:: adsb The ADS-B configuration. :type: GenericConnection .. attribute:: api The API configuration. :type: GenericConnection .. py:attribute:: update_rate :type: float .. py:attribute:: backend :type: str .. py:attribute:: autoavoid :type: AutoavoidConfig .. py:attribute:: logger :type: LoggerConfig .. py:attribute:: adsb :type: GenericConnection .. py:attribute:: api :type: GenericConnection .. py:class:: WindowConfig General configuration for a window. .. attribute:: width The width of the window. :type: int .. attribute:: height The height of the window. :type: int .. py:attribute:: width :type: int .. py:attribute:: height :type: int .. py:class:: CopyConfig Configuration for the copy command. Mirror of the copy configuration in pycasx.conf.copy. .. attribute:: fg_root The FlightGear root directory. :type: Optional[str] .. py:attribute:: fg_root :type: Optional[str] .. py:class:: LaunchConfig Configuration for the launch command. Mirror of the launch configuration in pycasx.conf.launch. .. attribute:: background If true, run FlightGear in the background. :type: bool .. attribute:: disable_sound If true, disable sound. :type: bool .. attribute:: fg_root The FlightGear root directory. :type: Optional[str] .. attribute:: fgfs The path to the FlightGear executable. :type: Optional[str] .. attribute:: timeout The timeout after which to kill FlightGear. Works only in non-background mode. :type: float .. attribute:: fgfsrc The path to the fgfsrc file. :type: Optional[str]] .. attribute:: httpd The httpd port. :type: Optional[int] .. attribute:: telnet The telnet configuration. :type: Optional[TelnetConfig] .. attribute:: aircraft The aircraft to use. :type: Optional[str] .. attribute:: altitude The altitude of the ownship. :type: Optional[float] .. attribute:: heading The heading of the ownship. :type: Optional[float] .. attribute:: lat The latitude of the ownship. :type: Optional[float] .. attribute:: lon The longitude of the ownship. :type: Optional[float] .. attribute:: pitch The pitch of the ownship. :type: Optional[float] .. attribute:: roll The roll of the ownship. :type: Optional[float] .. attribute:: vc The vertical speed of the ownship. :type: Optional[float] .. attribute:: config The FlightGear configuration files to use. :type: Optional[List[str]] .. attribute:: prop The FlightGear properties to set. :type: Optional[Dict[str, Any]] .. attribute:: timeofday The time of day. :type: Optional[str] .. attribute:: wind The wind. :type: Optional[str] .. attribute:: ai_scenario The AI scenario to use. :type: Optional[str] .. py:attribute:: background :type: bool .. py:attribute:: disable_sound :type: bool .. py:attribute:: fg_root :type: Optional[str] .. py:attribute:: fgfs :type: Optional[str] .. py:attribute:: timeout :type: float .. py:attribute:: fgfsrc :type: Optional[str] .. py:attribute:: httpd :type: Optional[int] .. py:attribute:: telnet :type: Optional[TelnetConfig] .. py:attribute:: aircraft :type: Optional[str] .. py:attribute:: altitude :type: Optional[float] .. py:attribute:: heading :type: Optional[float] .. py:attribute:: lat :type: Optional[float] .. py:attribute:: lon :type: Optional[float] .. py:attribute:: pitch :type: Optional[float] .. py:attribute:: roll :type: Optional[float] .. py:attribute:: vc :type: Optional[float] .. py:attribute:: config :type: Optional[List[str]] .. py:attribute:: prop :type: Optional[Dict[str, Any]] .. py:attribute:: timeofday :type: Optional[str] .. py:attribute:: wind :type: Optional[str] .. py:attribute:: ai_scenario :type: Optional[str] .. py:class:: IntruderConfig A simple intruder config for the scenario generation. .. attribute:: type_ The aircraft type :type: str .. attribute:: class_ The aircraft class :type: str .. attribute:: model The path to the xml model file :type: str .. py:attribute:: type_ :type: str .. py:attribute:: class_ :type: str .. py:attribute:: model :type: str .. py:class:: WeightsConfig A simple dataclass to represent the weights for the scenario generation. .. attribute:: colliding The weight for the colliding scenario :type: float .. attribute:: parallel The weight for the parallel scenario :type: float .. attribute:: skewed The weight for the skewed scenario :type: float .. py:attribute:: colliding :type: float .. py:attribute:: parallel :type: float .. py:attribute:: skewed :type: float .. py:class:: BetaDistributionConfig A simple dataclass to represent a beta distribution. .. attribute:: spread The spread of the distribution. If the value is a string, it will be interpreted by pint as a quantity. :type: float | str .. attribute:: alpha The alpha parameter :type: float .. attribute:: beta The beta parameter :type: float .. py:attribute:: spread :type: Union[float, str] .. py:attribute:: alpha :type: float .. py:attribute:: beta :type: float .. py:class:: MinMaxConfig A simple dataclass to represent the min and max values. .. attribute:: min The minimum value. If the value is a string, it will be interpreted by pint as a quantity. :type: float | str .. attribute:: max The maximum value. If the value is a string, it will be interpreted by pint as a quantity. :type: float | str .. py:attribute:: min_ :type: Union[float, str] .. py:attribute:: max_ :type: Union[float, str] .. py:class:: CollidingConfig A simple dataclass to represent the colliding scenario. .. attribute:: altitude The altitude distribution :type: BetaDistributionConfig .. attribute:: heading The heading distribution :type: MinMaxConfig .. attribute:: speed The speed distribution :type: MinMaxConfig .. py:attribute:: altitude :type: BetaDistributionConfig .. py:attribute:: heading :type: MinMaxConfig .. py:attribute:: speed :type: MinMaxConfig .. py:class:: ParallelConfig A simple dataclass to represent the parallel scenario. .. attribute:: altitude The altitude distribution :type: BetaDistributionConfig .. attribute:: horizontal The horizontal distribution :type: BetaDistributionConfig .. attribute:: speed The speed distribution :type: MinMaxConfig .. py:attribute:: altitude :type: BetaDistributionConfig .. py:attribute:: horizontal :type: BetaDistributionConfig .. py:attribute:: speed :type: MinMaxConfig .. py:class:: ScenarioConfig Configuration for the launch command. Mirror of the launch configuration in pycasx.conf.launch. .. attribute:: dest_folder The destination folder for the scenarios. :type: str .. attribute:: n_scenarios The number of scenarios to generate. :type: int .. attribute:: sort_by_uuid Sort scenarios by UUID into separate folders. :type: bool .. attribute:: 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 .. attribute:: weights The weights for the scenario generation. :type: WeightsConfig .. attribute:: colliding The colliding scenario configuration. :type: CollidingConfig .. attribute:: parallel The parallel scenario configuration. :type: ParallelConfig .. attribute:: headless If true, run FlightGear in the background. :type: bool .. attribute:: disable_sound If true, disable sound. :type: bool .. attribute:: httpd The httpd port. :type: int .. attribute:: telnet The telnet configuration. :type: TelnetConfig .. attribute:: aircraft The aircraft to use. :type: str .. attribute:: altitude The altitude of the ownship. If the value is a string, it will be interpreted by pint as a quantity. :type: float | str .. attribute:: heading The heading of the ownship. If the value is a string, it will be interpreted by pint as a quantity. :type: float | str .. attribute:: lat The latitude of the ownship. If the value is a string, it will be interpreted by pint as a quantity. :type: float | str .. attribute:: lon The longitude of the ownship. If the value is a string, it will be interpreted by pint as a quantity. :type: float | str .. attribute:: pitch The pitch of the ownship. If the value is a string, it will be interpreted by pint as a quantity. :type: float | str .. attribute:: roll The roll of the ownship. If the value is a string, it will be interpreted by pint as a quantity. :type: float | str .. attribute:: 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 .. attribute:: config The FlightGear configuration files to use. :type: List[str] .. attribute:: prop The FlightGear properties to set. :type: Dict[str, Any] .. attribute:: timeofday The time of day. :type: str .. attribute:: wind The wind. :type: str .. attribute:: min_intruders The minimum number of intruders. :type: int .. attribute:: max_intruders The maximum number of intruders. :type: int .. attribute:: intruder The intruder configuration. :type: IntruderConfig .. py:attribute:: dest_folder :type: str .. py:attribute:: n_scenarios :type: int .. py:attribute:: sort_by_uuid :type: bool .. py:attribute:: time_to_cpa :type: Union[float, str] .. py:attribute:: weights :type: WeightsConfig .. py:attribute:: colliding :type: CollidingConfig .. py:attribute:: parallel :type: ParallelConfig .. py:attribute:: headless :type: bool .. py:attribute:: disable_sound :type: bool .. py:attribute:: httpd :type: Optional[int] .. py:attribute:: telnet :type: Optional[TelnetConfig] .. py:attribute:: aircraft :type: str .. py:attribute:: altitude :type: Union[float, str] .. py:attribute:: heading :type: Union[float, str] .. py:attribute:: lat :type: Union[float, str] .. py:attribute:: lon :type: Union[float, str] .. py:attribute:: pitch :type: Union[float, str] .. py:attribute:: roll :type: Union[float, str] .. py:attribute:: vc :type: Union[float, str] .. py:attribute:: config :type: List[str] .. py:attribute:: prop :type: Dict[str, Any] .. py:attribute:: timeofday :type: str .. py:attribute:: wind :type: str .. py:attribute:: min_intruders :type: int .. py:attribute:: max_intruders :type: int .. py:attribute:: intruder :type: IntruderConfig .. py:class:: ONNXConfig Configuration for the onnx command. Mirror of the onnx configuration in pycasx.conf.onnx. .. attribute:: hcas The path to the hcas folder. :type: Optional[str] .. attribute:: vcas The path to the vcas folder. :type: Optional[str] .. py:attribute:: hcas :type: Optional[str] .. py:attribute:: vcas :type: Optional[str] .. py:class:: RunConfig Configuration for the run command. Mirror of the run configuration in cas.conf.run. :param timeout: The timeout after which to kill FlightGear. :type timeout: float :param venv_path: The path to the virtual environment. :type venv_path: Optional[str] .. py:attribute:: timeout :type: float .. py:attribute:: venv_path :type: Optional[str]