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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:30:15+00:00 2026-06-07T00:30:15+00:00

from Apple’s Documentation : @property(readonly, nonatomic) CMMagneticField magneticField Returns the magnetic field measured by

  • 0

from Apple’s Documentation :

@property(readonly, nonatomic) CMMagneticField magneticField

Returns the magnetic field measured by the magnetometer. (read-only)

The value of this property is the total magnetic field observed by the device which is equal to the Earth’s geomagnetic field plus bias introduced from the device itself and its surroundings.

@property(readonly, nonatomic) CMCalibratedMagneticField magneticField

The CMCalibratedMagneticField returned by this property gives you the total magnetic field in the device’s vicinity without device bias. Unlike the magneticField property of the CMMagnetometer class, these values reflect the earth’s magnetic field plus surrounding fields, minus device bias.

Which of the two do I need to use if I want to get the device’s deviation from the North in degrees? That is,the value a digital compass on the iPhone would display, based on where the device is facing (e.g. 90, 180, 193, etc..)

I know that none of the above return degrees in integer format. The documentation is not clear as to what exactly they return.. I think it’s MicroTeslas..

But if they do return a MicroTesla value how do I convert this value into an integer representing degrees? Do I have to multiply that MicroTesla value with some constant or something of that nature?

Thanks for any help!

  • 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-07T00:30:17+00:00Added an answer on June 7, 2026 at 12:30 am

    You need to measure the device heading which you get from CLLocationManager. Heres how you start getting the heading updates (first import core Location framework) –

    if([CLLocationManager headingAvailable]) //check if device has magnetometer
        [locationManager startUpdatingHeading];
    

    after this you get updates in this delegate –

    - (void)locationManager:(CLLocationManager*)manager 
           didUpdateHeading:(CLHeading*)newHeading
    {
        // If the accuracy is valid, process the event.
        if (newHeading.headingAccuracy > 0)
            CLLocationDirection theHeading = newHeading.magneticHeading;
    
        return;
    }
    

    so CLLocationDirection represents a direction that is measured in degrees relative to true north.

    Direction values are measured in degrees starting at due north and continue clockwise around the compass. Thus, north is 0 degrees, east is 90 degrees, south is 180 degrees, and so on. A negative value indicates an invalid direction.

    hopt his helps…

    UPDATE: do check out these links – CLLocationManager and degrees of heading in iPhone and iPhone 3.0 Compass: how to get a heading? and apple reference.

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

Sidebar

Related Questions

From Apple's Obj-C documentation: If the method returns an object, then a message sent
I have read the docs from apple http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/ProgrammingWithObjectiveC/WorkingwithObjects/WorkingwithObjects.html It says that we can check
I came across the following code snippets from Apple's Documentation. The Interface is fairly
I can't find any documentation from Apple to explain why this piece of code
I'm reading the following about UIScrollView from Apple UIScrollView Class Reference Documentation: Because a
I'm trying to figure out from Apple's sketchy documentation which method is the best
From Apple's documentation about the method indexPathForRow, I am not clear on when and
I was reading this paper from Apple: http://developer.apple.com/library/mac/documentation/cocoa/conceptual/OOP_ObjC/OOP_ObjC.pdf where it talks about OOP which
I copied some bits of code from apple's documentation - and I got these
From Apple's Class Reference , I understand that GKTurnBasedMatch 's participants property has a

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.