# Patent

## Title
Methods and apparatus for automatic magnetic compensation

## Abstract

A method for characterizing distortions in the earth's magnetic field caused by a vehicle having a magnetometer affixed therein is described. The method includes repeatedly measuring the distorted magnetic field utilizing the magnetometer and obtaining a three-dimensional orientation of the vehicle axes with respect to the earth at a time of each magnetometer measurement. The method also includes receiving undistorted earth magnetic field data for the vicinity of the vehicle relative to the earth at the time of each magnetometer measurement and characterizing distortions caused by one or more of the vehicle and magnetometer errors utilizing the magnetic field measurements, the orientations of the vehicle, and the undistorted earth magnetic field data.

## Background
CROSS REFERENCE TO RELATED APPLICATIONS
This application claims priority of Provisional Application Ser. No. 60/436,980 filed Dec. 30, 2002.


BACKGROUND OF THE INVENTION
This invention relates generally to determination of direction through magnetic direction indication, and more specifically to methods and apparatus for compensation of magnetic direction indications to account for local magnetic disturbances.
Magnetic direction indicators (e.g., magnetic compasses, magnetometers) are typically compensated to account for local disturbances in an ambient magnetic field caused by nearby magnetic objects, for example, ferrous materials, and magnetic fields generated by electrical currents. Known compensation methods are both time consuming and expensive processes. These known compensation methods also provide a limited accuracy because the methods are typically optimized for only a single angle of magnetic inclination.
Some known modern electronic compasses utilize software or firmware algorithms for magnetic compensation, but even these devices generally require time-consuming manual compensation procedures to determine a set of optimum compensation coefficients for utilization when performing the algorithms. Some low precision magnetometers are also known to exist, which provide quick automatic compensation techniques, but these techniques only provide a low accuracy compensation. Other known electronic compasses utilize biasing circuits as part of a closed loop system to attempt to reduce effects of magnetic field disturbances. However, these compasses also incorporate initialization modes, which can be complex, and which must be repeated upon each usage of the compass.
BRIEF SUMMARY OF THE INVENTION
In one aspect, a method for characterizing distortions in the earth's magnetic field caused by a vehicle is provided. A magnetometer is affixed to the vehicle and the method comprises repeatedly measuring the distorted magnetic field utilizing the magnetometer and obtaining a three-dimensional orientation of the vehicle axes with respect to the earth at a time of each magnetometer measurement. The method also comprises receiving undistorted earth magnetic field data for the vicinity of the vehicle relative to the earth at the time of each magnetometer measurement and characterizing distortions caused by one or more of the vehicle and magnetometer errors utilizing the magnetic field measurements, the orientations of the vehicle, and the undistorted earth magnetic field data.
In another aspect, a method of compensating a magnetometer affixed to a vehicle to obtain accurate magnetic heading information for a vehicle orientation is provided. The method comprises using the magnetometer to measure a distorted earth magnetic field relative to axes of the vehicle, determining a pitch and roll orientation of the vehicle axes with respect to the earth, and calculating the distortion of the earth's magnetic field for any relative angle between the vehicle axes and the earth's undistorted magnetic field. The method further comprises determining a magnetic heading based on the magnetometer measurement, adjusted by the pitch and roll orientation of the vehicle, and compensated for distortions of the earth's magnetic field.
In yet another aspect, a method for determining a true earth magnetic field from a magnetic field measured by a magnetometer is provided. The method comprises generating a truth reference field vector, {tilde over (h)}i, from inertial data and a three dimensional map of the earth's magnetic field, determining a difference between a vector as measured by the magnetometer and the truth reference vector, and utilizing the difference to estimate corrections to magnetometer model coefficients.
In still another aspect, a magnetic compass compensation unit for determining an orientation of a magnetometer within a vehicle relative to an undisturbed magnetic field of the earth is provided. The compensation unit comprises a processor configured to receive measurements of the distorted magnetic field from a magnetometer, receive an orientation of the vehicle axes with respect to the earth at a time corresponding to each magnetometer measurement, receive undistorted earth magnetic field data for the vicinity of the vehicle relative to the earth at the time corresponding to each magnetometer measurement, and characterize the distortions utilizing the magnetic field measurements, the orientations of the vehicle, and the undistorted earth magnetic field data.
In still yet another aspect, a processor programmed to generate a truth reference field vector, {tilde over (h)}i, from inertial data and a three dimensional map of the earth's magnetic field is provided. The processor also determines a difference between a vector as measured by the magnetometer and the truth reference vector, and utilizes the difference to estimate corrections to magnetometer model coefficients.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is an illustration of a magnetometer in a vehicle passing through, and disturbing, a magnetic field.
FIG. 2 is a detailed diagram of a magnetometer.
FIG. 3 is a flow diagram of a method for characterizing distortions in the earth's magnetic field caused by a vehicle.
FIG. 4 is a flow diagram of a method for compensating a magnetometer for local disturbances in the earth's magnetic field.
FIG. 5 depicts an overall structure of a magnetometer autocalibration and aiding process which utilizes Kalman filtering.
FIG. 6 illustrates magnetometer processing as three functions: a measurement residual calculation, a measurement matrix calculation, and a measurement covariance matrix calculation.
FIG. 7 details the measurement residual calculation of FIG. 6.
FIG. 8 details the measurement matrix calculation of FIG. 6.
FIG. 9 illustrates a magnetometer process model.



DETAILED DESCRIPTION OF THE INVENTION
Methods and apparatus are herein described which automatically compensate a magnetic compass (e.g. a magnetometer) for local disturbances in the earth's magnetic field caused by a vehicle during normal vehicle operations. The methods and apparatus eliminate, or greatly reduce, time and expense associated with known methods for determination of magnetic compensation coefficients. Further, the methods and apparatus provide highly accurate, three dimensional compensation coefficients that are valid over all combinations of vehicle pitch, vehicle roll, vehicle heading, magnetic inclination, and magnetic declination.
FIG. 1 illustrates an vehicle 10 equipped with a magnetometer 12 providing magnetic field strength signals 14. In one embodiment, magnetometer 12 provides magnetic field strength signals 14 representing a measurement of the earth's magnetic field to a magnetic compass compensation unit 16, which may be part of an aircraft navigation system, for example. Magnetometer 12 includes three magnetic sensors (shown in FIG. 2) placed in different orientations from one another. In a specific embodiment, magnetic sensors are placed such that each sensor is linear with one of the three orthogonal axes of vehicle 10. Magnetic field lines 20 are shown a distance from vehicle 10, and are not disturbed by presence of vehicle 10. Magnetic field lines 22 however, are disturbed by the presence of vehicle 10. Magnetic field lines 20 and 22 are used to illustrate a presence of the earth's magnetic field. The disturbance to the earth's magnetic field is illustrated by the non-uniformities in magnetic field lines 22. The disturbed magnetic field passes through magnetometer 12 which causes sensors to react, based on a magnetic field strength passing across each sensor. Therefore, magnetic field strength signals 14 are inaccurate because of the presence of vehicle 10. In one embodiment, magnetometer 12 is a solid state magnetometer.
As is known, magnetic field lines 20 and 22 are representative of magnetic field strength. Lines closer together represent a stronger magnetic field strength, and lines farther apart represent a weaker magnetic field. The Earth's magnetic fields originate from the earth's magnetic north and south poles, and for the most part are uniform. However, and as described above, ferrous materials or other magnetic field sources may interfere with or disturb the earth's magnetic field. Such a disturbance might well be represented by magnetic field lines 22 changing direction in the immediate vicinity of a disturbing source, i.e. vehicle 10. Trying to determine magnetic heading of vehicle 10 based upon magnetic fields disturbed by vehicle 10 is prone to error.
FIG. 2 is a detailed diagram of magnetometer 12. Magnetometer 12 includes an x-axis magnetic sensor 30, a y-axis magnetic sensor 32, and a z-axis magnetic sensor 34 each in a respective orthogonal axis of vehicle 10. Sensors 30, 32, and 34 generate a signal based on strength of a magnetic field through which sensors 30, 32, and 34 pass. Sensors 30, 32, and 34 are situated orthogonally, and the induced signal will be different for each axes, allowing determination of a three dimensional orientation of the disturbed magnetic field relative to orientation of vehicle 10. In one embodiment, magnetic sensors 30, 32, and 34 provide signals to an interface unit 36 which modifies signals from sensors 30, 32, and 34 for transmission to magnetic compensation unit 16 (shown in FIG. 1). While sensors 30, 32, and 34 are shown and described as being orthogonal to one another, the methods and apparatus described herein are applicable to sensor configurations where at least three sensors are each oriented in a unique direction, not necessarily orthogonal and not necessarily along vehicle axes, which allow determination of compensation coefficients in a moving vehicle as further described below. Other embodiments exist where only two magnetic sensors are utilized.
FIG. 3 is a flow diagram 50 which illustrates a method performed by magnetic compass compensation unit 16 to characterize distortions in the earth's magnetic field caused by vehicle 10. The method is utilized to determine an orientation of magnetometer 12 relative to an undisturbed magnetic field of the earth, where magnetometer 12 within a vehicle 10 which causes a disturbance to the magnetic field of the earth. Referring to flow diagram 50, the distorted magnetic field is repeatedly measured 52 utilizing magnetometer 12. A three-dimensional orientation of the vehicle axes is then obtained 54 with respect to the earth at a time of each magnetometer measurement. Undistorted earth magnetic field data for the vicinity of vehicle 10 relative to the earth at the time of each magnetometer measurement is received 56. Distortions caused by either or both of vehicle 10 and magnetometer errors are characterized 58 utilizing the magnetic field measurements, the orientations of the vehicle, and the undistorted earth magnetic field data.
In one embodiment, signals 14 from magnetometer 12 are calibrated by unit 16 according to hearth=Le*hmeas+hpe where, hearth is a three-dimensional vector for the undistorted Earth's magnetic field, hmeas is a three-dimensional vector for the distorted Earth's magnetic field as measured by magnetometer 12, Le is a three by three (3×3) matrix of magnetic correction coefficients, which includes, for example, nine correction coefficients, and hpe is a three-dimensional vector of magnetic correction coefficients which includes, for example, three correction coefficients. Signals 14 from magnetometer 12, hmeas, are multiplied using a multiplication function by magnetic correction coefficients, referred to herein as Le which is the aforementioned three by three matrix of magnetic correction coefficients. The product of the multiplication is added, using an addition function, to hpe, which is a three-dimensional vector of magnetic correction coefficients to provide a magnetic heading which is compensated for local disturbances to the magnetic field of the earth, for example, caused by the presence of a vehicle.
Magnetic correction coefficients, or Le and hpe, are estimated by comparing the three-dimensional magnetic field strength matrix, hmeas, as measured by magnetometer 12, against a three-dimensional magnetic truth system (not shown). A magnetic truth system provides an independent means to determine orientation of the Earth's undisturbed magnetic field relative to the orientation of magnetometer 12. The undisturbed Earth's magnetic field for a location can be determined from a geographic map of magnetic inclinations and declinations, assuming vehicle position is known through GPS or other means. Pitch and roll orientations of vehicle 10 can be determined by an attitude heading reference system (AHRS). Other sources of pitch and roll signals include, but are not limited to, an attitude reference system, an inertial reference system, and an inertial reference unit. The true heading orientation of vehicle 10 is provided through utilization of one of at least four different methods, and then transforming undistorted magnetic field components to distorted magnetic field components over relative orientations between the undistorted magnetic field and one or more of the axes of vehicle 10 and the axes of magnetometer 12.
One method for determining true heading involves a vehicle equipped with GPS. GPS is utilized to determine a true heading while the vehicle is moving by assuming true heading equals GPS track angle. The method assumes the vehicle's wheels are aligned with a longitudinal axis of the vehicle and that the vehicle is not turning or side slipping. However, effects of turns during movement are easily compensated by knowing the geometry of, for example, aircraft landing gears and by measuring GPS velocities and/or the yaw rate as determined by aircraft gyroscopes.
A second method for determining true heading involves a vehicle equipped with GPS and an Attitude and Heading Reference System (AHRS). Well-known AHRS algorithms are utilized to calculate a true heading while the vehicle is experiencing horizontal accelerations, including centrifugal accelerations caused by turns. These AHRS algorithms can continue to determine a true heading for a limited time duration after the acceleration stops, on the order of minutes.
If the vehicle has an Inertial Reference System (IRS), then a third method for determining true heading involves use of a true heading signal received directly from the IRS. An alternative is a synthesized magnetic heading signal from the IRS. A fourth method for determining true heading is utilization of a dual antenna GPS, from which true heading can be directly calculated.
Twelve coefficients, including nine magnetic correction coefficients and three vector of magnetic correction coefficients, are calculated using several methods. A preferred embodiment is to populate a three-dimensional magnetic error table with data during normal aircraft operations. The magnetic error table, in one embodiment, maintains separate data points for multiple orientations of the earth's actual magnetic field with respect to vehicle pitch, roll, and yaw axes. For example, the magnetic error table may include separate data points at 30 degree increments in yaw and at 60 degree increments in pitch and roll. In such an embodiment, the magnetic error table is configured with 216 data points. Each data point is a three-dimensional vector of magnetic error relative to the vehicle axes. Therefore, magnetic error table includes 648 scalar values. The data at each data point, in one embodiment, is low pass filtered, with a time constant of several hours. The low pass filtering occurs during a period when the orientation of the actual magnetic field relative to the orientation of vehicle 10 corresponds to the three-dimensional vector as represented by one of data points. Data points are not updated when the magnetic field present at vehicle 10 does not correspond to a particular data point.
Several, but perhaps not all, of the data points in magnetic error table will be updated during each flight, depending on, for example, how many turns vehicle 10 makes, vehicle orientation, and the angles of inclination it flies through. After a number of flights, the twelve compensation coefficients are determined from the highly overdetermined 648 scalar values of the 216 data points, through well-known mathematical procedures, for example, utilizing a least squares determination.
In conjunction with the above, a method for compensating a magnetometer affixed to a vehicle is illustrated in flowchart 60 of FIG. 4. The method provides accurate magnetic heading information for a vehicle orientation. Referring to flowchart 60, a magnetometer 12 (shown in FIG. 1) is used 62 to measure a distorted earth magnetic field relative to axes of vehicle 10 (shown in FIG. 1), and a pitch and roll orientation of the axes of vehicle 10 is determined 64 with respect to the earth. A distortion of the earth's magnetic field for any relative angle between the vehicle axes and the earth's undistorted magnetic field is calculated 66 and a magnetic heading based on the magnetometer measurement, adjusted by the pitch and roll orientation of vehicle 10, and compensated for distortions of the earth's magnetic field is determined 68.
In a further embodiment, a Kalman filter model is developed to carry out the above described procedures, and which automatically calibrates the twelve parameters that make up the three dimensional magnetometer model for estimating the true earth's magnetic field from the field measured by magnetometer 12. This calibration method uses pitch, roll, heading, and position data from one or more of a GPS, AHRS, inertial reference system, inertial navigation system and ground based navigational aids (i.e., VOR, distance measuring equipment (DME)), along with a three dimensional map of the earth's magnetic field to generate the “truth” reference field vector. The difference between the magnetometer-measured field vector and the “truth” reference vector becomes the measurement for the Kalman filter. The Kalman filter then estimates corrections to the magnetometer model coefficients as well as corrections to the attitude and heading angles of the navigation system.
FIG. 5 depicts an overall structure 100 of the above described magnetometer auto-calibration and compensation process. Magnetometer 102 measures the earth's magnetic field and provides the measurements to a magnetometer measurement process 104. A GPS receiver 106 provides GPS measurements to a GPS measurement process 108. Although GPS receiver 106 is the only aiding source depicted in FIG. 4 besides magnetometer 102, other aiding sources may be utilized as well, such as barometeric altitude, airspeed, and other sources as previously described. Outputs from magnetometer measurement process 104 and GPS measurement process 108 are combined utilizing measurement model 110, whose outputs are input to Kalman filter 112.
Kalman filter 112 provides a filter state output 114 which is provided as an input to magnetometer measurement process 104 and GPS measurement process 108 as well as to navigation solution generator 116, which provides, in the embodiment shown, an aided navigation solution 118. Inertial sensors 120 also provide data to navigation solution generator 116. The aided navigation solution 118 is fed back as inputs to magnetometer measurement process 104 and GPS measurement process 108 as well as to a GPS/inertial process model 122 and a magnetometer process model 124. Outputs of GPS/inertial process model 122 and magnetometer process model 124 are input to a process model 126, whose output is input to Kalman filter 112.
In developing the Kalman filter model, a model of the field as measured by magnetometer 12 is utilized. Specifically, the field measured by the magnetometer {tilde over (h)}m is related to the true earth's field {tilde over (h)} according to:

{tilde over (h)}m=M{tilde over (h)}+{tilde over (h)}p  (1)

where
M=3×3 magnetic permeability matrix
{tilde over (h)}p=3×1 vector of field offset errors resulting from permanent magnetization
A tilde ( ̃) is utilized to distinguish the magnetic field vectors from the Kalman filter measurement vector h which is described below.
By solving for {tilde over (h)} the true field from the measured field is computed via 



  
    
      
        
          
            
              
                h
                ~
              
              =
              
              ⁢
              
                
                  M
                  
                    -
                    1
                  
                
                ⁡
                
                  (
                  
                    
                      
                        h
                        ~
                      
                      m
                    
                    -
                    
                      
                        h
                        ~
                      
                      p
                    
                  
                  )
                
              
            
          
        
        
          
            
              =
              
              ⁢
              
                L
                ⁡
                
                  (
                  
                    
                      
                        h
                        ~
                      
                      m
                    
                    -
                    
                      
                        h
                        ~
                      
                      p
                    
                  
                  )
                
              
            
          
        
      
    
    
      
        (
        2
        )
      
    
  




where the matrix L is defined as L=M−1. Comparing equation (2) above with the calibration equation from the first embodiment, (i.e. hearth=Le*hmeas+hpe), it is seen that the two equations are equivalent if Le=L and hpe=−L{tilde over (h)}p. To develop the Kalman filter, it is assumed that the initial value of matrix L is equal to the identity matrix, and that the initial vector of field offset errors, {tilde over (h)}p, is zero.
A linearized error equation for the magnetometer-measured and compensated body-axis earth's field components is obtained by taking partial differentials of equation (2). For example, 



  
    
      
        
          
            
              
                δ
                ⁢
                
                  h
                  ~
                
              
              =
              
              ⁢
              
                
                  δ
                  ⁢
                  
                     
                  
                  ⁢
                  
                    L
                    ⁡
                    
                      (
                      
                        
                          
                            h
                            ~
                          
                          m
                        
                        -
                        
                          
                            h
                            ~
                          
                          p
                        
                      
                      )
                    
                  
                
                -
                
                  L
                  ⁢
                  
                     
                  
                  ⁢
                  δ
                  ⁢
                  
                     
                  
                  ⁢
                  
                    
                      h
                      ~
                    
                    p
                  
                
              
            
          
        
        
          
            
              =
              
              ⁢
              
                
                  δ
                  ⁢
                  
                     
                  
                  ⁢
                  L
                  ⁢
                  
                     
                  
                  ⁢
                  Δ
                  ⁢
                  
                    h
                    ~
                  
                
                -
                
                  L
                  ⁢
                  
                     
                  
                  ⁢
                  δ
                  ⁢
                  
                    
                      h
                      ~
                    
                    p
                  
                
              
            
          
        
      
    
    
      
        (
        3
        )
      
    
  




where Δ{tilde over (h)} is defined as

Δ{tilde over (h)}={tilde over (h)}m−{tilde over (h)}p.

Equation (3) provides a basic estimate of errors in a matrix format and is broken into three separate measurement equations (one for each field component), where each equation is in the form of a row (measurement mapping) vector multiplied by a column vector of magnetometer parameter errors to provide scalars that are functions of the vectors, for example,

δ{tilde over (h)}x=Δ{tilde over (h)}Tδlr1−lr1Tδ{tilde over (h)}p  (4)

δ{tilde over (h)}y=Δ{tilde over (h)}Tδlr2−lr2Tδ{tilde over (h)}p  (5)

δ{tilde over (h)}z=Δ{tilde over (h)}Tδlr3−lr3Tδ{tilde over (h)}p  (6)

where

δlriT=the ith throw of δL

lriT=the ith row of L

Alternatively, each term is written as a matrix times an error vector by defining the following 9×1 error vector 



  
    
      
        
          δ
          ⁢
          
             
          
          ⁢
          I
        
        =
        
          [
          
            
              
                
                  δ
                  ⁢
                  
                     
                  
                  ⁢
                  
                    I
                    r1
                  
                
              
            
            
              
                
                  δ
                  ⁢
                  
                     
                  
                  ⁢
                  
                    I
                    r2
                  
                
              
            
            
              
                
                  δ
                  ⁢
                  
                     
                  
                  ⁢
                  
                    I
                    r3
                  
                
              
            
          
          ]
        
      
    
    
      
        (
        7
        )
      
    
  




Then, equation (3) can be re-written as 



  
    
      
        
          δ
          ⁢
          
            h
            ~
          
        
        =
        
          
            
              [
              
                
                  
                    
                      Δ
                      ⁢
                      
                         
                      
                      ⁢
                      
                        
                          h
                          ~
                        
                        T
                      
                    
                  
                  
                    
                      0
                      
                        1
                        ×
                        3
                      
                    
                  
                  
                    
                      0
                      
                        1
                        ×
                        3
                      
                    
                  
                
                
                  
                    
                      0
                      
                        1
                        ×
                        3
                      
                    
                  
                  
                    
                      Δ
                      ⁢
                      
                         
                      
                      ⁢
                      
                        
                          h
                          ~
                        
                        T
                      
                    
                  
                  
                    0
                  
                
                
                  
                    
                      0
                      
                        1
                        ×
                        3
                      
                    
                  
                  
                    
                      0
                      
                        1
                        ×
                        3
                      
                    
                  
                  
                    
                      Δ
                      ⁢
                      
                         
                      
                      ⁢
                      
                        
                          h
                          ~
                        
                        T
                      
                    
                  
                
              
              ]
            
            ⁢
            δ
            ⁢
            
               
            
            ⁢
            I
          
          -
          
            L
            ⁢
            
               
            
            ⁢
            δ
            ⁢
            
              
                h
                ~
              
              p
            
          
        
      
    
    
      
        (
        8
        )
      
    
  




which provides magnetometer errors.
To compute a GPS/AHRS-based or inertial navigation system-based “truth” field {tilde over (h)}i, the earth's field vector is first determined in north/east/down frame components {tilde over (h)}N based on the current latitude, longitude, altitude, and (perhaps) time using an accurate model or map. Next the earth's field vector is transformed into body coordinates, to find errors in the “truth” source via the following transformations:

{tilde over (h)}i=CLBCNL{tilde over (h)}N  (9)

where CLB transforms a vector from the local-level frame (L-frame) to the body frame (B-frame) and is the transpose of the attitude direction cosine matrix C, and CNL accounts for the rotation in azimuth of the local-level frame with respect to north by the wander angle α and is given by 



  
    C
    N
    L
  
  =
  
    [
    
      
        
          
            cos
            ⁢
            
               
            
            ⁢
            α
          
        
        
          
            sin
            ⁢
            
               
            
            ⁢
            α
          
        
        
          0
        
      
      
        
          
            
              -
              sin
            
            ⁢
            
               
            
            ⁢
            α
          
        
        
          
            cos
            ⁢
            
               
            
            ⁢
            α
          
        
        
          0
        
      
      
        
          0
        
        
          0
        
        
          1
        
      
    
    ]
  




By taking partial differentials of equation (9), 



  
    
      
        
          
            
              
                δ
                ⁢
                
                  
                    h
                    ~
                  
                  i
                
              
              =
              
              ⁢
              
                
                  δ
                  ⁢
                  
                     
                  
                  ⁢
                  
                    C
                    T
                  
                  ⁢
                  
                    C
                    N
                    L
                  
                  ⁢
                  
                    
                      h
                      ~
                    
                    N
                  
                
                +
                
                   
                
                ⁢
                
                  
                    C
                    T
                  
                  ⁢
                  δ
                  ⁢
                  
                     
                  
                  ⁢
                  
                    C
                    N
                    L
                  
                  ⁢
                  
                    
                      h
                      ~
                    
                    N
                  
                
                +
                
                  
                    C
                    T
                  
                  ⁢
                  
                    C
                    N
                    L
                  
                  ⁢
                  δ
                  ⁢
                  
                    
                      h
                      ~
                    
                    N
                  
                
              
            
          
        
        
          
            
              =
              
              ⁢
              
                
                  
                    [
                    
                      
                        C
                        T
                      
                      ⁢
                      
                        {
                        γ
                        }
                      
                    
                    ]
                  
                  ⁢
                  
                    C
                    N
                    L
                  
                  ⁢
                  
                    
                      h
                      ~
                    
                    N
                  
                
                +
                
                  
                    
                      C
                      T
                    
                    ⁡
                    
                      [
                      
                        
                          -
                          
                            {
                            ɛ
                            }
                          
                        
                        ⁢
                        
                          C
                          N
                          L
                        
                      
                      ]
                    
                  
                  ⁢
                  
                    
                      h
                      ~
                    
                    N
                  
                
                +
                
                  
                    C
                    T
                  
                  ⁢
                  
                    C
                    N
                    L
                  
                  ⁢
                  δ
                  ⁢
                  
                     
                  
                  ⁢
                  
                    
                      h
                      ~
                    
                    N
                  
                
              
            
          
        
      
    
    
      
        (
        10
        )
      
    
  




where γ is the attitude error vector which represents the angular error of the L-frame relative to the B-frame, ε the angular position error vector which represents the angular error of the L-frame relative to the earth frame (E-frame), and {v} represents the skew-symmetric matrix form of the enclosed vector v and is defined by 



  
    
      
        
          {
          v
          }
        
        ≡
        
          [
          
            
              
                0
              
              
                
                  -
                  
                    v
                    z
                  
                
              
              
                
                  v
                  y
                
              
            
            
              
                
                  v
                  z
                
              
              
                0
              
              
                
                  -
                  
                    v
                    x
                  
                
              
            
            
              
                
                  -
                  
                    v
                    y
                  
                
              
              
                
                  v
                  x
                
              
              
                0
              
            
          
          ]
        
      
    
    
      
        (
        11
        )
      
    
  




During the GPS-aided mode, the “psi-angle” inertial error model is implemented in the Kalman filter, shown below. In such an embodiment, the attitude error states are actually the three components of the angular error vector ψ defined as

ψ=γ−ε  (12)

Using this substitution in equation (10), the first two terms combine to give yield following

δ{tilde over (h)}i=CT{ψ}CNL{tilde over (h)}N+CTCNLδ{tilde over (h)}N  (13)

To express each term in equation (13) as a matrix times an error vector, the first term must be re-arranged. The product of a skew-symmetric matrix form of a vector v multiplied by a vector u is the same as the cross product v×u. By reversing the order of the cross-product, the sign is reversed. Therefore,

{ψ}CNL{tilde over (h)}N=ψ×(CNL{tilde over (h)}N)=−(CNL{tilde over (h)}N)×ψ=−{CNL{tilde over (h)}N}ψ  (14)

and equation (13) is rewritten as

δ{tilde over (h)}i=−CT{CNL{tilde over (h)}N}ψ+CTCNLδ{tilde over (h)}N  (15)

The measurements to the Kalman filter are the differences between each of the magnetometer-derived earth's field components and the respective GPS/AHRS-derived earth's field components. These measurements can be processed one at a time or all at once. Each measurement equation is in the form of
 zk=hkTxk+νk  (16)
Where hk is the measurement mapping vector at time tk, xk is the state vector, and νk is white (uncorrelated) measurement noise. If all are processed at once, the measurement equation takes the form of

zk=Hkxk+vk  (17)

where zk is a 3×1 vector of measurements at time tk, Hk is a 3×n measurement matrix, and vk is the measurement noise vector.
By assuming that the three “psi-angle” attitude errors make up first three states and the twelve magnetometer parameters and the three earth field modeling errors make up the last fifteen states. The state vector is then written as

xT=[ψT . . . other nav/sensor states . . . δlT δ{tilde over (h)}pT (δ{tilde over (h)}N)T]  (18)

The measurement vector is determined subtracting equation (15) from equation (8) and adding measurement noise 



  
    
      
        
          
            
              z
              =
              
              ⁢
              
                
                  
                    h
                    ~
                  
                  -
                  
                    
                      h
                      ~
                    
                    i
                  
                
                =
                
                  
                    δ
                    ⁢
                    
                       
                    
                    ⁢
                    
                      h
                      ~
                    
                  
                  -
                  
                    δ
                    ⁢
                    
                       
                    
                    ⁢
                    
                      
                        h
                        ~
                      
                      i
                    
                  
                  +
                  v
                
              
            
          
        
        
          
            
              =
              
              ⁢
              
                
                  
                    [
                    
                      
                        
                          
                            Δ
                            ⁢
                            
                               
                            
                            ⁢
                            
                              
                                h
                                ~
                              
                              T
                            
                          
                        
                        
                          
                            0
                            
                              1
                              ×
                              3
                            
                          
                        
                        
                          
                            0
                            
                              1
                              ×
                              3
                            
                          
                        
                      
                      
                        
                          
                            0
                            
                              1
                              ×
                              3
                            
                          
                        
                        
                          
                            Δ
                            ⁢
                            
                               
                            
                            ⁢
                            
                              
                                h
                                ~
                              
                              T
                            
                          
                        
                        
                          0
                        
                      
                      
                        
                          
                            0
                            
                              1
                              ×
                              3
                            
                          
                        
                        
                          
                            0
                            
                              1
                              ×
                              3
                            
                          
                        
                        
                          
                            Δ
                            ⁢
                            
                               
                            
                            ⁢
                            
                              
                                h
                                ~
                              
                              T
                            
                          
                        
                      
                    
                    ]
                  
                  ⁢
                  δ
                  ⁢
                  
                     
                  
                  ⁢
                  I
                
                -
                
                  L
                  ⁢
                  
                     
                  
                  ⁢
                  δ
                  ⁢
                  
                    
                      h
                      ~
                    
                    p
                  
                
                +
                
                  
                    C
                    T
                  
                  ⁢
                  
                    {
                    
                      
                        C
                        N
                        L
                      
                      ⁢
                      
                        
                          h
                          ~
                        
                        N
                      
                    
                    }
                  
                  ⁢
                  ψ
                
                -
                
                  
                    C
                    T
                  
                  ⁢
                  
                    C
                    N
                    L
                  
                  ⁢
                  δ
                  ⁢
                  
                     
                  
                  ⁢
                  
                    
                      h
                      ~
                    
                    N
                  
                
                +
                v
              
            
          
        
      
    
    
      
        (
        19
        )
      
    
  




where v represents a vector of uncorrelated measurement noise due to electromagnetic noise and random earth field modeling errors such as quantization.
From equations (17), (18), and (19) it is shown that the measurement mapping matrix H is

H=[Hψ 0 . . . 0 Hδl H{tilde over (h)}p H{tilde over (h)}N]  (20)

where 



  
    
      
        
          H
          ψ
        
        =
        
          
            C
            T
          
          ⁢
          
            {
            
              
                C
                N
                L
              
              ⁢
              
                
                  h
                  ~
                
                N
              
            
            }
          
        
      
    
  
  
    
      
        
          H
          
            δ
            ⁢
            
               
            
            ⁢
            I
          
        
        =
        
        ⁢
        
          [
          
            
              
                
                  Δ
                  ⁢
                  
                     
                  
                  ⁢
                  
                    
                      h
                      ~
                    
                    T
                  
                
              
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
            
            
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
              
                
                  Δ
                  ⁢
                  
                     
                  
                  ⁢
                  
                    
                      h
                      ~
                    
                    T
                  
                
              
              
                0
              
            
            
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
              
                
                  Δ
                  ⁢
                  
                     
                  
                  ⁢
                  
                    
                      h
                      ~
                    
                    T
                  
                
              
            
          
          ]
        
      
    
  
  
    
      
        
          H
          
            
              h
              _
            
            p
          
        
        =
        
          -
          L
        
      
    
  
  
    
      
        
          H
          
            
              h
              _
            
            N
          
        
        =
        
          
            -
            
              C
              T
            
          
          ⁢
          
            C
            N
            L
          
        
      
    
  




Barring any disturbance (such as lightning strikes), the magnetometer parameters are assumed to be very stable over time, therefore a reasonable model to describe random processes for each of these states is a Gauss-Markov process with a very long correlation time, in one embodiment, about 1000 hours. A reasonable one-sigma value for each of the nine δL states is approximately 0.15 (15%), which corresponds to an angular error uncertainty of about 8.5°. A reasonable one-sigma value for each of the three offset errors contained in the vector δhp is 75 mgauss. Assuming an earth's field of 500 mgauss, this would again correspond to an angular error of about 8.5°. (The earth's field intensity ranges from about 250-650 mgauss). If a major disturbance does occur, it would be rather abrupt and would certainly be detected by standard Kalman filter residual screening.
A first-order Gauss-Markov process x is defined by the following 



  
    
      
        
          x
          .
        
        =
        
          
            
              -
              
                1
                τ
              
            
            ⁢
            x
          
          +
          
            
              
                
                  2
                  ⁢
                  
                     
                  
                  ⁢
                  
                    σ
                    2
                  
                
                τ
              
            
            ⁢
            
              u
              ⁡
              
                (
                t
                )
              
            
          
        
      
    
    
      
        (
        21
        )
      
    
  




where u(t) is unity white noise. The discrete-time model of this process is given by

xk+1=Φkxk+wk  (22)

where
 Φk=e−T/τ
wk=Gaussian white noise sequence with variance=σ2(1−e−2T/τ)
σ=steady-state one-sigma value of the process
τ=correlation time of the process
T=the discrete time interval between tk and tk+1 
The earth field modeling errors will vary as a function of position rather than time. Therefore, a Gauss-Markov process model which varies over distance traveled would be appropriate as such a model defines how state vectors vary over time. According to the National Geophysical Data Center (NGDC), local anomalies in geomagnetism which deviate from the International Geomagnetic Reference Field (IGRF) can exceed 10° of inclination and/or declination. In fact, Minnesota contains an extreme declination anomaly of 16° east in one area and 12° west just a few miles away—a change of 28 degrees. Over most of the world, however, the IRGF model is good to 0.5°. A reasonable one-sigma value to use to bound these larger anomalies might be 50 mgauss (corresponding to a 5.7 degree angular error for a 500 mgauss field) with a correlation distance of 10 nautical miles. Thus when cruising at 500 knots, the effective correlation time would be 72 seconds. However, during final approach at 150 knots an effective correlation time would be about four minutes.
The one-sigma measurement noise for the magnetometer is assumed to be on the order of 0.5 mgauss for each component which corresponds to an angular error of 0.06° for a 500 mgauss field.
The GPS/inertial process models are augmented by the fifteen process models associated with the magnetometer states to form the overall process model in matrix form

xk+1=Φkxk+wk  (23)

where
Φk=state transition matrix=the undriven response over time tk to tk+1 
wk=process noise vector=driven response to the white noise input over time tk to tk+1 
The magnetometer measurements may be processed independently or along with other aiding measurements such as GPS by augmenting the measurement vector z with these three additional measurements. Likewise, the measurement matrix H would also be augmented with these three additional rows. Standard Kalman filter time propagation and measurement update equations are iterated using known methods. For example, the estimated state vector {circumflex over (x)}k and its associated error noise covariance matrix Pk are projected forward to the next time step as follows

{circumflex over (x)}k+1−=Φk{circumflex over (x)}k  (24)

Pk+1−=ΦkPkΦkT+Qk  (25)

where
{circumflex over (x)}k+1−=estimated error state vector prior to the measurement update at time tk+1 
Pk=E[{circumflex over (x)}k{circumflex over (x)}kT]=error covariance matrix after the measurement update at time tk 
Qk=E[wkwkT]=process noise covariance matrix over time tk to tk+1 
Pk+1−=the error covariance matrix prior to the measurement update at time tk+1 
and the estimated state vector and the error covariance matrix are updated for the new measurement vector zk according to

Kk=Pk−HkT(HkPk−HkT+Rk)−1  (26)

{circumflex over (x)}k={circumflex over (x)}k−+Kk(zk−Hk{circumflex over (x)}k−)  (27)

Pk=(I−KkHk)Pk−  (28)

where
Rk=E[vkvkT]=measurement noise covariance matrix at time tk.
FIG. 6 is a detailed illustration of one embodiment of magnetometer measurement process 104, which includes three functions, a measurement residual calculation 140, a measurement matrix calculation 142, and a measurement covariance matrix calculation 144. To calculate measurement residuals, measurement residual calculation 140 receives as inputs, measured earth's magnetic field as measured by magnetometer 102 (shown in FIG. 5), filter state output 114 from Kalman filter 112 (shown in FIG. 5) and aided navigation solution 118 (also shown in FIG. 5). Measurement matrix calculation 142 utilizes results of residual calculations made in residual calculation 140 to provide a magnetic field matrix output 146. Measurement covariance matrix calculation 144 is based on an identity matrix 148.
FIG. 7 illustrates measurement residual calculation 140 (also shown in FIG. 6). Measured earth magnetic field 160 is first compensated using the current estimates of δ{tilde over (h)}p 162 and L 164, an inverse of the permeability matrix M. Note that a nominal value for L 164 is assumed to be identity matrix 166. The matrix δL 168 is an estimate of the error from this nominal identity matrix 166 and an estimate of the errors from magnetometer 12, δL, are subtracted from it to yield a current estimate of L 164. The magnetic “truth” field 170 (an inertial model of the earth's field) is computed from current estimates of altitude 172, position 174, and current date and time 176 using earth's field model 178 and current earth-to-local-level frame and local-level-to-body frame transformations 180 and is corrected for the earth field modeling error estimate δ{tilde over (h)}N 182. Since the measured field vector 184 and truth reference vector 186 are corrected explicitly (and the attitude error is reset in the strapdown navigation equations) with the state vector estimate from the filter, the difference between the two corrected field vectors 184 and 186 becomes the measurement residual vector 188 (zk−Hk{circumflex over (x)}k−) of equation (27).
FIG. 8 illustrates measurement matrix calculation 142 which provides a solution of equation (20), which is described above. Current date and time 176 is input as are local level transformations 180 and a modeled earth magnetic field 178. Also input to measurement matrix calculation 142 are earth field modeling error estimate δ{tilde over (h)}N 182 and L 164, an inverse of the permeability matrix M. An output of measurement matrix calculation 142 is the measurement mapping matrix H.
FIG. 9 shows a magnetometer process model 200 which results in calculation of Φk, the state transition matrix described with respect to equation (23) above, and Qk the process noise covariance matrix over time, as described with respect to equation (25), for the magnetometer states.
Once the twelve compensation components are determined, either through Kalman filtering, or through population of the magnetic error table, unit 16 is configured to remove local disturbances to the earth's magnetic field. Once the local disturbances are removed, accurate navigation of an aircraft or other vehicle is attained since the magnetic heading information supplied to the pilot is a true magnetic heading, uncompromised by local magnetic disturbances.
The above described methods and apparatus illustrate how magnetometer readings can be automatically compensated to remove local disturbances in the earth's magnetic field based upon data received from, for example, an inertial navigation system. While the invention has been described in terms of various specific embodiments, those skilled in the art will recognize that the invention can be practiced with modification within the spirit and scope of the claims.

## Claims

1. A method for characterizing distortions in the earth's magnetic field caused by a vehicle, a magnetometer affixed to the vehicle, said method comprising:
repeatedly measuring the distorted magnetic field utilizing the magnetometer; 
obtaining a three-dimensional orientation of the vehicle axes with respect to the earth at a time of each magnetometer measurement; 
receiving undistorted earth magnetic field data for the vicinity of the vehicle relative to the earth at the time of each magnetometer measurement; and 
utilizing the magnetic field measurements, the orientations of the vehicle, and the undistorted earth magnetic field data to characterize distortions caused by one or more of the vehicle and magnetometer errors.

2. A method according to claim 1 wherein obtaining an orientation of the vehicle axes comprises receiving pitch and roll signals from one or more of an attitude heading reference system, an attitude reference system, an inertial reference system, and an inertial reference unit.

3. A method according to claim 2 wherein obtaining an orientation of the vehicle axes comprises:
moving a vehicle equipped with a GPS; 
determining a GPS tracking angle; and 
assuming the GPS tracking angle is the true heading.

4. A method according to claim 2 wherein obtaining an orientation of the vehicle axes comprises:
moving a vehicle equipped with a GPS; and 
calculating a true heading during, and immediately following, vehicle turns or accelerations, utilizing GPS-augmented attitude and heading reference system algorithms.

5. A method according to claim 1 wherein obtaining an orientation of the vehicle axes comprises receiving pitch, roll, and at least one of a true heading signal and a synthetic magnetic heading signal from an inertial reference system.

6. A method according to claim 1 wherein obtaining an orientation of the vehicle comprises:
receiving pitch and roll signals from an attitude heading reference system; and 
receiving at least one of a true heading signal and a synthetic magnetic heading signal from an inertial reference system.

7. A method according to claim 1 wherein obtaining an orientation of the vehicle comprises:
receiving pitch and roll signals from an attitude heading reference system; and 
determining a true heading utilizing a dual antenna GPS.

8. A method according to claim 1 wherein receiving undistorted earth magnetic field data comprises determining vehicle position and using a table of magnetic inclination and declination data for a surface of the earth.

9. A method according to claim 1 wherein characterizing distortions caused by the vehicle comprises transforming undistorted magnetic field components to distorted magnetic field components over relative orientations between the undistorted magnetic field and one or more of the axes of the vehicle and the axes of the magnetometer.

10. A method according to claim 1 wherein obtaining a three-dimensional orientation of the vehicle axes comprises determining vehicle position using at least one of an inertial navigational system and ground based navigation aids.

11. A method according to claim 1 wherein characterizing distortions comprises calculating correction coefficients for the magnetometer.

12. A method according to claim 11 wherein calculating correction coefficients comprises compensating the magnetometer by estimating Le and Hpe in the function Hearth=Le*Hmeas+Hpe where, Hearth is a three-dimensional vector representing the undisturbed Earth's magnetic field, Hmeas represents a three-dimensional vector for the disturbed Earth's magnetic field as measured by magnetometer, Le is a three by three (3×3) matrix of magnetic correction coefficients, and Hpe is a three-dimensional vector of magnetic correction coefficients.

13. A method of compensating a magnetometer affixed to a vehicle to obtain accurate magnetic heading information for a vehicle orientation, said method comprising
using the magnetometer to measure a distorted earth magnetic field relative to axes of the vehicle; 
determining a pitch and roll orientation of the vehicle axes with respect to the earth; 
calculating the distortion of the earth's magnetic field for any relative angle between the vehicle axes and the earth's undistorted magnetic field; and 
determining a magnetic heading based on the magnetometer measurement, adjusted by the pitch and roll orientation of the vehicle, and compensated for distortions of the earth's magnetic field.

14. A method according to claim 13 wherein determining a magnetic heading further comprises compensating the magnetometer by solving the function Hearth=Le*Hmeas+Hpe by estimating Le and Hpe where, Hearth is a three-dimension vector representing the undisturbed Earth's magnetic field, Hmeas represents a three-dimensional vector for the disturbed Earth's magnetic field as measured by magnetometer, Le is a three by three (3×3) matrix of magnetic correction coefficients, and Hpe is a three-dimensional vector of magnetic correction coefficients.

15. A method according to claim 13 further comprising augmenting pitch and roll orientation data based on magnetometer measurements and the magnetometer compensation.

16. A method according to claim 13 further comprising estimating Le and Hpe based on multiple measurements of Hearth and Hmeas.

17. A method according to claim 16 wherein determining a magnetic heading comprises:
determining vehicle position and using a table of magnetic inclination and declination data for a surface of the earth; 
comparing the measured magnetic field, Hmeas, against the magnetic inclination and declination data to determine the magnetic correction coefficients, Hpe; and 
providing Le and Hpe as correction coefficients to the magnetometer.

18. A method according to claim 13 further comprising determining the vector of magnetic correction coefficients, Hpe, and the matrix of magnetic correction coefficients, Le, utilizing a three-dimensional magnetic error table, the error table configured to maintain separate data points for multiple aircraft orientations between an actual magnetic field and vehicle pitch, roll, and yaw axes.

19. A method according to claim 18 wherein the magnetic error table comprises separate data points at 30 degree increments in yaw and at 60 degree increments in pitch and roll, each data point being a three-dimensional vector of magnetic error relative to vehicle axes.

20. A method according to claim 19 comprising determining the correction coefficients utilizing scalar values from the data points.

21. A method for determining a true earth magnetic field from a magnetic field measured by a magnetometer, said method comprising:
generating a truth reference field vector, {tilde over (h)}i, from sources of pitch, roll, heading, and position independent of the magnetometer and a three dimensional map of the earth's magnetic field; 
determining a difference between a vector as measured by the magnetometer and the truth reference vector; and 
utilizing the difference to estimate corrections to magnetometer model coefficients.

22. A method according to claim 21 further comprising utilizing the difference to estimate corrections to one or more of vehicle pitch, roll, and heading.

23. A method according to claim 21 wherein pitch, roll, and heading data is provided by at least one of a GPS, an attitude and heading reference system, an inertial reference system, an inertial navigation system, and ground based navigational aids.

24. A method according to claim 21 further comprising utilizing the difference to provide corrections to attitude and heading angles of a navigation system.

25. A method according to claim 21 further comprising estimating corrections using a Kalman filter.

26. A method according to claim 21 wherein generating a truth reference field vector comprises relating the field measured by the magnetometer {tilde over (h)}m to the true earth's field {tilde over (h)} according to {tilde over (h)}m=M{tilde over (h)}+{tilde over (h)}p, where M is a 3×3 magnetic permeability matrix and {tilde over (h)}p is a 3×1 vector of field offset errors resulting from permanent magnetization.

27. A method according to claim 26 wherein determining a difference comprises:
solving for the true earth's field, {tilde over (h)}, according to 



  
    
      
        
          h
          ~
        
        =
        
        ⁢
        
          
            M
            
              -
              1
            
          
          ⁡
          
            (
            
              
                
                  h
                  ~
                
                m
              
              -
              
                
                  h
                  ~
                
                p
              
            
            )
          
        
      
    
  
  
    
      
        
          =
          
          ⁢
          
            L
            ⁡
            
              (
              
                
                  
                    h
                    ~
                  
                  m
                
                -
                
                  
                    h
                    ~
                  
                  p
                
              
              )
            
          
        
        ,
      
    
  





where the matrix L is defined as L=M−1; and
assuming that the initial value of matrix L is equal to the identity matrix and the initial vector of field offset errors, {tilde over (h)}p, is zero.

28. A method according to claim 27 further comprising:
obtaining a linearized error equation for the magnetometer-measured and compensated body-axis earth's field components according to 



  
    
      
        
          δ
          ⁢
          
             
          
          ⁢
          
            h
            ~
          
        
        =
        
        ⁢
        
          
            δ
            ⁢
            
               
            
            ⁢
            
              L
              ⁡
              
                (
                
                  
                    
                      h
                      ~
                    
                    m
                  
                  -
                  
                    
                      h
                      ~
                    
                    p
                  
                
                )
              
            
          
          -
          
            L
            ⁢
            
               
            
            ⁢
            δ
            ⁢
            
               
            
            ⁢
            
              
                h
                ~
              
              p
            
          
        
      
    
  
  
    
      
        
          =
          
          ⁢
          
            
              δ
              ⁢
              
                 
              
              ⁢
              L
              ⁢
              
                 
              
              ⁢
              Δ
              ⁢
              
                 
              
              ⁢
              
                h
                ~
              
            
            -
            
              L
              ⁢
              
                 
              
              ⁢
              δ
              ⁢
              
                 
              
              ⁢
              
                
                  h
                  ~
                
                p
              
            
          
        
        ,
      
    
  





where Δ{tilde over (h)} is defined as Δ{tilde over (h)}={tilde over (h)}m−{tilde over (h)}p; and
forming a separate measurement equation for each field component from the linearized error equation according to δ{tilde over (h)}x=Δ{tilde over (h)}Tδlr1−lr1Tδ{tilde over (h)}p, δ{tilde over (h)}y=Δ{tilde over (h)}Tδlr2−lr2Tδ{tilde over (h)}p, and δ{tilde over (h)}z=Δ{tilde over (h)}Tδlr3−lr3Tδ{tilde over (h)}p, where each equation is in the form of a row vector multiplied by a column vector of magnetometer parameter errors to provide scalars that are functions of the vectors.

29. A method according to claim 28 where magnetometer errors are provided according to 



  
    δ
    ⁢
    
       
    
    ⁢
    
      h
      ~
    
  
  =
  
    
      
        [
        
          
            
              
                Δ
                ⁢
                
                   
                
                ⁢
                
                  
                    h
                    ~
                  
                  T
                
              
            
            
              
                0
                
                  1
                  ×
                  3
                
              
            
            
              
                0
                
                  1
                  ×
                  3
                
              
            
          
          
            
              
                0
                
                  1
                  ×
                  3
                
              
            
            
              
                δ
                ⁢
                
                   
                
                ⁢
                
                  
                    h
                    ~
                  
                  T
                
              
            
            
              0
            
          
          
            
              
                0
                
                  1
                  ×
                  3
                
              
            
            
              
                0
                
                  1
                  ×
                  3
                
              
            
            
              
                Δ
                ⁢
                
                   
                
                ⁢
                
                  
                    h
                    ~
                  
                  T
                
              
            
          
        
        ]
      
      ⁢
      δ1
    
    -
    
      L
      ⁢
      
         
      
      ⁢
      δ
      ⁢
      
         
      
      ⁢
      
        
          
            h
            ~
          
          p
        
        .

30. A method according to claim 21 wherein generating a truth reference field vector, {tilde over (h)}i, from inertial data and a three dimensional map of the earth's magnetic field comprises:
determining the earth's field vector in north/east/down frame components {tilde over (h)}N based on one or more of a current latitude, longitude, altitude, and the map; and 
transforming the earth's field vector into body coordinates to find errors in the “truth” source according to {tilde over (h)}i=CLBCNL{tilde over (h)}N,where CLB transforms a vector from the local-level frame (L-frame) to the body frame (B-frame) and is the transpose of the attitude direction cosine matrix C, and CNL accounts for the rotation in azimuth of the local-level frame with respect to north by the wander angle α, and is given by 



  
    C
    N
    L
  
  =
  
    
      [
      
        
          
            
              cos
              ⁢
              
                 
              
              ⁢
              α
            
          
          
            
              sin
              ⁢
              
                 
              
              ⁢
              α
            
          
          
            0
          
        
        
          
            
              
                -
                sin
              
              ⁢
              
                 
              
              ⁢
              α
            
          
          
            
              cos
              ⁢
              
                 
              
              ⁢
              α
            
          
          
            0
          
        
        
          
            0
          
          
            0
          
          
            1
          
        
      
      ]
    
    .

31. A method according claim 30 further comprising taking partial differentials of {tilde over (h)}i=CLBCNL{tilde over (h)}N according to 



  
    
      
        
          δ
          ⁢
          
             
          
          ⁢
          
            
              h
              ~
            
            i
          
        
        =
        
        ⁢
        
          
            δ
            ⁢
            
               
            
            ⁢
            
              C
              T
            
            ⁢
            
              C
              N
              L
            
            ⁢
            
              
                h
                ~
              
              N
            
          
          +
          
            
              C
              T
            
            ⁢
            δ
            ⁢
            
               
            
            ⁢
            
              C
              N
              L
            
            ⁢
            
              
                h
                ~
              
              N
            
          
          +
          
            
              C
              T
            
            ⁢
            
              C
              N
              L
            
            ⁢
            δ
            ⁢
            
              
                h
                ~
              
              N
            
          
        
      
    
  
  
    
      
        
          =
          
          ⁢
          
            
              
                [
                
                  
                    C
                    T
                  
                  ⁢
                  
                    {
                    γ
                    }
                  
                
                ]
              
              ⁢
              
                C
                N
                L
              
              ⁢
              
                
                  h
                  ~
                
                N
              
            
            +
            
              
                
                  C
                  T
                
                ⁡
                
                  [
                  
                    
                      -
                      
                        {
                        ɛ
                        }
                      
                    
                    ⁢
                    
                      C
                      N
                      L
                    
                  
                  ]
                
              
              ⁢
              
                
                  h
                  ~
                
                N
              
            
            +
            
              
                C
                T
              
              ⁢
              
                C
                N
                L
              
              ⁢
              δ
              ⁢
              
                
                  h
                  ~
                
                N
              
            
          
        
        ,
      
    
  




where γ is the attitude error vector which represents the angular error of the L-frame relative to the B-frame, ε the angular position error vector which represents the angular error of the L-frame relative to the earth frame (E-frame), and {v} represents the skew-symmetric matrix form of the enclosed vector v, defined by 



  
    {
    v
    }
  
  ≡
  
    
      [
      
        
          
            0
          
          
            
              -
              
                v
                z
              
            
          
          
            
              v
              y
            
          
        
        
          
            
              v
              z
            
          
          
            0
          
          
            
              -
              
                v
                x
              
            
          
        
        
          
            
              -
              
                v
                y
              
            
          
          
            
              v
              x
            
          
          
            0
          
        
      
      ]
    
    .

32. A method according claim 31 further comprising:
estimating corrections using a Kalman filter implementing a “psi-angle” inertial error model where attitude error states are components of the angular error vector ψ defined as ψ=γ−ε, which results in δ{tilde over (h)}i=CT{ψ}CNL{tilde over (h)}N+CTCNLδ{tilde over (h)}N, or by taking a reversed order cross product, {ψ}CNL{tilde over (h)}N=ψ×(CNL{tilde over (h)}N)=−(CNL{tilde over (h)}N)×ψ=−{CNL{tilde over (h)}N}ψ, which results in δ{tilde over (h)}i=−CT{CNL{tilde over (h)}N}ψ+CTCNLδ{tilde over (h)}N.

33. A method according to claim 32 wherein determining a difference between a vector as measured by the magnetometer and the truth reference vector comprises stating the differences as zk=Hkxk+vk, where zk is a 3×1 vector of measurements at time tk, Hk is a 3×n measurement matrix, xk is the state vector, and vk is the measurement noise vector.

34. A method according to claim 33 further comprising:
determining the measurement vector by subtracting δ{tilde over (h)}i=−CT{CNL{tilde over (h)}N}ψ+CTCNLδ{tilde over (h)}N from 



  
    
      δ
      ⁢
      
        h
        ~
      
    
    =
    
      
        
          [
          
            
              
                
                  Δ
                  ⁢
                  
                     
                  
                  ⁢
                  
                    
                      h
                      ~
                    
                    T
                  
                
              
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
            
            
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
              
                
                  Δ
                  ⁢
                  
                     
                  
                  ⁢
                  
                    
                      h
                      ~
                    
                    T
                  
                
              
              
                0
              
            
            
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
              
                
                  Δ
                  ⁢
                  
                     
                  
                  ⁢
                  
                    
                      h
                      ~
                    
                    T
                  
                
              
            
          
          ]
        
        ⁢
        δ
        ⁢
        
           
        
        ⁢
        1
      
      -
      
        L
        ⁢
        
           
        
        ⁢
        δ
        ⁢
        
          
            h
            ~
          
          p
        
      
    
  
  ,





resulting in 



  
    
      
        z
        =
        
        ⁢
        
          
            
              h
              ~
            
            -
            
              
                h
                ~
              
              i
            
          
          =
          
            
              δ
              ⁢
              
                h
                ~
              
            
            -
            
              δ
              ⁢
              
                
                  h
                  ~
                
                i
              
            
            +
            v
          
        
      
    
  
  
    
      
        =
        
        ⁢
        
          
            
              [
              
                
                  
                    
                      Δ
                      ⁢
                      
                         
                      
                      ⁢
                      
                        
                          h
                          ~
                        
                        T
                      
                    
                  
                  
                    
                      0
                      
                        1
                        ×
                        3
                      
                    
                  
                  
                    
                      0
                      
                        1
                        ×
                        3
                      
                    
                  
                
                
                  
                    
                      0
                      
                        1
                        ×
                        3
                      
                    
                  
                  
                    
                      Δ
                      ⁢
                      
                         
                      
                      ⁢
                      
                        
                          h
                          ~
                        
                        T
                      
                    
                  
                  
                    0
                  
                
                
                  
                    
                      0
                      
                        1
                        ×
                        3
                      
                    
                  
                  
                    
                      0
                      
                        1
                        ×
                        3
                      
                    
                  
                  
                    
                      Δ
                      ⁢
                      
                         
                      
                      ⁢
                      
                        
                          h
                          ~
                        
                        T
                      
                    
                  
                
              
              ]
            
            ⁢
            δ
            ⁢
            
               
            
            ⁢
            1
          
          -
          
            L
            ⁢
            
               
            
            ⁢
            δ
            ⁢
            
              
                h
                ~
              
              p
            
          
          +
          
            
              C
              T
            
            ⁢
            
              {
              
                
                  C
                  N
                  L
                
                ⁢
                
                  
                    h
                    ~
                  
                  N
                
              
              }
            
            ⁢
            ψ
          
          -
          
            
              C
              T
            
            ⁢
            
              C
              N
              L
            
            ⁢
            δ
            ⁢
            
               
            
            ⁢
            
              
                h
                ~
              
              N
            
          
          +
          
            v
            ′
          
        
      
    
  




where v represents a vector of uncorrelated measurement noise due to electromagnetic noise and random earth field modeling errors such as quantization.

35. A method according to claim 34 further comprising generating a measurement mapping matrix H according to H=[Hψ 0 . . . 0 Hδl H{tilde over (h)}p H{tilde over (h)}N], where 



  
    
      
        
          H
          ψ
        
        =
        
        ⁢
        
          
            C
            T
          
          ⁢
          
            {
            
              
                C
                N
                L
              
              ⁢
              
                
                  h
                  ~
                
                N
              
            
            }
          
        
      
    
  
  
    
      
        
          H
          δ1
        
        =
        
        ⁢
        
          [
          
            
              
                
                  Δ
                  ⁢
                  
                     
                  
                  ⁢
                  
                    
                      h
                      ~
                    
                    T
                  
                
              
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
            
            
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
              
                
                  Δ
                  ⁢
                  
                     
                  
                  ⁢
                  
                    
                      h
                      ~
                    
                    T
                  
                
              
              
                0
              
            
            
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
              
                
                  Δ
                  ⁢
                  
                     
                  
                  ⁢
                  
                    
                      h
                      ~
                    
                    T
                  
                
              
            
          
          ]
        
      
    
  
  
    
      
        
          H
          
            
              h
              ~
            
            p
          
        
        =
        
        ⁢
        
          -
          L
        
      
    
  
  
    
      
        
          H
          
            
              h
              ~
            
            N
          
        
        =
        
        ⁢
        
          
            -
            
              C
              T
            
          
          ⁢
          
            
              C
              N
              L
            
            .

36. A magnetic compass compensation unit for characterizing distortions in the earth's magnetic field caused by a vehicle, in which said unit is mounted, relative to an undisturbed magnetic field of the earth, said unit comprising a processor configured to receive measurements of the distorted magnetic field from a magnetometer, receive an orientation of the vehicle axes with respect to the earth at a time corresponding to each magnetometer measurement, receive undistorted earth magnetic field data for the vicinity of the vehicle relative to the earth at the time corresponding to each magnetometer measurement, and characterize the distortions utilizing the magnetic field measurements, the orientations of the vehicle, and the undistorted earth magnetic field data.

37. A magnetic compass compensation unit according to claim 36, said processor receiving pitch and roll data from an attitude heading reference system.

38. A magnetic compass compensation unit according to claim 36 wherein to characterize the distortions, said processor calculates correction coefficients based upon a magnetometer orientation with respect to the vehicle axes, the magnetic field as measured by the magnetometer, magnetic inclination and declination data, and vehicle orientation.

39. A magnetic compass compensation unit according to claim 38 wherein said processor is configured to calculate correction coefficients by estimating Le and Hpe from the function Hearth=Le*Hmeas+Hpe where, Hearth is a three-dimensional vector representing the undisturbed Earth's magnetic field, Hmeas represents a three-dimensional vector for the disturbed Earth's magnetic field as measured by magnetometer, Le, is a three by three (3×3) matrix of magnetic correction coefficients, and Hpe is a three-dimensional vector of magnetic correction coefficients.

40. A magnetic compass compensation unit according to claim 36 further configured to receive signals corresponding to magnetic sensors oriented in at least two different orientations.

41. A magnetic compass compensation unit according to claim 36 further configured to receive signals corresponding to three magnetic sensors orthogonally oriented to one another.

42. A magnetic compass compensation unit according to claim 36 further configured to determine vehicle orientation based upon a received GPS tracking angle.

43. A magnetic compass compensation unit according to claim 36 further configured to determine a vehicle orientation based upon a true heading calculated utilizing GPS-augmented attitude and heading reference system algorithms.

44. A magnetic compass compensation unit according to claim 36 further configured to determine a vehicle orientation based upon at least one of a true heading signal or a magnetic heading signal from an inertial reference system.

45. A magnetic compass compensation unit according to claim 36 further configured to determine an orientation of the vehicle based upon a true heading received from a dual antenna GPS.

46. A magnetic compass compensation unit according to claim 36 wherein to receive undistorted earth magnetic field data said processor accesses a table of magnetic inclination and declination data for a surface of the earth.

47. A magnetic compass compensation unit according to claim 46 wherein said processor is configured to transform undistorted earth magnetic field data to correspond to axes of the magnetometer.

48. A processor programmed to generate a truth reference field vector, {tilde over (h)}i, from inertial data and a three dimensional map of the earth's magnetic field, determine a difference between a vector as measured by the magnetometer and the truth reference vector, and utilize the difference to estimate corrections to magnetometer model coefficients.

49. A processor according to claim 48 wherein said processor comprises a Kalman filter for estimating corrections.

50. A processor according to claim 48 wherein said processor is programmed to generate a truth reference field vector by relating the field measured by a magnetometer {tilde over (h)}m to the true earth's field {tilde over (h)} according to {tilde over (h)}m=M{tilde over (h)}+{tilde over (h)}p, where M is a 3×3 magnetic permeability matrix and {tilde over (h)}p is a 3×1 vector of field offset errors resulting from permanent magnetization.

51. A processor according to claim 50 wherein said processor is programmed to solve for the true earth's field, {tilde over (h)}, according to 



  
    
      
        
          h
          ~
        
        =
        
        ⁢
        
          
            M
            
              -
              1
            
          
          ⁡
          
            (
            
              
                
                  h
                  ~
                
                m
              
              -
              
                
                  h
                  ~
                
                p
              
            
            )
          
        
      
    
  
  
    
      
        
          =
          
          ⁢
          
            L
            ⁡
            
              (
              
                
                  
                    h
                    ~
                  
                  m
                
                -
                
                  
                    h
                    ~
                  
                  p
                
              
              )
            
          
        
        ,
      
    
  




by assuming that the initial value of matrix L is equal to the identity matrix and the initial vector of field offset errors, {tilde over (h)}p, is zero.

52. A processor according to claim 51 wherein said processor is programmed to:
provide a linearized error equation for the magnetometer-measured and compensated body-axis earth's field components according to 



  
    
      
        
          δ
          ⁢
          
             
          
          ⁢
          
            h
            ~
          
        
        =
        
        ⁢
        
          
            δ
            ⁢
            
               
            
            ⁢
            
              L
              ⁡
              
                (
                
                  
                    
                      h
                      ~
                    
                    m
                  
                  -
                  
                    
                      h
                      ~
                    
                    p
                  
                
                )
              
            
          
          -
          
            L
            ⁢
            
               
            
            ⁢
            δ
            ⁢
            
              
                h
                ~
              
              p
            
          
        
      
    
  
  
    
      
        
          =
          
          ⁢
          
            
              δ
              ⁢
              
                 
              
              ⁢
              L
              ⁢
              
                 
              
              ⁢
              Δ
              ⁢
              
                h
                ~
              
            
            -
            
              L
              ⁢
              
                 
              
              ⁢
              δ
              ⁢
              
                 
              
              ⁢
              
                
                  h
                  ~
                
                p
              
            
          
        
        ,
      
    
  





where Δ{tilde over (h)} is defined as Δ{tilde over (h)}={tilde over (h)}m−{tilde over (h)}p; and
generate a separate measurement equation for each field component from the linearized error equation according to δ{tilde over (h)}x=Δ{tilde over (h)}Tδlr1−lr1Tδ{tilde over (h)}p, δ{tilde over (h)}y=Δ{tilde over (h)}Tδlr2−lr2Tδ{tilde over (h)}p, and δ{tilde over (h)}z=Δ{tilde over (h)}Tδlr3−lr3Tδ{tilde over (h)}p, where each equation is in the form of a row vector multiplied by a column vector of magnetometer parameter errors to provide scalars that are functions of the vectors.

53. A processor according to claim 52 wherein said processor is programmed with magnetometer errors according to 



  
    δ
    ⁢
    
      h
      ~
    
  
  =
  
    
      
        [
        
          
            
              
                Δ
                ⁢
                
                  
                    h
                    ~
                  
                  T
                
              
            
            
              
                0
                
                  1
                  ×
                  3
                
              
            
            
              
                0
                
                  1
                  ×
                  3
                
              
            
          
          
            
              
                0
                
                  1
                  ×
                  3
                
              
            
            
              
                Δ
                ⁢
                
                   
                
                ⁢
                
                  
                    h
                    ~
                  
                  T
                
              
            
            
              0
            
          
          
            
              
                0
                
                  1
                  ×
                  3
                
              
            
            
              
                0
                
                  1
                  ×
                  3
                
              
            
            
              
                Δ
                ⁢
                
                   
                
                ⁢
                
                  
                    h
                    ~
                  
                  T
                
              
            
          
        
        ]
      
      ⁢
      δ
      ⁢
      
         
      
      ⁢
      1
    
    -
    
      L
      ⁢
      
         
      
      ⁢
      δ
      ⁢
      
        
          
            h
            ~
          
          p
        
        .

54. A processor according to claim 48 wherein to generate a truth reference field vector, {tilde over (h)}i, from inertial data and a three dimensional map of the earth's magnetic field, said processor is programmed to:
determine the earth's field vector in north/east/down frame components {tilde over (h)}N based on one or more of a current latitude, longitude, altitude, and the map; and 
transform the earth's field vector into body coordinates to find errors in the “truth” source according to {tilde over (h)}i=CLBCNL{tilde over (h)}N, where CLB transforms a vector from the local-level frame (L-frame) to the body frame (B-frame) and is the transpose of the attitude direction cosine matrix C, and CNL accounts for the rotation in azimuth of the local-level frame with respect to north by the wander angle α, and is given by 



  
    C
    N
    L
  
  =
  
    
      [
      
        
          
            
              cos
              ⁢
              
                 
              
              ⁢
              α
            
          
          
            
              sin
              ⁢
              
                 
              
              ⁢
              α
            
          
          
            0
          
        
        
          
            
              
                -
                sin
              
              ⁢
              
                 
              
              ⁢
              α
            
          
          
            
              cos
              ⁢
              
                 
              
              ⁢
              α
            
          
          
            0
          
        
        
          
            0
          
          
            0
          
          
            1
          
        
      
      ]
    
    .

55. A processor according claim 54 wherein said processor is programmed to take partial differentials of {tilde over (h)}i=CLBCNL{tilde over (h)}N according to 



  
    
      
        
          δ
          ⁢
          
            
              h
              ~
            
            i
          
        
        =
        
        ⁢
        
          
            δ
            ⁢
            
               
            
            ⁢
            
              C
              T
            
            ⁢
            
              C
              N
              L
            
            ⁢
            
              
                h
                ~
              
              N
            
          
          +
          
            
              C
              T
            
            ⁢
            δ
            ⁢
            
               
            
            ⁢
            
              C
              N
              L
            
            ⁢
            
              
                h
                ~
              
              N
            
          
          +
          
            
              C
              T
            
            ⁢
            
              C
              N
              L
            
            ⁢
            δ
            ⁢
            
              
                h
                ~
              
              N
            
          
        
      
    
  
  
    
      
        
          =
          
          ⁢
          
            
              
                [
                
                  
                    C
                    T
                  
                  ⁢
                  
                    {
                    λ
                    }
                  
                
                ]
              
              ⁢
              
                C
                N
                L
              
              ⁢
              
                
                  h
                  ~
                
                N
              
            
            +
            
              
                
                  C
                  T
                
                ⁡
                
                  [
                  
                    
                      -
                      
                        {
                        ɛ
                        }
                      
                    
                    ⁢
                    
                      C
                      N
                      L
                    
                  
                  ]
                
              
              ⁢
              
                
                  h
                  ~
                
                N
              
            
            +
            
              
                C
                T
              
              ⁢
              
                C
                N
                L
              
              ⁢
              δ
              ⁢
              
                
                  h
                  ~
                
                N
              
            
          
        
        ,
      
    
  




where γ is the attitude error vector which represents the angular error of the L-frame relative to the B-frame, ε the angular position error vector which represents the angular error of the L-frame relative to the earth frame (E-frame), and {v} represents the skew-symmetric matrix form of the enclosed vector v, defined by 



  
    {
    v
    }
  
  ≡
  
    
      [
      
        
          
            0
          
          
            
              -
              
                v
                z
              
            
          
          
            
              v
              y
            
          
        
        
          
            
              v
              z
            
          
          
            0
          
          
            
              -
              
                v
                x
              
            
          
        
        
          
            
              -
              
                v
                y
              
            
          
          
            
              v
              x
            
          
          
            0
          
        
      
      ]
    
    .

56. A processor according claim 55 wherein said processor is programmed to estimate corrections using a Kalman filter which implements a “psi-angle” inertial error model, the inertial error model having attitude error states that are components of an angular error vector ψ defined as ψ=γ−ε, which results in an error model of δ{tilde over (h)}i=CT{ψ}CNL{tilde over (h)}N+CTCNLδ{tilde over (h)}N.

57. A processor according to claim 56 wherein said processor is programmed to determine a difference between a vector as measured by the magnetometer and a truth reference vector comprises according to zk=Hkxk+vk, where zk is a 3×1 vector of measurements at time tk, Hk is a 3×n measurement matrix, xk is the state vector, and vk is the measurement noise vector.

58. A processor according to claim 57 wherein said processor is programmed to determine the measurement vector by subtracting δ{tilde over (h)}i=−CT{CNL{tilde over (h)}N}ψ+CTCNLδ{tilde over (h)}N from 



  
    
      δ
      ⁢
      
        h
        ~
      
    
    =
    
      
        
          [
          
            
              
                
                  Δ
                  ⁢
                  
                    
                      h
                      ~
                    
                    T
                  
                
              
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
            
            
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
              
                
                  Δ
                  ⁢
                  
                     
                  
                  ⁢
                  
                    
                      h
                      ~
                    
                    T
                  
                
              
              
                0
              
            
            
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
              
                
                  Δ
                  ⁢
                  
                     
                  
                  ⁢
                  
                    
                      h
                      ~
                    
                    T
                  
                
              
            
          
          ]
        
        ⁢
        δ
        ⁢
        
           
        
        ⁢
        1
      
      -
      
        L
        ⁢
        
           
        
        ⁢
        δ
        ⁢
        
          
            h
            ~
          
          p
        
      
    
  
  ,




resulting in 



  
    
      
        z
        =
        
        ⁢
        
          
            
              h
              ~
            
            -
            
              
                h
                ~
              
              i
            
          
          =
          
            
              δ
              ⁢
              
                h
                ~
              
            
            -
            
              δ
              ⁢
              
                
                  h
                  ~
                
                i
              
            
            +
            v
          
        
      
    
  
  
    
      
        =
        
        ⁢
        
          
            
              [
              
                
                  
                    
                      Δ
                      ⁢
                      
                        
                          h
                          ~
                        
                        T
                      
                    
                  
                  
                    
                      0
                      
                        1
                        ×
                        3
                      
                    
                  
                  
                    
                      0
                      
                        1
                        ×
                        3
                      
                    
                  
                
                
                  
                    
                      0
                      
                        1
                        ×
                        3
                      
                    
                  
                  
                    
                      Δ
                      ⁢
                      
                         
                      
                      ⁢
                      
                        
                          h
                          ~
                        
                        T
                      
                    
                  
                  
                    0
                  
                
                
                  
                    
                      0
                      
                        1
                        ×
                        3
                      
                    
                  
                  
                    
                      0
                      
                        1
                        ×
                        3
                      
                    
                  
                  
                    
                      Δ
                      ⁢
                      
                         
                      
                      ⁢
                      
                        
                          h
                          ~
                        
                        T
                      
                    
                  
                
              
              ]
            
            ⁢
            δ
            ⁢
            
               
            
            ⁢
            1
          
          -
          
            L
            ⁢
            
               
            
            ⁢
            δ
            ⁢
            
              
                h
                ~
              
              p
            
          
          +
          
            
              C
              T
            
            ⁢
            
              {
              
                
                  C
                  N
                  L
                
                ⁢
                
                  
                    h
                    ~
                  
                  N
                
              
              }
            
            ⁢
            ψ
          
          -
          
            
              C
              T
            
            ⁢
            
              C
              N
              L
            
            ⁢
            δ
            ⁢
            
              
                h
                ~
              
              N
            
          
          +
          
            v
            ′
          
        
      
    
  




where v represents a vector of uncorrelated measurement noise due to electromagnetic noise and random earth field modeling errors such as quantization.

59. A processor according to claim 58 wherein said processor is programmed to generate a measurement mapping matrix H according to H=[H104  0 . . . 0 Hδl H{tilde over (h)}p H{tilde over (h)}N], where 



  
    
      
        
          H
          ψ
        
        =
        
        ⁢
        
          
            C
            T
          
          ⁢
          
            {
            
              
                C
                N
                L
              
              ⁢
              
                
                  h
                  ~
                
                N
              
            
            }
          
        
      
    
  
  
    
      
        
          H
          δ1
        
        =
        
        ⁢
        
          [
          
            
              
                
                  Δ
                  ⁢
                  
                    
                      h
                      ~
                    
                    T
                  
                
              
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
            
            
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
              
                
                  Δ
                  ⁢
                  
                     
                  
                  ⁢
                  
                    
                      h
                      ~
                    
                    T
                  
                
              
              
                0
              
            
            
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
              
                
                  0
                  
                    1
                    ×
                    3
                  
                
              
              
                
                  Δ
                  ⁢
                  
                     
                  
                  ⁢
                  
                    
                      h
                      ~
                    
                    T
                  
                
              
            
          
          ]
        
      
    
  
  
    
      
        
          H
          
            
              h
              ~
            
            p
          
        
        =
        
        ⁢
        
          -
          L
        
      
    
  
  
    
      
        
          H
          
            
              h
              ~
            
            N
          
        
        =
        
        ⁢
        
          
            -
            
              C
              T
            
          
          ⁢
          
            
              C
              N
              L
            
            .