int64_t timestamp_ns;
// Bitmask of DVR_POSE_FLAG_* constants that apply to this pose.
//
- // If DVR_POSE_FLAG_VALID is not set, the pose is indeterminate.
+ // If DVR_POSE_FLAG_INVALID is set, the pose is indeterminate.
uint64_t flags;
// Reserved padding to 128 bytes.
uint8_t pad[16];
} DvrPoseAsync;
enum {
- DVR_POSE_FLAG_VALID = (1UL << 0), // This pose is valid.
- DVR_POSE_FLAG_HEAD = (1UL << 1), // This pose is the head.
- DVR_POSE_FLAG_CONTROLLER = (1UL << 2), // This pose is a controller.
+ DVR_POSE_FLAG_INVALID = (1UL << 0), // This pose is invalid.
+ DVR_POSE_FLAG_INITIALIZING = (1UL << 1), // The pose delivered during
+ // initialization and it may not be
+ // correct.
+ DVR_POSE_FLAG_3DOF =
+ (1UL << 2), // This pose is derived from 3Dof sensors. If
+ // this is not set, pose is derived using
+ // 3Dof and 6Dof sensors.
+ DVR_POSE_FLAG_FLOOR_HEIGHT_INVALID =
+ (1UL << 3), // If set the floor height is invalid.
};
// Represents a sensor pose sample.
// Timestamp for the measurement in nanoseconds.
int64_t timestamp_ns;
- // Padding to 96 bytes so the size is a multiple of 16.
- uint8_t padding[8];
+ // The combination of flags above.
+ uint64_t flags;
+
+ // The current floor height. May be updated at a lower cadence than pose.
+ float floor_height;
+
+ // Padding to 112 bytes so the size is a multiple of 16.
+ uint8_t padding[12];
} DvrPose;
__END_DECLS
namespace dvr {
// Increment when the layout for the buffers change.
-enum : uint32_t { kSharedBufferLayoutVersion = 1 };
+enum : uint32_t { kSharedBufferLayoutVersion = 2 };
// Note: These buffers will be mapped from various system processes as well
// as VrCore and the application processes in a r/w manner.
// Sanity check for basic type sizes.
static_assert(sizeof(DvrPoseAsync) == 128, "Unexpected size for DvrPoseAsync");
-static_assert(sizeof(DvrPose) == 96, "Unexpected size for DvrPose");
+static_assert(sizeof(DvrPose) == 112, "Unexpected size for DvrPose");
static_assert(sizeof(DvrVsync) == 32, "Unexpected size for DvrVsync");
static_assert(sizeof(DvrConfig) == 16, "Unexpected size for DvrConfig");
uint8_t padding[12];
};
-static_assert(sizeof(DvrVsyncPoseBuffer) == 1136,
+static_assert(sizeof(DvrVsyncPoseBuffer) == 1152,
"Unexpected size for DvrVsyncPoseBuffer");
// The keys for the dvr global buffers.