pycasx.acas.runner
Runner class around ACAS X.
Module Contents
Classes
Run the ACAS X system in a continuous loop. |
- class pycasx.acas.runner.Runner(backend, rate, autoavoid_cfg, logger_cfg)
Run the ACAS X system in a continuous loop.
- Parameters:
backend (str) – The neural network backend to use for the CAS.
rate (float) – The update rate of the ACAS X.
autoavoid_cfg (AutoavoidConfig) – The autoavoid configuration.
logger_cfg (LoggerConfig) – The logger configuration.
- register_connection(connection)
Register a connection with the CAS.
- Parameters:
connection (PropsConnection) – The connection to register.
- Return type:
None
- autoavoid()
Execute the autoavoid action.
This method will execute the autoavoid action based on the current autoavoid mode and advisory.
- Raises:
ValueError – If the autoavoid mode is not/wrongly set.
- Return type:
None
- _hcas_autoavoid()
Execute the HCAS autoavoid action.
- _vcas_autoavoid()
Execute the VCAS autoavoid action.
- log()
Log the current state of the ACAS X.
This method will log the current state of the ACAS X to log folder.
- Raises:
ValueError – If the topic is not found.
- Return type:
None
- init_log()
Initialize the logging for the ACAS X.
- print_status()
Print the status of the ACAS X.
- Return type:
None
- get_system_info(system_type)
Get the information about a CAS system.
- Parameters:
system_type (Literal["hcas", "vcas"]) – The CAS system to get information about.
- Returns:
The information about the CAS system.
- Return type:
- Raises:
HTTPException – If the system type is not found.
- get_ownship()
Get the ownship from the ACAS X system.
- Returns:
the ownship representation.
- Return type:
- get_intruder(call_sign)
Get an intruder from the ACAS X system.
- Parameters:
call_sign (str) – The callsign of the intruder.
- Returns:
The intruder from the ACAS X system.
- Return type:
- Raises:
HTTPException – If the intruder is not found.
- get_intruders()
Get the intruders from the ACAS X system.
- Returns:
- The intruders from the
ACAS X system.
- Return type:
Dict[str, Union[ExtendedIntruder, float]]
- get_autoavoid()
Get the autoavoid status from the ACAS X system.
- Returns:
the autoavoid representation.
- Return type:
- single_run()
Runs a single ACAS X update.
- async run()
Run the ACAS X in a continuous async loop.
This method will run the ACAS X in a continuous loop, updating the advisory every 1/rate seconds.
- Return type:
None