Home | History | Annotate | Download | only in mllite

Lines Matching refs:accel

100     sensors.accel.accuracy = inv_data_builder.save.accel_accuracy;
103 if (sensors.accel.accuracy == 3) {
181 /** Accel sensitivity.
184 * it works out to be the maximum accel value in g's * 2^15.
188 return sensors.accel.sensitivity;
278 /** Set Accel Sample rate in micro seconds.
279 * @param[in] sample_rate_us Set Accel Sample rate in us
290 sensors.accel.sample_rate_us = sample_rate_us;
291 sensors.accel.sample_rate_ms = sample_rate_us / 1000;
292 if (sensors.accel.bandwidth == 0) {
293 sensors.accel.bandwidth = (int)(1000000L / sample_rate_us);
348 case 2: // Accel
349 *ts = sensors.accel.timestamp;
351 if (sensors.accel.timestamp_prev != sensors.accel.timestamp)
370 * Priority is 9-axis quat, 6-axis quat, 3-axis quat, gyro, compass, accel on ties.
392 // At this point, we know compass is on. Check if accel or 6-axis quat is on
400 } else if ((sensors.accel.status & INV_SENSOR_ON) == 0) {
401 return 0; // Accel must be on or 6-axis quat must be on
404 // At this point, we know accel is on. Check if 3-axis quat is on
405 td[2] = sample_rate_us - sensors.accel.sample_rate_us;
413 // 0 = quat, 2 = compass, 3=accel
428 // 1 = gyro, 2 = compass, 3=accel
435 * Priority compass, accel on a tie
446 if ((sensors.accel.status & INV_SENSOR_ON) == 0) {
447 return 0; // Accel must be on
450 // At this point, we know compass & accel are both on.
451 td[0] = sample_rate_us - sensors.accel.sample_rate_us;
461 * Priority is Quaternion-6axis, Quaternion 3-axis, Gyro, Accel
472 } else if ((sensors.accel.status & INV_SENSOR_ON) == 0) {
473 return 0; // Accel must be on or 6-axis quat must be on
476 accel is on. Check if 3-axis quat is on
478 td[1] = sample_rate_us - sensors.accel.sample_rate_us;
482 // 0 = quat, 3=accel
493 idx *= 2; // 0=gyro 2=accel
495 // 1 = gyro, 3=accel
525 *sample_rate_ms = sensors.accel.sample_rate_ms;
557 /** Set Accel Bandwidth in Hz
562 sensors.accel.bandwidth = bandwidth_hz;
590 * @return TRUE if accel if on, 0 if accel if off
594 return (sensors.accel.status & INV_SENSOR_ON) == INV_SENSOR_ON;
604 if (sensors.accel.status & INV_SENSOR_ON) {
605 timestamp = sensors.accel.timestamp;
652 set_sensor_orientation_and_scale(&sensors.accel, orientation,
750 * Sets the factory accel bias
752 * Accel bias in hardware units (+/- 2 gee full scale assumed)
768 /** Sets the accel accuracy.
773 sensors.accel.accuracy = accuracy;
777 /** Sets the accel bias with control over which axis.
778 * @param[in] bias Accel bias, length 3. In HW units scaled by 2^16 in body frame
795 inv_apply_calibration(&sensors.accel, inv_data_builder.save_accel_mpl.accel_bias);
929 * Get factory accel bias mask
931 * Accel bias mask
953 * Get accel bias from MPL
955 * Accel bias in hardware units scaled by 2^16.
966 /** Get Accel Bias
967 * @param[out] bias Accel bias
979 /** Accel Bias in the form used by the DMP.
980 * @param[out] bias Accel Bias in the form used by the DMP. It is scaled appropriately
987 inv_convert_to_body_with_scale(sensors.accel.orientation, 536870912L,
992 * Record new accel data for use when inv_execute_on_data() is called
993 * @param[in] accel
994 * accel data, length 3.
1007 inv_error_t inv_build_accel(const long *accel, int status, inv_time_t timestamp)
1013 fwrite(accel, sizeof(accel[0]), 3, inv_data_builder.file);
1019 sensors.accel.raw[0] = (short)accel[0];
1020 sensors.accel.raw[1] = (short)accel[1];
1021 sensors.accel.raw[2] = (short)accel[2];
1022 sensors.accel.status |= INV_RAW_DATA;
1023 inv_apply_calibration(&sensors.accel, inv_data_builder.save_accel_mpl.accel_bias);
1025 sensors.accel.calibrated[0] = accel[0];
1026 sensors.accel.calibrated[1] = accel[1];
1027 sensors.accel.calibrated[2] = accel[2];
1028 sensors.accel.status |= INV_CALIBRATED;
1029 sensors.accel.accuracy = status & 3;
1032 sensors.accel.status |= INV_NEW_DATA | INV_SENSOR_ON;
1033 sensors.accel.timestamp_prev = sensors.accel.timestamp;
1034 sensors.accel.timestamp = timestamp;
1198 /** This should be called when the accel has been turned off. This is so
1209 sensors.accel.status = 0;
1268 * a combination. INV_ACCEL_NEW = accel data, INV_GYRO_NEW =
1271 * callback would be generated if there was new magnetomer data OR new accel data.
1325 * a combination. INV_ACCEL_NEW = accel data, INV_GYRO_NEW =
1328 * callback would be generated if there was new magnetomer data OR new accel data.
1371 if (sensors.accel.status & INV_NEW_DATA)
1408 if (sensors.accel.status & INV_NEW_DATA) {
1409 sensors.accel.status |= INV_CONTIGUOUS;
1410 current_time = MAX(current_time, sensors.accel.timestamp);
1431 if (inv_delta_time_ms(current_time, sensors.accel.timestamp) >= 2000)
1442 sensors.accel.status &= ~INV_NEW_DATA;
1449 /** Gets a whole set of accel data including data, accuracy and timestamp.
1450 * @param[out] data Accel Data where 1g = 2^16
1457 memcpy(data, sensors.accel.calibrated, sizeof(sensors.accel.calibrated));
1460 *timestamp = sensors.accel.timestamp;
1463 *accuracy = sensors.accel.accuracy;
1573 /** Returns accuracy of accel.
1574 * @return Accuracy of accel with 0 being not accurate, and 3 being most accurate.
1578 return sensors.accel.accuracy;
1589 *orient = sensors.accel.orientation;