STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
fsw::calibration::PtSmoother Class Reference

#include <PtSmoothing.hpp>

Collaboration diagram for fsw::calibration::PtSmoother:
[legend]

Public Member Functions

 PtSmoother (double alpha=0.25)
 0.25 → roughly a 4-sample effective window.
double step (uint16_t uid, double value)
 Feed one reading; returns the smoothed value.
void reset (uint16_t uid)

Private Attributes

double alpha_
std::unordered_map< uint16_t, double > state_

Detailed Description

Definition at line 16 of file PtSmoothing.hpp.

Constructor & Destructor Documentation

◆ PtSmoother()

fsw::calibration::PtSmoother::PtSmoother ( double alpha = 0.25)
inlineexplicit

0.25 → roughly a 4-sample effective window.

Definition at line 19 of file PtSmoothing.hpp.

References alpha_.

Member Function Documentation

◆ reset()

void fsw::calibration::PtSmoother::reset ( uint16_t uid)
inline

Definition at line 34 of file PtSmoothing.hpp.

References state_.

Referenced by main().

◆ step()

double fsw::calibration::PtSmoother::step ( uint16_t uid,
double value )
inline

Feed one reading; returns the smoothed value.

The first reading, or the first after a non-finite one, is passed through unchanged and seeds the average.

Definition at line 24 of file PtSmoothing.hpp.

References alpha_, and state_.

Referenced by engine.pipeline.thermal.wall_conduction.WallModel::advance(), main(), main(), and engine.pipeline.thermal.wall_conduction.WallModel::soak().

Member Data Documentation

◆ alpha_

double fsw::calibration::PtSmoother::alpha_
private

Definition at line 39 of file PtSmoothing.hpp.

Referenced by PtSmoother(), and step().

◆ state_

std::unordered_map<uint16_t, double> fsw::calibration::PtSmoother::state_
private

Definition at line 40 of file PtSmoothing.hpp.

Referenced by reset(), and step().


The documentation for this class was generated from the following file: