B. Tracking Movements
To update the phone’s attitude as it rotates, we use the gyroscope
measurements. From the sequence of phone attitudes, we
compute the trajectory of the phone’s writing point W on the
writing surface.
We use quaternions as a convenient way to describe and work
with rotations in 3-D space. When we say that we update an
attitude o1 using an angular velocity r, we first determine the
angle Q(Δt · r) by which the phone was rotated from r and the
time Δt corresponding to this measurement. Then, we compute
the updated attitude o2 by rotating o1 by that angle
o2 = o1 ∗ Q(Δt · r) (3)
where ∗ is the quaternion multiplication that corresponds to
rotating o1 by the angle Δt · r.
This is performed for every measured angular velocity rt
successively. Then, we compute the location at which point W
touches the writing surface for every time step t, assuming the
writing surface is orthogonal to the gravity vector g and cutting
it at point B.