Hi,
I have recently been working on adding potential support to file types defined in SPICE. These include actually a variety of file types providing different information, so I’d like to share my current view of the steps I’d like to take to add support for these files and see what people think about these potential features
This is a quick overview of the general file types that are currently handled by SPICE routines (described in SPICE required reading docs):
- DAF files (Double Precision Array Files): this is a very generic file type which is used as the basis to define more specific file types. In particular, the following 3 file types rely on DAF specifications: SPK (Spacecraft and Planet Kernel), PCK (Planetary Constants Kernel) and CK (C(amera)-matrix Kernel). SPK provide ephemeris for a target body, PCK provide orientation parameters for a target body-fixed frame with respect to an inertial frame and CK provide attitude data of spacecraft parts. I believe SPK and PCK would probably the SPICE file types of highest interest at this point.
- DAS files (Direct Access Segregated Files): this is another generic file format that generalizes even further DAF files to also support storage of integers and characters-based data. This format is the basis of DSK (Digital Shape Kernels) and EK (Event Kernels). DSK provide information about the 3D shape of objects more complex than ellipsoids. EK provide sequence of events in a given mission.
- SCLK files (Spacecraft CLocK): these provide data to convert from spacecraft clock data to other timescales. These seem to be important when handling CK files, since CK give attitude data referenced to spacecraft clock.
And this is the current roadmap that I envision:
- Add support for generic DAF files (a prototype is available in merge request 756)
- Add support for SPK files. This includes both reading files and evaluating them at given target times to obtain state vectors. This covers 16 different SPK types (a prototype is also available in merge request 756)
- Add support for PCK files, including also reading files and evaluating them. There is 3 different PCK types. A prototype is available in my issue-1571 branch, still not shared as a merge request since this builds up on the support for generic DAF files implemented by merge request 756.
- There is text-based versions of SPK kernels (this would be for example the ASCII versions of DE files) and PCK kernels. It probably would be easy to add support for these as well, having already support for the binary versions.
- Add support for SCLK files.
- Add support for CK files. It seems SCLK handling would be required to properly handle CK files. There is a single CK type.
- Add support for generic DAS files.
- Implement EK kernels
- Implement DSK kernels
What do you think about it? It seems SPK and PCK kernels are probably interesting additions. Would there also be interest in the other file types? I’m happy to tackle these as well. If so, would any of the file types be of particular interest? I think many (all?) of the data types provided in these files already have related data structures implemented in Orekit. So it could be a nice extension of available data sources.
And of course, I aim to provide example files for all implementations, with results verified against CSPICE
Best wishes,
Rafa