Improved Magnetometer Calibration Tool

All,

I have developed a Windows GUI for 3-axis magnetometer calibration (see screenshot below), and it is available for download at https://github.com/paynterf/MagCalTool.  The tool accepts comma, tab, or space-delimited magnetometer data via a selected comm port, displays the received data in a 3D window, and computes a compensation matrix and center offset using Octave to execute a MATLAB routine.  See this post for details.

I created this program because I couldn't find anything better to help me calibrate the magnetometer on my own 4WD wall-following robot, and as a learning experience for programming in C#/.NET and WPF.  I used the very nice WPF Helix Toolkit to implement the 3D viewports.  I'm sure other more experienced programmers can do a better job, but this one works, at least enough for me ;-).

3691306377?profile=original

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Verson 2.1.3 is now current.  The only changes were to add a 'model-referenced' coordinate system at (0,0,0) and move the original fixed 'viewport-refrenced' coordinate system to the bottom left corner of the viewport.  This allows the coordinate system symbol to move with the geometry when it is panned around the screen.

    I have prepared a short movie showing the use of the mag cal tool in calibrating magnetometer data from my wall-following robot 'Wall-E2', as part of a post on 'Paynters Palace' at http://fpaynter.com/2016/07/giving-wall-e2-sense-direction-part-vii/

    As before, 

    The latest source code and zip file containing everything needed to run the code on your PC can be found at https://github.com/paynterf/MagCalTool

    Frank

  • All,

    I have just finished a significant update to the Mag Cal Tool.  The only functional change is that the 'Show Ref Circles' checkbox now works properly - 3D reference circles are optionally displayed in both windows. The reference circles in the 'raw' view have a radius equal to the calculated average radius for all displayed points.  The ones in the 'calibrated' view have a radius of exactly 1.

    Getting these reference circles to work involved a LOT of hard work to understand the basics of model generation and modification in WPF and the Helix Toolkit, and the result was a much simpler (and I hope more elegant) project architecture. For those interested in WPF and the Helix Toolkit, I plan to post my experiences with this project on my blog at http://fpaynter.com/.

    The latest source code and zip file containing everything needed to run the code on your PC can be found at https://github.com/paynterf/MagCalTool

    Frank

  • Thanks for share Frank, I will test that 2morrow at the lab =)

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…