a(t) = rotationBSpace * b(t) * rotationARelativeToB
for every moment of t
.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
.State.timeBAheadOfA
is positive, otherwise it is negative.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 > ... }