09-14-2023, 09:30 PM
dear all,
apologies if this request has been already submitted. Wouldn't be nice if PhyPhox provided an orientation sensor as a built-in experiment? Android framework gives access to "type_rotation_vector" (an angle-axis/quaternion representation of the phone's 3D orientation based on acc+gyro+mag sensor fusion) and to "type_game_rotation_vector" (the same as the previous one without magnetometer). From these virtual orientation sensors, the phone's 3D orientation in terms of Euler angles (roll, pitch and yaw) can be derived by using " SensorManager.getRotationMatrixFromVector()", that converts in rotation matrix the output (quaternion) provided either by "type_rotation_vector" or "type_game_rotation_vector", and then using "SensorManager.getOrientation()" that returns roll pitch and yaw angles for an easier interpretation of the phone's orientation.
In PhyPhox editor I have noticed that no game_rotation_vector is included in the list of available sensors.
I hope you could implement this feature soon!
Thanks for the attention,
Pietro
PS: with respect to the already present built-in inclinometer experiment, that is probably base solely on accelerometer data (and that cannot be used in dynamic conditions), retrieving the phone's orientation directly from the vendor sensor fusion algorithm would give a more responsive and accurate 3D orientation of the phone that could track the phone's orientation even in dynamic conditions.
apologies if this request has been already submitted. Wouldn't be nice if PhyPhox provided an orientation sensor as a built-in experiment? Android framework gives access to "type_rotation_vector" (an angle-axis/quaternion representation of the phone's 3D orientation based on acc+gyro+mag sensor fusion) and to "type_game_rotation_vector" (the same as the previous one without magnetometer). From these virtual orientation sensors, the phone's 3D orientation in terms of Euler angles (roll, pitch and yaw) can be derived by using " SensorManager.getRotationMatrixFromVector()", that converts in rotation matrix the output (quaternion) provided either by "type_rotation_vector" or "type_game_rotation_vector", and then using "SensorManager.getOrientation()" that returns roll pitch and yaw angles for an easier interpretation of the phone's orientation.
In PhyPhox editor I have noticed that no game_rotation_vector is included in the list of available sensors.
I hope you could implement this feature soon!
Thanks for the attention,
Pietro
PS: with respect to the already present built-in inclinometer experiment, that is probably base solely on accelerometer data (and that cannot be used in dynamic conditions), retrieving the phone's orientation directly from the vendor sensor fusion algorithm would give a more responsive and accurate 3D orientation of the phone that could track the phone's orientation even in dynamic conditions.