indriApollo / elipsoid_fit_python

Find ellipsoid fit for arbitrary data with python/numpy, plot it or write to file.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

elipsoid_fit_python

Find ellipsoid fit for arbitrary data with python/numpy, plot it or write to file.

Used for 3-axis magnetometer calibration.

Project is a port of matlab/octave http://www.mathworks.com/matlabcentral/fileexchange/24693-ellipsoid-fit to python/numpy with some data regularization and fancy plotting on matplotlib added. It utilizes minimum squares method. Some code for plotting taken from https://github.com/minillinim/ellipsoid

Example input file is mag_out.txt and consists of rows with 3 numbers representing point coordinates.

Use plot_ellipsoid.py to see input data, fitted ellipsoid and data transferred onto sphere surface.

Use get_calibration_ellipsoid.py to generate mag_cal_ellipsoid.txt where first row has coordinates of fitted ellipsoid center, and other three rows are ellipsoid axes.

Requirements are:

  • numpy
  • matplotlib for plotting

About

Find ellipsoid fit for arbitrary data with python/numpy, plot it or write to file.

License:MIT License


Languages

Language:Python 100.0%