Home | History | Annotate | Download | only in mllite

Lines Matching refs:accel

49     /** Accel Bias in Chip Frame in Hardware units scaled by 2^16 */
51 /** Temperature when accel bias was stored. */
110 sensors.accel.accuracy = inv_data_builder.save.accel_accuracy;
148 /** Accel sensitivity.
151 * it works out to be the maximum accel value in g's * 2^15.
155 return sensors.accel.sensitivity;
223 /** Set Accel Sample rate in micro seconds.
224 * @param[in] sample_rate_us Set Accel Sample rate in us
235 sensors.accel.sample_rate_us = sample_rate_us;
236 sensors.accel.sample_rate_ms = sample_rate_us / 1000;
237 if (sensors.accel.bandwidth == 0) {
238 sensors.accel.bandwidth = (int)(1000000L / sample_rate_us);
268 *sample_rate_ms = sensors.accel.sample_rate_ms;
300 /** Set Accel Bandwidth in Hz
305 sensors.accel.bandwidth = bandwidth_hz;
333 * @return TRUE if accel if on, 0 if accel if off
337 return (sensors.accel.status & INV_SENSOR_ON) == INV_SENSOR_ON;
347 if (sensors.accel.status & INV_SENSOR_ON) {
348 timestamp = sensors.accel.timestamp;
386 set_sensor_orientation_and_scale(&sensors.accel, orientation,
478 /** Sets the accel bias.
479 * @param[in] bias Accel bias, length 3. In HW units scaled by 2^16 in body frame
487 inv_apply_calibration(&sensors.accel, inv_data_builder.save.accel_bias);
490 sensors.accel.accuracy = accuracy;
495 /** Sets the accel accuracy.
500 sensors.accel.accuracy = accuracy;
505 /** Sets the accel bias with control over which axis.
506 * @param[in] bias Accel bias, length 3. In HW units scaled by 2^16 in body frame
523 inv_apply_calibration(&sensors.accel, inv_data_builder.save.accel_bias);
525 sensors.accel.accuracy = accuracy;
575 /** Get Accel Bias
576 * @param[out] bias Accel bias where
589 * Record new accel data for use when inv_execute_on_data() is called
590 * @param[in] accel accel data.
604 inv_error_t inv_build_accel(const long *accel, int status, inv_time_t timestamp)
610 fwrite(accel, sizeof(accel[0]), 3, inv_data_builder.file);
616 sensors.accel.raw[0] = (short)accel[0];
617 sensors.accel.raw[1] = (short)accel[1];
618 sensors.accel.raw[2] = (short)accel[2];
619 sensors.accel.status |= INV_RAW_DATA;
620 inv_apply_calibration(&sensors.accel, inv_data_builder.save.accel_bias);
622 sensors.accel.calibrated[0] = accel[0];
623 sensors.accel.calibrated[1] = accel[1];
624 sensors.accel.calibrated[2] = accel[2];
625 sensors.accel.status |= INV_CALIBRATED;
626 sensors.accel.accuracy = status & 3;
629 sensors.accel.status |= INV_NEW_DATA | INV_SENSOR_ON;
630 sensors.accel.timestamp_prev = sensors.accel.timestamp;
631 sensors.accel.timestamp = timestamp;
760 /** This should be called when the accel has been turned off. This is so
765 sensors.accel.status = 0;
806 * a combination. INV_ACCEL_NEW = accel data, INV_GYRO_NEW =
809 * callback would be generated if there was new magnetomer data OR new accel data.
863 * a combination. INV_ACCEL_NEW = accel data, INV_GYRO_NEW =
866 * callback would be generated if there was new magnetomer data OR new accel data.
910 if (sensors.accel.status & INV_NEW_DATA)
945 if (sensors.accel.status & INV_NEW_DATA) {
946 sensors.accel.status |= INV_CONTIGUOUS;
947 current_time = MAX(current_time, sensors.accel.timestamp);
968 if (inv_delta_time_ms(current_time, sensors.accel.timestamp) >= 2000)
979 sensors.accel.status &= ~INV_NEW_DATA;
985 /** Gets a whole set of accel data including data, accuracy and timestamp.
986 * @param[out] data Accel Data where 1g = 2^16
993 memcpy(data, sensors.accel.calibrated, sizeof(sensors.accel.calibrated));
996 *timestamp = sensors.accel.timestamp;
999 *accuracy = sensors.accel.accuracy;
1094 /** Returns accuracy of accel.
1095 * @return Accuracy of accel with 0 being not accurate, and 3 being most accurate.
1099 return sensors.accel.accuracy;
1110 *orient = sensors.accel.orientation;