formak.cpp
¶
Module Contents¶
Classes¶
Options for generating C++. |
|
A run of statements without control flow. |
|
C++ implementation of the model. |
|
C++ implementation of the EKF. |
Functions¶
Data¶
API¶
- formak.cpp.DEFAULT_MODULES = ('scipy', 'numpy', 'math')¶
- formak.cpp.logger = 'getLogger(...)'¶
- class formak.cpp.Config¶
Options for generating C++.
- common_subexpression_elimination:
Remove common shared computation
- extra_validation:
Catch errors earlier in exchange for increased compute time
- common_subexpression_elimination: bool = True¶
- extra_validation: bool = False¶
- max_dt_sec: float = 0.1¶
- innovation_filtering: float = 5.0¶
- ccode()¶
- class formak.cpp.CppCompileResult¶
- success: bool = None¶
- header_path: Optional[str] = None¶
- source_path: Optional[str] = None¶
- class formak.cpp.BasicBlock(*, statements: List[Tuple[str, Any]], indent: int, config: formak.cpp.Config)¶
A run of statements without control flow.
All statements can be reordered or changed to improve performance.
Initialization
- __len__()¶
- compile()¶
- class formak.cpp.Model(symbolic_model, calibration_map, namespace, header_include, config)¶
C++ implementation of the model.
Initialization
- _translate_model(symbolic_model)¶
- _translate_return()¶
- model_body()¶
- enable_control()¶
- enable_calibration()¶
- formak.cpp.ReadingT = 'namedtuple(...)'¶
- class formak.cpp.ExtendedKalmanFilter(state_model, process_noise, sensor_models, sensor_noises, namespace, header_include, config, calibration_map=None)¶
C++ implementation of the EKF.
Initialization
- _translate_process_model(symbolic_model)¶
- process_model_body()¶
- _translate_process_jacobian(symbolic_model)¶
- process_jacobian_body()¶
- _translate_control_jacobian(symbolic_model)¶
- control_jacobian_body()¶
- _translate_return()¶
- enable_control()¶
- _translate_control_covariance(covariance)¶
- control_covariance_body()¶
- enable_calibration()¶
- _translate_sensor_model(sensor_model_mapping)¶
- reading_types(verbose=False)¶
- _translate_sensor_jacobian_impl(sensor_model_mapping)¶
- _translate_sensor_jacobian(typename, sensor_model_mapping)¶
- _translate_sensor_covariance_impl(covariance)¶
- _translate_sensor_covariance(typename, covariance)¶
- formak.cpp._generate_model_function_bodies(header_location, namespace, symbolic_model, calibration_map, config)¶
- formak.cpp._generate_ekf_function_bodies(header_location, namespace, state_model, process_noise, sensor_models, sensor_noises, calibration_map, config)¶
- formak.cpp._compile_argparse()¶
- formak.cpp._header_body(*, generator) Iterable[formak.ast_tools.BaseAst] ¶
- formak.cpp.header_from_ast(*, generator) str ¶
- formak.cpp._source_body(*, generator)¶
- formak.cpp.source_from_ast(*, generator)¶
- formak.cpp._compile_impl(args, *, generator)¶
- formak.cpp.compile(symbolic_model, calibration_map=None, *, config=None)¶
- formak.cpp.compile_ekf(state_model, process_noise, sensor_models, sensor_noises, calibration_map=None, *, config=None)¶