AK8963C module XYZ calibration by MAGMASTER

Thread Starter

camerart

Joined Feb 25, 2013
3,830
Hi,
I'm receiving DATA X,Y,Z from the AK8963C, and calibrated it using MAGMASTER, and visualiser which is interesting.

I need help to write a routine (Oshonsoft) for converting the X and Y to give 360DEG, please. I gather that the Z is used in a more advanced program for tilt, which would be good, but later perhaps. I'm not sure if quadrants or Octants are most suitable.

In 1/ (TXT FILE) I haven't been able to get past the first quadrant, which works, from 0 to 41DEG.

Here are three equation examples that I've collected.
C.

1/ See attached TXT file.
-------------------------------------------------------------------------------------------------------------------------------------------------------
2/ Here is a Honeywell equation:

To account for the tangent function being valid over 180° and not allowing the y=0 division calculation, the following equations can be used:
Azimuth (x=0, y<0) = 90.0
Azimuth (x=0, y>0) = 270.0
Azimuth (x<0) = 180 - [arcTan(y/x)]*180/¹
Azimuth (x>0, y<0) = - [arcTan(y/x)]*180/¹
Azimuth (x>0, y>0) = 360 - [arcTan(y/x)]*180/¹
__________________________________________________________________________________________________________-
3/ https://www.embedded.com/design/other/4216719/Performing-efficient-arctangent-approximation
 

Attachments

Last edited:

Thread Starter

camerart

Joined Feb 25, 2013
3,830
Hi,
The Magmaster BIAS routine:

Once you have Magmaster and it's viewer set-up (#22)
You will need a set-up to keep the AK8963C square to all orientations of your design. Here is a photo of mine:

Run this program:

Set the Matrix ENTRY BOXES at each orientation of your set-up.

Then click calculate and copy the results into your WORKING program as Magmaster BIAS settings.

I hope to set up an AK8963C in this way, then add a video of the VIEWER (later)

C.
 

Attachments

Top