InertiaSDK

Loading...
Searching...
No Matches
CalibrationSettings.h
1#pragma once
2
3 namespace inertia
4{
5 enum ConfigType : unsigned;
6
11 struct INERTIA_API CalibrationResults
12{
13 ConfigType configType;
14 unsigned sensorID;
15
16 double target;
17 double error;
18
19 double scaleX;
20 double scaleY;
21 double scaleZ;
22
23 double offsetX;
24 double offsetY;
25 double offsetZ;
26
29 CalibrationResults();
30};
31
32
37 struct INERTIA_API CalibrationSettings
38{
39 std::wstring logfile;
40 unsigned maxBurst;
41 bool accelFilter;
42 bool compassFilter;
43 bool gyroFilter;
44 double accelThresh;
45 double compassThresh;
46 double gyroThresh;
47 double accelTarget;
48 double compassTarget;
49 double gyroTarget;
50 bool accelZeroOffset;
51 bool compassZeroOffset;
52 bool gyroZeroOffset;
53
57 CalibrationSettings()
58 : CalibrationSettings(std::wstring(), 100)
59 {
60 }
61
78 CalibrationSettings(std::wstring const& logfile, const unsigned maxBurst,
79 const bool accelFilter = true, const bool compassFilter = false, const bool gyroFilter = true,
80 const double accelThresh = 2.0, const double compassThresh = .1, const double gyroThresh = 50.0,
81 const double accelTarget = 9.80665, const double compassTarget = .4905, const double gyroTarget = 360.0,
82 const bool accelZeroOffset = false, const bool compassZeroOffset = false, const bool gyroZeroOffset = true);
83
88 CalibrationSettings(std::wstring const& argString);
89
90#ifdef WITH_BOOST_PROGRAM_OPTIONS
95 static const po::options_description GetOptionDescription();
96#endif
97
102 std::wstring const ToString() const;
103};
104
105}
inertia
Definition FlashCommands.h:6
inertia::ConfigType
ConfigType
Definition ConfigChannel.h:7
inertia::CalibrationResults::configType
ConfigType configType
The configuration type these results apply to.
Definition CalibrationSettings.h:13
inertia::CalibrationResults::scaleY
double scaleY
New Y scale.
Definition CalibrationSettings.h:20
inertia::CalibrationResults::target
double target
The used calibration target.
Definition CalibrationSettings.h:16
inertia::CalibrationResults::offsetX
double offsetX
New X offset.
Definition CalibrationSettings.h:23
inertia::CalibrationResults::offsetZ
double offsetZ
New Z offset.
Definition CalibrationSettings.h:25
inertia::CalibrationResults::error
double error
Calibration error.
Definition CalibrationSettings.h:17
inertia::CalibrationResults::sensorID
unsigned sensorID
The sensorID these results apply to, or -1.
Definition CalibrationSettings.h:14
inertia::CalibrationResults::offsetY
double offsetY
New Y offset.
Definition CalibrationSettings.h:24
inertia::CalibrationResults::CalibrationResults
CalibrationResults()
inertia::CalibrationResults::scaleX
double scaleX
New X scale.
Definition CalibrationSettings.h:19
inertia::CalibrationResults::scaleZ
double scaleZ
New Z scale.
Definition CalibrationSettings.h:21
inertia::CalibrationSettings::CalibrationSettings
CalibrationSettings(std::wstring const &argString)
inertia::CalibrationSettings::gyroFilter
bool gyroFilter
Enable a filter for fast movements in the gyroscope data.
Definition CalibrationSettings.h:43
inertia::CalibrationSettings::gyroTarget
double gyroTarget
Target magnitude for gyroscope data, e.g. 360.0 deg/s.
Definition CalibrationSettings.h:49
inertia::CalibrationSettings::compassThresh
double compassThresh
Variance threshold for filtering compass data.
Definition CalibrationSettings.h:45
inertia::CalibrationSettings::compassZeroOffset
bool compassZeroOffset
Calculate the zero-offset of the average compass data.
Definition CalibrationSettings.h:51
inertia::CalibrationSettings::accelZeroOffset
bool accelZeroOffset
Calculate the zero-offset of the average acceleration data.
Definition CalibrationSettings.h:50
inertia::CalibrationSettings::ToString
std::wstring const ToString() const
inertia::CalibrationSettings::gyroThresh
double gyroThresh
Variance threshold for filtering gyroscope data.
Definition CalibrationSettings.h:46
inertia::CalibrationSettings::compassTarget
double compassTarget
Target magnitude for compass data, e.g. 0.4905 gauss.
Definition CalibrationSettings.h:48
inertia::CalibrationSettings::accelThresh
double accelThresh
Variance threshold for filtering acceleration data.
Definition CalibrationSettings.h:44
inertia::CalibrationSettings::GetOptionDescription
static const po::options_description GetOptionDescription()
inertia::CalibrationSettings::accelFilter
bool accelFilter
Enable a filter for fast movements in the accelerometer data.
Definition CalibrationSettings.h:41
inertia::CalibrationSettings::logfile
std::wstring logfile
The logfile with calibration data.
Definition CalibrationSettings.h:39
inertia::CalibrationSettings::CalibrationSettings
CalibrationSettings(std::wstring const &logfile, const unsigned maxBurst, const bool accelFilter=true, const bool compassFilter=false, const bool gyroFilter=true, const double accelThresh=2.0, const double compassThresh=.1, const double gyroThresh=50.0, const double accelTarget=9.80665, const double compassTarget=.4905, const double gyroTarget=360.0, const bool accelZeroOffset=false, const bool compassZeroOffset=false, const bool gyroZeroOffset=true)
inertia::CalibrationSettings::gyroZeroOffset
bool gyroZeroOffset
Calculate the zero-offset of the average gyroscope data.
Definition CalibrationSettings.h:52
inertia::CalibrationSettings::compassFilter
bool compassFilter
Enable a filter for fast movements in the compass data.
Definition CalibrationSettings.h:42
inertia::CalibrationSettings::maxBurst
unsigned maxBurst
Number of samples to read from the logfile and parse at once.
Definition CalibrationSettings.h:40
inertia::CalibrationSettings::CalibrationSettings
CalibrationSettings()
Definition CalibrationSettings.h:57
inertia::CalibrationSettings::accelTarget
double accelTarget
Target magnitude for acceleration data, e.g. 9.81 m/s2.
Definition CalibrationSettings.h:47