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//=============================================================================================================
53{
54 int chNumber = 0;
55 Eigen::Vector3d position{0, 0, 0};
56 Eigen::Matrix3d orientation{Eigen::Matrix3d::Identity()};
57 Eigen::VectorXd imbalance{Eigen::VectorXd::Ones(1)};
58};
59
60//=============================================================================================================
71{
72public:
73 FineCalibration() = default;
74
75 //=========================================================================================================
86 static FineCalibration read(const QString& sPath);
87
88 //=========================================================================================================
96 bool write(const QString& sPath) const;
97
98 //=========================================================================================================
104 const QList<FineCalEntry>& entries() const
105 {
106 return m_entries;
107 }
108
109 //=========================================================================================================
115 int size() const
116 {
117 return m_entries.size();
118 }
119
120 //=========================================================================================================
126 bool isEmpty() const
127 {
128 return m_entries.isEmpty();
129 }
130
131 //=========================================================================================================
140 bool findEntry(int chNumber, FineCalEntry& entry) const;
141
142 //=========================================================================================================
148 void addEntry(const FineCalEntry& entry)
149 {
150 m_entries.append(entry);
151 }
152
153 //=========================================================================================================
160 Eigen::VectorXd gainVector() const;
161
162 //=========================================================================================================
169 Eigen::MatrixXd imbalanceMatrix() const;
170
171private:
172 QList<FineCalEntry> m_entries;
173};
174
175} // namespace UTILSLIB
176
177#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::VectorXd imbalance
Eigen::Matrix3d orientation
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.