METHOD AND APPARATUS FOR AUTOMATIC CALIBRATION OF MAGNETIC COMPASS

Abstract: A three winding (u, v, w) induction compass mounted in a host vehicle has each winding output coupled to an analog to digital converter (162). Each winding output is weighted and accumulated by a push down stack circuit (165) to obtain a time filtered output; the filtered outputs are mapped into equivalent two winding outputs as the vehicle is turned in a 360 DEG circle to form sensitivity values from the windings readings and using these values to obtain measurement parameters which are incorporated into a least squares matrix which is solved for calibration coefficients to obtain the calibration parameters representing the distortions due to the permanent and induced magnetism of the host vehicle and due to winding imbalance between the three windings and misorientation of the three windings. The calibration parameters are applied to the outputs of the three windings to obtain an equivalent two winding output which is normalized (200, 202) for determining the corrected compass heading.

Description: METHOD AND APPARATUS FOR AUTOMATIC CALIBRATION OF MAGNETIC COMPASS Related Application This is a continuation in part application of copending application entitled "Method and Apparatus for Automatic Calibration of Magnetic Compass", Serial Number 06/555,885, filed November 28, 1983 by Ronald R. Hatch and Richard G. eegan. BACKGROUND OF THE INVENTION Field of the Invention This invention is in the field of automatic calibration of magnetic compasses, such as induction and Hall effect compasses, and more particularly to the calibration of compasses mounted in a host vehicle that has permanent and induced magnetic fields. Description of the Prior Art Various sources distort the earth's magnetic field as seen by a magnetic compass mounted in a host vehicle. The purpose of calibrating a magnetic compass is to determine the amount of distortion and provide a corresponding correction. The two basic sources of distortion are the permanent and induced magnetism of the host vehicle. In addition, the non-ideal nature of the magnetic sensor itself contributes effects which require correction. Numerous efforts have been made to provide these corrections. These include various methods of establishing or estimating a correction signal and applying a feedback signal to bucking coils coupled to the compass windings, the use of a gyrocompass in conjunction with the compass windings, and applying estimated compensation values to the signals from the compass windings. These efforts have been largely unsatisfactory since, while perhaps recognizing the SUBSTITUTESHEET complexity of the problem, they are only partial and inadequate solutions or are misdirected and no solution. Summary of the Invention Magnetic field distortions to be removed include those due to permanent and induced magnetism of the host vehicle. The distortions are to the earth's magnetic field vector, i.e. a signal having both amplitude and direction, to be measured by the compass. Without the distortions, the vectors measured by the compass as the host vehicle is turned in a complete circle define a perfect circle centered at the origin of a given coordinate system. Permanent magnetism and the vertical component of induced magnetism of the host vehicle cause an increase or decrease in the magnetic flux density seen by the compass depending on the orientation of the vehicle in the earth's magnetic field. The net result is a translation of the perfect circle away from the origin to a new center having coordinates Bx, By. The horizontal component of the induced magnetism may result in a more complicated distortion pattern. Depending on the nonsymmetrical nature of the induced field from the soft iron in the host vehicle and the vehicle orientation, the compass may see either an increased or a decreased magnetic flux density as a function of the particular orientation. However, the magnitude of the induced magnetism is independent of the polarity of the magnetizing field. If an increased flux density is observed at a particular host vehicle orientation due to the horizontal component of induced magnetism then an equal increase will be observed at an opposite vehicle orientation as well. The net result of the horizontal component of induced magnetism is to cause the perfect circle described above to become an ellipse. This ellipse is aligned with the semimajor axis in the direction at which the host vehicle induces a maximum in the magnetic flux density as SUBSTITUTESHEET seen by the compass. This elliptic effect can be defined by three terms: 1) a - scaling along the semimajor axis. 2) b - scaling along the semiminor axis. 3) θ - the angle between North and the semimajor axis. The total distortion from permanent and induced magnetism can then be described by five parameters, Bx, By, a, b, and θ. This invention provides for determining these parameters. A flux gate sensor is a type of two axis magnetometer which measures the complex amplitude of the earth's magnetic field in the plane of the sensor. In this description, "two axis" or "two winding" compass mean a magnetometer having a winding along each of two mutually orthogonal axes in a two dimensional plane. A "three winding" or "three axis" compass is a magnetometer having a winding along each of three equally spaced axes in a two dimensional plane. Since the sensor measures the complex amplitude of the field, mathematical compensation can be applied to the measurements to remove the anomalies of permanent and induced magnetism. Flux gate sensors are typically constructed in either two or three winding configurations. The two winding sensor measures the complex amplitude in quadrature whereas the three winding sensor measures the complex amplitude on a three vector basis, the windings being arcuately separated from one another by 120°. The calibration disclosed herein is implemented with the three winding sensor. Other distortion effects that are corrected in this invention are those due to any gain imbalance and angular separation error between the three windings of the sensor. Manufacturing imperfections result in sensors which are not ideal. Two types of imperfections cause errors in the heading that are produced from these sensors. The two types are gain errors and angular separation errors. Each winding SUBSTITUTE SHEET should have the same amplitude response from an external field and should be separated by 120°. The inherent imbalance of the three winding compass can be removed by making use of the fact that the three winding outputs, IT, V, W, respectively, sum to zero. By combining the readings from the three windings in a particular way a new set of readings which is equivalent but much less sensitive to these error sources is created. In the calibration of the magnetic compass the operator manually switches to a calibration mode and turns the host vehicle at least 360°. By taking a sequential sampling of U, V, W, from the three windings u, v, w, respectively, of the compass, a new set of readings is calculated. The U " , V, W readings are time filtered and become IT' , V , W* readings respectively. The time filtering is accomplished by using the previous seven readings of each of the winding outputs using the set: - P2 n - 2P3-+4P4. - 2P5 C - P6 c + P_7 where F = the filtered reading at time (t) and P- | ~ p 7 represent the winding outputs of U, V, W sequentially at times (t) to (t-6) respectively, as will be more fully described. For example, to obtain a new reading U' , the above set becomes: ϋ' (t)=U(t)-V(t-l)-2W(t-2)+4ϋ(t-3)-2V(t-4)-W(t-5)+T(t-6) where t=now. The new set of readings are obtained using a "push down stack" of the previous set of seven samples. The new output would be a U' sample if the most recent stack entry was a U sample, it would be a V sample if the most recent stack entry was a V sample, and it would be a W sample if the most recent stack entry was a W sample. During the 360° turn of the host vehicle the maximum and minimum values of each of the three output readings U', V, W are stored. SUBSTITUTESHEET As stated previously, the effect of permanent magnetism and the vertical component of induced magnetism is to create an origin offset in the perfect circle or ellipse. This origin offset can be determined by finding the bias associated with each of the windings. The biases are the average of the minimum and maximum value for each of the winding readings U', V, W . These biases are then subtracted from all subsequent readings made on the particular winding including those used for induced magnetism calibration. In another embodiment, during the 360° turn of the host vehicle, sensitivity values for measurement parameters are determined. The sensitivity values are variables in a generalized equation for a "flattened circle", or ellipse, having offset axes. The degree of flattening and the amount of offset of the axes are measurements of the distortions for which this invention provides calibrations. The measurement parameters representing the sensitivity values are placed into a least squares matrix with five calibration coefficients which is solved for the five calibration coefficients which are used to obtain X, Y biases, representing the offset, which in turn are mapped into U, V, W biases, and to obtain calibration parameters for getting the corrected heading. Thus, in this embodiment, it is unnecessary to obtain the minimum and maximum values of the three winding readings which tend to be noise sensitive. The horizontal component of induced magnetism has the effect of distorting the "perfect" circle into an ellipse, with its semimajor axis aligned with the direction at which the host vehicle induces a maximum in the magnetic flux density. The calibration procedure defines this elliptic shape by calculating the above mentioned three terms, 1) a - scaling along the semimajor axis, 2) b - scaling along the semiminor axis, or f, a factor representing the flattening of the ellipse and 3) θ - the angle between North and the semimajor axis, or equivalently a, b, f, SIN(2Θ) and COS(2θ). SUBSTITUTESHEET By making use of the mathematical equations which define an ellipse and the linear mappings which distort a perfect circle into an ellipse, inverse mappings are developed making use of the maximum values of the samples acquired during the 360° turn of the host vehicle. These inverse mappings are used to reverse the distortion caused by induced magnetism and to reconstruct the actual perfect circle. It is therefore an object of this invention to provide a method and apparatus for calibrating a magnetic field compass mounted in a host vehicle to correct for distortions to the earth's magnetic field. An object of this invention is to provide calibrations in the previous object for distortions due to permanent and induced magnetism of the host vehicle. It is a further object of this invention to provide calibrations in the previous objects for compass winding imbalance and winding separation irregularity. A further object is to time filter the readings of each of the windings of the compass. Another object is to achieve the previous objects by taking the maximum and minimum readings of each winding during a 360° turn of the host vehicle to obtain calibration parameters. Another object is to achieve the previous objects by forming sensitivity values from the windings readings during a 360° turn of the host vehicle and using these values to obtain measurement parameters which are incorporated into a least squares matrix which is solved for calibration coefficients to obtain the calibration parameters. SUBSTITUTESHEET The above mentioned and other features and objects of this invention and the manner of obtaining them will become more apparent and the invention itself will be best understood by reference to the following description of an embodiment of the invention taken in conjunction with the accompanying drawings. Brief Description of the Drawings Fig. 1 is a plot diagram of a distorted field compass readings superposed an undistorted field compass reading; Fig. 2 is a flow chart diagram of an embodiment of this invention; Fig. 3 is a push down stack schematic block diagram for obtaining the time filtered readings of the compass winding outputs; Fig. 4 is a block diagram of the embodiment of Fig. 2; Figs. 5A and 5B considered together are a flow chart diagram of an embodiment using a least squares matrix solution to obtain the calibration coefficients, where terminals A, B of Fig. 5A are connected to terminals A, B of Fig. 5B; and Fig. 6 is a hardware-software function block diagram of the embodiment of Figs. 5A and 5B. Description of Preferred Embodiments Calibration parameters are determined from the maximum and minimum raw readings obtained from each winding of a three winding magnetic compass as the vehicle is turned through a complete circle. In the derivation for determining the parameters, first equations for a basic two winding two axis compass are considered. Next the two axis equations are SUBSTITUTESHEET related to a three winding three axis compass and the calibration parameters are computed. The winding imbalance and winding separation irregularity scale factors are determined. These parameters and scale factors are then used in the desired linear mapping of the raw readings from the three winding compass into the cosine and sine of the vehicle heading. Referring to Fig. 1, a two axis compass mounted in a host vehicle, not shown, has y axis 20 aligned to the North and the x axis 22 aligned to the East, and if the earth's magnetic field is "perfect" then the compass readings will define circle 24 as the host vehicle is turned 360°. It is understood that initially the y axis may have any alignment providing the vehicle is turned in a 360° circle, the alignment shown being for purposes of explanation. The perfect readings are distorted by the effect of measurement distortions due to the induced and permanent magnetism effects of the host vehicle so that the readings will define an ellipse 26. Assuming the compass readings are scaled to read +/-1 and all angles are positive clockwise, then: x = Sin H where H = heading angle measured clockwise from the y axis. These perfect field readings are distorted to reflect the effect of field distortions due to the induced and permanent magnetism of the host vehicle. These distortions are mathematically applied to the perfect readings in an order opposite to their removal from the measured readings. SUBSTITUTESHEET First the readings are scaled as follows: x' = ax Next flattening of the circle defined by the last equation above is allowed to occur along any axis in space. Mathematically this effect can be accomplished by rotating the coordinate axes so that the y axis is rotated clockwise an angle Q and aligned along axis 28, the axis to be flattened. The flattening, or scaling, of the y measurement is then applied. The coordinate axes are then rotated back to their original position with y axis aligned to the North and the x axis aligned to the East. x", y" are obtained in the following equations where C=Cosθ and S=Sinθ: Express x" and y" in terms of the perfect field readings using the equations: x" = aCx - aSy y" = aSx + aCy (4) r" = (x") 2 + (y") 2 = a 2 The y axis reading is scaled by (1-f) where f varies from zero (circle) to 1 (straight line) . The parameter "f" is called the flattening factor and is related to "e" the eccentricity factor, "a" the semimajor axis of ellipse 26, and "b" the semiminor axis of ellipse 26 by the following equations: b = (l-f)a b 2 = (l-e 2 )a 2 (5) x'" = x" (6) y ,π = (l-f)y" SUBSTITUTESHEET Or in terms of x and y: x' " = aCx - aSy y'" = aS(1-f)x + aC (l-f)y (7) (r'") 2 = a 2 [l-e 2 (Sx + Cy) 2 ] Next the coordinate axes are rotated back to their original positions using the following equations: expressing in terms of x and y to obtain X, Y, and R gives: X = a(l-fS 2 )x - afCSy Y = -afCSx + a(l-fC 2 )y (9) R 2 = a 2 [l - e 2 (SX+CY) 2 ] The next step is to add on bias values Bx, By, the center coordinates of the transformed or displaced ellipse, such that the ellipse is moved off of the coordinate center to obtain X 1 , Y' : X' = a[(l-fS 2 )x - fCSy] + B (10) Y' = a[-fCS x -I- (l-fC 2 )y] + By Equation (10) shows that the X', Y* measurements of a practical two axis compass are a complex function of the desired values of x, y from a perfect field two axis compass. However, as shown below, if the parameters Bx, By, a, f, C, S can be determined then the reverse mapping can be constructed by reversing the distortion steps above: X = (X* - B ) = a[(l-fS 2 )x - fCSy] (11) Y = (Y' - B ) = a[-fCSx + (l-fC 2 )y] Rotate coordinates as follows: SUBSTiTUT E SHEET or : X" = CX - SY = a (Cx - Sy) ( 13) Y" = SX + CY = ( 1-f) (Sx+Cy) Now the Y" reading is amplified by dividing by the factor (1-f) to give: X'" = X" = aCx - aSy (14) y in = γ » /(l-f) = aSx + aCy or: X'" = CX - SY = aCx - aSy Y'" = (SX + CY)/(l-f)= aSx + aCy (15) Rotate back to original coordinates as follows: which gives X 1V = 1 [(l-fC 2 )x + fCSY] = ax {1"f) (17) Y 1V = 1 [fCSX + (l-fS 2 )Y] = ay (1-f) Next, dividing by "a" and using equation (5) gives: x = 1 [ (l-fC 2 )X + fCSY ] b (18) y = _1 [ fCS X + (l-fS 2 )Y ] b which in terms of biased measurements is: SUB S TITUTESHEET x = 1 [ ( 1-fCT ) (X ' - B x ) + fCS (Y 1 - B . y) ] ( 19 ) y = 1 [ fCS (X ' - B ) + (1-fS " ) (Y * - B ) ] Equations (19) show how to correct the measurements actually obtained from a two axis compass if the parameters describing the size, orientation, and coordinate center offset are available. In a three axis (three winding) flux gate compass if the three axes are labeled as u, v, and w, respectively, and the u axis is aligned to North as was the y axis of the two axis compass then the following relationship between the readings of the two axis and three axis compasses is obtained: Thus if readings ϋ, V, W are obtained from the windings on the three axes u, v, w, respectively, the equivalent values of readings x, y of a two axis compass can be determined from equations (20) when considered as three equations in two unknowns. Forming the least squares solution to equation (20) gives: Equation (21) simply relates the tv/o axis and three axis coordinates and therefore can be used to map either raw readings or corrected readings from the three axis to the equivalent two axis values. SUBSTITUTESHEET Calibration parameters B , B^ , a, f, and θ or their equivalent are needed in order to correct the raw compass readings . The six readings corresponding to the maximum and minimum readings on each of the three axes of the three winding compass are sufficient to compute the equivalent parameter set Bu, Bv, Bw, a, f, C and S, where C=Cosθ and S=Sinθ. Though there are seven parameters in this set only five are independent and six measurements are available. The six measurements are designated by: ϋ, O, v " , V, W, and W where the bar designates the maximum if above and minimum if below. U, V, W are raw readings from the windings on the u, v, w axes respectively. The first three calibration parameters B , B , B , are e u v' w obtained by: (22) The maximum readings are now corrected by removing the biases B , B , B , for use in later equations: u' v _w _ U' = U - Bu = (U - U) /2 V = v - Bv = (V - V) /2 (23) W = W - Bw = ( - W) 12 Since the u axis of the three axis compass is aligned in the same direction as the y axis of the two axis compass then from equation (9) the measurement U after correction for bias is: U = a [ -fCSx + (l-fC 2 )y ] (24) The maximum value of the U measurement can be found by taking the derivative with respect to the heading H which from equations (1) and (24) is: SUBSTITUTESHEET dU = 0 = a [ -fCSy - (l-fC 2 ) x ] (25) dH Simplifying and squaring equation (25) gives: (fCS) 2 y 2 = (1-fC 2 ) 2 x 2 (26) 2 using equation (1) to eliminate x gives [ (1-fC 2 ) 2 + (fCS) 2 ]y 2 = (1-fC 2 ) 2 . (27) 2 or solving for y when U=U' (U is maximum) : 2 2 2 y = (l-fCH (28) (1-fC 2 ) 2 + (fCS) 2 Equation (25) can be used in equation (24) to eliminate x: U' = a r (fCS) 2 + (1-fC 2 ) 2 . 7 (29) L j y (1 - c ) Squaring equation (29) : Substituting the equation (28) value of y 2 i.n equation (30) gives: (U') 2 = a 2 [(fCS) 2 + (1-fC 2 ) 2 ] (31) 2 Simplifying, substituting e =f(2-f), equation (5), and combining terms in equation (31) gives: (ϋ') 2 = a 2 (l-e 2 C 2 ) (32) Only one parameter in equation (32) depended on the choice of the coordinate reading U rather than V or W. That SUBSTITUTESHE T parameter is C, or Cosβ, since θ was measured clockwise from 2 the u axis. This means that the equations for (V) and 2 (W ) can be written as: 2 2 2 2 (V') = a^(l-e z Cos θ') (W) 2 = a 2 (l-e 2 Cos 2 θ") (33) where θ* = θ - 120° θ" = θ + 120° Equations (32) and (33) can be written in terms of θ by expanding the cosine and the sum of two angles: (U') 2 = a 2 [1 - e 2 (Cos 2 θ) ] (V ' ) 2 = a 2 [ l-e 2 U Cos 2 θ- J SinθCos«+_3Sin 2 β) ] ( 34 ) 4 2 4 (W) 2 in 2 θ) ] Taking the average of the equations above and defining the value as Z obtains the following: Z = [ (U') 2 + (V) 2 + (W') 2 ]/3 = a 2 (l-e 2 /2) (35) The value P is formed as follows: P = Z-(U') 2 = a 2 e 2 (2 Cos 2 θ - 1) (36) or: The value Q is formed as follows: Q = [ (v') 2 - (W') 2 ]/v = a 2 e 2 Sin 2Θ (38) 2 The value R is formed as follows: SUBSTITUTESHEET Then: Q/R = Sin2θ = S 2 (40) (1 - f) = b (44) a g = 1 + b (44a) a f = 1 - (1-f) (45) (2-f) = 1 + (1-f) (46) From equations (40), (41), (43), (44a), (45) and (46) K ±r K„, and It., are obtained as follows: - (2 - f) - fC, = g - fC (47) Λ l 2b 2b K 2 = fS 2 / 2b (48) = (2-f) + fC 2 = g + fC 2 (49) 3 2b 2b The procedure to remove induced and permanent magnetism effects of the host vehicle will now be discussed. The fewest operations for mapping the raw IT, V, W compass readings to the desired x, y, and cosine and sine of the heading values is first to use the derived bias parameters obtained from equation (22) as follows: These bias free values can then be mapped using equation (21) to bias free x, y equivalent readings which can then in lϋBSTlTUTE SHEET turn be mapped using equation (19) to the desired biased x, y readings. If equation (19) is converted using half angle formulas and K-, K 2 , and K_ from equations (47) , (48) and (49) substituted, the following equation results: Simplifying: The elements of this matrix can be precomputed and used until the compass is recalibrated. K-, K 2 , and K 3 have by equations (47), (48) and (49), respectively, a common divisor of 2b. If this divisor is not used no adverse effects are encountered since the radius of the mapped circle is simply larger and the scale is removed in the arc tangent computation of the heading. The normalizing, later described, makes unnecessary the divisor 2b and the 1/3 factor of equation (52) . This calibration procedure also removes any winding misorientation effects. This is due to the fact that any winding misorientation effects can be completely accounted for as winding imbalance effects. If the u winding is defined as having the correct scale and orientation, the scales of the v and w windings are defined as Kv and Kw, SUB3T1TUTSSKΞΞT respectively, and the misorientations of the v and w windings are defined as θv and θw, respectively. • Further, define: K = (Kv + Kw) 1 With these definitions it can be shown that the misorientation effects can be mapped into winding imbalance effects by: K = Cos θ 2 Sin (30°+^θ) (54) Mapping "perfect" ϋ", V", W" readings can be obtained by a mapping of the imperfect readings. The desired mapping is: where U, V, W are raw readings and U", V", W" designate the "perfect" readings. The U", V", and W" readings will always sum to zero, the mapping is simple, i.e. does not involve irrational numbers, and is symmetrical in U", V", and W". A disadvantage is that the raw readings should be made simultaneously to avoid introducing errors caused by the rate of change of heading. The use of three . A to D converters in parallel could be used to remove this disadvantage. Another way of at least reducing the effects SUBSTITUTE SHEET of rate of change of heading is to combine raw readings such that their average age is identical before implementing the mapping of equation (55) . This is the approach of this invention which also has the effect of averaging the readings which is an advantage if the readings are obtained rapidly but a disadvantage if they are obtained at only a slow rate. This mapping is: where U. , V. , W- represent readings at time t= now; U 2 , V , 2 represent readings at time t-1; U 3 , V 3 , W_ represent readings at time t-2. This equation, because it is symmetrical in U", V", and W", can be implemented to act on a push down stack " of the last seven raw readings. By taking a sequential sampling of U, V, W the new set of readings can be calculated in the following manner: "new" or filtered readings of U, V, W are calculated to obtain U" , V", W" readings, respectively, using the previous seven readings of each of the winding outputs comprising the set: F=P -P -2P +4P -?P -P +P 1 2 3 4 5 6 7 where F=the filtered reading at time (t) and Εy-Ω- represent the winding outputs 0, V, W sequentially at times (t) to (t-6) respectively. Thus, using this set to obtain U", V", W" , the following is obtained: SUBSTITUTE SHEET U" (t)=U(t)-V(t-l)-2W(t-2)+4U(t-3)-2V(t-4)-W(t-5)+ U(t-6) where time t=now. V" (t)=V(t) -W(t-l)-2ϋ(t-2) +4V(t-3) -2W(t-4)-U(t-5)+ V(t-6) where time t=now. W"(t)=W(t)-U(t-l)-2V(t-2)+4W(t-3)-2U(t-4)-V(t-5)-l- W(t-6) where time t=now. The new set of readings are obtained using the push down stack of the previous set of seven samples and is performed by block 64, later described. Referring now to Figs. 2-4 and in particular to Fig. 2 a flow chart diagram of an embodiment of this invention is shown. In the diagram of Fig. 2 the logic "decision make" functions are represented in diamonds, "compute" functions are represented in blocks and hardware is represented in blocks defined below as circuits. Flux Gate Sensor block 36 is a three winding flux gate compass, or other magnetometer, and contains interface circuitry to the compass windings, the interface circuitry being any appropriate circuitry known to the art for the purpose of quantizing the compass signals for processing. The winding analog outputs are converted to digital signals in block 36 and are fed on path 38 to Read Raw Data block 40 where the readings are outputted on path 42 to Reading Exceed Sensor Scale decision make 44 where the amplitude of the block 40 outputs are compared to the present upper amplitude of the block 36 sensor scale. If the readings from block 40 exceed the sensor scale, this decision is fed on "yes" path 46 to Increase Sensor Scale block 48 and Decrease Stored Values block 50. Block 48 feeds increase scale information via path 52 to block 36 to increase the sensor scale to include the present upper amplitude. If the present readings do not exceed the sensor scale, this decision is indicated on "no" path 52 to Reading Below Sensor Scale decision make 54. If the reading is below the present scale lower limit, this decision is fed on the "yes" path 56 to Decrease Sensor SUBSTITUTE SHEET Scale block 58 and Increase Stored Values block 60, block 58 feeding decrease sensor scale information to block 36 via path 59. If the amplitude reading is not below the present scale lower limit, this decision is fed on the "no" path 62 to push down stack block 64, later described. Block 64 is indicated by the double line on the top and left side indicating it is a table stored in memory. Also, blocks 50, 60 feed decrease and increase information, respectively, via paths 66, 68, respectively, to block 64 in order to maintain the incoming and stored data on the same amplitude scale. One method of increasing or decreasing the sensor scales is integrating means for integrating the winding incremental outputs and increasing the number of winding incremental outputs integrated when the winding outputs fall below the sensor scale and decreasing the number of winding incremental outputs integrated when the winding outputs are above the sensor scale, as is known in the art. The output of block 64 on path 70 is shown in block 72 and has the form: Referring to Fig. 3 block 64 will be described. Inputs of raw readings U, V, W are sequentially made to terminals 74-86 with an U reading being shown at terminal 74 in the time period, shown in Fig. 3 to obtain U". The readings at terminals 74-86 are multiplied by multipliers 74a-86a, respectively, having multiplying factors 1, -1, -1, 2, -1, -1, and 1 respectively. The outputs of multipliers 78a, 80a, 82a are summed in adder 88 and multiplied by a factor of 2 in multiplier 90. The outputs of multipliers 74a, 76a, 90, 84a, 86a are summed in adder 92 to obtain "aged" reading U". It is understood that to obtain aged reading V", a V reading is applied to terminal 74 and the readings in each of the lower terminals 76-86 are "pushed down" one letter in SUBSTITUTESHEET the series IT, V, W. To obtain aged reading W", a W reading is applied to terminal 74 and the readings in each of the lower terminals 76-86 are "pushed down" one letter in the series U, V, W. Thus, the aged output would be a U" sample if the most recent stack entry was a U sample, it would be a V" sample if the most recent entry was a V, and it would be a W" sample if the most recent entry was a W. The generation of this aged set of samples U", V", W" is done prior to any calibration including the acquisition of the maximum and minimum values of the outputs of each of the three windings. The aged or time filtered outputs U", V", W" from block 72 are directed via path 96 to In Calibrate Mode decision make 98. If the operator has switched the system to the calibrate mode, then the outputs on path 96 are fed via "yes" path 100 to Automatic Mode decision make 102. If the operator has switched the system to automatic mode, the outputs on path 100 are fed via "yes" path 104 to Store Maximums Minimums & Scale circuit 106 where they are stored and scaled. Scaling in circuit 106 is performed from input via paths 114, 116 from blocks 50, 60, respectively. The scaled maximum and minimum values from circuit 106 are fed via path 118 to Is Table Full decision make 120 whereat it is decided whether the table of values in circuit 106 is full. If the decision is yes, then an enable signal is fed via "yes" path 122 to Compute Biases block 124 where biases B , B , B are computed according to equations (22) . If the decision is no, then a disable signal is fed via "no" path 126 to exit 128. The bias outputs BU, BV, Bw from block 124 are used in block 138 as described below and are fed via path 130 to Compute Values block 132 where the values of equations (23) , (35) , (38)-(44a), and (47)-(49) are computed. It is noted that SUBSTITUTESHE .=-= the equations in block 132 for computing K, , K_, and K_ do not correspond exactly to equations (47) -(49) since they do not have the divisor 2b. As mentioned, if this divisor is not used no adverse effects are encountered since the radius of the mapped circle is simply larger and the scale is removed in the arc tangent computation of the heading. The normalizing, later described, makes unnecessary the divisor 2b and the 1/3 factor of equation (52) . Additionally, the following values are computed in block 132: ll = 2K 2 The computed values from block 132 are fed via path 134 to exit 128 and are used in block 138 to determine X, Y as described below. Thus, when the system is switched by the operator to the calibrate mode the outputs on path 96 are collected during the 360° turn of the vehicle. After the turn, ' the operator switches from the calibrate mode to the automatic mode and the collected outputs are applied to determine the calibration parameters. When the system is not in calibrate mode but in automatic mode, the system is enabled to compute and apply the data collected when in the calibrate mode. In the automatic mode, X and Y are determined from the information obtained from blocks 72, 124, 132 in Apply Calibration Parameters to Form X, Y, from U", V", W" block 138 by the following equations: X = a1 1 1 1 (U"-Bu)+a1 1 2(V"-Bv)+a1-3.-(W"-Bw)' SUBSTITUTESHEET Y = a 2 1 (U"-B u ) +a 22 (V"-B v ) +a 2 3 (W"-B w ) (58) X, Y values are then fed via path 140 to Normalize block 142. Normalized values X 1 , Y' are computed in the following manner: Equations (59) are similar to equations (52) except the 1/3 factor is deleted as a result of the normalization. After normalizing, X', Y* are fed via path 144 to Compute Heading block 146 where arc tangent (X 1 , Y') is computed and fed via path 148 to Exit 128. From Exit 128 the calibrated heading may be fed to an heading indicator, position plotter, dead reckoning system or other use which are not shown. Referring to Fig. 4, a simplified block diagram showing both hardware and software controlled data processing " system function blocks or circles is shown, the hardware blocks being in dashed section 152. Compass drive circuit 154 is coupled to compass demodulation circuit 156, drive winding d providing the drive signal for compass windings u, v, w in conventional manner to circuit 154. Circuit 156 feeds analog signals U, V, W from windings u, v, w respectively to sample and holds 3 circuit 158 which samples and holds each of the ϋ, V, W signals and feeds these signals to multiplexor circuit 160. Circuit 160 supplies the ϋ, V, W signals serially to analog/digital A/D converter circuit 162 where the analog signals are converted to digital signals. Timing circuit 164 supplies timing signals to circuits 158, 160, 162. The hardware thus described corresponds to circuits 36, 40, 48, 58 in Fig. 2. SUBSTITUTE SHEET The output of converter circuit 162 is supplied to push down stack 165 which time filters the U, V, W signals to provide U", V", W" signals in the manner described for block 64, Fig. 3. The U" , V", W" signals from stack 165 are provided to register file 166, minimum-maximum block 168 and subtracter 170. File 166 also receives a timing signal from circuit 164. Block 168 determines the minimum and maximum values of each of U", V", W" signals for each 360° turn of the host vehicle and supplies these values to file 166. File 166 supplies the U", V", W" signals and the minimum and maximum values on a timed basis to compensation process function block 171 which performs the functions of blocks 124, 132, 138 in Fig. 2 and which computes and furnishes the biases Bu, Bv,' Bw on bias line 172 to subtracter 170 where they are subtracted from U", V", W" respectively. The output of subtracter 170 is supplied on path 174 to register stack 176 which supplies (U"-B ) on path 178 to each of multiply function circles 180, 182; (V"-B ) on path 184 to each of multiply function circles 186, 188, and (W"-B ) on path 190 to each of multiply function circles 192, 194. Values a , ., a i 2 ' a 13 ' 21 ' a 2 ?' a 23 ' are provided to multiply function circles 180, 186, 192, 182, 188, 194 respectively from process function block 171 wherein the product values a 1;L (U"-B u ), a 12 (V"-B v ), a 13 ( "-B w ), a, Z.L. (U"-BU) , a Z,Z_(V"-BV), a Z_5_(W"-BW) are obtained. a1 i 1 n (U B -Bu),' a1-2-(V n -Bv), a1-3-.(W"-Bw) are sup e p εr lied from multiply function circles 180, 186, 192 respectively to add function block 196 to obtain the X value on path 198 according 3 to X = a1-1- (U"-Bu) + a1_2(V"-Bv) + a1-3-. (W"-Bw) which is supplied to each of normalize function blocks 200, 202. In like manner, a,.1(U"-BU) , a Z Z(V"-BV), a Z„-.(W"-Bw) are supplied from multiply function circles 182, 188, 194 respectively to add function block 204 to obtain the Y value on path 206 according to Y = a 21 (U"-B ) + 22 (V"-B v ) + a 23 (W"-B ) which is supplied to each of normalize function blocks 200, 202 where X'=X/ X 2 +Y 2 and Y*=Y/ X 2 +Y 2 are obtained respectively and supplied to arc tan function block SUBSTITUTESHEET 208 from which the calibrated compass heading is provided on line 210. Thus the circuitry between line 172 and lines 198, 206 corresponds to that provided in block 138, in Fig. 2, blocks 200, 202 correspond to block 142 in Fig. 2, and block 208 corresponds to block 146 in Fig. 2. The previously described embodiment utilizes maximum and minimum raw readings obtained from each compass winding, which typically are readings sensitive to noise. Also, when the number of kinds of measurements only slightly exceeds the number of the obtained calibration parameters, the solution is additionally sensitive to noise. A second embodiment that is less sensitive to noise and is designated as the "least squares fit" approach, is described below. This approach uses linear equations and hence the raw readings from the compass windings need not be stored if the readings are incorporated into a least squares matrix as they are .received as the host vehicle is turned in a 360° circle and a relatively large number, in the order of 60, readings are taken during the turn. The number of readings should be chosen as a function of the quantization noise and the desired accuracy of the compass. More frequent readings are desired if they are incorporated into the matrix as they are received. This approach substitutes the following equations (61) to (89) for equations (22) to (43) above, it being understood that equations (1) to (21) and (44) to (59) a PPly i n the second embodiment as previously described herein for the previously described embodiment in the manner described hereinbelow. The pairs of X, Y readings are fit in a least squares sense to the elliptical equation derived below. The standard ellipse equation with center at the coordinate center and semimajor axis a in the x direction (semiminor axis b in the y direction) , Fig. 1, is given by: 2 ? 2 2 XVa~ + Y b^ = 1 (61) SUBSTITUTESHEET 2 Multiplying through by b and substituting in the definition of eccentricity, e e 2 = (a 2 -b 2 )/a 2 (62) gives: Using the definition of horizontal radius give: r 2 -e 2 X 2 = b 2 (64) To generalize this equation to allow any coordinate frame orientation, X must be replaced by a rotated value of X: X = CX'-SY f (65) where X is the rotated value; X' and Y' are the pre-rotation values of X and Y, respectively; C is the cosine (θ) of the rotation angle; S is the sine (θ) of the rotation angle. Since r does not change as a result of coordinate rotation, when equation (65) is substituted into equation (64) : r 2 -e 2 [C 2 (X') 2 - 2CSXΥ' + S 2 (Y') 2 ] = b 2 (66) Using the half angle formulas and designating C_ as the cosine (2Θ) and S_ as the sine(2θ) : r 2 -(e 2 /2) [(X') 2 + (Y') 2 ] - (e 2 /2) C 2 [ (X' ) 2 - (Y') 2 ] - (e 2 /2)S 2 [-2X'Y'] = b 2 (67) Simplifying and dropping the primes: r 2 = X 2 +Y 2 = 2b 2 /(2-e 2 ) + e 2 C 2 /(2-e 2 ) [X 2 -Y 2 ] + e 2 S 2 / (2-e 2 ) [-2XY] (68) Equation (68) is a valid equation for an ellipse in any orientation, and it is linear in the unknown coefficient values; substituting coefficients a,, a ? , a, for the coefficients in equation (68) : r 2 = X 2 +Y 2 = a χ + a 2 [X 2 -Y 2 ] + a 3 [-2XY] (69) SUBSTITUTESHEET The definition of coefficients a.. , a_, a 3 is obvious from comparison of the forms of equations (68) and (69) ; It is still necessary to make an adjustment so that an offset from the x, y center of the ellipse to an offset center having coordinates x , y is provided for. This can be done by substituting in equation (68) as follows: X = (x-x ) and Y = (y-y ) (70) Performing the substitution of equation (70) and using the coefficients a,, a„, a 3 to keep it simple: r 2 = χ 2 +y 2 = [a -(l-a 2 )X Q 2 -(1+a,,)y Q 2 - 2a 3 x Q o ] + a 2 [x -y ] + a 3 [-2xy] + [(l-a 2 )x o + a 3 y Q ] (2y) + C(l+a 2 )y o + a 3 x Q ] (2y) (71) Substituting calibration coefficients b,, b 2 , b 3 b,, b_ for the coefficients in equation (71) gives a linear equation of the form: r 2 = χ 2 +y 2 = h ± + b 2 (χ 2 -y 2 ) + b 3 (-2xy) + b 4 (2x) + b 5 (2y) (72) The definition of coefficients b 1, , b Z~, b ά_, 4. , bD- is obvious from comparison of the forms of equations (71) and (72) ; Pairs of x, y measurements are inserted into equation (72) and it is solved for the entire set of measurements in a standard least squares sense for the set of coefficients b. , b„, b-. b., b ς . Since it is a linear equation it need not be iterated. Substituting the sensitivity values m , m- , m„, m^, ., m- in equation (72) for the terms x 2+y2, °1, x2-y2, -2xy, 2x and 2y, respectively, gives: mo = ,1b»1 + 2 b 2 + m 3 b 3 4 4 m 5 b 5 (73) SUBSTITUTE SHEET Let M be the row matrix with elements (mo, m,1, m2„, m3' m 4., mD,.) and let B be the column matrix with coefficients then equation (72) becomes: m o = (M) (B) (74) Each time new measurements of readings x and y are obtained new values of m and M are obtained. The least squares matrix equation which uses all of the measurements is given by: £(M m o ) = ∑(M T M) (B) (75) Where the summation is across all measurements and the superscript T designates the transpose of the matrix. When written out in terms of the elements equation (75) If all the elements of the matrices in equation (76) which contain the summation of products of the values of "m" are set to zero before the calibration process is begun then the elements of these matrices can be formed sequentially by forming each of the products (m.m.) for the current •*- J measurement and adding it to the cumulated values of the appropriate element. ("i" in the above product varies from 0 to 5, while "j" varies from 1 to 5) . SUBSTITUTE SHEET When all of the measurements have been included into equation (76) then the equation is solved for the values of calibration coefficients b- to b-, as follows: In matrix form: B = [X(M T M)] _1 [∑(M m )] (77) Σ (MTM) ]-1 is the inverse of the matrix (MTM) and can be found in standard methods, described for example in Statistics in Physical Science, by Walter Clark Hamilton, Ronald Press, New York, New York (1964) and the resultant values of b.. , b„, b 3 , b., b- obtained directly from equation (77) by standard methods such as Gauss elimination defined in Computational Methods of Linear Algebra, author V. N. Faddeeva, Dover Publications, New York, New York (1959) . The coefficients b.., b 2 , b 3 b., b.. are processed further. First it is noted that: a 2 = b 2 a 3 = b 3 - (78) The values of b 4. and b5 c are used to solve for xo and y J o, the offset center coordinates of the ellipse, by using the values of b 2 and b 3 (a 2 and a 3 , respectively) (l-b 2 )x o + b 3 y Q = b 4 b 3 x o + d+b 2 ) y o = b 5 ( 79) from equations ( 68) , (69 ) and ( 78 ) : e 2 / ( 2-e 2 ) - V b. Let K = b 2 2 + b 3 2 ( 80 ) solving for x and y : Let D = °1 - (b 2 °2 - (b 3 ) 2 (81) From equation (80) : SUBSTITUTESHEET D 1 - K' ( 82 ) Let x Q = B χ = [b 4 (l+b 2 ) - 5 b 3 ]/D y o = B y = [b 5 (l-b 2 ) - b 4 b 3 ]/D (83) The offset biases Bx, By are by definition, equation (83) , the values x , y , respectively. From equation (5) the flattening factor f is: Let h = (1-f) =Vl-2K/ (1+K) =V(1-K) / (1+K) (84) g= 1 + h Using equation (80) : C 2 = b 2 /K (85) s 2 = b 3 /κ Using equations (85) solve for the cosine and sine of the rotation angle of the semimajor axis: S S == SS 22 //((22CC) (86) Else If S 2 0 then S = -S (88) C = S 2 /(2S) The outputs from equations (86) and (87) are then used to obtain; θ = ARCTAN (S, C) (89) This completes the solution for all parameters of an arbitrary ellipse in the horizontal plane. The values obtained from equations (80), (83) and (84) completely define the ellipse and the values K- , I 2 , and K 3 SUBSTITUTE SHEET of equations (47) , (48) and (49) above. The solution from equation (49) proceeds as previously described. Referring now to Figs. 5A, 5B and 6, and in particular Figs. 5A and 5B, a flow chart diagram of the second embodiment of this invention is shown. The symbolism described for Fig. 2 applies to Figs. 5A, 5B. Further, common reference numerals in the diagrams of Figs. 2 and 5A, 5B pertain to common functions in the respective flow charts and descriptions of the common functions are not repeated in the following description of Figs. 5A, 5B. Readings from block 40 provide on path 220 a sensor scale input to Scale Readings by the Current Sensor Scale block 222 and to Scale Bu, Bv, Bw by ■ * ■ the Current Sensor Scale block 224. Block 222 receives on path 226 time filtered outputs from block 72 which are scaled according to the inputs from path 222 and the scaled outputs from block 222 are fed to In Calibrate Mode decision make 98. If the operator has switched the system to the calibrate mode, then the outputs on path 96 are fed via "YES" path 100 to Automatic Mode decision make 102. If the operator has switched the system to automatic mode, the outputs on path 100 are fed via "YES" path 104 to Form Sensitivity Values for Measurement Parameters circuit 228. The X and Y values in circuit 228 are expressed in U, V and W values from straightforward trigonometric relations and coefficients b,-b 5 are provided. The ir -m.. values are as defined from equation (73) . The measurement values values and coefficients from circuit 228 are fed on path 230 to Incorporate Measurement Parameters and Coefficients into the Least Squares Matrix circuit 232 wherein values m ^ -m- are natrixed with the coefficients b.-b- as "defined in equations (72)-(76) above. The output of circuit 232 is fed on path 234 to Enough Measurements decision make 236 wherein it is determined if SUBSTITUTE SHEET there are enough measurements to provide a least square fit to continue the process. A test for this determination is if the host vehicle has made a complete 360° turn. When there are not enough measurements, a signal is provided on "NO" path 238 to Exit 240 and the process restarts. When there are enough measurements, the process continues on "YES" path 242 with the matrix circuit 232 results being supplied to Invert Matrix Equation circuit 244 where the values of coefficients b, , b , b 3 , b., b,- are obtained as explained for equation (77) above. From there coefficients b.-b- are fed on path 246 to Compute Ellipse Parameters circuit 248 where the values in equations (80) , (82) , (83) , (84) and (85) , above, are computed and the values C 2 , S 2 are fed on path 250 to Compute θ for Manual Reentry circuit 252 where equations (86), (87), (88), (89) above are computed and θ and the ellipse parameters are fed on path 254 to Compute Calibration Parameters circuit 256. If the operator has set the system for manual operation, an enable signal is sent from Automatic Mode decision make 102 on "NO" path 108 to Manual Entry circuit 260 where manual entry of the B , B , θ, and h values, determined from previous calibration cycles, may be made as are manual entries to circuit 110 in the Fig. 2 embodiment. Circuit 260 entered values are then fed on path 262 to Compute C„ and S circuit 264 and then passed on path 266 to circuit 256. The indicated values in circuit block 256 that are common to those in block 132, Fig. 2, are similarly computed as previously described for block 132. The "f" and "g" values are from equation (84) . The values K- , K„, K_, a,,, a-,, a, „, a „«, a,.,, --, are determined as for the embodiment of Fig '. 2. The BU, ■BV, Bw values defined in terms B , By as shown in circuit block 256 are straightforward trigonometric conversions of B , B . After all calibration parameters indicated in block 256 are performed for a 360° turn of the host vehicle, or from SUBSTITUTESHEET manual entry in block 260, the computed calibration parameters are fed on path 268 to Exit 270 and from there are applied to path 96. If the operator has switched the system out of calibrate mode, then the calibration parameters are fed on "NO" path 136 to circuit 224 and path 276 to circuit 138 where the calibration parameters are processed as previously described for the embodiment of Figs. 2 and 4 to obtain the heading. Referring to Fig. 6, a block diagram similar to that of Fig. 4 is shown and has the same delineation between hardware and software controlled data processing systems as described for those of Fig. 4. The Fig. 4 diagram implements the flow diagram of Fig. 2 while the Fig. 6 diagram implements the flow diagram of Figs. 5A, 5B. Components with common reference numerals perform similar functions and have similar outputs in the diagrams of Figs. 4 and 6. The essential differences between the diagrams of Figs. 4 and 6 are that function block 168 in Fig. 4 is replaced by Form Least Squares Matrix function block 272 in Fig. 6 and Compensation Process function block 171 in Fig. 4 is replaced with Matrix Inversion and Compensation Process function block 274, but otherwise the diagram blocks and functions in Figs. 4 and 6 are similar. Block 272 performs the functions of circuits 228 and 232 in the flow diagram of Figs. 5A, 5B and block 274 performs the .functions of circuits 244, 248, 256 in the diagram of Figs. 5A, 5B. The values a^, a.., ι-j' a ι ' a 22 ' a 23 re provided from function block 274 to multiply function blocks 180, 186, 192, 182, 188, 194, respectively, and bias values B , B , B are provided from function block 274 in path 172 to subtracter 170 and from there the " circuit description, and function are similar in the diagrams of Figs. 4 and 6. Whereas in most cases the two dimensional horizontal embodiment described above is sufficient, an extension into SUBSTITUTESH three dimensions if required is straightforward. A three dimensional embodiment would be important when either pitch and roll are constant for long periods of time and then change abruptly; or the magnetic latitude and hence the magnetic field "dip" angle changes appreciably. Since both of these situations can significantly change the earth's magnetic field strength and/or the vertical component of the earth's field, a change in either the size or bias offset of the ellipse in the horizontal plane can occur. The three dimensional model is an ellipsoid formed by rotating an ellipse about its semimajor axis allowing the equivalent rotated semiminor axis vector to trace an ellipse, defined as the minor ellipse. The semimajor axis would again be aligned with the direction at which the host vehicle induces a maximum in the magnetic flux density. This ellipsoid effect can be described by six terms: 1) a scaling along the semimajor axis of the ellipsoid. 2) b - scaling along the semimajor axis of the minor ellipse. 3) c - scaling along the semiminor axis of the minor ellipse. 4) θ - the angle between North and the semimajor axis of the ellipsoid in the horizontal plane of the host vehicle. 5) <> - the angle between the horizontal plane of the host vehicle and the semimajor axis of the ellipsoid. 6) [J - the angle of rotation of the minor ellipse with respect to the semimajor axis of the ellipsoid. The elliptic model for the two dimensional embodiment described earlier is an horizontal "slice" through this ellipsoid. The effect of pitch and roll on a suspended flux gate sensor where a certain orientation is maintained for a long time and then abruptly changed is to change the horizontal slice through the ellipsoid. By changing this SUBSTITUTESHEET slice the parameters describing the ellipse could change. The effect of changing the magnetic field dip angle would be to change «5, the angle between the horizontal plane of the host vehicle and the ellipsoid's semimajor axis, and translate the three dimensional center of the ellipsoid. The net effect on the horizontal slice of the ellipsoid received by the sensor is to translate the origin but maintain the shape of the ellipse with the possible exception of overall scale. The net effect to the horizontal calibration is a change in the bias values. Also, this invention can be used with a speed log input, or other speed input, of the host vehicle to obtain a navigational system for the host vehicle. Further, in a two winding magnetometer, the computation is simplified since conversion mapping between the two winding and three winding models is unnecessary. While there have been described above the principles of this invention in connection with specific embodiments, it is to be understood that this is by way of example and is not limiting of the scope of this invention. SUBSTITUTE SHEET

Claims: WHAT IS CLAIMED IS: 1. Apparatus for calibrating the distortions in the readings of a magnetic compass having a plurality of windings in a two dimensional plane and mounted in a vehicle comprising: first means coupled to the compass windings for obtaining the outputs from each of the windings as a function of time by weighting and combining the outputs from each of the windings at a first time and for a predetermined number of the next previous times to said first time to obtain a time filtered output for each of the windings; second means coupled to said first means to form from said windings outpμts measurement parameters having sensitivity values; said sensitivity values being variables in a generalized equation that represents the configuration and location of a geometrical figure defined by the locus of coordinates of said outputs, said outputs having distortions due to permanent and induced magnetism of the vehicle and distortions due to winding imbalance between and misorientation of the magnetic compass windings; said second means for defining calibration coefficients of said measurement parameters in said equation; third means coupled to said second and third means to incorporate said measurement parameters and said calibration coefficients into a least squares matrix and to solve for said calibration coefficients; fourth means coupled to said third means for computing calibration parameters from said calibration coefficients that are to be applied to said outputs; SUBSTITUTE ftwisc fifth means coupled to said first means and said fourth means for applying said calibration parameters to said outputs from said first means to form an output from each of two windings; said two windings being orthogonally related to one another; sixth means coupled to said fifth means for obtaining the calibrated compass heading from said two windings outputs. The apparatus of claim 1 including seventh means coupled between said fifth means and said sixth means for normalizing said two windings outputs by dividing each of said two windings outputs by the square root of the sum of the squares of each of said two windings outputs. The apparatus of claim 1 including eighth means coupled between each of said compass windings and each of said first means and said second means for sensing the amplitude of the winding outputs and increasing or decreasing the amplitudes of the winding outputs to fit within a predetermined sensor scale of amplitudes. 4.. The apparatus of claim 3 wherein said eighth means comprises integrating means for integrating the winding incremental outputs and increasing the number of winding incremental outputs integrated when the winding outputs fall below the sensor scale and decreasing the number of winding incremental outputs integrated when the winding outputs are above the sensor scale. 5. The apparatus of claim 1 wherein said geometrical figure for the distorted vector outputs is in the shape of an ellipse and the geometric figure for the undistorted vector outputs is in the shape of a circle; said generalized equation in said second means being: b 5 (2y) in said second means said measurement parameters being m , -, m 2 , m 3 , m., m_ and having having the sensitivity values x +y , 1, x -y , -2xy, 2x and 2y, respectively; in said second means said calibration coefficients comprise: b χ = [a 1 -(l-a 2 )x o 2 -(l+a 2 )y o 2 -2a 3 x o y o ] V a 2 b 3 = a 3 b 4 = [(i- a 2 )χ 0 + 3 y 0 ] b 5 = [d+a 2 )y o + a 3 o ] where a = semimajor axis of ellipse of ellipse C„ = cosine (2Θ) and S_ = sine(2θ) θ = rotation angle of ellipse x, y = coordinates of center of ellipse prior to offset xo, y J o = coordinates of offset center of ellip c se said least squares matrix in said third means comprises; SUBSTITUTE SHEET B = [J(M M)] _1 r£(M m 0 )] where the matrix [ Y (M M) ] is the inverse of the matrix -(MTM) said calibration parameters in said fourth means comprise; c 2 = b 2 /κ s 2 = b 3 /κ f = 1 - h g = 1 + h *! = g-fc 2 K 2 = fS 2 K 3 = g + fC 2 The apparatus of claim 5 wherein the number of windings in the compass is three and the three windings are arcuately spaced 120° from one another and the outputs from the three windings are U, V, W respectively, said first means comprises push down stack means for obtaining time filtered outputs U", V", W" having the form: F=p -p -2P +4P -2P -P -f-P 1 2 3 4 5 6 7 SUBSTITUTE SHEET where for the U reading F=U" (t) , Pl=U(t), P 2 =V(t-l), P 3 =W(t-2), P 4 =U(t-3), P 5 =V(t-4), P 6 =W(t-5), P ? =U(t-6); where for the V reading F=V" (t) , P-=V(t), P =W(t-l), P 3 =U(t-2), P 4 =V(t-3), P 5 =W(t-4), P 6 =U(t-5), P ? =V(t-6); where for the W reading F=W" (t) , P χ =W(t), P 2 =U(t-l), P 3 =V(t-2), P 4 =W(t-3), P 5 =U(t-4), P 6 =V(t-5), P ? =W(t-6) and where t= present time and (t-n) is the time equal to the present time t minus the next previous n time units. 7. The apparatus of claim 6 = wherein said filtered outputs from said three windings are U", V", W" respectively and said two winding outputs are X, Y respectively, and said fifth means converts to the said two winding outputs by obtaining: X = a n (U"-B u ) + a 12 (V-B v ) + a 13 (W"-B w ) . Y = a 21 {U "- B u ) + a 22 (V "- B v ) + a 23 (W "-V- 8. The apparatus of claim 7 wherein said fifth means is for normalizing the X, Y outputs to obtain X', Y', respectively, as follows: 9. The apparatus of claim 8 wherein said sixth means is for obtaining the heading arc tangent from X', Y 1 . 10. The apparatus of claim 1 wherein the number of windings in the compass is three and the three windings are arcuately spaced 120° from one another and the outputs from the three windings are U, V, W respectively, said S ^^T first means comprises push down stack means for obtaining time filtered outputs U", V", W" having the form: F=P 1 -P 2 -2P 3+ 4P 4 -2P 5 -P 6+ P 7 where for the U reading F=U" (t) , P x =U(t), P 2 =V(t-l) , P 3 =W(t-2), P 4 =U(t-3), P 5 =V(t-4), P 6 =W(t-5), P ? =U(t-6) ; where for the V reading F=V" (t) , P χ =V(t) , P 2 =W(t-l) , P 3 =U(t-2), P 4 =V(t-3), P 5 =W(t-4), P 6 =U(t-5), P ? =V(t-6); where for the W reading F=W" (t) , P 1 =W(t) , P 2 =U(t-l) , P 3 =V(t-2), P 4 =W(t-3), P 5 =U(t-4), P 6 =V(t-5), P ? =W(t-6) and where t = present time and (t-n) is the time equal to the present time t minus the next previous n time units. 11. The apparatus of claim 10 wherein said filtered outputs from said three windings are U", V" , W" respectively and said two winding outputs are X, Y respectively, and said fifth means converts to the said two winding outputs by obtaining: X = ail (U--B u ) + a 12 (V"-B v ) + a 13 ( "-B w ) Y = 21 (U--B u ) + a 22 (V"-B v ) + a 23 (W"-B w ). 12. The apparatus of claim 11 wherein said fifth means is for normalizing the X, Y outputs to obtain X', Y*, respectively, as follows: 13. The apparatus of claim 12 wherein said sixth means is for obtaining the heading arc tangent from X' , Y' . 14. A method for calibrating the distortions in the readings of a magnetic compass having a plurality of windings in a two dimensional plane and mounted in a vehicle comprising the steps of: a second step of forming from said windings outputs measurement parameters having sensitivity values; said sensitivity values being variables in a generalized equation that represents the configuration and location of a geometrical figure defined by the locus of coordinates of said outputs, said outputs having distortions due to permanent and induced magnetism of the vehicle and distortions due to winding imbalance between and misorientation of the magnetic compass windings; said second step defining calibration coefficients of said measurement parameters in said equation; a third step of incorporating said measurement parameters and said calibration coefficients into a least squares matrix and to solve for said calibration coefficients; a fourth step of computing calibration parameters from said calibration coefficients that are to be applied to said outputs; a fifth step of applying said calibration parameters to said outputs from said first step to form an output from each of two windings; said two windings being orthogonally related to one another; a sixth step of obtaining the calibrated compass heading from said two windings outputs. SUBS T ITUTESHEET 15. The method of claim 14 wherein said first step comprises obtaining the outputs from each of the windings as a function of time by weighting and combining the outputs from each of the windings at a first time and for a predetermined number of the next previous times to said first time to obtain a time filtered output for each of the windings. 16. The method of claim 14 including a seventh step of normalizing said two windings outputs by dividing each of said two windings outputs by the square root of the sum of the squares of each of said two windings outputs. 17. The method of claim 14 including an eighth step of sensing the amplitude of the winding outputs and increasing or decreasing the amplitudes of the winding outputs to fit within a predetermined sensor scale of amplitudes. 18. The method of claim 17 wherein said eighth step comprises integrating the winding incremental outputs and increasing the number of winding incremental outputs integrated when the winding outputs fall below the sensor scale and decreasing the number of winding incremental outputs integrated when the winding outputs are above the sensor scale, to fit the outputs within a predetermined sensor scale of amplitudes. 19. The method of claim 14 wherein said geometrical figure for the distorted vector outputs is in the shape of an ellipse and the geometric figure for the undistorted vector outputs is in the shape of a circle; said generalized equation being; x 2 +y 2 = b-_+ b 2 (x 2 -y 2 ) + b 3 (-2xy) + b 4 (2x) + b 5 (2y) SUBSTITUTE SHEET said measurement parameters being m , m 1 m„, m, m m- and having the sensitivity values x2 " + 1 'y2,^ 1, x -y i' -Zxy, 2x and 2y, respectively; said calibration coefficients comprise: = [a f (l- ■ a 2 )x < (1+a 2 )y o "2a 3 x o y o ] b 3 = a 3 b 4 = [d-a 2 )x o + a 3 y Q ] b 5 = [d+a 2 )y 0 + a 3 x o ] where a = semimajor axis of ellipse b = semiminor axis of ellipse C 2 = cosine (2θ) and S 2 = sine(2θ) θ = rotation angle of ellipse x,y= coordinates of center of ellipse prior to offset x ,y = coordinates of offset center of ellipse said least squares matrix comprises; B = [ J(M M)] _1 [∑(M m o )] where the matrix [^ v M TM) ]-1 is the inverse of the matrix -( M M ) eters comprise; SUBSTITUTE SHEET D = 1 - K' B = [b 4 ( l+b 2 ) - b 5 b 3 ] /D C 2 β b 2 /κ s 2 = b 3 /κ f = 1 - h g = 1 + h κ ι = g-fc 2 K 2 = fs 2 3 = g+fc 2 a n = 2κ 2 20. The method of claim 14 wherein said first step comprises compensating for the origin offset due to the permanent magnetic distortion effect of the vehicle on the compass vector outputs, said offset being the difference between the vector origin location of the distorted vector outputs for all headings of the compass and the vector origin location of the undistorted vector outputs for all headings of the compass; said first step further comprising compensating for the difference in configuration of geometric figures defined by the distorted vector outputs and the undistorted vector outputs due to the induced magnetic distortion effects of the vehicle on the compass vector outputs for all headings of the compass. SUBSTITUTESHEET 21. Apparatus for calibrating the distortions in the readings of a magnetic compass having a plurality of windings in a two dimensional plane and mounted in a vehicle comprising: first means coupled to the compass windings for obtaining the outputs from each of the windings; second means coupled to said first means to form from said windings outputs measurement parameters having sensitivity values; said sensitivity values being variables in a generalized equation that represents the configuration and location of a geometrical figure defined by the locus of coordinates of said outputs, said outputs having distortions due to permanent and induced magnetism of the vehicle and distortions due to winding imbalance between and misorientation of the magnetic compass windings; said second means for defining calibration coefficients of said measurement parameters in said equation; third means coupled to said second and third means to incorporate said measurement parameters and said calibration coefficients into a least squares matrix and to solve for said calibration coefficients; fourth means coupled to said third means for computing calibration parameters from said calibration coefficients that are to be applied to said outputs; fifth means coupled to said first means and said fourth means for applying said calibration parameters to said outputs from said first means to form an output from each of two windings; said two windings being orthogonally related to one another; SUBSTITUTE SHEET sixth means coupled to said fifth means for obtaining the calibrated compass heading from said two windings outputs. SUBSTITUTESHEET

Inventors: HATCH RONALD R, HATCH, RONALD, R.
Applicants: MAGNAVOX CO, MAGNAVOX GOVERNMENT AND INDUSTRIAL ELECTRONICS COM
Application year: 1987
Main classification: G01C17
IPC codes: G01C17, G01C19