ANISE provides an open-source and open-governed library and algorithmic specification for most computations for astrodynamics

Overview

Specifications

Project purpose

ANISE provides an open-source and open-governed library and algorithmic specification for most computations for astrodynamics. It is heavily inspired by NAIF SPICE, and may be considered as an open-source modern rewrite of SPICE.

ANISE is an acronym for Attitude, Navigation, Instrument, Spacecraft, and Ephemeris.

The toolkit provides a new file definition to store references frames, their related ephemeris and attitude trajectory, and respective covariances. The toolkit also provides algorithms for the most basic querying and astrodynamics calculations similar to SPICE, and their implementations in a number of languages (Rust, Python).

This toolkit is licensed in AGPLv3, whose terms you may read here. One could argue that this license is business-friendly while ensuring that contributions to ANISE benefit the hard work by the authors.

ANIS file

The ANISE file specifications, extension .anis. Implementation should include this project as a submodule to ensure traceability.

Algorithms

Ephemeris

TBD

Attitude

TBD

Frame transformations

TBD

Tools

TBD

Comments
  • LICENSE declares MPL-2.0, README states AGPL

    LICENSE declares MPL-2.0, README states AGPL

    This is probably introduced by https://github.com/anise-toolkit/specs/commit/a3204fdac1e877e20f2eb19448fe6d275bf31ff4, where licensing was updated, but not in the README.

    opened by skade 0
  • Try to remove start and end states

    Try to remove start and end states

    They are needed in Nyx because of how the frames are handled in there, but in Anise, we can get rid of it (probably). To compute the first and last state, simply evaluate at the start and end times.

    opened by ChristopherRabotin 0
  • Gravity fields for spherical harmonic computations

    Gravity fields for spherical harmonic computations

    It should be possible to use ANISE to store gravity fields, e.g. EGM2008. At the moment, software will typically read this data from a text file found on NASA PDS in a specific format.

    Text formats are great for data that is typically read or edited by humans. This is not the case for gravity field information.

    Gravity field information contains the C_nm and S_nm coefficients and may optionally contain the standard deviation of those coefficients. This standard deviation data can be used to generate gravity clones, often used in orbit determination to see how small errors in the gravity field may affect the OD solution.

    Storing this data as a packed structure will be significantly more efficient, and would prevent memory allocation to read said data.

    Moreover, it should be possible for several gravity fields for the same object to be stored in the same file. This will allow for tools like Nyx to quickly switch between gravity fields while reading the same file.

    file-format new-feature proposed 
    opened by ChristopherRabotin 0
  • MRP to be the attitude representation stored in a context

    MRP to be the attitude representation stored in a context

    Modified Rodrigues Parameters have been developed for the aerospace industry and recommended by Schaub (cf. Basilisk) and as the attitude representation in NASA's Best Practices for Navigation Filters.

    Some of the main reasons include:

    1. Ease of interpolation, although switching to the shadow set may lead to interpolation issues
    2. Only three numbers proportional to the tangent of the quarter of the angle -- which implies that a 32 bit representation may be sufficient in many (most?) cases
    3. Ease of conversion to a skew-symmetric matrix and to quaternions
    4. No ambiguity in quaternion nomenclature or structure
    5. The orientation path between two MRPs is necessarily the shortest path (which is not true for quaternions)
    6. MRPs are necessarily normalized

    Proposed signatures

    This would be available everywhere by default.

    MRP definition

    pub struct MRP {
       s1: f32,
       s2: f32,
       s3: f32,
       is_singular: bool
    }
    

    Question: are 32 bits indeed enough to represent all rotations without loss compared to a 64 bit unit quaternion? This question can be easily answered with a plot showing the error in conversion to/from a 32 bit MRP and 64 bit quaternion.

    Question: if the shadow set is always enforced, is there a need for the is_singular parameter?

    Nomenclature

    The nomenclature from Schaub and Junkins shall be used throughout the implementation, including for the naming of the operations (e.g. Add vs Mul).

    specification proposed 
    opened by ChristopherRabotin 0
  • FAIR metadata

    FAIR metadata

    Here are the recommended metadata points for FAIR: https://specs.fairdatapoint.org/#metadataschemas .

    Although not all should be in the data files themselves, the metadata builder should allow for these.

    opened by ChristopherRabotin 0
  • Checksum field and method for computation

    Checksum field and method for computation

    In the specs, it would be extremely useful to provide a checksum field early into the file. The checksum should be computed for the subsequent data (i.e. metadata excluded). Moreover, a function shall be provided to recompute this checksum.

    The purpose of this checksum is to allow for rapid verification of the integrity of the data, it shall not be used for signing the data. As such, the CRC32 hashing function is proposed (specifically the cdc32fast crate).

    Proposed signatures

    This is only valid in an Anise context, i.e. with a loaded Anise file.

    impl Anise {
       /// Returns the rotation quaternion and the body rate vector
       pub fn verify_checksum(&self) -> Result<(), AniseError>;
    }
    

    The following AniseError enum variant is proposed:

    pub enum  AniseError {
    // ...
      /// Error returned if the checksum in the Anise file does not match the one computed by reading the file
      InvalidChecksum {expected: u32, computed: u32}
    }
    

    Proposed usage

    This can be used onboard in a guidance loop to ensure that the data is valid at each new guidance loop iteration, and if it isn't, a backup file can be loaded from another disk for example.

    proposed 
    opened by ChristopherRabotin 1
  • Switch from Flatbuffers to ASN.1 ?

    Switch from Flatbuffers to ASN.1 ?

    ASN.1 is a highly efficient standardized platform-independent binary encoding used in lots of applications, including telecommunications and cryptographic key exchanges. This just looks amazing, seriously. Huge thanks to @pwnorbitals for letting me know about this.

    Some references:

    • https://www.thanassis.space/asn1.html
    • https://luca.ntop.org/Teaching/Appunti/asn1.html
    • A rust library that supports most of the tags in ASN.1: https://docs.rs/der/
    • A cheat sheet reference: https://www.oss.com/asn1/resources/reference/ASN.1-Reference-Card-format-USA.pdf

    Note: all of the ASN.1 specs below can be tested directly on this playground: https://asn1.io/asn1playground/ .

    Benchmark encoding sizes

    One issue with the der library is that it does not support the Real type defined in section 2.4 of the specs (PDF).

    Rebuilding the REAL type

    Built-in

    ANISE DEFINITIONS AUTOMATIC TAGS ::= 
    BEGIN
      Real ::= SEQUENCE       
      {                                                     
         data REAL
      }                                                     
    END
    
    

    Encode:

    value Real ::= {
      data 3.141592653589793
    }
    

    DER: 26 bytes

    Naive

    ANISE DEFINITIONS AUTOMATIC TAGS ::= 
    BEGIN
      Real ::= SEQUENCE       
      {                                                     
         mantissa INTEGER DEFAULT 0,
         realbase INTEGER DEFAULT 10,
         exponent INTEGER DEFAULT 0
      }                                                     
    END
    
    

    Encode Pi:

    value Real ::= {
      mantissa 3141592653589793,
      realbase 10,
      exponent 15
    }
    

    DER: 14 bytes

    Full specs

    (Took me one hour to fix...)

    ANISE DEFINITIONS AUTOMATIC TAGS ::= 
    BEGIN
      Normal ::= SEQUENCE       
      {                                                     
         mantissa INTEGER DEFAULT 0,
         realbase INTEGER DEFAULT 10,
         exponent INTEGER DEFAULT 0
      }
    
    Subnormal ::= ENUMERATED {
        plus-infinity,
        neg-infinity
    }   
    
    Real ::= CHOICE {
        as_normal Normal,
        as_subnormal Subnormal
    }                                                                                                 
    END
    

    Encoding a normal number:

    realdata Real ::= as_normal : {
      mantissa 3141592653589793,
      realbase 10,
      exponent 15
    }
    

    DER: 14 bytes ( no overhead it seems!)

    Encoding a subnormal number:

    realdata Real ::= as_subnormal : plus-infinity
    

    DER: 1 byte (yet, ONE!)

    specification proposed 
    opened by ChristopherRabotin 2
  • Orientation querying

    Orientation querying

    Also computing the quaternion corresponding to a given rotation

    Proposed signatures

    This is only valid in an Anise context

    impl Anise {
       /// Returns the rotation quaternion and the body rate vector
       pub fn rotation(&self, from_frame: &Frame, into_frame: &Frame) -> Result<(Quaternion, Vector3), AniseError>;
       pub fn position_rotation(&self, from_frame: &Frame, into_frame: &Frame) -> Result<Quaternion, AniseError>;
       /// Returns a 6x6 DCM which can be multiplied by a state represented as [x,y,z,vx,vy,vz]
       pub fn rotation_dcm(&self, , from_frame: &Frame, into_frame: &Frame) -> Result<Matrix6, AniseError>;
       /// The same as above but with the provided light time calculations, cf. https://docs.rs/nyx-space/latest/nyx_space/cosmic/enum.LightTimeCalc.html .
       pub fn rotation_with_correction(&self, obj: &Anise.Ephemeris, at: &Anise.Epoch, lt: LightTimeCalc) -> Result<Vector6, AniseError>;
    }
    
    supported-functions proposed 
    opened by ChristopherRabotin 0
Owner
ANISE
ANISE provides a toolkit and files for Attitude, Navigation, Instrument, Spacecraft, and Ephemeris data. It's a modern replacement of NAIF SPICE file.
ANISE
This library provides implementations of many algorithms and data structures that are useful for bioinformatics.

This library provides implementations of many algorithms and data structures that are useful for bioinformatics. All provided implementations are rigorously tested via continuous integration.

Rust-Bio 1.2k Dec 26, 2022
Library that implements different versions of PPMD algorithm (compress and decompress)

ppmd-rs Library that implements different versions of PPMD algorithm (compress and decompress) Dependencies Rust 1.58 or newer Cargo How to build Clon

Alexander Zaitsev 3 Jun 20, 2022
Genetic Algorithm library in Rust

RsGenetic Summary and Features RsGenetic is a framework for executing genetic algorithms in Rust. It is designed to have a simple but modular API. Exa

Mathieu De Coster 74 Dec 27, 2022
Genetic Algorithms Library

genx genx provides modular building blocks to run simulations of optimization and search problems using Genetic Algorithms (GA). The vision for genx i

Lakshya Singh 29 Aug 9, 2022
A library that can be used as a building block for high-performant graph algorithms.

graph A library that can be used as a building block for high-performant graph algorithms. Graph provides implementations for directed and undirected

Martin Junghanns 222 Jan 1, 2023
Fast, parallel, extensible and adaptable genetic algorithms framework written in Rust

oxigen Oxigen is a parallel genetic algorithm framework implemented in Rust. The name comes from the merge of OXIdación (Rust translated to Spanish) a

Martín Pozo 146 Dec 18, 2022
Execute genetic algorithm (GA) simulations in a customizable and extensible way.

genevo genevo provides building blocks to run simulations of optimization and search problems using genetic algorithms (GA). The vision for genevo is

Innoave 110 Dec 21, 2022
Rust implementation of real-coded GA for solving optimization problems and training of neural networks

revonet Rust implementation of real-coded genetic algorithm for solving optimization problems and training of neural networks. The latter is also know

Yury Tsoy 19 Aug 11, 2022
Linear Programming for Rust, with an user-friendly API. This crate allows modeling LP problems, and let's you solve them with various solvers.

good_lp A Linear Programming modeler that is easy to use, performant with large problems, and well-typed. use good_lp::{variables, variable, coin_cbc,

Rust Operations Research 101 Dec 27, 2022
A browser app that evolves vehicles using genetic algorithms, written in Rust and Bevy

Vehicle Evolver Deluxe This is a simulation that uses AI (to be specific: genetic algorithms) to try to build better and better vehicles. The vehicles

null 95 Dec 26, 2022
Common data structures and algorithms for competitive programming in Rust

algorithm-rs algorithm-rs is common data structures and algorithms for competitive programming in Rust. Contents TBA How To Contribute Contributions a

Chris Ohk 16 Dec 21, 2022
zine/book about bitmap drawing algorithms and math with code examples in Rust

A Bitmapper's Companion - zine/book about bitmap drawing algorithms and math with code examples in Rust A small zine/book written in LaTeX. In progres

Manos Pitsidianakis 42 Nov 8, 2022
Example of a genetic algorithm in Rust and Python

Example of a genetic algorithm in Rust and Python Monkey typewriter Finding the phrase 'To be or not to be. That is the question.' Inspired by the exa

sotrh 2 Jan 27, 2022
A Rust implementation the HOTP and TOTP Algorithms

xotp A Rust implementation the HOTP and TOTP Algorithms. HOTP was implemented in accordance with RFC4226 TOTP was implemented in accordance with RFC62

Tejas Mehta 3 Jan 21, 2022
hubpack is an algorithm for converting Rust values to bytes and back.

hubpack is an algorithm for converting Rust values to bytes and back. It was originally designed for encoding messages sent between embedded programs. It is designed for use with serde.

Cliff L. Biffle 6 Nov 11, 2022
Online algorithm for mean and variance, with support for uneven weights

welford Online algorithm for mean and variance, with support for uneven weights. This implements the Welford's online algorithm for computing mean and

Felipe S. S. Schneider 1 Sep 8, 2022
AI-TOML Workflow Specification (aiTWS), a comprehensive and flexible specification for defining arbitrary Ai centric workflows.

AI-TOML Workflow Specification (aiTWS) The AI-TOML Workflow Specification (aiTWS) is a flexible and extensible specification for defining arbitrary wo

ruv 20 Apr 8, 2023
Easy c̵̰͠r̵̛̠ö̴̪s̶̩̒s̵̭̀-t̶̲͝h̶̯̚r̵̺͐e̷̖̽ḁ̴̍d̶̖̔ ȓ̵͙ė̶͎ḟ̴͙e̸̖͛r̶̖͗ë̶̱́ṉ̵̒ĉ̷̥e̷͚̍ s̷̹͌h̷̲̉a̵̭͋r̷̫̊ḭ̵̊n̷̬͂g̵̦̃ f̶̻̊ơ̵̜ṟ̸̈́ R̵̞̋ù̵̺s̷̖̅ţ̸͗!̸̼͋

Rust S̵̓i̸̓n̵̉ I̴n̴f̶e̸r̵n̷a̴l mutability! Howdy, friendly Rust developer! Ever had a value get m̵̯̅ð̶͊v̴̮̾ê̴̼͘d away right under your nose just when

null 294 Dec 23, 2022
Koofr Vault is an open-source, client-side encrypted folder for your Koofr cloud storage offering an extra layer of security for your most sensitive files.

Koofr Vault https://vault.koofr.net Koofr Vault is an open-source, client-side encrypted folder for your Koofr cloud storage offering an extra layer o

Koofr 12 Dec 30, 2022