Skyward boardcore
Loading...
Searching...
No Matches
SoftAndHardIronCalibration.h
Go to the documentation of this file.
1
/* Copyright (c) 2021-2022 Skyward Experimental Rocketry
2
* Authors: Riccardo Musso, Alberto Nidasio
3
*
4
* Permission is hereby granted, free of charge, to any person obtaining a copy
5
* of this software and associated documentation files (the "Software"), to deal
6
* in the Software without restriction, including without limitation the rights
7
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
* copies of the Software, and to permit persons to whom the Software is
9
* furnished to do so, subject to the following conditions:
10
*
11
* The above copyright notice and this permission notice shall be included in
12
* all copies or substantial portions of the Software.
13
*
14
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
* THE SOFTWARE.
21
*/
22
#pragma once
23
24
#include <
sensors/SensorData.h
>
25
#include <
sensors/correction/SixParametersCorrector/SixParametersCorrector.h
>
26
27
#include <Eigen/Core>
28
#include <Eigen/Eigenvalues>
29
#include <vector>
30
31
namespace
Boardcore
32
{
33
45
class
SoftAndHardIronCalibration
46
{
47
public
:
48
SoftAndHardIronCalibration
();
49
50
bool
feed
(
const
MagnetometerData
& data);
51
60
SixParametersCorrector
computeResult
();
61
62
private
:
63
Eigen::Matrix<float, 7, 7> D = Eigen::Matrix<float, 7, 7>::Zero();
64
};
65
66
}
// namespace Boardcore
SensorData.h
SixParametersCorrector.h
Boardcore::SixParametersCorrector
Six-parameter correction uses, for each axis, a coefficient to be multiplied and a constant to be add...
Definition
SixParametersCorrector.h:42
Boardcore::SoftAndHardIronCalibration
Soft and hard iron calibration utility.
Definition
SoftAndHardIronCalibration.h:46
Boardcore::SoftAndHardIronCalibration::SoftAndHardIronCalibration
SoftAndHardIronCalibration()
Definition
SoftAndHardIronCalibration.cpp:34
Boardcore::SoftAndHardIronCalibration::feed
bool feed(const MagnetometerData &data)
Definition
SoftAndHardIronCalibration.cpp:36
Boardcore::SoftAndHardIronCalibration::computeResult
SixParametersCorrector computeResult()
Uses the recorded measurements to compute the correction parameters needed to correct sensor's data.
Definition
SoftAndHardIronCalibration.cpp:55
Boardcore
This file includes all the types the logdecoder script will decode.
Definition
ActiveObject.h:31
Boardcore::MagnetometerData
Structure to handle magnetometer data.
Definition
SensorData.h:249
src
shared
sensors
calibration
SoftAndHardIronCalibration
SoftAndHardIronCalibration.h
Generated by
1.10.0