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

PtSmoother: calibrated PT output smoothing. More...

#include <PtSmoothing.hpp>

Collaboration diagram for 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

PtSmoother: calibrated PT output smoothing.

The first reading must come straight through — the old map default-inserted 0.0 and every PT ramped up from 0 psi after a restart.

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.

Member Function Documentation

◆ reset()

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

Definition at line 34 of file PtSmoothing.hpp.

◆ 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.

Member Data Documentation

◆ alpha_

Definition at line 39 of file PtSmoothing.hpp.

◆ state_

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

Definition at line 40 of file PtSmoothing.hpp.


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