Home | History | Annotate | Download | only in mllite

Lines Matching refs:gyro

99     sensors.gyro.accuracy = inv_data_builder.save.gyro_accuracy;
171 /** Gyro sensitivity.
178 return sensors.gyro.sensitivity;
236 /** Sets the Orientation and Sensitivity of the gyro data.
255 set_sensor_orientation_and_scale(&sensors.gyro, orientation,
259 /** Set Gyro Sample rate in micro seconds.
260 * @param[in] sample_rate_us Set Gyro Sample rate in us
271 sensors.gyro.sample_rate_us = sample_rate_us;
272 sensors.gyro.sample_rate_ms = sample_rate_us / 1000;
273 if (sensors.gyro.bandwidth == 0) {
274 sensors.gyro.bandwidth = (int)(1000000L / sample_rate_us);
342 case 1: // Gyro
343 *ts = sensors.gyro.timestamp;
345 if (sensors.gyro.timestamp_prev != sensors.gyro.timestamp)
370 * Priority is 9-axis quat, 6-axis quat, 3-axis quat, gyro, compass, accel on ties.
412 idx++; // Skip gyro sensor in next function call
417 // No Quaternion data from outside, Gyro must be on
418 if ((sensors.gyro.status & INV_SENSOR_ON) == 0) {
419 return 0; // Gyro must be on
422 td[0] = sample_rate_us - sensors.gyro.sample_rate_us;
428 // 1 = gyro, 2 = compass, 3=accel
461 * Priority is Quaternion-6axis, Quaternion 3-axis, Gyro, Accel
486 // No Quaternion data from outside, Gyro must be on
487 if ((sensors.gyro.status & INV_SENSOR_ON) == 0) {
488 return 0; // Gyro must be on
491 td[0] = sample_rate_us - sensors.gyro.sample_rate_us;
493 idx *= 2; // 0=gyro 2=accel
495 // 1 = gyro, 3=accel
500 * @param[in] sample_rate_us Set Gyro Sample rate in micro seconds.
520 *sample_rate_ms = sensors.gyro.sample_rate_ms;
549 /** Set Gyro Bandwidth in Hz
550 * @param[in] bandwidth_hz Gyro bandwidth in Hz
554 sensors.gyro.bandwidth = bandwidth_hz;
558 * @param[in] bandwidth_hz Gyro bandwidth in Hz
566 * @param[in] bandwidth_hz Gyro bandwidth in Hz
581 /** Helper function stating whether the gyro is on or off.
582 * @return TRUE if gyro if on, 0 if gyro if off
586 return (sensors.gyro.status & INV_SENSOR_ON) == INV_SENSOR_ON;
607 if (sensors.gyro.status & INV_SENSOR_ON) {
608 if (timestamp < sensors.gyro.timestamp) {
609 timestamp = sensors.gyro.timestamp;
633 /** Sets the orientation and sensitivity of the gyro data.
656 /** Sets the Orientation and Sensitivity of the gyro data.
811 * Sets the factory gyro bias
813 * Gyro bias in hardware units (+/- 2000 dps full scale assumed)
830 * Sets the mpl gyro bias
832 * Gyro bias in hardware units scaled by 2^16 (+/- 2000 dps full
844 inv_apply_calibration(&sensors.gyro,
848 sensors.gyro.accuracy = accuracy;
861 module that gyro biases were set.
868 * @brief Return whether gyro biases were set to signal the temperature
872 * @return true if the flag was set, indicating gyro biases were set.
884 * Get the mpl gyro biases
886 * Gyro calibrated bias.
899 /** Gyro Bias in the form used by the DMP.
900 * @param[out] bias Gyro Bias in the form used by the DMP. It is scaled appropriately
909 inv_convert_to_body_with_scale(sensors.gyro.orientation, 46850825L,
915 * Get the gyro biases and temperature record from MPL
917 * Gyro bias in hardware units scaled by 2^16.
1039 /** Record new gyro data and calls inv_execute_on_data() if previous
1041 * @param[in] gyro Data is in device units. Length 3.
1046 inv_error_t inv_build_gyro(const short *gyro, inv_time_t timestamp)
1052 fwrite(gyro, sizeof(gyro[0]), 3, inv_data_builder.file);
1057 memcpy(sensors.gyro.raw, gyro, 3 * sizeof(short));
1058 sensors.gyro.status |= INV_NEW_DATA | INV_RAW_DATA | INV_SENSOR_ON;
1059 sensors.gyro.timestamp_prev = sensors.gyro.timestamp;
1060 sensors.gyro.timestamp = timestamp;
1061 inv_apply_calibration(&sensors.gyro, inv_data_builder.save_mpl.gyro_bias);
1240 /** This should be called when the gyro has been turned off. This is so
1251 sensors.gyro.status = 0;
1269 * gyro data, INV_MAG_NEW = compass data. So passing in
1326 * gyro data, INV_MAG_NEW = compass data. So passing in
1369 if (sensors.gyro.status & INV_NEW_DATA)
1404 if (sensors.gyro.status & INV_NEW_DATA) {
1405 sensors.gyro.status |= INV_CONTIGUOUS;
1406 current_time = sensors.gyro.timestamp;
1429 if (inv_delta_time_ms(current_time, sensors.gyro.timestamp) >= 2000)
1441 sensors.gyro.status &= ~INV_NEW_DATA;
1467 /** Gets a whole set of gyro data including data, accuracy and timestamp.
1468 * @param[out] data Gyro Data where 1 dps = 2^16
1474 memcpy(data, sensors.gyro.calibrated, sizeof(sensors.gyro.calibrated));
1476 *timestamp = sensors.gyro.timestamp;
1479 *accuracy = sensors.gyro.accuracy;
1483 /** Gets a whole set of gyro raw data including data, accuracy and timestamp.
1484 * @param[out] data Gyro Data where 1 dps = 2^16
1490 memcpy(data, sensors.gyro.raw_scaled, sizeof(sensors.gyro.raw_scaled));
1492 *timestamp = sensors.gyro.timestamp;
1499 /** Get's latest gyro data.
1500 * @param[out] gyro Gyro Data, Length 3. 1 dps = 2^16.
1502 void inv_get_gyro(long *gyro)
1504 memcpy(gyro, sensors.gyro.calibrated, sizeof(sensors.gyro.calibrated));
1555 /** Returns accuracy of gyro.
1556 * @return Accuracy of gyro with 0 being not accurate, and 3 being most accurate.
1560 return sensors.gyro.accuracy;
1583 *orient = sensors.gyro.orientation;