Code Monkey home page Code Monkey logo

Comments (5)

Lelelo1 avatar Lelelo1 commented on June 18, 2024

I have found this sketch:
sketch

from https://diydrones.com/profiles/blogs/advanced-hard-and-soft-iron-magnetometer-calibration-for-dummies

So I assume the difference of the reading vector and the combined bias vector should be multiplied by either the A_1 matrix or the A matrix

Matrix<double> A_1 = SQ * hm / hmb;

Console.WriteLine("A-1 matrix:");
Console.WriteLine(A_1.ToString());

// Calculate A to permit comparison with MagCal 
Matrix<double> A = A_1.Inverse();

Console.WriteLine("A matrix:");
Console.WriteLine(A.ToString());

from magcal.

hightower70 avatar hightower70 commented on June 18, 2024

Hi,

the equation on the picture is correct. The transformation matrix is the A_1 matrix.

from magcal.

Lelelo1 avatar Lelelo1 commented on June 18, 2024
// Calculate combined bias
B[0] = -B[0];     // x-axis combined bias
B[1] = -B[1];     // y-axis combined bias
B[2] = -B[2];     // z-axis combined bias

As the bias vector is produced by 10 rows of data. Can it be used with any of the data rows in the set (with A_1 matrix) to produce a calibrated vector?

In my case I have access to live sensor data. Do you think it would work to take the 10 most recent sensor updates and expect a good result? Can I use one row of data?

I have read more about magnetometer calibration, and some more source code examples. As I understand it a few values (which should be as accurate as possible) is taked to construct the sphere.
So MagCal is about constructing the A_1 matrix based off sphere/ellipsoid calculation. So it is not about implementing calibration on live data fully - it has to be done all well. (My use case being mobile app development)

from magcal.

Lelelo1 avatar Lelelo1 commented on June 18, 2024

Can I generate a sphere with earth's magnetic field vector of world magnetic model? See: https://www.ngdc.noaa.gov/geomag/WMM/calculators.shtml - you can use Single Point Calculator and give latitude longitude of gps. It should give the ideal sphere based off the actual earth's magnetic field.

from magcal.

Lelelo1 avatar Lelelo1 commented on June 18, 2024

I managed to set it up correctly. With list storing recent values, calibrating the newest value. It had almost the same calibration accuracy as the default ios calibration.

from magcal.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.