Lines Matching refs:kasa
52 static int moc_eigen_test(struct KasaFit *kasa) {
55 S.elem[0][0] = kasa->acc_xx - kasa->acc_x * kasa->acc_x;
56 S.elem[0][1] = S.elem[1][0] = kasa->acc_xy - kasa->acc_x * kasa->acc_y;
57 S.elem[0][2] = S.elem[2][0] = kasa->acc_xz - kasa->acc_x * kasa->acc_z;
58 S.elem[1][1] = kasa->acc_yy - kasa->acc_y * kasa->acc_y;
59 S.elem[1][2] = S.elem[2][1] = kasa->acc_yz - kasa->acc_y * kasa->acc_z;
60 S.elem[2][2] = kasa->acc_zz - kasa->acc_z * kasa->acc_z;
84 kasaReset(&moc->kasa);
94 (moc->kasa.nsamples > MIN_BATCH_SIZE)) {
148 kasaAccumulate(&moc->kasa, x, y, z);
150 if (moc->kasa.nsamples == 1) {
157 kasaNormalize(&moc->kasa);
160 if (moc_eigen_test(&moc->kasa)) {
163 // 4. Kasa sphere fitting
164 if (kasaFit(&moc->kasa, &bias, &radius, MAX_FIT_MAG, MIN_FIT_MAG)) {
167 CAL_DEBUG_LOG("[MAG_CAL:KASA UPDATE] :", CAL_FORMAT_3DIGITS_TRIPLET