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 9013171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:11:35+00:00 2026-06-16T03:11:35+00:00

How do you calculate the amount the phone has rotated?, where the zero degrees

  • 0

How do you calculate the amount the phone has rotated?, where the “zero degrees” is something you specify.

For example, say you have your phone flat infront of you on a table in a portrait position – let’s call that “zero degrees”.

You rotate the phone to the right so that it is now landscape (top of phone pointing right) – that would be “90 degrees”.

During this rotation, the phone would’ve rotated 20, 30, 40 etc degrees

So far, I’ve found the way to detect phone rotation is via accelerometer and compass, ie “getAzimuth()“. However, “zero degrees” is always North.

Is there a way to calculate the rotation of the phone not in relation to cardinal directions?

Notes:

  • Using libgdx, though the sensor behaviour shouldn’t differ that much
  • “getRotation()” seems to be able to determine rotations at 0, 90, 270 degrees but not values in between
  • Phone I’m using doesn’t have gyroscope, and ideally solution won’t need gyroscope either

Thanks 🙂

  • 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-06-16T03:11:37+00:00Added an answer on June 16, 2026 at 3:11 am

    You can calculate an angle between any two vectors. If one of them has direction to North (with 0 azimuth) – this is just a special case. You can choose any other angle as base and just subtract it from next measurements.

    There are no means to tell the mobile to have 0 azimuth not pointing to North. BTW, “rotation” is about screen orientation, this is a side product of mobile rotation.

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

Sidebar

Related Questions

So I have a counter. It is supposed to calculate the current amount of
Would anyone have any ideas of how to best calculate the amount of days
I have a javascript function to calculate total amount : <script> function calculate(v) {
I have been thinking about the best way to calculate the amount of on-hand
I am trying to jQuery to calculate the amount of times a ID has
I would like to calculate amount of teams that have owner (OwnerId!=0) and amount
I want to calculate the amount to charge my customers, when they buy licenses
I would like to calculate total order amount in the previous month. I got
I would like to calculate my total order amount in the previous week. I
Hey I am trying to calculate monthly repayments based on loan amount, interest rate

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.