Alfriend1999.java

  1. /* Copyright 2002-2024 CS GROUP
  2.  * Licensed to CS GROUP (CS) under one or more
  3.  * contributor license agreements.  See the NOTICE file distributed with
  4.  * this work for additional information regarding copyright ownership.
  5.  * CS licenses this file to You under the Apache License, Version 2.0
  6.  * (the "License"); you may not use this file except in compliance with
  7.  * the License.  You may obtain a copy of the License at
  8.  *
  9.  *   http://www.apache.org/licenses/LICENSE-2.0
  10.  *
  11.  * Unless required by applicable law or agreed to in writing, software
  12.  * distributed under the License is distributed on an "AS IS" BASIS,
  13.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.  * See the License for the specific language governing permissions and
  15.  * limitations under the License.
  16.  */
  17. package org.orekit.ssa.collision.shorttermencounter.probability.twod;

  18. import org.hipparchus.CalculusFieldElement;
  19. import org.hipparchus.util.FastMath;

  20. /**
  21.  * Compute the probability of collision using the method described in : "Kyle Alfriend, Maruthi Akella, Joseph Frisbee, James
  22.  * Foster, Deok-Jin Lee, and Matthew Wilkins. Probability of ProbabilityOfCollision Error Analysis. Space Debris, 1(1):21–35,
  23.  * 1999.".
  24.  * <p>It assumes :
  25.  *     <ul>
  26.  *         <li>Short encounter leading to a linear relative motion.</li>
  27.  *         <li>Spherical collision object.</li>
  28.  *         <li>Uncorrelated positional covariance.</li>
  29.  *         <li>Gaussian distribution of the position uncertainties.</li>
  30.  *         <li>Deterministic velocity i.e. no velocity uncertainties.</li>
  31.  *         <li>Both objects are in circular orbits (eq 14).</li>
  32.  *         <li>Probability density function is constant over the collision disk (eq 18).</li>
  33.  *     </ul>
  34.  * <p>
  35.  * By assuming a constant probability density function over the collision circle this method will,
  36.  * <b>most of the time</b>, give much higher probability of collision than other regular methods.
  37.  * That is why it is qualified as a maximum probability of collision computing method.</p>
  38.  *
  39.  * @author Vincent Cucchietti
  40.  * @since 12.0
  41.  */
  42. public class Alfriend1999 extends AbstractAlfriend1999 {

  43.     /** Empty constructor. */
  44.     public Alfriend1999() {
  45.         super(ShortTermEncounter2DPOCMethodType.ALFRIEND_1999.name());
  46.     }

  47.     /** {@inheritDoc} */
  48.     @Override
  49.     public boolean isAMaximumProbabilityOfCollisionMethod() {
  50.         return true;
  51.     }

  52.     /** {@inheritDoc} */
  53.     @Override
  54.     public ShortTermEncounter2DPOCMethodType getType() {
  55.         return ShortTermEncounter2DPOCMethodType.ALFRIEND_1999;
  56.     }

  57.     /** {@inheritDoc} */
  58.     @Override
  59.     double computeValue(final double radius, final double squaredMahalanobisDistance,
  60.                         final double covarianceMatrixDeterminant) {
  61.         return FastMath.exp(-0.5 * squaredMahalanobisDistance) * radius * radius /
  62.                 (2 * FastMath.sqrt(covarianceMatrixDeterminant));
  63.     }

  64.     /** {@inheritDoc} */
  65.     @Override
  66.     <T extends CalculusFieldElement<T>> T computeValue(final T radius, final T squaredMahalanobisDistance,
  67.                                                        final T covarianceMatrixDeterminant) {
  68.         return squaredMahalanobisDistance.multiply(-0.5).exp().multiply(radius.square())
  69.                                          .divide(covarianceMatrixDeterminant.sqrt().multiply(2.));
  70.     }

  71. }