User manual

Table Of Contents
Appendix D
ACM Compass Calibration
This appendix provides a detailed description of ACM compass calibration. Two
programs that calculate compass offsets, scale factors, and angular bias are included with the
software in the MMP tool kit. These corrections to the raw compass measurements are discussed
at length in Chapter 8, “Data Offload, Processing, and Interpretation”. The first program,
acm_corr.m, runs under Matlab Version 5 and higher.
NOTE
If you attempt to run the program under Matlab Version 4 and experience a problem with the
call to fminsearch() in p_corr.m , try replacing the call with one to fmins(). If an options
argument is necessary for fmins() to run, create a default options argument in p_corr.m with the
instruction: options = foptions.
If you normally run Matlab or otherwise have access to Matlab, use this version of the
compass correction code. If you do not have access to Matlab, acm_corr.exe is a stand-alone
version of the m-file routine. Following a short installation procedure, which is described in this
Appendix, it will run on a PC that does not have Matlab installed. Both programs use the Nelder-
Mead simplex algorithm to minimize a defined error norm and determine an optimal set of offset
and scale factors.
The programs operate on two types of ASCII text files. The first type is unpacked ACM
files from a deployment. These files have names of the form A0000414.txt. The data are present
in nine columns with the compass data in the third, fourth, and fifth columns. The second file
type is spin test data produced by the scrolling tilt and compass display in the Bench Test utilities.
Files of this type must be named spintest.txt. The data are present in five columns with the
compass data in the third, fourth, and fifth columns. Whichever version of the program you are
using, it should be run in the same directory as the files it is processing.
Angular bias is calculated by both programs for the special case of eight element spin test
data. A five column, eight row file named spintest.txt triggers the calculation. The rows must be
in north, northeast, east, southeast, south, southwest, west, northwest order for the calculation to
return accurate results. There are two ways to create such a file. Record the scrolling tilt and
compass display while sequentially orienting the MMP to the eight cardinal points of the compass
(a basic spin test). Then edit the text file, removing all but eight lines, each one representative of
Appendix D-1