star-mrp 0.1.0
Modified Rodrigues parameters
Public state: Released & Verified. The registry label is RELEASED. What the states mean →
Apache-2.0 Released & Verified single file
Summary
Modified Rodrigues parameters: conversion with quaternions, direction cosine matrices and rotation vectors, shadow set and switching, composition of rotations through quaternions (no division by zero at a full turn) and the kinematic equation; within 6e-16 of Basilisk and 2e-15 of SciPy on 601 pairs with norms from 1e-8 to 5.
Run in your browser
Edit the code and press Run (or Ctrl+Enter). Python runs in your browser with this package's published code. The first run downloads Python once (about 12 MB).
Runs in the browser: all 383 tests pass in the browser's Python (Pyodide 314.0.7, Python 3.14.2), measured on 20 October 2026.
Use it on your computer
No account and no GitHub needed. Download, then install with one command:
- Install file · star_mrp-0.1.0-py3-none-any.whl 4 kB
- Single file — copy it alongside your code · star_mrp.py 6 kB
- Source code (.zip) 25 kB
python -m pip install star_mrp-0.1.0-py3-none-any.whlIn Python: import star_mrp
Cite it, and its bill of materials
For a paper, a report or a supplier file: the citation in two formats, and the software bill of materials (SBOM) in the two standard formats, with the fingerprint of the wheel.
@software{cavazzini_star_mrp_0_1_0,
author = {Cavazzini, Andrea},
title = {{star-mrp}: Modified Rodrigues parameters},
version = {0.1.0},
year = {2026},
url = {https://andrea07072000.github.io/S.T.A.R.-/software/star_mrp/},
note = {Apache-2.0. Source: https://github.com/Andrea07072000/S.T.A.R.-, commit dc09f61d}
}
For developers
Install directly from the public repository:
python -m pip install "star-mrp @ git+https://github.com/Andrea07072000/S.T.A.R.-.git@dc09f61dcee098d518f070d6a23a8815defc1109#subdirectory=packages/star_mrp"
Technical sheet
Requirements
- R1
mrp_from_quaternion,quaternion_from_mrp,dcm_from_mrp,rotation_vector_from_mrp,mrp_from_rotation_vectorconvert between sigma = e tan(phi/4) and the other representations;shadowandswitchgive the other MRP of the same attitude;compose(first, second)chains two rotations;mrp_rate(s, omega)is the kinematic equation. - R2 Quaternions are scalar first; the matrix takes reference to body; results of conversions and of
composeare on the short rotation (|sigma| <= 1, quaternion with w >= 0, angle in [0, pi]).composegoes through quaternions, so two rotations that add up to a full turn give zero and not a division by zero. - R3 Measured on 601 pairs of MRPs with norms from 1e-8 to 5 (a third beyond 1): eight operations agree with Basilisk within 6e-16 and seven with SciPy within 2e-15.
- R4 Every function returns floats or raises
ValueError: vectors that are not three (or four) finite real numbers within 1e150, a zero quaternion, the shadow of the zero MRP, a threshold that is not positive.
Limits (what is not claimed)
Kinematics only: no dynamics, no control law, no integrator (mrp_rate is the right-hand side; integrating it and switching to the shadow set is left to the caller). At exactly half a turn the two MRPs of norm 1 are equally short and either may be returned. No Gibbs vector (classical Rodrigues parameters), no Euler angles (see star_euler). No published numerical table is reproduced: the references are cited for the formulas.
Release gate
Computed by the registry from the result files, with the same function that decides RELEASED.
- Mutation score, latest measure of each module (needs at least 0.850)
- star_mrp.py 0.975 (2026-10-07)
- Independent implementations written by others (needs 2)
- Basilisk RigidBodyKinematics, scipy Rotation
- Result
- Released & Verified
Evidence in the registry
| Check | Status | Recorded | What was observed |
|---|---|---|---|
| Clean install from the release tag | VERIFIED | 2026-10-07 | pytest outside the tree: 383 passed in 0.94s |
| Unit tests | VERIFIED | 2026-10-07 | 383 passed in 3.52s |
| Review | VERIFIED | 2026-10-07 | Requirements, interface, units, data provenance, dependency surface and failure behaviour reviewed |
| Review | VERIFIED | 2026-10-07 | Re-running the cross-check gives a byte-identical evidence file |
| Reference value | VERIFIED | 2026-10-07 | mrp_from_quaternion((0.5, 0.5, 0.5, 0.5)) = (0.3333333333333333, 0.3333333333333333, 0.3333333333333333); quaternion_from_mrp((0, 0, 1)) = (0.0, 0.0, 0.0, 1.0) (suite: 383 passed in 3.52s) |
| Cross-check with independent libraries | VERIFIED | 2026-10-07 | star_mrp converts, composes and differentiates modified Rodrigues parameters as two independent implementations do, the shadow set included |
| Benchmark | VERIFIED | 2026-10-07 | largest difference from Basilisk: 5.6e-16; from SciPy: 1.3e-15 |
Fingerprints (SHA-256)
| star_mrp-0.1.0-py3-none-any.whl | 7289c9375b2cc3a3c7c83fb36852785963ee2d8f41f319e0ee5027b9c4e22875 |
| star_mrp.py | dd6d256d9a3a171e89e377271cc6e8d48ecb22661109db2db20453cefd25af04 |
| star_mrp-0.1.0-source.zip | 14f506a3a33acb73dfd0a3030cc75f406ef6f2daab530b0593c072fac9fa234b |
