Skip to main content

Crate citra_solve

Crate citra_solve 

Source
Expand description

§citra-solve

Efficient lost-in-space astrometric plate solver for embedded systems.

citra-solve uses geometric hashing of 4-star patterns (quads) to achieve fast, memory-efficient plate solving suitable for wide field-of-view systems with significant optical distortion.

§Features

  • Low memory footprint: ~16KB runtime heap, memory-mapped indices
  • Wide FOV support: 10+ degree fields with SIP distortion modeling
  • Robust matching: Handles false stars (noise) and missing stars
  • Fast solving: O(1) hash table lookups, early termination

§Quick Start

use citra_solve::{Solver, SolverConfig, DetectedStar, Index};

// Load a pre-built index
let index = Index::open("hipparcos.idx").unwrap();

// Create solver with default config
let solver = Solver::new(&index, SolverConfig::default());

// Your detected stars from image
let stars = vec![
    DetectedStar { x: 512.0, y: 384.0, flux: 1000.0 },
    // ... more stars
];

// Solve!
match solver.solve(&stars, 1024, 768) {
    Ok(solution) => println!("Solved: RA={}, Dec={}", solution.center.ra_deg(), solution.center.dec_deg()),
    Err(e) => eprintln!("Failed to solve: {}", e),
}

Re-exports§

pub use crate::catalog::index::Index;
pub use crate::core::types::DetectedStar;
pub use crate::core::types::RaDec;
pub use crate::core::types::Vec3;
pub use crate::solver::solution::Solution;
pub use crate::solver::solver::Solver;
pub use crate::solver::solver::SolverConfig;
pub use crate::wcs::Wcs;
pub use crate::extract::extract_stars;
pub use crate::extract::ExtractionConfig;

Modules§

bench
Benchmarking utilities for plate solver evaluation.
catalog
Star catalog and index management.
core
Core types and mathematical operations.
error
Error types for the library
extract
Star detection and centroid extraction from images.
pattern
Star pattern extraction and matching.
solver
Plate solving core: hypothesis generation, verification, and refinement.
wcs
World Coordinate System (WCS) transformations.