Coder Social home page Coder Social logo

Comments (5)

aleksandrbazhin avatar aleksandrbazhin commented on June 5, 2024 1

As far as I recall, it is not related to finding the ellipsoid, it is using the ellipsoid found to calibrate the magnetometer. The perfectly calibrated one would be returning such "spherical" data, i.e. when you rotate it by x degrees, the magnetic field data should indicate that. TR is the transformation you would apply to raw data to get the calibrated one.
I think the previous issue / question was about that.

from ellipsoid_fit_python.

aleksandrbazhin avatar aleksandrbazhin commented on June 5, 2024 1

I think it is just scaling along the principal axes of the ellipsoid we find.

from ellipsoid_fit_python.

nagygabor93 avatar nagygabor93 commented on June 5, 2024

Thanks for the answer!

Yes I understand that this is for magnetometer raw data transformation ( I want to use it for that as well! :) ) I just dont understand what are these calculations:


a, b, c = radii
r = (a * b * c) ** (1. / 3.)
D = np.array([[r/a, 0., 0.], [0., r/b, 0.], [0., 0., r/c]])
#http://www.cs.brandeis.edu/~cs155/Lecture_07_6.pdf
#affine transformation from ellipsoid to sphere (translation excluded)
TR = evecs.dot(D).dot(evecs.T)

The ellipsoid_fit function already returns the evecs, that is a transformation matrix in itself isn't it?

from ellipsoid_fit_python.

nagygabor93 avatar nagygabor93 commented on June 5, 2024

One more question here. In the original matlab code, it was possible to call the function with the 'xyz' parameter. That way (at least from the code comments) it seems that the algorithm will produce a sphere fitting.

Can you remember why you choose to implement the arbitrary one?

from ellipsoid_fit_python.

aleksandrbazhin avatar aleksandrbazhin commented on June 5, 2024

As far as I remember, the author created several options for symmetrical ellipsoids, but the most relevant to magnetometer calibration was the arbitrary one. What is the reason in fitting a sphere to the points if you want to find a transformation from the ellipsoid to sphere? If your data fits to sphere, the most arbitrary method will still work, just the axes in the result would be of equal length.
I understand it can be useful sometimes, as well as other options in the original, it just was not useful for me. In the end you can easily substitute the equation yourself. The code in this repo is not perfect, neither it is universal, I just shared what I had.

from ellipsoid_fit_python.

Related Issues (14)

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.