Coder Social home page Coder Social logo

Comments (6)

TheNitek avatar TheNitek commented on May 22, 2024

The claibration is explained quite well here: https://appelsiini.net/2018/calibrate-magnetometer/

from qmc5883lcompass.

gone-bush avatar gone-bush commented on May 22, 2024

Thank you for your reply. I have read the article but it doesn't answer my question. Let me illustrate:

Let max(x) = min(x) + 10, ditto for the other axes. This then gives:

offset_x = (min(x) + 10 + min(x)) / 2 = min(x) + 5

If we let sensor_x = min(x) + 2 we therefore get

corrected_x = min(x) + 2 - (min(x) + 5)) = -3.

Continuing,

avg_delta_x = (min(x) + 10 - min(x)) / 2 = 5

and, according the above assumption that the other axes are the same, we get

avg_delta = avg_delta_x

and

scale_x = 1

hence

corrected_x = (min(x) + 2 - (min(x) + 5)) * 1 = -3

What am I missing?
Kevin

from qmc5883lcompass.

TheNitek avatar TheNitek commented on May 22, 2024

You did a lot of math now, but you did not describe your problem/what confuses you. Why don‘t you like the values the calibration gives you? If sensor only provides you data in a range out of 10 values, then yes the nirmalized data will be between -5 and 5

from qmc5883lcompass.

gone-bush avatar gone-bush commented on May 22, 2024

My problem is that corrected_x is a constant, -3 in my example.

If min(x) = 100, the corrected_x = -3. If min(x) = 200, then corrected_x = -3.

from qmc5883lcompass.

TheNitek avatar TheNitek commented on May 22, 2024

That‘s why you normalize data. It‘s moving the the same relative values to a specific absolute value. Maybe take a closer look at the plots in original artical and look how the point clouds get moved around

from qmc5883lcompass.

gone-bush avatar gone-bush commented on May 22, 2024

OK, I'm beginning to understand. I'll take a closer look at those graphs. I was expecting the corrected number to be approximately equal to the raw number. WRONG! :(

from qmc5883lcompass.

Related Issues (11)

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.