| ISF 2.2 rev 5 Intelligent Sensing Framework for Kinetis with Processor Expert

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Macros | Functions
magnetic.h File Reference
`#include "sensor_data_types.h"`
`#include "magnetic_config.h"`
Include dependency graph for magnetic.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | MagneticBuffer
struct | MagCalibration

## Macros
#define | DEFAULTB 50.0F

## Functions
void | fInitMagCalibration (struct MagCalibration *pthisMagCal, struct MagneticBuffer *pthisMagBuffer)
void | fRunMagCalibration (struct MagCalibration *pthisMagCal, struct MagneticBuffer *pthisMagBuffer, struct MagSensor *pthisMag)
void | iUpdateMagnetometerBuffer (struct MagneticBuffer *pthisMagBuffer, struct MagSensor *pthisMag, int32 loopcounter)
void | fInvertMagCal (struct MagSensor *pthisMag, struct MagCalibration *pthisMagCal)
void | fUpdateCalibration4INV (struct MagCalibration *pthisMagCal, struct MagneticBuffer *pthisMagBuffer, struct MagSensor *pthisMag)
void | fUpdateCalibration7EIG (struct MagCalibration *pthisMagCal, struct MagneticBuffer *pthisMagBuffer, struct MagSensor *pthisMag)
void | fUpdateCalibration10EIG (struct MagCalibration *pthisMagCal, struct MagneticBuffer *pthisMagBuffer, struct MagSensor *pthisMag)

## Macro Definition Documentation

#define DEFAULTB 50.0F

Definition at line 47 of file magnetic.h.

Referenced by fInitMagCalibration(), fUpdateCalibration10EIG(), fUpdateCalibration4INV(), and fUpdateCalibration7EIG().

## Function Documentation

void fInitMagCalibration | ( | struct MagCalibration * | pthisMagCal,
|  | struct MagneticBuffer * | pthisMagBuffer
| ) |  |

Definition at line 38 of file magnetic.c.

References CHX, CHY, CHZ, DEFAULTB, f3x3matrixAeqI(), MagCalibration::fB, MagCalibration::fFitErrorpc, MagCalibration::finvW, MagCalibration::fV, MagCalibration::iCalInProgress, MagneticBuffer::iMagBufferCount, MagCalibration::iMagCalHasRun, MagneticBuffer::index, MagCalibration::iValidMagCal, MAGBUFFSIZEX, MAGBUFFSIZEY, PI, and MagneticBuffer::tanarray.

Referenced by Fusion_Init().

Here is the call graph for this function:

Here is the caller graph for this function:

void fInvertMagCal | ( | struct MagSensor * | pthisMag,
|  | struct MagCalibration * | pthisMagCal
| ) |  |

Definition at line 242 of file magnetic.c.

References CHX, CHY, CHZ, MagSensor::fBcAvg, MagSensor::fBsAvg, MagSensor::fCountsPeruT, MagCalibration::finvW, MagCalibration::fV, MagSensor::iBcAvg, MagSensor::iBsAvg, and MagCalibration::iValidMagCal.

Referenced by Fusion_Run().

Here is the caller graph for this function:

void fRunMagCalibration | ( | struct MagCalibration * | pthisMagCal,
|  | struct MagneticBuffer * | pthisMagBuffer,
|  | struct MagSensor * | pthisMag
| ) |  |

Definition at line 278 of file magnetic.c.

References CHX, CHZ, MagCalibration::fB, MagCalibration::fFitErrorpc, MagCalibration::finvW, FITERRORAGINGSECS, MagCalibration::ftrB, MagCalibration::ftrFitErrorpc, MagCalibration::ftrinvW, MagCalibration::ftrV, fUpdateCalibration10EIG(), fUpdateCalibration4INV(), fUpdateCalibration7EIG(), MagCalibration::fV, MagCalibration::iCalInProgress, MagneticBuffer::iMagBufferCount, INTERVAL10CAL, INTERVAL4CAL, INTERVAL7CAL, MagCalibration::iValidMagCal, MAXBFITUT, MINBFITUT, MINMEASUREMENTS10CAL, MINMEASUREMENTS7CAL, OVERSAMPLE_RATIO, and SENSORFS.

Referenced by MagCal_Run().

Here is the call graph for this function:

Here is the caller graph for this function:

void fUpdateCalibration10EIG | ( | struct MagCalibration * | pthisMagCal,
|  | struct MagneticBuffer * | pthisMagBuffer,
|  | struct MagSensor * | pthisMag
| ) |  |

Definition at line 677 of file magnetic.c.

References CHX, CHY, CHZ, DEFAULTB, eigencompute10(), f3x3matrixAeqAxScalar(), f3x3matrixAeqInvSymB(), f3x3matrixAeqMinusA(), f3x3matrixDetA(), MagCalibration::fA, MagCalibration::finvA, MagCalibration::fmatA, MagCalibration::fmatB, MagCalibration::ftrB, MagCalibration::ftrFitErrorpc, MagCalibration::ftrinvW, MagCalibration::ftrV, MagSensor::fuTPerCount, MagCalibration::fvecA, MagneticBuffer::iBs, MagneticBuffer::iMagBufferCount, MagneticBuffer::index, MAGBUFFSIZEX, MAGBUFFSIZEY, ONESIXTH, and ONETHIRD.

Referenced by fRunMagCalibration().

Here is the call graph for this function:

Here is the caller graph for this function:

void fUpdateCalibration4INV | ( | struct MagCalibration * | pthisMagCal,
|  | struct MagneticBuffer * | pthisMagBuffer,
|  | struct MagSensor * | pthisMag
| ) |  |

Definition at line 351 of file magnetic.c.

References CHX, CHY, CHZ, DEFAULTB, f3x3matrixAeqI(), MagCalibration::fmatA, MagCalibration::fmatB, fmatrixAeqInvA(), MagCalibration::ftrB, MagCalibration::ftrFitErrorpc, MagCalibration::ftrinvW, MagCalibration::ftrV, MagSensor::fuTPerCount, MagCalibration::fvecA, MagCalibration::fvecB, MagneticBuffer::iBs, MagneticBuffer::iMagBufferCount, MagneticBuffer::index, MAGBUFFSIZEX, and MAGBUFFSIZEY.

Referenced by fRunMagCalibration().

Here is the call graph for this function:

Here is the caller graph for this function:

void fUpdateCalibration7EIG | ( | struct MagCalibration * | pthisMagCal,
|  | struct MagneticBuffer * | pthisMagBuffer,
|  | struct MagSensor * | pthisMag
| ) |  |

Definition at line 530 of file magnetic.c.

References CHX, CHY, CHZ, DEFAULTB, eigencompute10(), f3x3matrixAeqAxScalar(), f3x3matrixAeqI(), f3x3matrixAeqMinusA(), f3x3matrixAeqScalar(), MagCalibration::fA, MagCalibration::fmatA, MagCalibration::fmatB, MagCalibration::ftrB, MagCalibration::ftrFitErrorpc, MagCalibration::ftrinvW, MagCalibration::ftrV, MagSensor::fuTPerCount, MagCalibration::fvecA, MagneticBuffer::iBs, MagneticBuffer::iMagBufferCount, MagneticBuffer::index, MAGBUFFSIZEX, MAGBUFFSIZEY, ONESIXTH, and ONETHIRD.

Referenced by fRunMagCalibration().

Here is the call graph for this function:

Here is the caller graph for this function:

void iUpdateMagnetometerBuffer | ( | struct MagneticBuffer * | pthisMagBuffer,
|  | struct MagSensor * | pthisMag,
|  | int32 | loopcounter
| ) |  |

Definition at line 75 of file magnetic.c.

References CHX, CHY, CHZ, MagSensor::iBcAvg, MagneticBuffer::iBs, MagSensor::iBs, MagneticBuffer::iMagBufferCount, MagneticBuffer::index, MAGBUFFSIZEX, MAGBUFFSIZEY, MAXMEASUREMENTS, MESHDELTACOUNTS, and MagneticBuffer::tanarray.

Referenced by fsl_fusion_virt_3D_orient_PeriodicCallback(), and Fusion_Run().

Here is the caller graph for this function:
- © Freescale Semiconductor, Inc. 2016. All Rights Reserved.