Home
last modified time | relevance | path

Searched refs:quat (Results 1 – 22 of 22) sorted by relevance

/hardware/invensense/60xx/mlsdk/mllite/
DmlMathFunc.c234 void inv_quaternion_to_rotation(const long *quat, long *rot) in inv_quaternion_to_rotation() argument
237 inv_q29_mult(quat[1], quat[1]) + inv_q29_mult(quat[0], in inv_quaternion_to_rotation()
238 quat[0]) - 1073741824L; in inv_quaternion_to_rotation()
239 rot[1] = inv_q29_mult(quat[1], quat[2]) - inv_q29_mult(quat[3], quat[0]); in inv_quaternion_to_rotation()
240 rot[2] = inv_q29_mult(quat[1], quat[3]) + inv_q29_mult(quat[2], quat[0]); in inv_quaternion_to_rotation()
241 rot[3] = inv_q29_mult(quat[1], quat[2]) + inv_q29_mult(quat[3], quat[0]); in inv_quaternion_to_rotation()
243 inv_q29_mult(quat[2], quat[2]) + inv_q29_mult(quat[0], in inv_quaternion_to_rotation()
244 quat[0]) - 1073741824L; in inv_quaternion_to_rotation()
245 rot[5] = inv_q29_mult(quat[2], quat[3]) - inv_q29_mult(quat[1], quat[0]); in inv_quaternion_to_rotation()
246 rot[6] = inv_q29_mult(quat[1], quat[3]) - inv_q29_mult(quat[2], quat[0]); in inv_quaternion_to_rotation()
[all …]
DmlFIFO.c1699 long quat[4]; in inv_get_gravity() local
1713 result = inv_get_quaternion(quat); in inv_get_gravity()
1720 inv_q29_mult(quat[1], quat[3]) - inv_q29_mult(quat[2], quat[0]); in inv_get_gravity()
1722 inv_q29_mult(quat[2], quat[3]) + inv_q29_mult(quat[1], quat[0]); in inv_get_gravity()
1724 (inv_q29_mult(quat[3], quat[3]) + inv_q29_mult(quat[0], quat[0])) - in inv_get_gravity()
DmlMathFunc.h54 void inv_quaternion_to_rotation(const long *quat, long *rot);
/hardware/invensense/60xx/libsensors_iio/software/core/mllite/
Dml_math_func.c39 float inv_compass_angle(const long *compass, const long *grav, const float *quat) in inv_compass_angle() argument
51 inv_q_multf(quat, cgcross, q1); in inv_compass_angle()
52 inv_q_invertf(quat, qi); in inv_compass_angle()
234 double quaternion_to_rotation_angle(const long *quat) { in quaternion_to_rotation_angle() argument
235 double quat0 = (double )quat[0] / 1073741824; in quaternion_to_rotation_angle()
346 void inv_quaternion_to_rotation(const long *quat, long *rot) in inv_quaternion_to_rotation() argument
349 inv_q29_mult(quat[1], quat[1]) + inv_q29_mult(quat[0], in inv_quaternion_to_rotation()
350 quat[0]) - in inv_quaternion_to_rotation()
353 inv_q29_mult(quat[1], quat[2]) - inv_q29_mult(quat[3], quat[0]); in inv_quaternion_to_rotation()
355 inv_q29_mult(quat[1], quat[3]) + inv_q29_mult(quat[2], quat[0]); in inv_quaternion_to_rotation()
[all …]
Dml_math_func.h80 void inv_quaternion_to_rotation(const long *quat, long *rot);
92 void inv_quaternion_to_rotation_vector(const long *quat, long *rot);
101 const float *quat);
109 double quaternion_to_rotation_angle(const long *quat);
Ddata_builder.c288 sensors.quat.sample_rate_us = sample_rate_us; in inv_set_quat_sample_rate()
289 sensors.quat.sample_rate_ms = sample_rate_us / 1000; in inv_set_quat_sample_rate()
741 inv_error_t inv_build_quat(const long *quat, int status, inv_time_t timestamp) in inv_build_quat() argument
747 fwrite(quat, sizeof(quat[0]), 4, inv_data_builder.file); in inv_build_quat()
752 memcpy(sensors.quat.raw, quat, sizeof(sensors.quat.raw)); in inv_build_quat()
753 sensors.quat.timestamp = timestamp; in inv_build_quat()
754 sensors.quat.status |= INV_NEW_DATA | INV_RAW_DATA | INV_SENSOR_ON; in inv_build_quat()
755 sensors.quat.status |= (INV_BIAS_APPLIED & status); in inv_build_quat()
781 sensors.quat.status = 0; in inv_quaternion_sensor_was_turned_off()
916 if (sensors.quat.status & INV_QUAT_NEW) in inv_execute_on_data()
[all …]
Dhal_outputs.c352 if ((sensor_cal->quat.status & INV_SENSOR_ON) && (sr > sensor_cal->quat.sample_rate_ms)) { in inv_generate_hal_outputs()
353 sr = sensor_cal->quat.sample_rate_ms; in inv_generate_hal_outputs()
358 if (sensor_cal->quat.status & INV_SENSOR_ON) { in inv_generate_hal_outputs()
383 hal_out.nine_axis_status = (sensor_cal->quat.status & INV_NEW_DATA) ? 1 : 0; in inv_generate_hal_outputs()
384 hal_out.nav_timestamp = sensor_cal->quat.timestamp; in inv_generate_hal_outputs()
Ddata_builder.h110 struct inv_quat_sensor_t quat; member
182 inv_error_t inv_build_quat(const long *quat, int status, inv_time_t timestamp);
Dresults_holder.h27 void inv_store_gaming_quaternion(const long *quat, inv_time_t timestamp);
Dresults_holder.c59 void inv_store_gaming_quaternion(const long *quat, inv_time_t timestamp) in inv_store_gaming_quaternion() argument
62 memcpy(&rh.gam_quat, quat, sizeof(rh.gam_quat)); in inv_store_gaming_quaternion()
/hardware/invensense/65xx/libsensors_iio/software/core/mllite/
Dml_math_func.c39 float inv_compass_angle(const long *compass, const long *grav, const float *quat) in inv_compass_angle() argument
51 inv_q_multf(quat, cgcross, q1); in inv_compass_angle()
52 inv_q_invertf(quat, qi); in inv_compass_angle()
234 double quaternion_to_rotation_angle(const long *quat) { in quaternion_to_rotation_angle() argument
235 double quat0 = (double )quat[0] / 1073741824; in quaternion_to_rotation_angle()
346 void inv_quaternion_to_rotation(const long *quat, long *rot) in inv_quaternion_to_rotation() argument
349 inv_q29_mult(quat[1], quat[1]) + inv_q29_mult(quat[0], in inv_quaternion_to_rotation()
350 quat[0]) - in inv_quaternion_to_rotation()
353 inv_q29_mult(quat[1], quat[2]) - inv_q29_mult(quat[3], quat[0]); in inv_quaternion_to_rotation()
355 inv_q29_mult(quat[1], quat[3]) + inv_q29_mult(quat[2], quat[0]); in inv_quaternion_to_rotation()
[all …]
Ddata_builder.c320 sensors.quat.sample_rate_us = sample_rate_us; in inv_set_quat_sample_rate()
321 sensors.quat.sample_rate_ms = sample_rate_us / 1000; in inv_set_quat_sample_rate()
396 if (sensors.quat.status & INV_SENSOR_ON) { in inv_get_last_timestamp()
397 if (timestamp < sensors.quat.timestamp) in inv_get_last_timestamp()
398 timestamp = sensors.quat.timestamp; in inv_get_last_timestamp()
863 inv_error_t inv_build_quat(const long *quat, int status, inv_time_t timestamp) in inv_build_quat() argument
869 fwrite(quat, sizeof(quat[0]), 4, inv_data_builder.file); in inv_build_quat()
877 MPL_LOGV("3q: %ld,%ld,%ld\n", quat[0], quat[1], quat[2]); in inv_build_quat()
878 inv_compute_scalar_part(quat, resultQuat); in inv_build_quat()
880 memcpy(sensors.quat.raw, resultQuat, sizeof(sensors.quat.raw)); in inv_build_quat()
[all …]
Dml_math_func.h80 void inv_quaternion_to_rotation(const long *quat, long *rot);
92 void inv_quaternion_to_rotation_vector(const long *quat, long *rot);
101 const float *quat);
109 double quaternion_to_rotation_angle(const long *quat);
Dhal_outputs.c535 hal_out.quat_status = sensor_cal->quat.status; in inv_generate_hal_outputs()
550 if ((sensor_cal->quat.status & INV_SENSOR_ON) && (sr > sensor_cal->quat.sample_rate_ms)) { in inv_generate_hal_outputs()
551 sr = sensor_cal->quat.sample_rate_ms; in inv_generate_hal_outputs()
556 if (sensor_cal->quat.status & INV_SENSOR_ON) { in inv_generate_hal_outputs()
581 hal_out.nine_axis_status = (sensor_cal->quat.status & INV_NEW_DATA) ? 1 : 0; in inv_generate_hal_outputs()
582 hal_out.nav_timestamp = sensor_cal->quat.timestamp; in inv_generate_hal_outputs()
Dresults_holder.h27 void inv_store_gaming_quaternion(const long *quat, inv_time_t timestamp);
28 void inv_store_accel_quaternion(const long *quat, inv_time_t timestamp);
Dresults_holder.c65 void inv_store_gaming_quaternion(const long *quat, inv_time_t timestamp) in inv_store_gaming_quaternion() argument
68 memcpy(&rh.gam_quat, quat, sizeof(rh.gam_quat)); in inv_store_gaming_quaternion()
77 void inv_store_accel_quaternion(const long *quat, inv_time_t timestamp) in inv_store_accel_quaternion() argument
80 memcpy(&rh.accel_quat, quat, sizeof(rh.accel_quat)); in inv_store_accel_quaternion()
Ddata_builder.h130 struct inv_quat_sensor_t quat; member
236 inv_error_t inv_build_quat(const long *quat, int status, inv_time_t timestamp);
/hardware/invensense/60xx/libsensors/
DMPLSensor.cpp662 float quat[4]; in rvHandler() local
667 r = inv_get_float_array(INV_QUATERNION, quat); in rvHandler()
676 norm = quat[1] * quat[1] + quat[2] * quat[2] + quat[3] * quat[3] in rvHandler()
683 quat[1] = quat[1] * inv_norm; in rvHandler()
684 quat[2] = quat[2] * inv_norm; in rvHandler()
685 quat[3] = quat[3] * inv_norm; in rvHandler()
688 if (quat[0] < 0.0) { in rvHandler()
689 quat[1] = -quat[1]; in rvHandler()
690 quat[2] = -quat[2]; in rvHandler()
691 quat[3] = -quat[3]; in rvHandler()
[all …]
/hardware/invensense/60xx/libsensors_iio/software/core/mpl/
Dquaternion_supervisor.h21 void inv_set_quaternion(long *quat);
Dmag_disturb.h17 int inv_check_magnetic_disturbance(unsigned long delta_time, const long *quat,
/hardware/invensense/65xx/libsensors_iio/software/core/mpl/
Dquaternion_supervisor.h23 void inv_set_quaternion(long *quat);
Dmag_disturb.h19 int inv_check_magnetic_disturbance(unsigned long delta_time, const long *quat,