Reorient Unity data into the Qualisys right handed coordinate system and account for the offset between scene origin (in Unity) and Qualisys Motion Capture origin (in Unity coordinates).

reorient_unity2qualisys(df, offset = c(0, 0, 0), scenario_data = NULL)

Arguments

df

A movement data frame with position coordinates in the form _X, _Y, _Z (uppercase or lowercase)

offset

A 3-element translation vector in Unity coordinates (from Unity Scenario Origin towards Qualisys Mocap origin)

scenario_data

A scenario object (optional default NULL)

Value

The same movement tibble with all position columns reoriented in a list, to be used by mutate across rows of a trial_results tibble

Details

Provide the offset as a vector in Unity coordinates (FROM Unity Scenario origin TO Qualisys origin). The function can also undo the rotation to local scenario coordinates provided in a scenario data object. This would convert the input data from global coordinates to scenario coordinates and thus avoid any sytemic artefacts in the returned data.

It is recommended to include scenario data as all data stored via UXF from unity VR is in global coordinates.