Lines Matching refs:bias
327 /* read gyro self test scale used to calculate factory cal bias later */
347 /* open Factory Gyro Bias fd */
348 /* mFactoryGyBias contains bias values that will be used for device offset */
358 LOGE("HAL:could not open factory gyro calibrated bias");
364 /* open Gyro Bias fd */
365 /* mGyroBias contains bias values that will be used for framework */
366 /* mGyroChipBias contains bias values that will be used for dmp */
369 LOGV_IF(EXTRA_VERBOSE, "HAL: gyro x dmp bias path: %s", mpu.in_gyro_x_dmp_bias);
370 LOGV_IF(EXTRA_VERBOSE, "HAL: gyro y dmp bias path: %s", mpu.in_gyro_y_dmp_bias);
371 LOGV_IF(EXTRA_VERBOSE, "HAL: gyro z dmp bias path: %s", mpu.in_gyro_z_dmp_bias);
377 LOGE("HAL:could not open gyro DMP calibrated bias");
406 /* open Accel Bias fd */
407 /* mAccelBias contains bias that will be used for dmp */
409 LOGV_IF(EXTRA_VERBOSE, "HAL:accel x dmp bias path: %s", mpu.in_accel_x_dmp_bias);
410 LOGV_IF(EXTRA_VERBOSE, "HAL:accel y dmp bias path: %s", mpu.in_accel_y_dmp_bias);
411 LOGV_IF(EXTRA_VERBOSE, "HAL:accel z dmp bias path: %s", mpu.in_accel_z_dmp_bias);
417 LOGE("HAL:could not open accel DMP calibrated bias");
561 /* initialize Compass Bias */
564 /* initialize Factory Accel Bias */
567 /* initialize Gyro Bias */
2068 /* apply accel/gyro bias to DMP bias */
2070 /* postcondition: bias is applied upon masterEnable(1) */
2382 memcpy(s->uncalibrated_gyro.bias, mGyroBias, sizeof(mGyroBias));
2383 LOGV_IF(HANDLER_DATA,"HAL:gyro bias data : %+f %+f %+f -- %lld - %d",
2384 s->uncalibrated_gyro.bias[0], s->uncalibrated_gyro.bias[1],
2385 s->uncalibrated_gyro.bias[2], s->timestamp, update);
2424 //TODO:: need to handle uncalib data and bias for 3rd party compass
2433 memcpy(s->uncalibrated_magnetic.bias, mCompassBias, sizeof(mCompassBias));
2434 LOGV_IF(HANDLER_DATA, "HAL:compass bias data: %+f %+f %+f -- %lld - %d",
2435 s->uncalibrated_magnetic.bias[0], s->uncalibrated_magnetic.bias[1],
2436 s->uncalibrated_magnetic.bias[2], s->timestamp, update);
3739 long bias[3], temp, temp_slope[3];
3740 inv_get_mpl_gyro_bias(bias, &temp);
3747 (float)bias[0] / 65536.f / 16.384f,
3748 (float)bias[1] / 65536.f / 16.384f,
3749 (float)bias[2] / 65536.f / 16.384f,
3800 /* if bias was applied to DMP bias,
3801 set status bits to disable gyro bias cal */
3804 LOGV_IF(INPUT_DATA, "HAL:input mpl bias not used");
3822 /* if bias was applied to DMP bias,
3823 set status bits to disable gyro bias cal */
3843 /* if bias was applied to DMP bias,
3844 set status bits to disable gyro bias cal */
4403 LOGE("HAL:Error reading gyro bias");
4410 "HAL:pre-scaled bias: X:Y:Z (%ld, %ld, %ld)",
4418 "HAL:scaled bias: X:Y:Z (%ld, %ld, %ld)",
4786 // MPU bias value is not set on purpose -
4790 // DMP uses these bias values
4795 // MPU uses these bias values
4878 long bias[3];
4885 inv_get_compass_bias(bias);
4887 inv_convert_to_body(orient, bias, compassBias);
4888 LOGV_IF(HANDLER_DATA, "Mpl Compass Bias (HW unit) %ld %ld %ld", bias[0], bias[1], bias[2]);
4889 LOGV_IF(HANDLER_DATA, "Mpl Compass Bias (HW unit) (body) %ld %ld %ld", compassBias[0], compassBias[1], compassBias[2]);
4911 LOGV_IF(ENG_VERBOSE, "Factory Gyro Bias %ld %ld %ld", mFactoryGyroBias[0], mFactoryGyroBias[1], mFactoryGyroBias[2]);
4918 /* set bias from factory cal file to MPU offset
4964 LOGV_IF(EXTRA_VERBOSE, "HAL:Factory Gyro Calibrated Bias Applied");
4977 long bias[3];
4984 inv_convert_to_body(orient, mGyroChipBias, bias);
4985 LOGV_IF(ENG_VERBOSE, "Mpl Gyro Bias (HW unit) %ld %ld %ld", mGyroChipBias[0], mGyroChipBias[1], mGyroChipBias[2]);
4986 LOGV_IF(ENG_VERBOSE, "Mpl Gyro Bias (HW unit) (body) %ld %ld %ld", bias[0], bias[1], bias[2]);
4995 mGyroBias[i] = (float) (bias[i] * temp / (1<<16) / 180 * M_PI);
5010 long bias[3];
5017 inv_get_gyro_bias_dmp_units(bias);
5021 bias[0], mpu.in_gyro_x_dmp_bias, getTimestamp());
5022 if(write_attribute_sensor_continuous(gyro_x_dmp_bias_fd, bias[0]) < 0)
5028 bias[1], mpu.in_gyro_y_dmp_bias, getTimestamp());
5029 if(write_attribute_sensor_continuous(gyro_y_dmp_bias_fd, bias[1]) < 0)
5035 bias[2], mpu.in_gyro_z_dmp_bias, getTimestamp());
5036 if(write_attribute_sensor_continuous(gyro_z_dmp_bias_fd, bias[2]) < 0)
5043 LOGV_IF(EXTRA_VERBOSE, "HAL:Gyro DMP Calibrated Bias Applied");
5056 LOGV_IF(HANDLER_DATA, "Factory Accel Bias (mg) %ld %ld %ld", mFactoryAccelBias[0], mFactoryAccelBias[1], mFactoryAccelBias[2]);
5086 LOGV_IF(EXTRA_VERBOSE, "HAL:Factory Accel Calibrated Bias Applied");
5098 LOGV_IF(ENG_VERBOSE, "Accel Bias (mg) %ld %ld %ld", mAccelBias[0], mAccelBias[1], mAccelBias[2]);
5111 long bias[3];
5113 inv_convert_to_body(orient, mAccelBias, bias);
5139 LOGV_IF(EXTRA_VERBOSE, "HAL:Accel DMP Calibrated Bias Applied");