
Row, row, row your boat gently up / down the stream???
Purpose (RECALL): This blog post is created to help readers a) better understand electronic compass [smartphone or rangefinder] residual azimuth deviation errors b) quantify the errors, c) model the errors, d) compensate [correct] the errors, and e) influence the app vendors to apply the correction method within the affected smartphone app. Basically, we need to know (accurately) whether to go up / down the stream (path) we are traveling on.
Goal: The goal of this blog post is to demonstrate the impact of very different environmental settings [influences] on a) the accuracy of smartphone compass sensors [and apps] and b) the ability of the TruPath Compass app to compensate residual (after calibration) azimuth deviation errors experienced in those different operating environments.
Justification: Over the past several years, hundreds and thousands of smartphone users have complained (internet users’ forums) about their inability to use the compass apps – and rightly so. “Experts” have offered many “fixes” to resolve the issue; yet smartphone compass apps (all) have remained notoriously inaccurate.
Hypothesis: After recognizing a problem (error), if the error can be predicted, the error can be corrected (compensated).
Problem Statement: How can electronic compass azimuth errors be predicted (quantified / modeled) and then be compensated (corrected) in real world situations?
Solution Characteristics: In order for electronic compass azimuth errors to be compensated (corrected), the following statements should be true.
- The error must be quantified – throughout the entire 360 degree range of measurement – in a manner that adds minimum cost to the user in terms of a) out-of-pocket expense, b) time and effort, and c) investment in education and/or training. This means that descriptive data must be collected to quantify the error.
- Manufacturer’s recommended compass calibration procedures must be factored in (and applied) to account for the “hard iron” and “soft iron” effects attributed by the materials and component(s) arrangements within the electronic compass itself. The electronic compass azimuth error to be compensated is the residual (after calibration) error resulting from environmental magnetic/electromagnetic influences – external to the electronic compass itself.
- The data collected about the compass azimuth deviation error must be “modeled” in such a way that the predicted error can be “added back” (subtracted) from the original erroneous azimuth readings to compensate (correct) the error(s) – in a repeatable and reliable manner over the entire 360 degree range of measurement – within the local environment, over a wide geographic area.
Solution Defined: The TruPath Compass smartphone app exhibits all the positive solution characteristics stated above. TruPath Compass actually fixes the problem stated above.
Background:
This post takes a look at how the many different external magnetic and electromagnetic influences that exist inside a car affect the output (azimuth readings) of higher-quality commercial smartphone sensor units and compass apps.
The data collection procedures used for this demonstration are those automated augmented reality (AR) procedures available via the TruPath Compass app hosted on an Android (Samsung S23 MAX) smartphone. Refer to the original post/page at http://www.tru-path.org for more examples for collecting residual (after calibration) azimuth deviation error data.
- A “reference” azimuth was established using the TruPath Compass app to determine the sun position (solar azimuth derived using a “vertical” shadow) relative to the observer’s (geographic) location on the date/time the demonstrations were performed – a correct, defendable, and independent reference direction. The “vertical” shadow was cast by a light pole in a large parking lot.
- The Android/TruPath Compass app was set to indicate azimuths relative to True North.
- The smartphone (sensors) compass was re-calibrated prior to initiating data collection.
Some controlling, fundamental facts that need to be kept in mind include:
- Residual (after calibration) compass azimuth deviation error exists; and the error magnitude varies throughout the entire 360 degree range of measurement.
- Compensation of residual (after calibration) azimuth deviation error is device (and installation) specific.
- The placement of the car’s engine and ancillary electrical/electronic equipment influences the operation of the smartphone compass.
- The car’s engine needs to be running to demonstrate the full electromagnetic effect (influence) on the smartphone compass.
- The car must be moved to align with the TruPath Compass augmented virtual compass rose (grid) as the azimuth deviation data is being collected.
Notes: Faster, Better, Cheaper Azimuth Deviation (error) Data Collection
Typically, for collecting azimuth deviation data,
- Effort: The time required to collect azimuth deviation data (using the TruPath Compass app) is less than 4 minutes – for each orientation (portrait, landscape, or horizontal) of the smartphone in most cases – excluding the collection of azimuth deviation data inside the confines of an automobile.
- Circumstances:
- On sunny days, take advantage of the shadow of a vertical object (wooden stake, light poles, edge of building, standing person, etc.) to establish a base (reference) azimuth – using TruPath Compass’ determination of the sun’s azimuth to obtain unquestionable accuracy.
- On cloudy days, establish a base (reference) azimuth with a “distant feature” using TruPath Compass’ background map. The geographical location of the distant feature can be edited (using either land survey, map, or GPS coordinates) to improve accuracy.
- Flexibility/ Accuracy/Repeatability:
- Use TruPath Compass’ augmented reality targets (virtual compass rose) to collect azimuth deviation (error) data – requires user sighting of the target – usually in a faster handheld mode of operation.
- Use a camera tripod (with azimuth ring) to collect azimuth deviation (error) data – mechanically traversing clockwise from the base (reference) azimuth in equal 45 degree increments – more steady and more accurate.
- Operation Modes: (general use or when collecting azimuth deviation data)
- Handheld
- Tripod Mounted
Recall the Objectives
Considering a real-world operating situation (that is, measure the direction [azimuth] of a car), this blog post will demonstrate the use of a calibrated smartphone electronic compass (along with the TruPath Compass app) to:
- Collect residual [after calibration] azimuth deviation [error] data faster, better [easier], cheaper and
- Analyze the collected deviation data to produce a deviation compensation curve[s] – for the purpose of effectively compensating residual azimuth deviation error[s] exhibited by the electronic compass.
The Demonstration (test) Environment
Test Site A: Urban – Inside The Car
The test site (the car) was located in a generally benign urban setting – a large empty parking lot of a local community college.

View – East
The observer occupied the driver’s seat of an automobile (with the engine running, the air conditioning unit running, and other electrical equipment running).

View – East (zoomed from previous image)
The shadow of a vertical light pole was used to establish the reference azimuth of the sun – and thus, the azimuth (direction) to True North – by the TruPath Compass app.

Deviation Analysis – Data Collection Screen
To facilitate the deviation data collection effort, TruPath Compass a) makes use of “augmented reality” technology to b) create a “virtual compass rose”. Note the red line (target grid) crossing the data table.
The author maneuvered the car back and forth (around the center of the compass rose) to align the car with each azimuth marker (target) of the virtual compass rose. Once the car was aligned with one of the eight (8) virtual targets, an azimuth reading was captured. Repeating the process, the author collected all eight (8) required data points.
The author (accessing the “Save” button) a] saved the collected deviation data and b] simultaneously activated the TruPath Compass deviation analysis to “model” the eight collected data points into the form of a continuous deviation curve – the basis for subsequent deviation error compensation calculations.
Test & Analysis Results
Test A: The following four (4) charts depict the test results involving the operation of a smartphone compass app inside an automobile (combustion engine) with the engine running.
In the first chart (below), the observed residual azimuth deviation error varied throughout the entire 360 degree range of measurement: – 16.7 < azimuth error < +14.2 degrees. Also, the remaining compensated error varied as follows: – 2.8 < remaining compensated azimuth error < +3.8 degrees – a significant improvement in compass performance.



The negative (inverse) of the compensation curve is the “predictor” of the compass azimuth deviation error. In the following chart, the predicted azimuth deviation error curve agrees well with the actual measured deviation error points collected.

Note: Due to the level of difficulty experienced collecting the original azimuth deviation error data inside the vehicle (confined area), a couple of the measured points exhibit some user error.
Test B: In the following chart, the observed residual azimuth deviation error (outside the car) varied throughout the entire 360 degree range of measurement: – 6.5 < azimuth error < +4.4 degrees. Also, the remaining compensated error varied as follows: – 0.4 < remaining compensated azimuth error < +0.3 degrees – a significant improvement in compass performance.

User Value Proposition (Conclusions)
Conclusion: As observed in each of the two (2) test cases described above, the necessary and sufficient combination of a) the manufacturer’s recommended calibration procedure and b) TruPath Compass’ compensation techniques produced superior azimuth error compensation results – the author’s own intent – improved smartphone compass accuracy.
Conclusion: The TruPath Compass’ virtual compass rose (grid & targets) were successfully used to collect the residual azimuth deviation error data inside a car.
Conclusion: Smartphone compass users [customers] can a) use the TruPath Compass smartphone app to collect residual azimuth deviation [error] data from any electronic compass employed in a wide variety of real-world operating conditions – in a faster, better (easier), and cheaper way – and b) receive the TruPath Compass azimuth error compensation coefficients [correction parameters] immediately – to be shared with the compass app’s vendor [or the user’s own software] to compensate the azimuth errors being encountered locally.

Leave a comment