Request tracking extrapolation on client
Add the timestamp where data was requested, use this to compute how far in the future the application is requesting samples. With this information, client requests 2 tracking samples: one at the current time and one in the future. Server now keeps track of actual samples + one predicted sample, and is most of the time in the interpolation use case.
This commit is contained in:
@@ -120,8 +120,9 @@ static xrt_hand_joint_set convert_joints(const std::optional<std::array<from_hea
|
||||
|
||||
void hand_joints_list::update_tracking(const from_headset::hand_tracking & tracking, const clock_offset & offset)
|
||||
{
|
||||
if (hand_id == 0)
|
||||
add_sample(tracking.timestamp, convert_joints(tracking.left), offset);
|
||||
else
|
||||
add_sample(tracking.timestamp, convert_joints(tracking.right), offset);
|
||||
add_sample(
|
||||
tracking.production_timestamp,
|
||||
tracking.timestamp,
|
||||
convert_joints(hand_id == 0 ? tracking.left : tracking.right),
|
||||
offset);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user