我想使用TANGO_COORDINATE_FRAME_GLOBAL_WGS84来确定我的设备与世界的位置。
我的代码看起来像这样:
glm::mat4 matrixDeviceToWGS;
glm::vec4 originDeviceInDevice = glm::vec4(glm::vec3(0.0), 1.0);
glm::vec4 originDeviceInWGS;
glm::vec4 northPoleInWGS = glm::vec4(glm::vec2(0.0), SEMI_MINOR_AXIS_WGS, 1.0);
glm::vec4 northPoleInDevice;
TangoMatrixTransformData matrix_transform;
TangoSupport_getMatrixTransformAtTime(
i_timestamp, TANGO_COORDINATE_FRAME_START_OF_SERVICE, TANGO_COORDINATE_FRAME_GLOBAL_WGS84,
TANGO_SUPPORT_ENGINE_TANGO, TANGO_SUPPORT_ENGINE_TANGO,
ROTATION_0,
&matrix_transform);
if (matrix_transform.status_code == TANGO_POSE_VALID) {
matrixDeviceToWGS = glm::make_mat4(matrix_transform.matrix);
originDeviceInWGS = matrixDeviceToWGS * originDeviceInDevice;
northPoleInDevice = -originDeviceInWGS + northPoleInWGS;
}
但是我无法传递条件TANGO_POSE_VALID,我只有TANGO_POSE_INVALID。 有没有人知道我的代码是否正确,或者至少是否实现了枚举TANGO_COORDINATE_FRAME_GLOBAL_WGS84?