Home
last modified time | relevance | path

Searched refs:moc (Results 1 – 3 of 3) sorted by relevance

/device/google/contexthub/firmware/src/algos/
Dmag_cal.c36 static int moc_eigen_test(struct MagCal *moc) in moc_eigen_test() argument
40 S.elem[0][0] = moc->acc_xx - moc->acc_x * moc->acc_x; in moc_eigen_test()
41 S.elem[0][1] = S.elem[1][0] = moc->acc_xy - moc->acc_x * moc->acc_y; in moc_eigen_test()
42 S.elem[0][2] = S.elem[2][0] = moc->acc_xz - moc->acc_x * moc->acc_z; in moc_eigen_test()
43 S.elem[1][1] = moc->acc_yy - moc->acc_y * moc->acc_y; in moc_eigen_test()
44 S.elem[1][2] = S.elem[2][1] = moc->acc_yz - moc->acc_y * moc->acc_z; in moc_eigen_test()
45 S.elem[2][2] = moc->acc_zz - moc->acc_z * moc->acc_z; in moc_eigen_test()
67 static int moc_fit(struct MagCal *moc, struct Vec3 *bias, float *radius) in moc_fit() argument
72 A.elem[0][0] = moc->acc_xx; A.elem[0][1] = moc->acc_xy; in moc_fit()
73 A.elem[0][2] = moc->acc_xz; A.elem[0][3] = moc->acc_x; in moc_fit()
[all …]
/device/google/contexthub/firmware/inc/algos/
Dmag_cal.h45 void initMagCal(struct MagCal *moc,
51 void destroy_mag_cal(struct MagCal *moc);
53 bool magCalUpdate(struct MagCal *moc, uint64_t sample_time_us,
56 void magCalGetBias(struct MagCal *moc, float *x, float *y, float *z);
58 void magCalAddBias(struct MagCal *moc, float x, float y, float z);
60 void magCalRemoveBias(struct MagCal *moc, float xi, float yi, float zi,
63 void magCalSetSoftiron(struct MagCal *moc,
68 void magCalRemoveSoftiron(struct MagCal *moc, float xi, float yi, float zi,
/device/google/contexthub/firmware/src/drivers/bosch_bmi160/
Dbosch_bmi160.c372 struct MagCal moc; member
1773 magCalRemoveSoftiron(&mTask.moc, x, y, z, &xi, &yi, &zi); in parseRawData()
1775 newMagBias |= magCalUpdate(&mTask.moc, sensorTime * kSensorTimerIntervalUs, xi, yi, zi); in parseRawData()
1777 magCalRemoveBias(&mTask.moc, xi, yi, zi, &x, &y, &z); in parseRawData()
1819 magCalGetBias(&mTask.moc, &sample->x, &sample->y, &sample->z); in parseRawData()
2538 mTask.moc.x_bias = values[0]; in magCfgData()
2539 mTask.moc.y_bias = values[1]; in magCfgData()
2540 mTask.moc.z_bias = values[2]; in magCfgData()
2965 magCalAddBias(&mTask.moc, (mTask.last_charging_bias_x - newMagBias), 0.0, 0.0); in handleEvent()
3046 initMagCal(&mTask.moc, in startTask()
[all …]