Home
last modified time | relevance | path

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

/device/google/contexthub/firmware/os/algos/calibration/magnetometer/mag_cal/
Dmag_cal.c83 void magCalReset(struct MagCal *moc) { in magCalReset() argument
84 kasaReset(&moc->kasa); in magCalReset()
85 diversityCheckerReset(&moc->diversity_checker); in magCalReset()
86 moc->start_time = 0; in magCalReset()
87 moc->kasa_batching = false; in magCalReset()
90 static bool moc_batch_complete(struct MagCal *moc, uint64_t sample_time_us) { in moc_batch_complete() argument
93 if ((sample_time_us - moc->start_time > moc->min_batch_window_in_micros) && in moc_batch_complete()
94 (moc->kasa.nsamples > MIN_BATCH_SIZE)) { in moc_batch_complete()
97 } else if (sample_time_us - moc->start_time > MAX_BATCH_WINDOW) { in moc_batch_complete()
100 magCalReset(moc); in moc_batch_complete()
[all …]
Dmag_cal.h83 void initMagCal(struct MagCal *moc,
87 void magCalDestroy(struct MagCal *moc);
89 enum MagUpdate magCalUpdate(struct MagCal *moc, uint64_t sample_time_us,
92 void magCalGetBias(const struct MagCal *moc, float *x, float *y, float *z);
94 void magCalAddBias(struct MagCal *moc, float x, float y, float z);
96 void magCalRemoveBias(struct MagCal *moc, float xi, float yi, float zi,
99 void magCalSetSoftiron(struct MagCal *moc, float c00, float c01, float c02,
103 void magCalRemoveSoftiron(struct MagCal *moc, float xi, float yi, float zi,
106 void magCalReset(struct MagCal *moc);
109 void magLogPrint(struct DiversityChecker *moc, float temp);
/device/google/contexthub/firmware/os/algos/calibration/magnetometer/mag_sphere_fit_cal/
Dmag_sphere_fit.c39 initMagCal(&mocs->moc, mag_cal_parameters, diverse_parameters); in initMagCalSphere()
103 mocs->number_of_data_samples, mocs->moc.radius}; in magCalSphereFit()
104 float initial_bias[3] = {mocs->moc.x_bias, mocs->moc.y_bias, in magCalSphereFit()
105 mocs->moc.z_bias}; in magCalSphereFit()
131 if (UPDATE_BIAS == magCalUpdate(&mocs->moc, sample_time_us, x, y, z)) { in magCalSphereUpdate()
141 } else if (!mocs->moc.kasa_batching) { in magCalSphereUpdate()
Dmag_sphere_fit.h38 struct MagCal moc; member
/device/google/contexthub/firmware/os/drivers/st_mag40/
Dst_mag40.c229 struct MagCal moc; member
519 mTask.moc.x_bias = d->bias[0]; in magCfgData()
520 mTask.moc.y_bias = d->bias[1]; in magCfgData()
521 mTask.moc.z_bias = d->bias[2]; in magCfgData()
531 diversityCheckerLocalFieldUpdate(&mTask.moc.diversity_checker, d->strength); in magCfgData()
743 magCalRemoveSoftiron(&mTask.moc, x, y, z, &xi, &yi, &zi); in parseRawData()
745 newMagnCalibData = magCalUpdate(&mTask.moc, TIME_NS_TO_US(mTask.timestampInt), xi, yi, zi); in parseRawData()
747 magCalRemoveBias(&mTask.moc, xi, yi, zi, &x, &y, &z); in parseRawData()
763 magCalGetBias(&mTask.moc, in parseRawData()
1032 initMagCal(&mTask.moc, in startTask()
[all …]
/device/google/contexthub/firmware/os/drivers/bosch_bmi160/
Dbosch_bmi160.c522 struct MagCal moc; member
2036 magCalRemoveSoftiron(&mTask.moc, x, y, z, &xi, &yi, &zi);
2038 newMagBias |= magCalUpdate(&mTask.moc, sensorTime * kSensorTimerIntervalUs, xi, yi, zi);
2040 magCalRemoveBias(&mTask.moc, xi, yi, zi, &x, &y, &z);
2203 magCalGetBias(&mTask.moc, &sample->x, &sample->y, &sample->z);
3227 mTask.moc.x_bias = d->bias[0];
3228 mTask.moc.y_bias = d->bias[1];
3229 mTask.moc.z_bias = d->bias[2];
3239 diversityCheckerLocalFieldUpdate(&mTask.moc.diversity_checker, d->strength);
3769 magCalAddBias(&mTask.moc, (mTask.last_charging_bias_x - newMagBias), 0.0, 0.0);
[all …]