Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6683737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:51:24+00:00 2026-05-26T04:51:24+00:00

I am using a tracking device (only rotation tracked, not position) for input and

  • 0

I am using a tracking device (only rotation tracked, not position) for input and I send its rotation matrix to an OpenGL application. The tracker sends an identity matrix when it’s aligned with it’s axis system, i.e when the tracker is facing towards its Y axis and the up direction of the tracker is facing it’s Z axis. As seen in the right hand side of the illustration.

Axis Systems Diagram

If I rotate the tracker however, the corresponding rotation in my opengl program is wrong. To try to remedy that I tried to multiply the matrix provided by the tracker with:

  1  0  0  0
  0  0  1  0
  0 -1  0  0
  0  0  0  1 

To remap but no matter what I try it seems like always one of the three rotations is wrong.

Is there some matrix that I could multiply my tracker’s matrix with to get the rotations right?

===== EDIT =====

Android’s remapCoordinateSystem seems to achieve what I want but I can’t understand the code in there:
https://github.com/android/platform_frameworks_base/blob/master/core/java/android/hardware/SensorManager.java#L1459

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:51:24+00:00Added an answer on May 26, 2026 at 4:51 am

    The following worked to translate the matrix to work properly with OpenGL.

    //orientation is the tracker's rotation matrix
    orientation = glm::rotate(orientation, glm::degrees((float)M_PI/2),vec3(1,0,0));
    orientation = glm::inverse(orientation);
    orientation = glm::rotate(orientation, glm::degrees((float)M_PI/2),vec3(1,0,0));
    

    I don’t know why it worked, but it worked.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working on a tracking application using GPS. It is all fine, but sometimes because
For tracking user activity, I am using a Windows Hook for the main application
My application is using Self-Tracking Entities & I get my data from a WCF
So I am creating a time tracking application using Ruby On Rails and am
I am doing a project on criminal tracking using gps and i am not
I would like to write an application for people tracking by using GPS in
I need to implement a GPS application for tracking purposes using J2ME... I wanted
I'm using self-tracking entities in a WCF client-server application. My WCF service returns various
Here's an interesting writeup of using eye tracking software to generate heat maps that
We've been using Trac for task/defect tracking and things were going well enough, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.