35 #define MAGN_DS_SIZE 32 74 float sample[MAGN_DS_SIZE][3];
75 unsigned int sample_count;
79 typedef double mat_input_t[MAGN_DS_SIZE][3];
111 void installISR(
void (*isr)(
char*,
void*),
void* arg);
159 void extract3Axis(
char* data,
float* x,
float* y,
float* z);
175 getCalibratedData(
int* cal_level,
double offset[3][1],
double w_invert[3][3],
double* bfield);
181 loadCalibratedData(
int cal_level,
double offset[3][1],
double w_invert[3][3],
double bfield);
186 void calibrateCompass(
float* x,
float* y,
float* z,
compass_cal_t* cal_data);
187 int compassCollect(
float* x,
float* y,
float* z,
compass_cal_t* cal_data);
190 int ellipsoidFit(mat_input_t& m,
196 void scale(
float* x,
float* y,
float* z);
197 void compassComputeCal(
float* x,
float* y,
float* z,
compass_cal_t* cal_data);
200 void denoise_average(
float* x,
float* y,
float* z);
202 mraa_iio_context m_iio;
203 int m_iio_device_num;
204 float m_sampling_frequency;
205 bool m_mount_matrix_exist;
206 float m_mount_matrix[9];
void loadCalibratedData(int cal_level, double offset[3][1], double w_invert[3][3], double bfield)
Definition: mmc35240.cxx:284
bool enableBuffer(int length)
Definition: mmc35240.cxx:160
bool disableBuffer()
Definition: mmc35240.cxx:169
void extract3Axis(char *data, float *x, float *y, float *z)
Definition: mmc35240.cxx:208
int getCalibratedLevel()
Definition: mmc35240.cxx:238
int64_t getChannelValue(unsigned char *input, mraa_iio_channel *chan)
Definition: mmc35240.cxx:108
C++ API wrapper for the bh1749 driver.
Definition: a110x.hpp:29
MMC35240(int device)
Definition: mmc35240.cxx:53
bool enable3AxisChannel()
Definition: mmc35240.cxx:192
~MMC35240()
Definition: mmc35240.cxx:87
Definition: mmc35240.hpp:81
void getCalibratedData(int *cal_level, double offset[3][1], double w_invert[3][3], double *bfield)
Definition: mmc35240.cxx:265
bool setScale(const float scale)
Definition: mmc35240.cxx:176
MMC35240 Tri-axis Magnetic Sensor API.
Definition: mmc35240.hpp:60
void installISR(void(*isr)(char *, void *), void *arg)
Definition: mmc35240.cxx:102
Definition: mmc35240.hpp:63
bool setSamplingFrequency(const float sampling_frequency)
Definition: mmc35240.cxx:184
void initCalibrate()
Definition: mmc35240.cxx:244