**Advertisement**

ABSTRACT

A method for correcting the magnetic deviation error from planes using a flux valve heading sensor is presented. This error can significantly degrade the quality of the wind data reported from certain commercial airlines. A database is constructed on a per-plane basis and compared to multiple model analyses and observations. A unique filtering method is applied using coefficients derived from this comparison. Three regional airline fleets hosting the Tropospheric Airborne Meteorological Data Reporting (TAMDAR) sensor were analyzed and binned by error statistics. The correction method is applied to the outliers with the largest deviation, and the wind observational error was reduced by22% (2.4kt; 1kt = 0.51ms*-1*), 50% (8.2kt), and 68% (20.5 kt) for each group.

(

1. Introduction

Commercial aircraft have been providing observations of wind and temperature for over 50 years (

Moninger et al. (2010) conducted a 3-yr study of the impact of TAMDAR data on the forecast skill of the Rapid Update Cycle (RUC) model. Two identical models, with the exception of the TAMDAR data, were verified against radiosonde observations (raobs). While the TAMDAR data were found to provide a significant positive impact on forecast skill, it was discovered that the wind observational error provided by a subset of planes was considerably larger than other TAMDAR- reportingplanesaswellasstandardAMDAR.Thedif- ference in wind error originated from the heading instrumentation, which provides data used in the cal- culation of wind speed and direction. Many turboprops, including the

Here, we present a method to correct the inaccuracies associated with flux valve heading systems described in Moninger et al. (2010) that can significantly improve the quality of wind measurements.

2. Background

Observations collected by a multifunction in situ at- mospheric sensor on commercial aircraft, called the TAMDAR sensor, contain measurements of humidity, pressure, temperature, winds aloft, icing, and turbulence, along with the corresponding GPS location, time, pres- sure altitude, and geometric altitude (height above mean sea level). After sampling, the observations are relayed via satellite in real time to a ground-based network op- erations center.

The TAMDAR sensor was originally deployed by AirDat in

TAMDAR sensors can be installed on most fixed-wing aircraft, from large commercial airliners to small, un- manned aerial vehicles, where they continuously transmit atmospheric observations via a global satellite network in real time as the aircraft climbs, cruises, and descends. Emphasis has been placed on equipping regional carriers, as these flights tend to (i) fly into more remote and di- verse locations and (ii) make more frequent flights that produce more daily vertical profiles while remaining in the boundary layer for longer durations.

For the purposes of this study, and the correction of the magnetic deviation heading error, we will only be addressing those planes with the flux valve heading in- strumentation, which represent a very small subset of the TAMDAR fleet (,5%). However, this correction methodology can be applied to any flux valve heading instrumentation and is not TAMDAR specific (Mulally and Anderson 2011).

a. Calculation of wind speed and direction

The wind velocity VW can be calculated from the vector difference between the ground track vector and the air track vector:

... (1)

The air track (i.e., aircraft relative) velocity vector VA is calculated from the true airspeed (TAS), which is de- termined by the differential pressure observed by a pitot tube; static pressure; static temperature; and the aircraft heading, which is observed by either a flux valve or laser- gyro navigation system. The ground track (i.e., Earth relative) velocity vector VG is calculated from the GPS- observed ground speed and track angle. Since VA and VG are typically much larger than VW ,itiscriticalthatthey are measured with a high degree of accuracy.

Each TAMDAR system uses an integrated GPS, and the associated error is nearly two orders of magnitude smaller than the observed values, so it is assumed to be negligible in the overall calculation. The magnitude of VA (i.e., TAS) can either be measured from the TAMDAR pitot and static pressure transducers and static tempera- ture or the aircraft bus data. In this study, the ERJ-145s use the TAS directly off the bus. The

b. Flux valve heading systems

The magnetic flux valve, or flux gate, heading system is an electronic magnetometer that measures the direc- tion of the horizontal component of the earth's geo- magnetic field relative to the aircraft. To provide a stable heading, especially during aircraft maneuvering, the final heading is obtained from a system where a gyroscope is slaved to the flux valve output. Prior to the wind vector calculation, the true heading is calculated from the magnetic heading by applying the magnetic declination (i.e., variation) for the particular latitude, longitude, and date.

Any long-term systematic errors or biases in the flux valve will propagate through the system and cause errors in the heading provided to TAMDAR, thereby degrad- ing the accuracy of the wind calculation. The heading error, as a function of measured heading, is called the magnetic deviation. Two common sources of error are those caused by soft iron effects and hard iron effects (i.e., subpermanent magnetism). Soft iron effects are due to material that is temporarily affected by an external magnetic field (e.g., the earth's magnetic field), whereas hard iron effects are due to permanently magnetized material. The magnetic fields from these sources will add to the earth's field, and produce distortion in the magni- tude and direction of the measured field. Since the hard iron is fixed relative to the plane (e.g., a magnetized bolt), its effect is almost entirely a function of heading, and to a lesser extent, attitude.1 The general equation for mag- netic deviation is

... (2)

where d is the magnetic deviation and z0 is the magnetic- based system heading. The coefficients A, B, C, D, and E are constants. A complete derivation of (2) is presented in the appendix. The constant A is the general error offset, while B and C are the semicircular sin(z0 ) and cos(z0 ) deviation curves and are related to the parallel and perpendicular asymmetrical components, respec- tively, of the hard iron error. Constants D and E are the quadrantal sin(2z0 ) and cos(2z0 ) induced magnetic de- viation curves and are related to the symmetrical and asymmetrical components, respectively, of the hori- zontal soft iron error.

At low levels, hard iron errors produce an approxi- mate sinusoidal curve in the heading distribution. The sinusoidal nature of the heading errors observed on TAMDAR-equipped flux valve planes suggest that hard iron effects are the dominant factor; therefore, we make the assumption that the D and E components of the soft iron error are very small and can be ignored, so that the fit can be characterized by

... (3)

The fixed offset component A is typically caused by either inaccurate flux valve mounting or calibration is- sues, whereas the sinusoidal components are typically caused by hard iron effects. The strength of the horizontal component of the earth's magnetic field is strongest near the magnetic equator and weakest near the magnetic poles. As a result, the magnetic deviation curve will vary with magnetic latitude for a constant hard iron effect, while the attitude (i.e., pitch and roll) will also contribute a very minor effect. The aircraft pitch is unknown, but all TAMDAR wind observations are flagged as unusable if the roll angle exceeds 108.

A small fraction of the TAMDAR-equipped turbo- prop fleets has detectable heading errors in the yaw that can significantly degrade the accuracy of the wind cal- culation. It is technically possible to reduce this error by carefully performing compass swings and applying a calibration; however, accurate swings are difficult to accomplish, and do not fit well with the standard main- tenance practices of most commercial airlines. Further- more, errors on the order of 48-58 may be considered acceptable to an airline, and no additional adjustments will be performed during the routine compass check. However, errors this large can have a serious negative impact on the accuracy of the wind observations. These errors are unacceptable, yet are easily corrected by the method described below.

3. Methods

The method described below is designed to charac- terize the magnetic deviation as a function of measured heading on an aircraft-specific basis. This is performed by comparing wind vector observations from thousands of TAMDAR reports to wind vectors extracted from high-resolution rapid-cycling model analysis fields. An additional cross check compares both the model analysis winds and the TAMDAR winds to neighboring AMDAR and raobs. This is not a ground system-based correction; the ground processing is only done once to determine the aircraft heading system biases. A lookup table based on this characterization is then uploaded to each TAMDAR system and is used to correct the heading in real time before the wind calculation is performed. The general protocol follows this series of steps:

d Calculate the ground track vector for each weather observation.

d Calculate the air track vector from the TAMDAR- observed wind vector.

d Calculate the air track vector from the reference model analysis wind vector.

d Take the difference between the two air track vector headings to obtain the heading error.

d Form a database of heading error versus aircraft- measured heading based on a large sample (e.g., 1 year of multiple daily flights).

d Fit a sinusoid curve to the distribution of heading errors as a function of measured heading.

d Derive the magnetic deviation correction lookup table from the inverted sinusoid.

The ground track vector VG in Fig. 1 can be calculated from the latitude and longitude change between adja- cent points via the GPS, as discussed in section 2. The air track vector VA is calculated using (1) for two different values:

... (4)

and

... (5)

where VA and V0A are the aircraft track vectors. The value for VA is based on the TAMDAR-observed wind vector, VWTAM, and V0A is based on the reference model analysis windvector, VWREF. Theground track vector VG has an angle h from north, while the heading angles for VA and V0A are c and c0 , respectively. The heading error is defined by the difference between these two angles:

... (6)

The accuracy of the calculated ground track angle (h) has no impact on the accuracy of the heading error calculation (cerr). This is because the same ground track is used for both air track calculations, so any ground track angle error will cancel. This can be seen in Fig. 1, where any change in h due to an error will affect both c and c0 equally. A ground speed error will, however, have some impact on heading error. Also, an error in h will result in the associated heading being slightly in error, but since magnetic deviation changes rather slowly with heading, a small heading error is not expected to be significant.

4. Data analysis

Each plane has a unique heading error dataset that is constructed from several months to over a year of model comparisons with multiple model analyses. The models used in this study were the National Oceanic and At- mospheric Administration (NOAA) Global Systems Division (GSD) Rapid Refresh (RAP), the RUC, and the PAC Real-Time Four-Dimensional Data Assimila- tion (RTFDDA) model. These models are ideal, as they generate analysis fields hourly. It should be noted that no forecast output is used, only the model analysis. Since the duration of the study spanned over a year that coincided with the transition from the RUC to RAP at GSD, the RAP was only employed in the second half. Since the dataset is used to map heading-against-heading error, it is independent of when each model was used as well as seasonal biases, provided the compiled data spans a lengthy time period. The North American Mesoscale Model (NAM) and Aircraft Communications Address- ing and Reporting System (ACARS) data were also used in this study, when available, to validate the other model comparisons. With the exception of the PenAir Alaskan fleet analysis, which used only RAP because of RUC and RTFDDA domain limitations, no fewer than two independent models were used in the comparison at any given time throughout the entire dataset construction.

a. Dependence on magnetic latitude

To simplify the data analysis process, the method presented here uses true heading, which is obtained from magnetic heading with a magnetic declination ap- plied. The magnetic declination is not a constant offset and does vary over a geographic region. This can result in a dataset with slightly more noise, and a final magnetic deviation curve that might be shifted along the x axis by a couple of degrees depending on the geographic region. Because the influence of the magnetic declination is small in general, and further minimized by the fact that regional airline fleets cover limited geographical areas (i.e., short flights), these effects are considered to be negligible and were ignored for this study.

The magnetic latitude variation will result in a hori- zontal shift of the curve by the amount equal to the average magnetic declination. Since the points on the resultant curve contain no information as to the decli- nation, these errors will present as noise or a slight bias if the net variation is not zero. The root-mean-square er- ror (RMSE) for a given swing in magnetic declination will be proportional to the amplitude of the error curve.

Magnetic declination as a function of geographic lo- cation for the three fleets tested is presented in Table 1. The magnetic declination varies according to the right- most column (Mag dec range). If we assume the varia- tion of the data is random noise, then this will not have a large effect when the sinusoid curve fit is done; how- ever, the average or median magnetic declination (Me- dian mag dec) will have an effect and is discussed below. The magnetic field strengths are based on the eleventh- generation International Geomagnetic Reference Field (IGRF 11) model assuming a 6-km height above mean sea level.

The PenAir (

b. Assumptions

d Model errors are not correlated with the heading of the aircraft (i.e., the model does not know which direction the airplane is flying).

d Model wind speed bias is , 1ms2 1.

d The primary cause of TAMDAR wind error is due to heading errors, not TAS errors.

d The heading error of the aircraft is a function of heading only.3

d The magnetic declination correction applied by TAMDAR (from the Garmin GPS) is accurate.4

d The calculated heading used for the table of heading and heading error is sufficiently accurate. Since the magnetic deviation changes rather slowly with head- ing (section 4e), sufficient accuracy is expected.

d The particular plane being used has not had the flux valve system recalibrated during the period of data analysis.5

d For the purpose of this study, we assume the plane stays within a certain region or band of similar magnetic latitude. In theory this could be accounted for, but with regional airlines, there is not a significant variation.

d Induced errors are dominated by hard iron effects that do not change significantly over time or the operational geographic area.6

d The strength of the horizontal component of the earth's magnetic field does not change significantly over time or the geographic area covered by most regional airline flights. The effect of a fixed hard iron error will be a function of the strength of the earth's field. This means the calibration may only apply over a lim- ited geographic region and may be dependent on magnetic latitude (see Table 2).

c. Considerations and caveats

d For dataset construction, it is probably best to restrict the data to when the airplane is in cruise (i.e., flying in a straight line). Turning, banking, ascents, descents, or any other maneuvering other than a linear flight track can add uncertainty to the vector difference. Although this would appear as random noise, and likely be averaged out over a long time period of sampling, it was not included in this analysis.

d The resolution of the latitude and longitude GPS position reports will affect the accuracy of the ground track vector calculation. This appears as a nonbiased random (quantization) error and is expected to be averaged out in the curve fit process. The resolution of the latitude and longitude is 0.1 arcmin. At a speed of 250 kt (1 kt 5 0.51 m s21), this error would be a random ground track angle error of about 0.58.

d The optimum dataset for a plane includes flights in- volving all headings (i.e., a complete 08-3598 range). This may require a few months of data collection for a particular plane depending on the airline's scheduled routes. Airlines tend to reuse the same planes for certain routes; however, they do move the planes around every few weeks. This results in clusters of data points because of the abundance of route-specific headings. This is why the analysis can last up to a full year.

d There are several numerical weather prediction models thatcanbeused,andwhenusedinparallel,the robustness can be greatly improved. In this study, we use the PAC RTFDDA, RUC, RAP, and the NAM. Additionally, it is possible to use ACARS and raob data, but the limited space-time proximity of those observations coincident with TAMDAR data result in only a few points.

d Magnetic declination (i.e., variation) can result in an error that would contribute to an offset in the curve, which is inherently corrected, to a certain extent, by this method. This requires the underlying assumption that the plane's flight routes are limited to a smaller geographical domain. For longer flights (e.g., trans- continental), this correction may not be helpful. Fortu- nately, almost all of the planes with larger geographical routes employ laser-gyro heading instrumentation and are not subject to these errors.

d. Longitudinal and transverse wind errors

To quantify the quality of the wind observations, we analyze the total RMSE of the wind vector mag- nitude, the RMSE of the longitudinal (i.e., along track) component, and the RMSE of the transverse (i.e., across track) component. Using the total RMSE of the wind vector magnitude is convenient because it includes the error contributions from both speed and direction.

The effect of TAS error versus heading error on the wind accuracy can be seen by plotting the components independently. Additional discussion of speed versus directional error of aircraft observations can be found in Huang et al. (2013). These errors are monitored by one of the multistage quality control processes called Delta Hound run by PAC. The transverse wind error compo- nent is almost entirely dominated by the contribution of heading error, while the TAS primarily affects the lon- gitudinal component.

An example of the performance difference between both types of heading systems is shown in Fig. 3. Two groups of ERJ-145 planes from the same fleet were analyzed for two months. One group has the Honeywell AH-900 Attitude and Heading Reference System (AHRS), which provides heading from a laser-gyro source, denoted by _LG in Fig. 3. The other group has the Honeywell AH-800 ARHS system, which provides heading from a magnetic flux valve, denoted by _FV in Fig. 3. For the laser-gyro system, the longitudinal (solid circle) and transverse (solid triangle) wind RMSE are both small and quite similar, which suggests that neither the TAS nor heading errors are the dominant contributor to the total RMSE (solid square).

However, for the magnetic flux valve system, it is clearly evident that the transverse component (dashed triangle) is the dominant contributor to the total RMSE (dashed square), while the longitudinal component from the flux valve (dashed circle) is no different than that of the laser-gyro system. Not surprisingly, this eliminates TAS and implicates the magnetic flux valve heading system as the source of the error seen in the total RMSE. The trend of transverse error increasing with al- titude is consistent with the fact that the vector-based heading errors are magnified as the speed of the plane increases.

e. Data analysis examples

Approximately one year of data from RTFDDA, RUC or RAP, and ACARS, when available, are used for each plane. Two examples of the raw data for two dif- ferent planes can be seen in Figs. 4a and 4b. The trends appear sinusoidal, which is expected for magnetic de- viation. Every plane studied had a similar sinusoidal ap- pearance to the data shown but with differing phase, offset, and amplitude. For reasons noted above, it was decided to use a sinusoidal fit as a function of heading (c). The sinusoid fits the data well and also has the advantage of wrapping around at 3608 with no discontinuity.

Rather than using an actual sinusoid for the final cor- rection, an eight-point lookup table is used and a piece- wise linear fit closely approximating the sinusoid is used in the TAMDAR to obtain the corrected heading, which is used in the wind calculation.

The plane in Fig. 4a flew several flight legs a day, and to a wide range of locations, so the distribution of com- parison points was extremely robust. The plane in Fig. 4b did not fly as frequently, so the number of comparisons per same time period is smaller than those in the other example. Also, this plane largely flew the same routes repeatedly, so the comparisons appear grouped along the heading axis. As an additional means of comparison, ACARS are also included in Fig. 4b. Data were filtered to eliminate points where the aircraft was maneuvering. Since the phase, offset, and amplitude are unique to each plane, the possibility of biases existing that are not related to the plane is essentially eliminated.

The eight-point piecewise linear fit approximates the si- nusoid, and the points are every 458 (i.e., 08,458,908,1358, etc.). A linear interpolation is applied between each of the eight points. The sinusoid function takes the form

... (7)

where A is the in-phase component, B is the quadrature component, and C is the offset. A typical regression fit undercuts the curve slightly, so an adjustment factor of 1.05 is included to unbias the undercutting of the straight lines between points on the curve. This adds 5% to the sample points on the sinusoid, so that the resulting error between the piecewise liner fit and the sinusoid is reduced.

The curve of this equation is sampled every 458 to get the eight values retained in the lookup table. It should be noted that this table of calibration constants can be overridden to provide values outside of the sine curve constraints (i.e., the TAMDAR software is not restricted to the sinusoidal assumption); however, this is not currently done.

5. Results

Results from detailed field experiments to validate the magnetic deviation correction are shown in Table 2. Three different fleets (i.e., regional airlines) were ana- lyzed and are categorized by group-A, B, and C. Airline A (Mesaba) is based in the

Two airplane types were included: the

Phase 1 of the test compiles the error statistics for both the control and experimental subgroups prior to the correction being applied. In Table 2, the number of ob- servations and the wind observation RMSE are shown. Phase 2 compiles the error statistics over a window of time, discussed below, after the correction has been applied to the experimental subgroup. Since phases 1 and 2 were conducted at different times, the model error may not have been the same for both periods; therefore, in phase 2, the wind RMSE was normalized to account for the model error of both RAP and RTFDDA. Both error values from phase 2 are shown in Table 2.

a. Group A results

In group A, there were 17

The control group error differed between phases 1 and 2, and was assumed to be a result of general model error. An adjustment (i.e., normalization) factor was derived from the difference in the control group phases and was applied to both phase 2 subgroups. After being nor- malized to account for model error, the phase 2 exper- imental A subgroup normalized error was 5.1, 6.3, and 8.4 kt for the longitudinal, transverse, and total wind RMSE, respectively.

The before (phase 1) and after (phase 2) wind RMSE from group A is shown in Fig. 5. As mentioned in section 4c, the transverse component dominates the error seen in the total wind RMSE. Since there is minimal contri- bution from the longitudinal component, there is es- sentially no change in error seen in Fig. 5. However, a significant reduction in error is seen in the transverse component and as a result the total error is reduced.

The total wind RMSE of the experimental subgroup A was improved by 22%. As expected, this change was almost entirely a function of the error reduction in the transverse wind component, which improved by 36%, compared to the 6% improvement in the longitudinal wind RMSE. The distributions of these results are con- sistent with the findings of TAS versus heading error impact on the observed wind vector components dis- cussed in section 3c.

b. Group B results

In group B, there were three

Phase 1 for group B spanned 9 January-

The before (phase 1) and after (phase 2) wind RMSE from group B is shown in Fig. 6. Unlike group A, group B saw a very slight improvement in the longitudinal com- ponent. In addition to this, there was a very substantial improvement in the transverse component that greatly improved the overall wind RMSE. The improvements grew with altitude. This is primarily because at higher speeds, a small heading error can result in a larger transverse component error. As seen in Fig. 6,thiswas almost entirely eliminated in phase 2.

The total wind RMSE of the experimental subgroup B was improved by 50%. The percent improvement in the transverse wind component was 60%, and the percent improvement in the longitudinal wind RMSE was 24%.

c. Group C results

In group C, there were seven ERJ-145 control planes and three experimental planes from the

The transverse component error for this group is ex- tremely large compared to the Saabs in the other groups. This is because the ERJs fly at speeds almost twice as fast as the Saabs. TAMDAR uses a time-based sample window to calculate the wind vector, which is the same for all planes. The ERJ travels nearly twice as far in the same amount of time as the

Phase 2 of group C spanned 11 March 2010-11 May 2010. The experimental C subgroup normalized error for phase 2 was 5.3, 8.2, and 9.5 kt for the longitudinal, transverse, and total wind RMSE, respectively.

The before (phase 1) and after (phase 2) wind RMSE from group C is shown in Fig. 7. As with group A, the longitudinal component of group C was essentially un- changed. Group C saw the most substantial improvement from the phase 2 correction in the transverse component and the resulting total wind RMSE. The group C im- provements grew with altitude. As mentioned in sec- tion 5b, the small heading error in group C was creating a significant transverse component error at high speeds, which appears, coincidentally, as a function of altitude. This error was most significant in group C, likely because this group was composed of ERJ-145s, which fly at higher speeds. Because of this, applying the phase 2 correction to the planes had a tremendous positive impact on overall wind error reduction.

The total wind RMSE of the experimental subgroup C was improved by 68%. The percent improvement in the transverse wind component was 74%, and the percent improvement in the longitudinal wind RMSE was 17%. As expected, this improvement was dominated by the error reduction in the transverse wind component.

6. Conclusions

Historically, it has been assumed that heading infor- mation supplied by flux valve magnetic sensor devices to an aircraft's compass system would not be able to provide wind data accurate enough to add value in nu- merical weather prediction. With the TAMDAR-based technique employed here, the majority of the aircraft's unique magnetic deviations can be filtered out, and the limitations of the heading system overcome.

When employing this correction methodology, the total wind RMSE was reduced by 22%, 50%, and 68% for subgroups A, B, and C, respectively. While the lon- gitudinal components of the error were improved in all cases, these were small compared to the substantial im- provements seen in the transverse wind components, which were clearly the source of most of the original error.

Additional long-term analysis will be conducted to refine this technique; however, when comparing the corrected (after) data in Figs. 5-7 to the laser-gyro (LG) data of Fig. 3, preliminary analysis suggests that flux valve-based heading systems are capable of providing wind data approaching the quality of ring LG-based inertial navigation systems on similar sized aircraft.

Acknowledgments. The authors thank

1Attitudeis anaviation termused to describeaircraft orientation about the center of mass, including pitch and roll.

2 This may be a future TAMDAR analysis software improve- ment.

3 This is likely the case, as heading errors are typically caused by fixed, local magnetic effects in the aircraft.

4 Since we see significant variations in wind quality from the Mesaba fleet and they all use the same GPS, the magnetic decli- nation is assumed not to be a significant contributor to the error. Likewise, the same GPS unit is used in the laser-gyro systems on other planes, which have much more accurate winds.

5 This is beyond our control but from discussions with Mesaba and

6 The sinusoidal nature of the magnetic deviation suggests this is the case.

REFERENCES

Airy, G. B., 1839: Account of Experiments on Iron-Built Ships: Instituted for the Purpose of Discovering a Correction for the Deviation of the Compass Produced by the Iron of the Ships. R. and

Daniels, T. S.,

Evans, F. J., and A. Smith, 1865: On the magnetic character of the armour-plated ships of the

Gao, F., X. Zhang,

Huang, X.-Y., F. Gao,

Moninger, W. R.,

-,

Muir, W. C. P., 1906: A Treatise on Navigation and Nautical As- tronomy: Including the Theory of Compass Deviations.

Mulally, D. J., and

Poisson, S.-D., 1838: MÉmoire sur les dÉviations de la boussole, produites par le fer des vaisseaux. C. R. SÉances Acad. Sci., 6, 755-766.

Sabine, E., 1843: Contributions to terrestrial magnetism. No. V. Philos. Trans. Roy. Soc.

Smith, A., and

DANIEL J. MULALLY AND ALAN K. ANDERSON

(Manuscript received

Corresponding author address:

E-mail: neil.jacobs@panasonic.aero

APPENDIX

Approximation for Magnetic Deviation

The existence of magnetic declination in compass heading has been known by mariners since the early 1400s. The effects of magnetic deviation induced by iron within the ship were first documented by

The mathematical correction is not specific to ships and can easily be applied to any platform that relies on magnetic-based heading instrumentation, including aircraftwith magnetic flux gate navigation systems. We begin with the set of equations proposed by Poisson:

... (A1)

... (A2)

... (A3)

where X, Y, and Z are the components of the earth's magnetic force relative to the ship (i.e., forward, starboard, and downward, respectively); and X0,

The magnetic deviation d is defined as the difference between the angle from magnetic north z, and the heading according to the instrumentation z0, so that d 5 z 2 z0. The horizontal force of Earth's magnetic field is given by H2 5X2 1Y2, and the horizontal force of the combined magnetic fields of Earth and the platform is given by H02 5X02 1Y02. These relations are used to form the following set of equations:

... (A4)

where u is the magnetic inclination (i.e., dip angle).

For the purposes of our horizontal magnetic deviation correction, the force along the Z axis defined in (A3) is ignored. Substituting (A4) into (A1) and (A2) yields

... (A5)

... (A6)

After multiplying (A5) by sinz and (A6) by cosz, and adding them together, we obtain the following equation with some reductions:

... (A7)

As done in (A7), we now multiply (A5) by cosz and (A6) by sinz, and subtract them before applying similar simplifications to obtain

... (A8)

We define the mean horizontal force in the direction of magnetic north as lH, so that

... (A9)

and the following set of constants can be used to further simplify (A7) and (A8):

... (A10)

The constants A, B, C, D, and E are considered to be exact values. They are traditionally written in Fraktur Blackletter font in historical manuscripts. After substituting (A10) into (A7) and (A8), we obtain

... (A11)

... (A12)

Here, (A11) is then divided by (A12), which yields the exact calculation for the horizontal magnetic deviation d:

... (A13)

While (A13) is the exact equation to calculate the magnetic deviation, it is not practical to apply in an op- erational setting because the angle from true magnetic north, z, is not realistically attainable with the in- strumentation. If it were, then there would be no de- viation. To be a functional solution, we need to have (A13) in terms of the instrument heading, z0 . We begin by multiplying (A11) by 21, adding it to (A12),andap- plying Euler's formula:

... (A14)

After taking the natural logarithm of both sides, we obtain the Taylor series form:

... (A15)

The constants A, B, C, D, and E are less than 1, and in practical applications B is typically less than 0.4, while the others are less than half that value. As a result, the higher-order terms, which contain only squares and products of these constants, are much smaller and can be neglected. We then substitute (A12) for H0 /Hl,andapply the same Taylor series expansion for ln(1 1 x):

... (A16)

At this stage, we make the assumption that we are dealing with small deviation angles. Smith and Evans (1869) suggest deviation angles less than 208 are acceptable. Since the typical magnetic deviation error in a flux gate heading system on aircraft almost never exceeds 108,andis more often less than half that error, this is a very reasonable assumption. When dealing with a small angle of deviation, we can assume cosd 5 1. By making this assumption, we alter the original exact constants. We can express (A16) with inexact constants in (A17), which are not in bold. From this point on, the equation is an approximation:

... (A17)

To obtain (A17) in terms of z0 , we substitute z 5 d 1 z0, which eliminates z but leaves terms containing d:

... (A18)

Applying the small angle assumption from above (i.e., cosd 5 1) simplifies (A18) to a more common expression of an Nth harmonic function, which is typically trun- cated to the form below when employed for the calcu- lation of magnetic deviation:

... (A19)