Antilatency Tracking Alignment Library

Antilatency Tracking Alignment Library

A library for combining data from two tracking systems that are used together. For example, when using the Alt tracker with an AR/VR headset with its own tracking system.

Library’s functions

This library calculates information about the relative rotation of trackers, of coordinate systems, and the latency between the tracking data.

Summary

The Alt tracker is commonly used with an AR/VR headset having its own tracking system. We can use the tracking data of these two systems in order to specify the Placement, determine the correct interpolation time (since headsets use their own value for timewarp), make certain diagnostics, etc. In general, trackers:
We ignore the shift of the trackers and their world coordinate systems, since the result is less useful in practice. For the tasks above, it is enough to determine the rotations and the latency, which this library does. Tracking alignment is based on the following equation: a(t) = rotationBSpace * b(t) * rotationARelativeToB for every moment of t.

ITrackingAlignment

The ITrackingAlignment optimizer is used to combine the data from the Antilatency tracking system and a third-party system. To create an instance of the optimizer, set the parameters initialARelativeToB (which is a part of Placement) and initialTimeBAheadOfA (an estimated value of latency between the tracking data), where A is the Alt, B is the third-party tracker. The State structure is the state of the optimizer. It stores data about the Alt's rotation relative to the third-party tracker, the relative rotation of the third-party world coordinate system, and the time delay between tracking data. To update these fields, use the Alt rotation data (without extrapolation), the third-party tracker rotation data (as is), and the current time (set from a specific reference point, for example, from the time of the program’s launch). All the rotations are represented as quaternions.

State

struct State {
Math.floatQ rotationARelativeToB;
Math.floatQ rotationBSpace;
float timeBAheadOfA;
}
The results of tracking alignment are recorded by the optimizer in State.
If the third-party tracker data arrives earlier than that of the Alt, the value of State.timeBAheadOfA is positive, otherwise it is negative.

Example

C# code:
using Antilatency.TrackingAlignment;

ILibrary alignmentLibrary = Antilatency.TrackingAlignment.Library.load();
ITrackingAlignment trackingAlignment = alignmentLibrary.createTrackingAlignment(
    initialARelativeToB,
    initialTimeBAheadOfA
);

...
while (...) {
    State state = trackingAlignment.update(
        alt.state.pose.rotation,
        rotationB,
        currentTime
    );

    < use state somehow >
    ...
}