Monado OpenXR Runtime
t_tracker_psmv_fusion.hpp
Go to the documentation of this file.
1 // Copyright 2019, Collabora, Ltd.
2 // SPDX-License-Identifier: BSL-1.0
3 /*!
4  * @file
5  * @brief PS Move tracker code.
6  * @author Pete Black <pblack@collabora.com>
7  * @author Jakob Bornecrantz <jakob@collabora.com>
8  * @author Ryan Pavlik <ryan.pavlik@collabora.com>
9  * @ingroup aux_tracking
10  */
11 
12 #pragma once
13 
14 #ifndef __cplusplus
15 #error "This header is C++-only."
16 #endif
17 
18 #include "xrt/xrt_defines.h"
19 #include "xrt/xrt_tracking.h"
20 
21 #include "util/u_time.h"
22 
23 #include <memory>
24 
25 
26 namespace xrt_fusion {
28 {
29 public:
30  static std::unique_ptr<PSMVFusionInterface>
31  create();
32  virtual ~PSMVFusionInterface() = default;
33 
34  /*!
35  * @brief If you've lost sight of the position tracking and won't even
36  * enter another function in this class.
37  */
38  virtual void
40 
41  virtual void
43  timepoint_ns timestamp_ns,
44  const struct xrt_tracking_sample *sample,
45  const struct xrt_vec3 *orientation_variance_optional) = 0;
46  virtual void
48  const struct xrt_vec3 *position,
49  const struct xrt_vec3 *variance_optional,
50  const struct xrt_vec3 *lever_arm_optional,
51  float residual_limit) = 0;
52 
53  virtual void
55  struct xrt_space_relation *out_relation) = 0;
56 };
57 } // namespace xrt_fusion
virtual void process_3d_vision_data(timepoint_ns timestamp_ns, const struct xrt_vec3 *position, const struct xrt_vec3 *variance_optional, const struct xrt_vec3 *lever_arm_optional, float residual_limit)=0
A 3 element vector with single floats.
Definition: xrt_defines.h:133
A relation with two spaces, includes velocity and acceleration.
Definition: xrt_defines.h:336
Definition: t_tracker_psmv_fusion.hpp:27
Time-keeping: a clock that is steady, convertible to system time, and ideally high-resolution.
virtual void process_imu_data(timepoint_ns timestamp_ns, const struct xrt_tracking_sample *sample, const struct xrt_vec3 *orientation_variance_optional)=0
Common defines and enums for XRT.
int64_t timepoint_ns
Integer timestamp type.
Definition: u_time.h:34
virtual ~PSMVFusionInterface()=default
struct vive_imu_sample sample[3]
Definition: vive_protocol.h:210
Header defining the tracking system integration in Monado.
IMU Sample.
Definition: xrt_tracking.h:94
static std::unique_ptr< PSMVFusionInterface > create()
Definition: t_tracker_psmv_fusion.cpp:255
virtual void get_prediction(timepoint_ns when_ns, struct xrt_space_relation *out_relation)=0
Definition: t_fusion.hpp:25
virtual void clear_position_tracked_flag()=0
If you&#39;ve lost sight of the position tracking and won&#39;t even enter another function in this class...