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, example and test packages, you can use the following command:

poetry install --without dev docs test example

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-1.0.0.tar.gz (39.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

magyc-1.0.0-py3-none-any.whl (44.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: magyc-1.0.0.tar.gz
  • Upload date:
  • Size: 39.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.8.0-49-generic

File hashes

Hashes for magyc-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3d02968c66c981ba32d85701f8c17c5dff373a547f56947a5936835efbcf7c76
MD5 df6798f34ceed3df48cba86073f3ba41
BLAKE2b-256 fff7e513a5dd58d7cea3d5568fe329a71ad41d91236b9b960e963b7c4658149e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: magyc-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 44.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.12 Linux/6.8.0-49-generic

File hashes

Hashes for magyc-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 385873ee2d612624209707f9faa894d48bfbfa617122782529570426521318c9
MD5 99b7ee10582e627e83272a2946dc329b
BLAKE2b-256 d824972a05247b98fba1b5c4d2c5872bffa181cd8c169b9f01115474e5711d76

See more details on using hashes here.

Supported by

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