Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load SPICE metakernel #123

Open
1 of 6 tasks
ChristopherRabotin opened this issue Oct 15, 2023 · 2 comments
Open
1 of 6 tasks

Load SPICE metakernel #123

ChristopherRabotin opened this issue Oct 15, 2023 · 2 comments
Labels
good first issue Good for newcomers Kind: new feature Kind: spice-interop SPICE interoperability Status: draft Issue is at draft stage Status: scheduled

Comments

@ChristopherRabotin
Copy link
Member

ChristopherRabotin commented Oct 15, 2023

High level description

SPICE metakernels are really useful for ensuring that the same data is always loaded correctly. The purpose of this issue is to implement a way to load and append a given Almanac from a SPICE metakernel.

Requirements

Test plans

  • Test loading without variable
  • Test loading with variables

Design

This is the design section. Each subsection has its own subsection in the quality assurance document.

API definition

Maybe something like this:

impl Almanac {

    /// Extends the current Almanac with the provided meta kernel
    pub fn extend(&mut self, meta: Metakernel) {
    // ...
    }

    // Clone the Almanac and extend it with the provided meta kernel
    pub fn with(&self, meta: Metakernel) -> Self {
    // ...
    }
}

pub struct Metakernel {
paths: HashMap<String, PathBuf>,
kernels: Vec<String>
}

Metakernel would implement FromStr to be build from the string of the metakernel I think. It would also reuse the parse function currently used to parse all other KPL files.

Example input:

\begindata
 
   PATH_VALUES  = ( '/flight_projects/mgs/SPICE_kernels',
                    '/generic/SPICE_kernels'              )
 
   PATH_SYMBOLS = ( 'MGS',
                    'GEN' )
 
 
   KERNELS_TO_LOAD = ( '$GEN/leapseconds.tls',
                       '$MGS/mgs.tsc',
                       '$GEN/generic.bsp',
                       '$MGS/mgs.bc',
                       '$GEN/earth.bpc',
                       '$MGS/mgs.bes'           )
 
   \begintext

High level architecture

Document, discuss, and optionally upload design diagram into this section.

Detailed design

The detailed design *will be used in the documentation of how ANISE works.

Feel free to fill out additional QA sections here, but these will typically be determined during the development, including the release in which this issue will be tackled.

@ChristopherRabotin ChristopherRabotin added good first issue Good for newcomers Kind: spice-interop SPICE interoperability Status: draft Issue is at draft stage Kind: new feature labels Oct 15, 2023
@ChristopherRabotin
Copy link
Member Author

After diving way too deep into configs, I'll follow @sellout's recommendation and use Dhall for the configuration of metakernels.

@ChristopherRabotin
Copy link
Member Author

@GregoireHENRY In your opinion, is this still a required feature, or is the dhall configuration an acceptable substitute?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers Kind: new feature Kind: spice-interop SPICE interoperability Status: draft Issue is at draft stage Status: scheduled
Projects
None yet
Development

No branches or pull requests

1 participant