title: Android accelerometer mapping movement to custom coordinate system
body: <p>If I have custom coordinate system X - left/right, Y - forward/backward, Z - Up/down that is represented on my PC screen inside my unreal project, <strong>how would I map the accelerator values In a way that when I move my phone toward the PC screen (regardless of the phone orientation) so that my Y value goes up and same for other axes?</strong></p>
  <p>I got something similar working with rotation by taking &quot;referent&quot; rotation quaternion, inverting it and multiplying it by current rotation quaternion, but I'm just stuck on how to transform movement.</p>
  <p><strong>Example of my problem is that if I'm moving my phone up with screen pointing at sky my Z axis increases which is what I want, but when I also point my phone screen to my PC screen and move it forward Z axis again goes up, when I would want in this case that my Y value increases.</strong></p>
  <p>There is a similar question <a href="https://stackoverflow.com/questions/11578636/acceleration-from-devices-coordinate-system-into-absolute-coordinate-system">Acceleration from device's coordinate system into absolute coordinate system</a> but that doesn't really solve my problem since I don't want to depend on the location of the north for Y and so on.</p>