Skip to main content

CoMPAS Lab Magnetometer and Gyroscope Calibration (MAGYC)

Project description

MAGYC: Magnetometer and Gyroscope Calibration

The goal of this library is to provide a set of tools for the calibration of Attitude and Heading Reference System (AHRS) magnetometers and gyroscopes. The proses of calibration consist of determine the scale and non-orthogonality vectors for the magnetometer, soft-iron (SI), and the biases for the gyroscope and the magnetometer, hard-iron (HI).

To solve the calibration problem, this library provides a set of least squares and factor graph method that need the magnetometer and gyroscope measurements, and the timestamp for each one of this samples. As both measurement are from the same device, the timestamp will be the same for both. This library was developed in the context of a research publication in the IEEE Journal of Oceanic Engineering. In this library the user can find the methods developed for this research under the MAGYC: Magnetometer and Gyroscope Calibration novel approach, and as well the benchmark methods implemented.

Dependencies

Poetry will be used for dependencies handling. For further details on the required dependencies, please refer to the pyproject.toml file.

Build

To isolate this library's use in the local environment, this project is built with Poetry. If you do not have poetry installed on your machine, you can follow the steps in this tutorial. Once you have poetry installed, you can follow the next steps.

If you want to use the library as a pip module, you can build the project with the following command:

poetry build

This will create a dist directory with the built magical package. Then, you can install the built package with the following command:

pip3 install dist/magyclib-<VERSION>-py3-none-any.whl

Development

If you want to install the library for development purposes, you can install the required packages in the virtual environment with the following command inside the repository:

poetry install

If you are installing the library through an SSH server, there might be a problem related to the python keyring. To avoid this problem, run keyring --disable before the last command in your terminal.

If you want to avoid the development, documentation and test packages, you can use the following command:

poetry install --without dev docs test

Now, to run and modify the code, you have to spawn a new shell with the environment activated:

poetry shell

VSCode Development

If you use VSCode as your development tool, you need to consider that the python interpreter must be set to the virtual environment activated for this project. By default, poetry saves the virtual environment in the directory: /home/<user>/.cache/pypoetry/virtualenvs/. To have this directory available for our interpreter selection, you need to open VSCode preferences (ctrl + ,) and search for venv. You will find Python: Venv Folders and Python: Venv Path. You must add the virtual environments directory path in both sections, including the / at the end.

Once the path is added, you can select the python interpreter in the lower right corner for the python scripts and the upper right corner for the python notebooks.

Documentation

Documentation is built with mkdocs. To create it, you will need to install the project development dependencies:

poetry install --no-root

Then, run the following command:

mkdocs build

By default, this will create a site/ directory with the built documentation in html format. However, if you want to build the documentation and serve it locally, you can run the following command:

mkdocs serve

Then, navigate to http://localhost:8000/ to view the documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

magyc-0.1.1.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

magyc-0.1.1-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

Details for the file magyc-0.1.1.tar.gz.

File metadata

  • Download URL: magyc-0.1.1.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.5.0-1027-oem

File hashes

Hashes for magyc-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6587ea61f911b5695fca26fda1d010a33f9c4ad193b6f7c2c752a528d7cdeb20
MD5 6d1b95049a053a3ad6c0d6420ff8985d
BLAKE2b-256 da4f2b6cad8bb6eaa23baf85c9816b899c1425900e1e597e767d73b8c6b44f97

See more details on using hashes here.

File details

Details for the file magyc-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: magyc-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 29.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.5.0-1027-oem

File hashes

Hashes for magyc-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 edc824bd092fd7b41a2a92021b9bee3936aaa7b452ed0533a23a309dd3894bf0
MD5 8f81c1cf663e2eaa87f590d1aa99f136
BLAKE2b-256 a8340f5a8788059a0a164ce3044d1e93a7fa1cd8e889c72561074e384c89c455

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page