Hi PRAMOD K. G.
You can download a very complete source code that includes the magnetic calibration from www.freescale.com/sensorfusion
In this source code we provide full optimized MCU software with full source code including 10 element magnetic calibration models just click on the “download” button on the left of the page next to “sensor Fusion Library for Kinetis MCUs”
Once downloaded you can find specifically the 10 element code can be found in the file magnetic.c in the Codewarrior projects.
Or, can also find it in the Freescale communities, specifically in the downloadable folder “Build_422_PreRelease.zip” from the following link: https://community.freescale.com/docs/DOC-102732
For further support about this code I would recommend you to check content on the following link: https://community.freescale.com/community/sensors/sensorfusion
Have a great day,
Jose Reyes
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------