![]()  | 
  
    ISSDK
    1.8
    
   IoT Sensing Software Development Kit 
   | 
 
Magnetic Calibration Structure. More...
#include <magnetic.h>

Data Fields | |
| float | fV [3] | 
| current hard iron offset x, y, z, (uT)  More... | |
| float | finvW [3][3] | 
| current inverse soft iron matrix  More... | |
| float | fB | 
| current geomagnetic field magnitude (uT)  More... | |
| float | fBSq | 
| square of fB (uT^2)  More... | |
| float | fFitErrorpc | 
| current fit error %  More... | |
| int32_t | iValidMagCal | 
| solver used: 0 (no calibration) or 4, 7, 10 element  More... | |
| float | ftrV [3] | 
| trial value of hard iron offset z, y, z (uT)  More... | |
| float | ftrinvW [3][3] | 
| trial inverse soft iron matrix size  More... | |
| float | ftrB | 
| trial value of geomagnetic field magnitude in uT  More... | |
| float | ftrFitErrorpc | 
| trial value of fit error %  More... | |
| float | fA [3][3] | 
| ellipsoid matrix A  More... | |
| float | finvA [3][3] | 
| inverse of ellipsoid matrix A  More... | |
| float | fmatA [10][10] | 
| scratch 10x10 float matrix used by calibration algorithms  More... | |
| float | fmatB [10][10] | 
| scratch 10x10 float matrix used by calibration algorithms  More... | |
| float | fvecA [10] | 
| scratch 10x1 vector used by calibration algorithms  More... | |
| float | fvecB [4] | 
| scratch 4x1 vector used by calibration algorithms  More... | |
| float | fYTY | 
| Y^T.Y for 4 element calibration = (iB^2)^2.  More... | |
| int32_t | iSumBs [3] | 
| sum of measurements in buffer (counts)  More... | |
| int32_t | iMeanBs [3] | 
| average magnetic measurement (counts)  More... | |
| int32_t | itimeslice | 
| counter for tine slicing magnetic calibration calculations  More... | |
| int8_t | iCalInProgress | 
| flag denoting that a calibration is in progress  More... | |
| int8_t | iNewCalibrationAvailable | 
| flag denoting that a new calibration has been computed  More... | |
| int8_t | iInitiateMagCal | 
| flag to start a new magnetic calibration  More... | |
| int8_t | iMagBufferReadOnly | 
| flag to denote that the magnetic measurement buffer is temporarily read only  More... | |
| int8_t | i4ElementSolverTried | 
| flag to denote at least one attempt made with 4 element calibration  More... | |
| int8_t | i7ElementSolverTried | 
| flag to denote at least one attempt made with 4 element calibration  More... | |
| int8_t | i10ElementSolverTried | 
| flag to denote at least one attempt made with 4 element calibration  More... | |
Magnetic Calibration Structure.
Definition at line 55 of file magnetic.h.
| float fA[3][3] | 
ellipsoid matrix A
Definition at line 70 of file magnetic.h.
Referenced by fComputeMagCalibration10(), fComputeMagCalibration7(), fUpdateMagCalibration10Slice(), and fUpdateMagCalibration7Slice().
| float fB | 
current geomagnetic field magnitude (uT)
Definition at line 60 of file magnetic.h.
Referenced by CreateAndSendPackets(), fInitializeMagCalibration(), fRun_6DOF_GY_KALMAN(), and fRunMagCalibration().
| float fBSq | 
square of fB (uT^2)
Definition at line 61 of file magnetic.h.
Referenced by fInitializeMagCalibration(), fRun_6DOF_GY_KALMAN(), and fRunMagCalibration().
| float fFitErrorpc | 
current fit error %
Definition at line 62 of file magnetic.h.
Referenced by CreateAndSendPackets(), fInitializeMagCalibration(), and fRunMagCalibration().
| float finvA[3][3] | 
inverse of ellipsoid matrix A
Definition at line 71 of file magnetic.h.
Referenced by fComputeMagCalibration10(), and fUpdateMagCalibration10Slice().
| float finvW[3][3] | 
current inverse soft iron matrix
Definition at line 59 of file magnetic.h.
Referenced by CreateAndSendPackets(), fInitializeMagCalibration(), fInvertMagCal(), and fRunMagCalibration().
| float fmatA[10][10] | 
scratch 10x10 float matrix used by calibration algorithms
Definition at line 72 of file magnetic.h.
Referenced by fComputeMagCalibration10(), fComputeMagCalibration4(), fComputeMagCalibration7(), fUpdateMagCalibration10Slice(), fUpdateMagCalibration4Slice(), and fUpdateMagCalibration7Slice().
| float fmatB[10][10] | 
scratch 10x10 float matrix used by calibration algorithms
Definition at line 73 of file magnetic.h.
Referenced by fComputeMagCalibration10(), fComputeMagCalibration4(), fComputeMagCalibration7(), fUpdateMagCalibration10Slice(), fUpdateMagCalibration4Slice(), and fUpdateMagCalibration7Slice().
| float ftrB | 
trial value of geomagnetic field magnitude in uT
Definition at line 68 of file magnetic.h.
Referenced by fComputeMagCalibration10(), fComputeMagCalibration4(), fComputeMagCalibration7(), fRunMagCalibration(), fUpdateMagCalibration10Slice(), fUpdateMagCalibration4Slice(), and fUpdateMagCalibration7Slice().
| float ftrFitErrorpc | 
trial value of fit error %
Definition at line 69 of file magnetic.h.
Referenced by fComputeMagCalibration10(), fComputeMagCalibration4(), fRunMagCalibration(), fUpdateMagCalibration10Slice(), fUpdateMagCalibration4Slice(), and fUpdateMagCalibration7Slice().
| float ftrinvW[3][3] | 
trial inverse soft iron matrix size
Definition at line 67 of file magnetic.h.
Referenced by fComputeMagCalibration10(), fComputeMagCalibration4(), fComputeMagCalibration7(), fRunMagCalibration(), fUpdateMagCalibration10Slice(), fUpdateMagCalibration4Slice(), and fUpdateMagCalibration7Slice().
| float ftrV[3] | 
trial value of hard iron offset z, y, z (uT)
Definition at line 66 of file magnetic.h.
Referenced by fComputeMagCalibration10(), fComputeMagCalibration4(), fComputeMagCalibration7(), fRunMagCalibration(), fUpdateMagCalibration10Slice(), fUpdateMagCalibration4Slice(), and fUpdateMagCalibration7Slice().
| float fV[3] | 
current hard iron offset x, y, z, (uT)
Definition at line 58 of file magnetic.h.
Referenced by CreateAndSendPackets(), fInitializeMagCalibration(), fInvertMagCal(), and fRunMagCalibration().
| float fvecA[10] | 
scratch 10x1 vector used by calibration algorithms
Definition at line 74 of file magnetic.h.
Referenced by fComputeMagCalibration10(), fComputeMagCalibration4(), fComputeMagCalibration7(), fUpdateMagCalibration10Slice(), fUpdateMagCalibration4Slice(), and fUpdateMagCalibration7Slice().
| float fvecB[4] | 
scratch 4x1 vector used by calibration algorithms
Definition at line 75 of file magnetic.h.
Referenced by fComputeMagCalibration4(), and fUpdateMagCalibration4Slice().
| float fYTY | 
Y^T.Y for 4 element calibration = (iB^2)^2.
Definition at line 76 of file magnetic.h.
Referenced by fUpdateMagCalibration4Slice().
| int8_t i10ElementSolverTried | 
flag to denote at least one attempt made with 4 element calibration
Definition at line 86 of file magnetic.h.
Referenced by fInitializeMagCalibration(), and fRunMagCalibration().
| int8_t i4ElementSolverTried | 
flag to denote at least one attempt made with 4 element calibration
Definition at line 84 of file magnetic.h.
Referenced by fInitializeMagCalibration(), and fRunMagCalibration().
| int8_t i7ElementSolverTried | 
flag to denote at least one attempt made with 4 element calibration
Definition at line 85 of file magnetic.h.
Referenced by fInitializeMagCalibration(), and fRunMagCalibration().
| int8_t iCalInProgress | 
flag denoting that a calibration is in progress
Definition at line 80 of file magnetic.h.
Referenced by fInitializeMagCalibration(), fRunMagCalibration(), fUpdateMagCalibration10Slice(), fUpdateMagCalibration4Slice(), and fUpdateMagCalibration7Slice().
| int8_t iInitiateMagCal | 
flag to start a new magnetic calibration
Definition at line 82 of file magnetic.h.
Referenced by fInitializeMagCalibration(), fRunMagCalibration(), fUpdateMagCalibration10Slice(), fUpdateMagCalibration4Slice(), and fUpdateMagCalibration7Slice().
| int8_t iMagBufferReadOnly | 
flag to denote that the magnetic measurement buffer is temporarily read only
Definition at line 83 of file magnetic.h.
Referenced by fInitializeMagCalibration(), fUpdateMagCalibration10Slice(), fUpdateMagCalibration4Slice(), fUpdateMagCalibration7Slice(), and processMagData().
| int32_t iMeanBs[3] | 
average magnetic measurement (counts)
Definition at line 78 of file magnetic.h.
Referenced by fUpdateMagCalibration10Slice(), fUpdateMagCalibration4Slice(), and fUpdateMagCalibration7Slice().
| int8_t iNewCalibrationAvailable | 
flag denoting that a new calibration has been computed
Definition at line 81 of file magnetic.h.
Referenced by fInitializeMagCalibration(), fRunMagCalibration(), fUpdateMagCalibration10Slice(), fUpdateMagCalibration4Slice(), and fUpdateMagCalibration7Slice().
| int32_t iSumBs[3] | 
sum of measurements in buffer (counts)
Definition at line 77 of file magnetic.h.
Referenced by fUpdateMagCalibration10Slice(), fUpdateMagCalibration4Slice(), and fUpdateMagCalibration7Slice().
| int32_t itimeslice | 
counter for tine slicing magnetic calibration calculations
Definition at line 79 of file magnetic.h.
Referenced by fUpdateMagCalibration10Slice(), fUpdateMagCalibration4Slice(), and fUpdateMagCalibration7Slice().
| int32_t iValidMagCal | 
solver used: 0 (no calibration) or 4, 7, 10 element
Definition at line 63 of file magnetic.h.
Referenced by fInitializeMagCalibration(), fRun_6DOF_GY_KALMAN(), and fRunMagCalibration().