STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
fsw::control Namespace Reference

Namespaces

namespace  anonymous_namespace{ControllerLUT.cpp}

Classes

class  ControllerLUT
 Controller LUT loader with multilinear interpolation. More...
class  ControllerService
 C++ controller service with UDP PWM output. More...
class  PressureStateMachine
 Pressure-based State Machine for Propulsion System. More...
struct  PWMResolution
class  RobustDDPController
 Robust Hybrid Optimal Controller. More...

Functions

std::map< int, std::string > boardIpMap (const fsw::config::Config &cfg)
 board_id → IP from [boards.
PWMResolution resolvePWMTargets (const fsw::config::Config &cfg)
template<typename T>
static bool send_msg (fsw::elodin::ElodinClient &client, T msg)

Variables

constexpr int N_STATE = 11
constexpr int N_CONTROL = 2
constexpr int IDX_P_COPV = 0
constexpr int IDX_P_REG = 1
constexpr int IDX_P_U_F = 2
constexpr int IDX_P_U_O = 3
constexpr int IDX_P_D_F = 4
constexpr int IDX_P_D_O = 5
constexpr int IDX_V_U_F = 6
constexpr int IDX_V_U_O = 7
constexpr int IDX_M_GAS_COPV = 8
constexpr int IDX_M_GAS_F = 9
constexpr int IDX_M_GAS_O = 10
constexpr double GAMMA_N2 = 1.4
constexpr double R_GAS_N2 = 296.8
constexpr double G0 = 9.807
static constexpr uint8_t PACKET_TYPE_PWM = 10
static constexpr uint8_t COMMS_VERSION = 0
static constexpr size_t HEADER_SIZE = 6
static constexpr size_t BODY_SIZE = 1
static constexpr size_t CMD_SIZE = 13
static constexpr size_t SINGLE_CMD_PACKET_SIZE = HEADER_SIZE + BODY_SIZE + CMD_SIZE
static constexpr size_t DUAL_CMD_PACKET_SIZE = HEADER_SIZE + BODY_SIZE + CMD_SIZE * 2

Function Documentation

◆ boardIpMap()

std::map< int, std::string > fsw::control::boardIpMap ( const fsw::config::Config & cfg)
inline

board_id → IP from [boards.

*] (non-empty ip, first wins). No synthesized entries: a board this map does not hold is a board config did not declare.

Definition at line 47 of file PWMTargets.hpp.

References b.

Referenced by resolvePWMTargets().

◆ resolvePWMTargets()

PWMResolution fsw::control::resolvePWMTargets ( const fsw::config::Config & cfg)
inline

Definition at line 55 of file PWMTargets.hpp.

References boardIpMap(), res, and target.

Referenced by main(), and main().

◆ send_msg()

template<typename T>
bool fsw::control::send_msg ( fsw::elodin::ElodinClient & client,
T msg )
static

Variable Documentation

◆ BODY_SIZE

size_t fsw::control::BODY_SIZE = 1
staticconstexpr

Definition at line 59 of file ControllerService.cpp.

◆ CMD_SIZE

size_t fsw::control::CMD_SIZE = 13
staticconstexpr

Definition at line 60 of file ControllerService.cpp.

◆ COMMS_VERSION

uint8_t fsw::control::COMMS_VERSION = 0
staticconstexpr

◆ DUAL_CMD_PACKET_SIZE

size_t fsw::control::DUAL_CMD_PACKET_SIZE = HEADER_SIZE + BODY_SIZE + CMD_SIZE * 2
staticconstexpr

◆ G0

double fsw::control::G0 = 9.807
constexpr

◆ GAMMA_N2

double fsw::control::GAMMA_N2 = 1.4
constexpr

◆ HEADER_SIZE

size_t fsw::control::HEADER_SIZE = 6
staticconstexpr

Definition at line 58 of file ControllerService.cpp.

◆ IDX_M_GAS_COPV

int fsw::control::IDX_M_GAS_COPV = 8
constexpr

◆ IDX_M_GAS_F

int fsw::control::IDX_M_GAS_F = 9
constexpr

◆ IDX_M_GAS_O

int fsw::control::IDX_M_GAS_O = 10
constexpr

◆ IDX_P_COPV

◆ IDX_P_D_F

◆ IDX_P_D_O

◆ IDX_P_REG

int fsw::control::IDX_P_REG = 1
constexpr

◆ IDX_P_U_F

◆ IDX_P_U_O

◆ IDX_V_U_F

int fsw::control::IDX_V_U_F = 6
constexpr

◆ IDX_V_U_O

int fsw::control::IDX_V_U_O = 7
constexpr

◆ N_CONTROL

◆ N_STATE

◆ PACKET_TYPE_PWM

uint8_t fsw::control::PACKET_TYPE_PWM = 10
staticconstexpr

◆ R_GAS_N2

double fsw::control::R_GAS_N2 = 296.8
constexpr

◆ SINGLE_CMD_PACKET_SIZE

size_t fsw::control::SINGLE_CMD_PACKET_SIZE = HEADER_SIZE + BODY_SIZE + CMD_SIZE
staticconstexpr