I have read through the discussion here: Orekit Caching Feature Behaviour.
I am wondering about the possibility of Orekit exposing functionality so that a client can provide his own custom frame transformation caching/interpolation algorithms for more fine-grained control over memory usage and performance. Uses of InterpolatingTransformProvider, ShiftingTransformProvider, and GenericTimeStampedCache are hardcoded in AbstractFrames.
Here is one proposal for how this functionality could be added: Add a new constructor to AbstractFrames taking an additional parameter such as a Map<Predefined, UnaryOperator<TransformProvider>> which would allow a client to provide a custom transformation wrapper for each Predefined frame. If no entry is present, no wrapping of the raw transform would be done. The existing constructors would delegate to the new constructor, passing a map defining the caching/interpolating wrappers which are currently hardcoded. I am not sure what would be done for
- The versioned ITRF frames. I have never used this functionality. It looks like the versioned ITRF frame uses the same
TransformProvideras the “raw ITRF” frame, so maybe there would be nothing to be done. - The uncached ITRF frames. I have never used this functionality either. These use custom-built ITRF, TIRF, CIRF frames which are separate from the
Predefinedframes. TheTransformProviderbetween CIRF and GCRF hardcodes aShiftingTransformProvider, which uses anInterpolatingTransformProvider, which uses aGenericTimeStampedCache. Ideally this could be overridden also, but the necessaryUnaryOperator<TransformProvider>could not be obtained from theMapI suggested above. Perhaps theMapcould instead be aMap<CoarsePredefined, UnaryOperator<TransformProvider>>whereCoarsePredefinedis a new enum with values such asCoarsePredefined.ITRFinstead ofPredefined.ITRF_CIO_CONV_2010_SIMPLE_EOP,Predefined.ITRF_CIO_CONV_2010_ACCURATE_EOP, etc. Groups of values of thePredefinedenum corresponding to different convention variants would map to a single value of theCoarsePredefinedenum. AndCoarsePredefinedcould be used as a key to obtain aUnaryOperator<TransformProvider>both when building the cached, predefined frames and when building the uncached ITRF frames. (I don’t like theCoarsePredefinedname, it is just a placeholder for discussion.)
These are just thoughts I am throwing out there to see if there is interest in such a feature. If there is interest, I am open to implementation ideas that are much better than my suggestions above.