I have a problem recently in AbsoluteDate.java. I have tried to create createGravityField(inputData); (as in the tutorial). But an exception raised in AbsoluteDate.java in line 315:
final SumAndResidual sumAndResidual = MathUtils.twoSum(seconds, tsOffset);
The execution is:
Exception in thread “main” java.lang.NoSuchMethodError: ‘org.hipparchus.util.MathUtils$SumAndResidual org.hipparchus.util.MathUtils.twoSum(double, double)’
Can you please help me to understand what is the problem? I appreciate it. Please note that I’m using the develop orekit.
The implementation using MathUtils.twoSum(seconds, tsOffset) in AbsoluteDate class is recent (i.e. 5 weeks ago). It is a double implementation: one part in Hipparchus library (see commit 2b062b of Hipparchus) and one part in Orekit library (see commit 5b250e of Orekit).
Therefore, if you are using the development version of Orekit, you must also use the development version of Hipparchus library (i.e. master branch) in order to have the last changes in MathUtils.twoSum(...)
I have checked the build path of all projects and I did not find anything strange. I know it may silly but can you check if I miss any steps here? It’s now 2 days I’m on this point
Depending on how they are configured, Eclipse project may import dependencies from either official maven published artifacts or from other projects in the same eclipse workspace.
I guess your orekit-tutorial projects uses the maven published artifacts and doesn’t use the development versions you downloaded alongside, despite they are available close.
You can righ-click on the orekit-tutorials entry in the package explorer and from the context menu select “Build Path → Configure Build Path…”. Then, look into this wizard, there should be one tab for “Projects” where you could point to the develop version you downloaded/ You may also need to look at the “Order and Export” tab and rearrange the order for electing dependencies, making sure he projects are used before the “Maven Dependencies” (or even that the “Maven Dependencies” are unchecked).
Beware that this is not the standard setting since most people would like to use officially published version. This configuration is useful when someone needs to rely on still unpublished development version, so it requires this kind of manual configuration.