DUDS
Distributed Update of Data from Something
duds::data::CompactSample< VT, QT > Struct Template Reference

A template for a sample from an insturment that does not store units or the origin. More...

#include <Sample.hpp>

Collaboration diagram for duds::data::CompactSample< VT, QT >:

Public Types

typedef QT Quality
 
typedef VT Value
 

Public Attributes

QT accuracy
 The expected accuracy of the instrument under the conditions in which the sample was taken. More...
 
QT precision
 The expected precision of the instrument under the conditions in which the sample was taken. More...
 
QT resolution
 The expected resolution of the instrument under the conditions in which the sample was taken. More...
 
VT value
 The value sampled from the insturment. More...
 

Static Public Attributes

static constexpr QT Unspecified = std::numeric_limits<QT>::infinity()
 The value used to represent an unspecified or unknown accuracy, precision, or resolution. More...
 

Detailed Description

template<class VT, class QT>
struct duds::data::CompactSample< VT, QT >

A template for a sample from an insturment that does not store units or the origin.

This is intended for use in data structures that store many samples from the same Instrument.

Template Parameters
VTThe type used to store the value meausred by the insturment. In most cases, this should be double. In the case of a time stamp rather than an interval, the value should be an integer to avoid loss of resolution the further the time is from time zero.
QTThe type used to store quality information about the sampled value. In the case of a time stamp, a double or float could be used. Units are be the same as in VT, unless VT is one of the duds::time::interstellar time types and QT is a floating point type, in which case the units are seconds. Unsigned intergers must not be used.
Author
Jeff Jackowski

Definition at line 60 of file Sample.hpp.

Member Typedef Documentation

◆ Quality

template<class VT, class QT>
typedef QT duds::data::CompactSample< VT, QT >::Quality

Definition at line 188 of file Sample.hpp.

◆ Value

template<class VT, class QT>
typedef VT duds::data::CompactSample< VT, QT >::Value

Definition at line 187 of file Sample.hpp.

Member Data Documentation

◆ accuracy

template<class VT, class QT>
QT duds::data::CompactSample< VT, QT >::accuracy

The expected accuracy of the instrument under the conditions in which the sample was taken.

This is how far from correct the value could be.

Definition at line 202 of file Sample.hpp.

◆ precision

template<class VT, class QT>
QT duds::data::CompactSample< VT, QT >::precision

The expected precision of the instrument under the conditions in which the sample was taken.

This is how much the sample value may vary when the measured property is the same; think of it as consistency or repeatability.

Definition at line 209 of file Sample.hpp.

◆ resolution

template<class VT, class QT>
QT duds::data::CompactSample< VT, QT >::resolution

The expected resolution of the instrument under the conditions in which the sample was taken.

This is the smallest increment the insturment can represent. Since the Sample object may store the value in different units than the instrument reports, this value is not determined by the types used in the Sample object.

Definition at line 217 of file Sample.hpp.

◆ Unspecified

template<class VT, class QT>
constexpr QT duds::data::CompactSample< VT, QT >::Unspecified = std::numeric_limits<QT>::infinity()
static

The value used to represent an unspecified or unknown accuracy, precision, or resolution.

Definition at line 193 of file Sample.hpp.

◆ value

template<class VT, class QT>
VT duds::data::CompactSample< VT, QT >::value

The value sampled from the insturment.

Definition at line 197 of file Sample.hpp.


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