# Rotation Tool

The rotation tool allows the in plane rotation of an object to be measured, with total rotation and rotation rate charted and logged.  In addition the algorithm will attempt to compensate for small translational movements, and these can also be charted and logged.

To start rotation tracking select the **Rotation** tool and check **Enable**.  Scrub or play to the time in the clip where rotation tracking should begin and stop playback.  Press **Set ROI** and drag the circular ROI over the center of rotation of the object to be measured.  The ROI size can be changed by dragging the perimeter and the start angle can be set by dragging near the end of the pointer.  If the object has a non-rotating or indistinct central feature then this is the opportunity to check **Hub mask** to help improve rotational accuracy at the expense of translational accuracy.  Press **Set ROI** again and the ROI should turn solid yellow to indicate that rotation tracking is now active.  Note that when resizing the ROI the circle will snap to a specific size due to certain internal constraints in the tracking algorithm.&#x20;

Press **Play** and the yellow ROI pointer should follow the object rotation and will adjust to any small translational movements.  Let the clip play for the desired tracking duration and then stop the clip.  Note that if the object is fixed in the frame and just exhibits pure rotational movement then better results can sometimes be obtained by checking **Fixed position**.

To restart rotation tracking from the same origin point, press **Return to start**.  The clip will rewind to where tracking was initiated and the ROI will be reset.

The rotation tracking history between where the ROI was set and the point where the clip is stopped is logged, and the clip can be freely scrubbed between these two points.  Scrubbing outside these points is blocked while rotation tracking is enabled.  In order to extend rotation tracking beyond the previous stop point just start the clip playing again.  If it is desired to start rotation tracking earlier in the clip than when the ROI was defined press **Set ROI** to unlock the scrubbing range and scrub to the new start point, repositioning the ROI as well if desired.  Press **Set ROI** again to return to tracking mode.

Charts for rotation angle, rotation rate and translation can be enabled by selecting the appropriate checkbox.  Scaling for each chart can be adjusted using the relevant **Scale** sliders, with the steppers adjacent to the slider providing a 10<sup>3</sup> coarse adjustment.  Alternatively autoscaling can be enabled for all charts by checking **Autoscale.**  The chart span can be adjusted by dragging the **Span** slider.

In some circumstances (e.g. very slow rotation rates) the rotation pointer may lag behind the real rotation after a while.  If this is seen to be happening try reducing the adaption rate to a lower value.  If tracking is being lost completely then better results may be obtained by increasing the adaption rate at the expense of increased slip likelihood.&#x20;

The units for rotation angle and rotation rate can be changed in the appropriate pulldowns, and if calibration has been applied using the procedure in the [measure-tool](https://docs.freeflysystems.com/products/products/ember-camera/ember-scientific-toolbox-app/measure-tool "mention") then real world units can be applied to the translation chart.
