Object depth tracking with magnetometer

8 visualizaciones (últimos 30 días)
Bozza
Bozza el 8 de En. de 2024
Respondida: Image Analyst el 8 de En. de 2024
Hello,
I have a 3-axis magnetometer and a small plastic box of known size. The magnetometer is fixed to the bottom of the box, and I am trying to track the depth of the object within the box, which I have been able to successfully do by recording the magnetometer values for the Z-axis at known positions, finding a calibration curve, fitting an equation, and then solving the equation in real-time for depth.
However, the issue I have is that the magnetometer values for the Z-axis (depth) change if the object moves horizontally (in the x or y plane). Therefore, unless the object is directly in the position in which I made the calibration curve, the depth readings become inaccurate. So my question is, would anyone have an idea of how to ensure the depth readings can be consistently accurate even when the object moves horizontally?
Thanks.

Respuestas (1)

Image Analyst
Image Analyst el 8 de En. de 2024
Since you don't know how the Z values change, you'll have to model that. So I'd map out a 3 by 3 (or more) grid that covers the possible locations laterally of the object and make up 9 calibration curves. Then knowing the (x,y) you can use scatteredInterpolant to get an estimate of the curve for that particular location. I'm including a demo of scatteredInterpolant.

Categorías

Más información sobre Get Started with Curve Fitting Toolbox en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by