I started trying out the new Collision package in Orekit on the development branch.
First of all, thanks a lot for the great effort to implement this! I think it is a really great addition to Orekit for everyone working on space flight safety! Very nice work!
I did some validation of the Patera2005 method and added some unit tests from the NASA CARA Tools (GitHub - nasa/CARA_Analysis_Tools). These unit tests check the calculated probability of collision (Pc) against Monte-Carlo obtained Pc values for different CDMs (see https://github.com/nasa/CARA_Analysis_Tools/blob/master/two-dimension_Pc/UnitTest/ProbabilityOfCollisionCode/Pc2D_Foster_UnitTest.m)
I found that some of the unit tests fail using the default settings for the Patera2005 method:
maxNbOfEval(maximum number of function evaluation when integrating) is by default 5000. To avoid getting “org.hipparchus.exception.MathIllegalStateException: maximal count (5000) exceeded” errors, I needed to set the maxNbOfEval to 10,000 or 50,000 in some cases.
minimalIterationCountof the TrapezoidIntegrator (which I used for integration) is by default 3. With this value, in one case Patera2005 returned a Pc of 3.742e-28, whereas a Pc of 0.04932 was expected(!). By changing the minimalIterationCount to 5, I got the expected Pc of 0.04932.
Therefore, it seems that the default settings for
minimalIterationCount are not always suitable for computing the Pc. In particular, with
minimalIterationCount = 3 the calculated Pc was completely off.
I attached the Patera2005 extended unit tests: one with default settings that fails and one with updated settings that succeeds. It should work on the latest development branch.
Patera2005Test.zip (30.3 KB)
Since the probability of collision is an important parameter for collision avoidance decision making, it may be wise to change the default values of the two parameters for Pc calculations to avoid unexpected errors.
What do you think?