|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Controller LUT loader with multilinear interpolation. More...
#include <ControllerLUT.hpp>
Classes | |
| struct | Axis |
| struct | Output |
Public Member Functions | |
| ControllerLUT ()=default | |
| bool | load (const std::string &path) |
| Load LUT from binary file. | |
| bool | is_loaded () const |
| True if a LUT is loaded and ready for evaluation. | |
| bool | evaluate (const std::map< std::string, double > &point, std::map< std::string, double > &out) const |
| Evaluate LUT at the given point. | |
Private Attributes | |
| std::vector< Axis > | axes_ |
| std::vector< Output > | outputs_ |
Controller LUT loader with multilinear interpolation.
Loads binary LUT exported by scripts/controller_lut/export_lut_for_fsw.py. Used to bypass DDP and output optimal control (u_safe_F, u_safe_O or duty_F, duty_O) for boolean solenoid actuation.
Definition at line 19 of file ControllerLUT.hpp.
|
default |
| bool fsw::control::ControllerLUT::evaluate | ( | const std::map< std::string, double > & | point, |
| std::map< std::string, double > & | out ) const |
Evaluate LUT at the given point.
| point | Map from axis name -> value (e.g. P_u_fuel, P_u_ox, thrust_desired) |
| out | Map from output name -> interpolated value (e.g. u_safe_F, u_safe_O, duty_F, duty_O) |
Definition at line 104 of file ControllerLUT.cpp.
References axes_, outputs_, and result.
Referenced by engine.core.runner.PintleEngineRunner::evaluate_arrays().
|
inline |
True if a LUT is loaded and ready for evaluation.
Definition at line 27 of file ControllerLUT.hpp.
References axes_.
| bool fsw::control::ControllerLUT::load | ( | const std::string & | path | ) |
Load LUT from binary file.
Returns false on error.
Definition at line 21 of file ControllerLUT.cpp.
References a, axes_, MAGIC, o, and outputs_.
Referenced by engine.layerx.measurements.MeasurementStore::get().
|
private |
Definition at line 52 of file ControllerLUT.hpp.
Referenced by evaluate(), is_loaded(), and load().
|
private |
Definition at line 53 of file ControllerLUT.hpp.
Referenced by evaluate(), and load().