Skip to main content

Lightweight Python Star Tracker With Rust Backend

Project description

Lightweight Python Star Tracker With Rust Backend

Based on the methodology used in https://github.com/nasa/COTS-Star-Tracker, with following improvements:

  • Reduced dependencies to opencv and numpy for lightweight usage in a Raspberry Pi.
  • Reimplemented computationally expensive parts in rust. This includes most parts that are not image processing related.
  • Added quadratic inter star angle index look up polynomial for faster triangle search.
  • Added spatial index to look up neighboring stars.

Features:

  • Attitude estimation from image and camera calibration parameters.
  • Attitude estimation from list of star observation coordinates.
  • Star catalog creation with temporal corrections.

Example

import ruststartracker

# Get catalog positions
catalog = ruststartracker.StarCatalog(max_magnitude=...)
star_catalog_vecs = catalog.normalized_positions(epoch=...)

# Define opencv camera parameters, see https://docs.opencv.org/4.x/dc/dbb/tutorial_py_calibration.html
camera_params = ruststartracker.CameraParameters(
    camera_matrix=...,
    cam_resolution=...,
    dist_coefs=...,
)

# Create StarTracker instance (reuse this)
st = ruststartracker.StarTracker(
    star_catalog_vecs,
    camera_params,
    max_inter_star_angle=...,
    inter_star_angle_tolerance=...,
    n_minimum_matches=...,
    timeout_secs=...,
)

# Obtain numpy array image
img = ...

# Find attitude from given image
result = st.process_image(img)

print(result)
# StarTrackerResult(quat=[-0.43977802991867065, -0.439766526222229, -0.4398997128009796, 0.6478340029716492], match_ids=[1435, 1272, 1140, 2035, 1070, 1438, 1338, 903, 260, 2141, 1771, 1727, 385, 1717, 2204, 2062, 1989, 1634, 708, 1357], n_matches=20, duration_s=0.0003700880042742938)

Installation

  • Install with pip install ruststartracker (Currently only ARM/x86 Linux wheels available).

TODOs

  • Improve error messages.
  • Return more diagnostic data.

Attributions

Gaia Data

This project includes data from the European Space Agency (ESA) mission Gaia, processed by the Gaia Data Processing and Analysis Consortium (DPAC). Funding for the DPAC has been provided by national institutions, in particular the institutions participating in the Gaia Multilateral Agreement.

Gaia DR3 data is © European Space Agency and is released under the Creative Commons Attribution 4.0 International License (CC BY 4.0).

Gaia Collaboration, Vallenari et al. (2022), A&A 674, A1. DOI: 10.1051/0004-6361/202243940

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

ruststartracker-0.2.2.tar.gz (13.5 kB view details)

Uploaded Source

Built Distributions

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

ruststartracker-0.2.2-cp312-cp312-manylinux_2_35_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.35+ x86-64

ruststartracker-0.2.2-cp312-cp312-manylinux_2_35_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.35+ ARM64

ruststartracker-0.2.2-cp311-cp311-manylinux_2_35_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.35+ x86-64

ruststartracker-0.2.2-cp311-cp311-manylinux_2_35_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.35+ ARM64

ruststartracker-0.2.2-cp310-cp310-manylinux_2_35_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.35+ x86-64

ruststartracker-0.2.2-cp310-cp310-manylinux_2_35_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.35+ ARM64

File details

Details for the file ruststartracker-0.2.2.tar.gz.

File metadata

  • Download URL: ruststartracker-0.2.2.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ruststartracker-0.2.2.tar.gz
Algorithm Hash digest
SHA256 e60a73af7ac7206b770a8c9c0c1d20ac2fad7bcff77e8d04698c1e9c414ec006
MD5 8f214993396c0d5a5767932324fc2f34
BLAKE2b-256 37b3885c609827bb6e8b1eba83e06aeea6e8f1960d7f01b0a12f177c5b5800f5

See more details on using hashes here.

File details

Details for the file ruststartracker-0.2.2-cp312-cp312-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for ruststartracker-0.2.2-cp312-cp312-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 f6eb3fea385b61fec90a5a64af17e333bf51e0a03c8438d5687dd43a06d3f5a9
MD5 ffca18f0ba6bc9d418708fb66180024d
BLAKE2b-256 1dae2edca63312975755a99bb4480a12b2ab244cc4c31a85f02fb21e3b3cfd4b

See more details on using hashes here.

File details

Details for the file ruststartracker-0.2.2-cp312-cp312-manylinux_2_35_aarch64.whl.

File metadata

File hashes

Hashes for ruststartracker-0.2.2-cp312-cp312-manylinux_2_35_aarch64.whl
Algorithm Hash digest
SHA256 b49194aae8888e7abb983dedf21d4965d54da8b01726bee958f4c5082c81f2d5
MD5 9234d2d8c5d2e8c54fd9592bd4783bb4
BLAKE2b-256 5095dcec57241ffe3363d46c357709ed593d2b49130f9f53a2a4af16f024a0a2

See more details on using hashes here.

File details

Details for the file ruststartracker-0.2.2-cp311-cp311-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for ruststartracker-0.2.2-cp311-cp311-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 ae7603fc62925920bef9ec3b38d93827c675f5a7fb1f53f304c90dd680ea8bba
MD5 bd79d21b5b47ede0b673098e1a299b0b
BLAKE2b-256 77844438ba7939d6eb87411cafc5eee8133fd72d04dd66c31a9567bd5c2c6dd6

See more details on using hashes here.

File details

Details for the file ruststartracker-0.2.2-cp311-cp311-manylinux_2_35_aarch64.whl.

File metadata

File hashes

Hashes for ruststartracker-0.2.2-cp311-cp311-manylinux_2_35_aarch64.whl
Algorithm Hash digest
SHA256 a3d3ac11a2ad92b799777644045289e0775f1aedb96dddc890a8a22365cd85db
MD5 b6bb176127630bd44bad9a45727fd2e5
BLAKE2b-256 b6faaaf89e784e8812692a60fd18d841a9c30bdd51199055c11961094307b46b

See more details on using hashes here.

File details

Details for the file ruststartracker-0.2.2-cp310-cp310-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for ruststartracker-0.2.2-cp310-cp310-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 57d7f455d11e97167d07a9a01b1bda4c21b0518c53027c78b240d0adeb3db87b
MD5 7dd60cbd1674d742e2e2841ef9ed3b8b
BLAKE2b-256 008a648b6eda580f30144144f56b84074e241bb63768bc7029a2b26bc264a755

See more details on using hashes here.

File details

Details for the file ruststartracker-0.2.2-cp310-cp310-manylinux_2_35_aarch64.whl.

File metadata

File hashes

Hashes for ruststartracker-0.2.2-cp310-cp310-manylinux_2_35_aarch64.whl
Algorithm Hash digest
SHA256 6b4b6e6d2206d3cd67f22733fd4042dba154db16d420348bdc7bf95f651227c7
MD5 d48a0dbfc24e00f28d62a8a27a7895cc
BLAKE2b-256 6264ee963bfbf4806c0e8530bcd280bb1e424b6bdb6d1c29ce393e405f02b679

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