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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: magyc-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 e91ee5befb0f9310f4bf442373063fe7a362ec4007693ee3f711f309f16afe7b
MD5 d4c7e3187aab2172c8f725136b2edaa4
BLAKE2b-256 6c219125d6303ffc257dc501e6bc8f8b4e8aaee6e3a88a45a98a1d558b50df39

See more details on using hashes here.

File details

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

File metadata

  • Download URL: magyc-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e442b34b60ccc8e7d406d31326b614cdc12e56c28b984a523859e6b48660c987
MD5 42e42fc37dadad41ba404ca531ae04a1
BLAKE2b-256 53270d8e4bfb525057a5970feacad87c114cda38316a3afb236820db77943976

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