v2.0.0
Loading...
Searching...
No Matches
fine_calibration.h
Go to the documentation of this file.
1//=============================================================================================================
16
17#ifndef FINE_CALIBRATION_DSP_H
18#define FINE_CALIBRATION_DSP_H
19
20//=============================================================================================================
21// INCLUDES
22//=============================================================================================================
23
24#include "dsp_global.h"
25
26//=============================================================================================================
27// EIGEN INCLUDES
28//=============================================================================================================
29
30#include <Eigen/Core>
31
32//=============================================================================================================
33// QT INCLUDES
34//=============================================================================================================
35
36#include <QString>
37#include <QList>
38
39//=============================================================================================================
40// DEFINE NAMESPACE UTILSLIB
41//=============================================================================================================
42
43namespace UTILSLIB
44{
45
46//=============================================================================================================
51{
52 int chNumber = 0;
53 double dGain = 1.0;
54 Eigen::Vector3d imbalance{0,0,0};
55};
56
57//=============================================================================================================
71{
72public:
73 FineCalibration() = default;
74
75 //=========================================================================================================
87 static FineCalibration read(const QString& sPath);
88
89 //=========================================================================================================
97 bool write(const QString& sPath) const;
98
99 //=========================================================================================================
103 const QList<FineCalEntry>& entries() const { return m_entries; }
104
105 //=========================================================================================================
109 int size() const { return m_entries.size(); }
110
111 //=========================================================================================================
115 bool isEmpty() const { return m_entries.isEmpty(); }
116
117 //=========================================================================================================
126 bool findEntry(int chNumber, FineCalEntry& entry) const;
127
128 //=========================================================================================================
132 void addEntry(const FineCalEntry& entry) { m_entries.append(entry); }
133
134 //=========================================================================================================
143 Eigen::VectorXd gainVector() const;
144
145 //=========================================================================================================
151 Eigen::MatrixXd imbalanceMatrix() const;
152
153private:
154 QList<FineCalEntry> m_entries;
155};
156
157} // namespace UTILSLIB
158
159#endif // FINE_CALIBRATION_DSP_H
Export/import macros and namespace declaration for the DSP library.
#define DSPSHARED_EXPORT
Definition dsp_global.h:50
Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms).
Per-sensor fine calibration entry.
Eigen::Vector3d imbalance
bool isEmpty() const
Check if empty.
bool write(const QString &sPath) const
Write fine calibration to a .dat file.
int size() const
Get the number of entries.
void addEntry(const FineCalEntry &entry)
Add an entry.
static FineCalibration read(const QString &sPath)
Read a fine calibration file (.dat format).
const QList< FineCalEntry > & entries() const
Get the calibration entries.