Home
last modified time | relevance | path

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

12

/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()
/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()
/hardware/invensense/6515/libsensors_iio/software/simple_apps/playback/linux/
Ddatalogger_outputs.c31 long quat[4]; member
178 q00 = inv_q29_mult(dl_out.quat[0], dl_out.quat[0]); in inv_get_sensor_type_compass_float()
179 q12 = inv_q29_mult(dl_out.quat[1], dl_out.quat[2]); in inv_get_sensor_type_compass_float()
180 q22 = inv_q29_mult(dl_out.quat[2], dl_out.quat[2]); in inv_get_sensor_type_compass_float()
181 q03 = inv_q29_mult(dl_out.quat[0], dl_out.quat[3]); in inv_get_sensor_type_compass_float()
254 values[0] = dl_out.quat[0] / 1073741824.f; in inv_get_sensor_type_quat_float()
255 values[1] = dl_out.quat[1] / 1073741824.f; in inv_get_sensor_type_quat_float()
256 values[2] = dl_out.quat[2] / 1073741824.f; in inv_get_sensor_type_quat_float()
257 values[3] = dl_out.quat[3] / 1073741824.f; in inv_get_sensor_type_quat_float()
318 if (dl_out.quat[0] >= 0) { in inv_get_sensor_type_rotation_vector_float()
[all …]
Dmain.c456 float quat[4]; in fifo_callback() local
457 inv_get_quaternion_float(quat); in fifo_callback()
458 PRINT_4ELM_ARRAY_FLOAT(10, 5, quat); in fifo_callback()
468 float quat[4]; in fifo_callback() local
474 quat[j] = (float)temp[j] / (1 << 30); in fifo_callback()
475 PRINT_4ELM_ARRAY_FLOAT(10, 5, quat); in fifo_callback()
Dand_constructor.c183 long quat[4]; in inv_playback() local
186 int32_to_long(buffer, quat, 4); in inv_playback()
187 inv_build_quat(quat, INV_BIAS_APPLIED, ts); in inv_playback()
/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.c342 sensors.quat.sample_rate_us = sample_rate_us; in inv_set_quat_sample_rate()
343 sensors.quat.sample_rate_ms = sample_rate_us / 1000; in inv_set_quat_sample_rate()
419 if (sensors.quat.status & INV_SENSOR_ON) { in inv_get_last_timestamp()
420 if (timestamp < sensors.quat.timestamp) in inv_get_last_timestamp()
421 timestamp = sensors.quat.timestamp; in inv_get_last_timestamp()
924 inv_error_t inv_build_quat(const long *quat, int status, inv_time_t timestamp) in inv_build_quat() argument
930 fwrite(quat, sizeof(quat[0]), 4, inv_data_builder.file); in inv_build_quat()
938 MPL_LOGV("3q: %ld,%ld,%ld\n", quat[0], quat[1], quat[2]); in inv_build_quat()
939 inv_compute_scalar_part(quat, resultQuat); in inv_build_quat()
941 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);
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);
Dhal_outputs.c546 hal_out.quat_status = sensor_cal->quat.status; in inv_generate_hal_outputs()
563 if ((sensor_cal->quat.status & INV_SENSOR_ON) && (sr > sensor_cal->quat.sample_rate_ms)) { in inv_generate_hal_outputs()
564 sr = sensor_cal->quat.sample_rate_ms; in inv_generate_hal_outputs()
569 if (sensor_cal->quat.status & INV_SENSOR_ON) { in inv_generate_hal_outputs()
596 hal_out.nine_axis_status = (sensor_cal->quat.status & INV_NEW_DATA) ? 1 : 0; in inv_generate_hal_outputs()
597 hal_out.nav_timestamp = sensor_cal->quat.timestamp; in inv_generate_hal_outputs()
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()
/hardware/invensense/6515/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.c337 *ts = sensors.quat.timestamp; in inv_raw_sensor_timestamp()
339 if (sensors.quat.timestamp_prev != sensors.quat.timestamp) in inv_raw_sensor_timestamp()
379 …if ((sensors.quat.status & (INV_QUAT_9AXIS | INV_SENSOR_ON)) == (INV_QUAT_9AXIS | INV_SENSOR_ON)) { in inv_get_9_axis_timestamp()
381 *ts = sensors.quat.timestamp; in inv_get_9_axis_timestamp()
383 if (sensors.quat.timestamp_prev != sensors.quat.timestamp) in inv_get_9_axis_timestamp()
393 td[0] = sample_rate_us - sensors.quat.sample_rate_us; in inv_get_9_axis_timestamp()
395 …if ((sensors.quat.status & (INV_QUAT_6AXIS | INV_SENSOR_ON)) == (INV_QUAT_6AXIS | INV_SENSOR_ON)) { in inv_get_9_axis_timestamp()
406 …if ((sensors.quat.status & (INV_QUAT_3AXIS | INV_SENSOR_ON)) == (INV_QUAT_3AXIS | INV_SENSOR_ON)) { in inv_get_9_axis_timestamp()
469 …if ((sensors.quat.status & (INV_QUAT_6AXIS | INV_SENSOR_ON)) == (INV_QUAT_6AXIS | INV_SENSOR_ON)) { in inv_get_6_axis_gyro_accel_timestamp()
477 td[0] = sample_rate_us - sensors.quat.sample_rate_us; in inv_get_6_axis_gyro_accel_timestamp()
[all …]
Dresults_holder.h62 void inv_store_gaming_quaternion(const long *quat, inv_time_t timestamp);
63 void inv_store_accel_quaternion(const long *quat, inv_time_t timestamp);
64 void inv_store_nav_quaternion(const float *quat, inv_time_t timestamp);
65 void inv_store_game_quaternion(const float *quat, inv_time_t timestamp);
66 void inv_store_geomag_quaternion(const float *quat, inv_time_t timestamp);
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);
Dresults_holder.c67 void inv_store_gaming_quaternion(const long *quat, inv_time_t timestamp) in inv_store_gaming_quaternion() argument
70 memcpy(&rh.gam_quat, quat, sizeof(rh.gam_quat)); in inv_store_gaming_quaternion()
79 void inv_store_nav_quaternion(const float *quat, inv_time_t timestamp) in inv_store_nav_quaternion() argument
81 memcpy(&rh.nav_quat, quat, sizeof(rh.nav_quat)); in inv_store_nav_quaternion()
90 void inv_store_geomag_quaternion(const float *quat, inv_time_t timestamp) in inv_store_geomag_quaternion() argument
92 memcpy(&rh.geomag_quat, quat, sizeof(rh.geomag_quat)); in inv_store_geomag_quaternion()
101 void inv_store_game_quaternion(const float *quat, inv_time_t timestamp) in inv_store_game_quaternion() argument
104 memcpy(&rh.game_quat, quat, sizeof(rh.game_quat)); in inv_store_game_quaternion()
113 void inv_store_accel_quaternion(const long *quat, inv_time_t timestamp) in inv_store_accel_quaternion() argument
116 memcpy(&rh.accel_quat, quat, sizeof(rh.accel_quat)); in inv_store_accel_quaternion()
Dhal_outputs.c590 hal_out.quat_status = sensor_cal->quat.status; in inv_generate_hal_outputs()
607 if ((sensor_cal->quat.status & INV_SENSOR_ON) && (sr > sensor_cal->quat.sample_rate_ms)) { in inv_generate_hal_outputs()
608 sr = sensor_cal->quat.sample_rate_ms; in inv_generate_hal_outputs()
622 if (sensor_cal->quat.timestamp_prev == sensor_cal->quat.timestamp) { in inv_generate_hal_outputs()
627 if (sensor_cal->quat.status & INV_SENSOR_ON) { in inv_generate_hal_outputs()
654 hal_out.nine_axis_status = (sensor_cal->quat.status & INV_NEW_DATA) ? 1 : 0; in inv_generate_hal_outputs()
655 hal_out.nav_timestamp = sensor_cal->quat.timestamp; in inv_generate_hal_outputs()
/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);
/hardware/invensense/65xx/libsensors_iio/software/core/mpl/
Dquaternion_supervisor.h23 void inv_set_quaternion(long *quat);
/hardware/invensense/6515/libsensors_iio/software/core/mpl/
Dquaternion_supervisor.h23 void inv_set_quaternion(long *quat);

12