How to use ExceptionalDataContext

Hello,

I have recently implemented the use of custom data contexts, and moving forward I’d like to prevent anyone from making use of the default data context.

On this page Orekit – Data contexts I see the following example:

// Force initialization of classes with static fields that use the default data context
Object o = AbsoluteDate.ARBITRARY_DATE;
o = InertialProvider.of(Frame);
// Prevent further use of the default data context
DataContext.setDefault(new ExceptionalDataContext());

However, I do not seem to have access to InertialProvider in my version of Orekit at 12.1
I am also confused by the use of Frame here, does this refer to Frame.class?

Is this an outdated example? I am unsure how to force initialization of classes with static fields that use the default data context. Thanks for any help you can offer!

Upon further inspection, it looks like this line:
o = InertialProvider.of(Frame);
can be omitted and the example code works!

1 Like

Indeed, InertialProvider has recently been replaced by FrameAlignedProvider in the 12.0 version if i remember well.

Cheers,
Vincent