diff --git a/build.xml b/build.xml index f4b377e9bd..a549efb6d7 100644 --- a/build.xml +++ b/build.xml @@ -2,7 +2,7 @@ - + diff --git a/pom.xml b/pom.xml index 5de71c6664..c86cb6b9ca 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.orekit orekit jar - 10.3 + 10.3.1 ORbit Extrapolation KIT http://www.orekit.org/ diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 1411a7a981..f3a7c4ab9b 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -20,6 +20,14 @@ Orekit Changes + + + Fixed potential infinite loops in tesselation in very rare cases due to numerical noise. + + - - Updated Hipparchus version to 1.8 and updated code with new functionalities. + + Updated Hipparchus version to 1.8 and updated code with new functionalities. Added aggregator for bounded attitude providers. diff --git a/src/main/java/org/orekit/models/earth/tessellation/EllipsoidTessellator.java b/src/main/java/org/orekit/models/earth/tessellation/EllipsoidTessellator.java index af4b996b45..e086a7c98e 100644 --- a/src/main/java/org/orekit/models/earth/tessellation/EllipsoidTessellator.java +++ b/src/main/java/org/orekit/models/earth/tessellation/EllipsoidTessellator.java @@ -26,6 +26,7 @@ import java.util.NoSuchElementException; import java.util.Queue; +import org.hipparchus.exception.LocalizedCoreFormats; import org.hipparchus.geometry.euclidean.threed.Vector3D; import org.hipparchus.geometry.partitioning.BSPTree; import org.hipparchus.geometry.partitioning.Hyperplane; @@ -41,6 +42,7 @@ import org.hipparchus.util.MathUtils; import org.orekit.bodies.GeodeticPoint; import org.orekit.bodies.OneAxisEllipsoid; +import org.orekit.errors.OrekitException; import org.orekit.errors.OrekitInternalError; /** Class used to tessellate an interest zone on an ellipsoid in either @@ -65,6 +67,11 @@ */ public class EllipsoidTessellator { + /** Safety limit to avoid infinite loops during tesselation due to numerical noise. + * @since 10.3.1 + */ + private static final int MAX_ITER = 1000; + /** Number of segments tiles sides are split into for tiles fine positioning. */ private final int quantization; @@ -164,8 +171,13 @@ public List> tessellate(final SphericalPolygonsSet zone, SphericalPolygonsSet remaining = (SphericalPolygonsSet) zone.copySelf(); S2Point inside = getInsidePoint(remaining); + int count = 0; while (inside != null) { + if (++count > MAX_ITER) { + throw new OrekitException(LocalizedCoreFormats.MAX_COUNT_EXCEEDED, MAX_ITER); + } + // find a mesh covering at least one connected part of the zone final List mergingSeeds = new ArrayList(); Mesh mesh = new Mesh(ellipsoid, zone, aiming, splitLength, splitWidth, inside); @@ -236,8 +248,13 @@ public List> sample(final SphericalPolygonsSet zone, SphericalPolygonsSet remaining = (SphericalPolygonsSet) zone.copySelf(); S2Point inside = getInsidePoint(remaining); + int count = 0; while (inside != null) { + if (++count > MAX_ITER) { + throw new OrekitException(LocalizedCoreFormats.MAX_COUNT_EXCEEDED, MAX_ITER); + } + // find a mesh covering at least one connected part of the zone final List mergingSeeds = new ArrayList(); Mesh mesh = new Mesh(ellipsoid, zone, aiming, splitLength, splitWidth, inside); @@ -317,8 +334,13 @@ private void neighborExpandMesh(final Mesh mesh, final Collection see boolean expanding = true; final Queue newNodes = new LinkedList(); newNodes.addAll(seeds); + int count = 0; while (expanding) { + if (++count > MAX_ITER) { + throw new OrekitException(LocalizedCoreFormats.MAX_COUNT_EXCEEDED, MAX_ITER); + } + // first expansion step: set up the mesh so that all its // inside nodes are completely surrounded by at least // one layer of outside nodes diff --git a/src/site/markdown/downloads.md.vm b/src/site/markdown/downloads.md.vm index 8b527daad7..affcd658d7 100644 --- a/src/site/markdown/downloads.md.vm +++ b/src/site/markdown/downloads.md.vm @@ -45,7 +45,7 @@ with groupID org.orekit and artifactId orekit so maven internal mechanism will download automatically all artifacts and dependencies as required. -#set ( $versions = {"10.3": "2020-12-21", "10.2": "2020-07-14", "10.1": "2020-02-19", "10.0": "2019-06-24", "9.3.1": "2019-03-16", "9.3": "2019-01-25", "9.2": "2018-05-26","9.1": "2017-11-26","9.0.1": "2017-11-03","9.0": "2017-07-26","8.0.1": "2017-11-03","8.0": "2016-06-30","7.2.1": "2017-11-03","7.2": "2016-04-05","7.1": "2016-02-07","7.0": "2015-01-11","6.1": "2013-12-13","6.0": "2013-04-23","5.0.3": "2011-07-13","5.0.2": "2011-07-11","5.0.1": "2011-04-18"} ) +#set ( $versions = {"10.3.1": "2021-06-16", "10.3": "2020-12-21", "10.2": "2020-07-14", "10.1": "2020-02-19", "10.0": "2019-06-24", "9.3.1": "2019-03-16", "9.3": "2019-01-25", "9.2": "2018-05-26","9.1": "2017-11-26","9.0.1": "2017-11-03","9.0": "2017-07-26","8.0.1": "2017-11-03","8.0": "2016-06-30","7.2.1": "2017-11-03","7.2": "2016-04-05","7.1": "2016-02-07","7.0": "2015-01-11","6.1": "2013-12-13","6.0": "2013-04-23","5.0.3": "2011-07-13","5.0.2": "2011-07-11","5.0.1": "2011-04-18"} ) #foreach( $version in $versions.entrySet() ) | package | link | diff --git a/src/site/markdown/faq.md b/src/site/markdown/faq.md index e4ee92e254..015124183c 100644 --- a/src/site/markdown/faq.md +++ b/src/site/markdown/faq.md @@ -116,29 +116,30 @@ with version 4.1, and up to 7.2, Orekit depends only on officially released vers Apache Commons Math. Starting with version 8.0, Orekit has switched from Apache Commons Math to Hipparchus - version | dependency ----------------|--------------------------------------------- - Orekit 4.1 | Apache Commons Math 2.0 - Orekit 5.0 | Apache Commons Math 2.1 - Orekit 5.0.3 | Apache Commons Math 2.2 - Orekit 6.0 | Apache Commons Math 3.2 - Orekit 6.1 | Apache Commons Math 3.2 - Orekit 7.0 | Apache Commons Math 3.4.1 - Orekit 7.1 | Apache Commons Math 3.6 - Orekit 7.2 | Apache Commons Math 3.6.1 - Orekit 7.2.1 | Apache Commons Math 3.6.1 - Orekit 8.0 | Hipparchus 1.0 - Orekit 8.0.1 | Hipparchus 1.0 - Orekit 9.0 | Hipparchus 1.1 - Orekit 9.0.1 | Hipparchus 1.1 - Orekit 9.1 | Hipparchus 1.2 - Orekit 9.2 | Hipparchus 1.3 - Orekit 9.3 | Hipparchus 1.4 - Orekit 9.3.1 | Hipparchus 1.4 - Orekit 10.0 | Hipparchus 1.5 - Orekit 10.1 | Hipparchus 1.6 - Orekit 10.2 | Hipparchus 1.7 - Orekit 10.3 | Hipparchus 1.8 + version | dependency +----------------|--------------------------------------------- + Orekit 4.1 | Apache Commons Math 2.0 + Orekit 5.0 | Apache Commons Math 2.1 + Orekit 5.0.3 | Apache Commons Math 2.2 + Orekit 6.0 | Apache Commons Math 3.2 + Orekit 6.1 | Apache Commons Math 3.2 + Orekit 7.0 | Apache Commons Math 3.4.1 + Orekit 7.1 | Apache Commons Math 3.6 + Orekit 7.2 | Apache Commons Math 3.6.1 + Orekit 7.2.1 | Apache Commons Math 3.6.1 + Orekit 8.0 | Hipparchus 1.0 + Orekit 8.0.1 | Hipparchus 1.0 + Orekit 9.0 | Hipparchus 1.1 + Orekit 9.0.1 | Hipparchus 1.1 + Orekit 9.1 | Hipparchus 1.2 + Orekit 9.2 | Hipparchus 1.3 + Orekit 9.3 | Hipparchus 1.4 + Orekit 9.3.1 | Hipparchus 1.4 + Orekit 10.0 | Hipparchus 1.5 + Orekit 10.1 | Hipparchus 1.6 + Orekit 10.2 | Hipparchus 1.7 + Orekit 10.3 | Hipparchus 1.8 + Orekit 10.3.1 | Hipparchus 1.8 ### Maven failed to compile Orekit and complained about a missing artifact.