Template:PTX COMPASSCAL: Difference between revisions

From Phidgets Support
(Created page with "<div class="phd-slide-deck" data-deck="PTX_COMPASSCAL"> <div class="phd-slide-deck-header"><h3>Magnetometer Calibration</h3></div> <div class="phd-slides"> <div class="phd-sli...")
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 10: Line 10:
</div>
</div>
<div class="phd-panel phd-flex-column-align-left phd-flex-column-justify-top">
<div class="phd-panel phd-flex-column-align-left phd-flex-column-justify-top">
<p>In order to get accurate results from your spatial's compass you will need to provide calibration parameters.</p>
<p>In order for your magnetometer to provide accurate heading information, it must be calibrated.</p>
<p>Follow this guide to complete the calibration process.</p>
<p>Follow this guide to complete the calibration process.</p>
</div>
</div>
Line 17: Line 17:


<div class="phd-slide">
<div class="phd-slide">
<p>1. Open the Phidget Control Panel and right click on your Spatial Phidget. Select <b>Calibrate Magnetometer</b>.</p>
<p>1. Open the Magnetometer example for your device, and click the <b>Calibrate button</b>. This will open the Compass Calibration tool.</p>


<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PTX_COMPASSCAL/cal1.jpg"></div>
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PTX_COMPASSCAL/-x390/50/ccal1.png"></div>
</div>
</div>


<div class="phd-slide">
<div class="phd-slide">
<p>2. Go to the webpage listed in the window that opens (or click this link):</p>
<p>2. If your device supports heating, we recommend checking the <b>HeatingEnabled</b> checkbox. Wait for the temperature reading to turn green:</p>


<p><span>[http://www.ngdc.noaa.gov/geomag-web/#igrfwmm http://www.ngdc.noaa.gov/geomag-web/#igrfwmm]</span></p>
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PTX_COMPASSCAL/ccal2.png"></div>


<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PTX_COMPASSCAL/cal2-1.jpg"></div>
<p>If your Spatial does not support heating (neither of the above controls will be available), you can skip this step.</p>
</div>
</div>


<div class="phd-slide">
<div class="phd-slide">
<p>3. Enter your full address including postal code and click <b>Get & Add Lat / Lon</b>.</p>
<p>3. Next, decide if you're using 2-axis or 3-axis calibration:</p>


<p>This will cause numbers to appear in the left section. Click <b>Calculate</b>.</p>
<p>● If the spatial is free to move in all directions, use 3-axis</p>


<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PTX_COMPASSCAL/cal3.jpg"></div>
<p>● If the spatial is being kept mostly level (e.g. in a car), use 2-axis</p>
 
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PTX_COMPASSCAL/ccal3.png"></div>
</div>
</div>


<div class="phd-slide">
<div class="phd-slide">
<p>
<p>
4. Grab the <b>Total Field</b> value from the window that pops up and convert it from nT to G by dividing by 10000. Put the new gauss value into the
4. You can leave the <b>Local Field Strength</b> at 1.0 for general use since magnitude doesn't affect heading. If you need more quantitative results, look up
<b>Local Field Strength</b> field in the Magnetometer Calibrator.
your local value.
</p>
</p>


<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PTX_COMPASSCAL/cal4.jpg"></div>
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PTX_COMPASSCAL/-x390/50/ccal4.png"></div>
</div>
</div>


Line 50: Line 52:
<p>5. Make sure your Phidget Spatial is firmly in the position you intend to calibrate it for, and begin by clicking the <b>Start</b> button.</p>
<p>5. Make sure your Phidget Spatial is firmly in the position you intend to calibrate it for, and begin by clicking the <b>Start</b> button.</p>


<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PTX_COMPASSCAL/cal5.jpg"></div>
<p>Begin rotating the structure your Phidget is mounted to. Notice the red dots appearing on the graph.</p>
 
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PTX_COMPASSCAL/-x350/50/ccal5.png"></div>
</div>
</div>


<div class="phd-slide">
<div class="phd-slide">
<p>6. Try to rotate it so that it fills out as much of the sphere (or circle in 2-axis mode) as possible. When you're finished, click <b>Stop</b>.</p>
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PTX_COMPASSCAL/-x200/50/ccal7.png"></div>
<p>
<p>
6. Rotate the Phidget around so that the graph on screen begins to draw a complete sphere. This will take a few minutes. Don't worry if the result doesn't look
You should now see red and green spheres (or circles) in the graph. The red one is the raw measurements, and the green one is the calibrated measurements.
like a perfect sphere, just try to rotate the Phidget in a way that fills in as much of the empty regions as possible. If the Phidget is mounted in a vehicle,
drive it around and the calibrator will fill out a flat circle instead of a sphere.
</p>
</p>


<p>When you're finished, click <b>Stop</b>.</p>
<p>
Newly calibrated data from the magnetometer will be indicated by a green line that matches the sphere. The green sphere should be more centered than the red
one. If not, try repeating the calibration.
</p>


<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PTX_COMPASSCAL/cal6.jpg"></div>
<p>
You're now done the calibration process! On most Phidget Spatials, the calibration will be stored in flash, so it stays calibrated to this environment even
across power cycles.
</p>
</div>
</div>


<div class="phd-slide">
<div class="phd-slide">
<p>
<p>7. If you need to repeat this exact calibration, you can save the values listed in the text box.</p>
7. The calibration is now complete. Calibration values have been saved to the on-board flash memory, so it'll remember this calibration even if the device is
 
unplugged.
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PTX_COMPASSCAL/-x360/50/ccal8.png"></div>
</p>


<p>
<p>
You can find the calibration parameters in the text box in case you want to quickly recalibrate this Phidget or calibrate a replacement that will sit in the
You can use these values in the <b>setMagnetometerCorrectionParameters</b> method. See our
same installation. You can use these values in the <b>setMagnetometerCorrectionParameters</b> method. See our
<span>[https://www.phidgets.com/?view=api API Documentation]</span> for more details.
<span>[https://www.phidgets.com/?view=api API Documentation]</span> for more details.
</p>
</p>
<div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PTX_COMPASSCAL/cal7.jpg"></div>
</div>
</div>
</div>
</div>

Latest revision as of 22:47, 13 January 2022

Magnetometer Calibration

Magnetometer Calibration Guide

In order for your magnetometer to provide accurate heading information, it must be calibrated.

Follow this guide to complete the calibration process.

1. Open the Magnetometer example for your device, and click the Calibrate button. This will open the Compass Calibration tool.

2. If your device supports heating, we recommend checking the HeatingEnabled checkbox. Wait for the temperature reading to turn green:

If your Spatial does not support heating (neither of the above controls will be available), you can skip this step.

3. Next, decide if you're using 2-axis or 3-axis calibration:

● If the spatial is free to move in all directions, use 3-axis

● If the spatial is being kept mostly level (e.g. in a car), use 2-axis

4. You can leave the Local Field Strength at 1.0 for general use since magnitude doesn't affect heading. If you need more quantitative results, look up your local value.

5. Make sure your Phidget Spatial is firmly in the position you intend to calibrate it for, and begin by clicking the Start button.

Begin rotating the structure your Phidget is mounted to. Notice the red dots appearing on the graph.

6. Try to rotate it so that it fills out as much of the sphere (or circle in 2-axis mode) as possible. When you're finished, click Stop.

You should now see red and green spheres (or circles) in the graph. The red one is the raw measurements, and the green one is the calibrated measurements.

Newly calibrated data from the magnetometer will be indicated by a green line that matches the sphere. The green sphere should be more centered than the red one. If not, try repeating the calibration.

You're now done the calibration process! On most Phidget Spatials, the calibration will be stored in flash, so it stays calibrated to this environment even across power cycles.

7. If you need to repeat this exact calibration, you can save the values listed in the text box.

You can use these values in the setMagnetometerCorrectionParameters method. See our API Documentation for more details.

«
»