diff --git a/NOTICE.txt b/NOTICE.txt index b65e6c654d78ebf3e973e85ca146437c851335e3..53b85ab7c8f25160bdfb01a716e6cbf786ba2395 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -1,8 +1,8 @@ RUGGED -Copyright 2013-2020 CS GROUP +Copyright 2013-2022 CS GROUP This product includes software developed by -CS GROUP (http://www.c-s.fr/) +CS GROUP (https://www.csgroup.eu/) This product depends on software developed by The Apache Software Foundation (http://www.apache.org/) diff --git a/Readme.md b/Readme.md index f5cc611486b655abd9d4e5c6b0456d776f18c2c6..d6a21bcc2ea2c7a2e28bd67cf6992be633ba7611 100644 --- a/Readme.md +++ b/Readme.md @@ -22,6 +22,7 @@ Direct and inverse location can be used to perform full ortho-rectification of images and correlation between sensors observing the same area. +[](http://www.apache.org/licenses/LICENSE-2.0.html) [](https://sonar.orekit.org/dashboard?id=org.orekit%3Arugged) [](https://sonar.orekit.org/component_measures?id=org.orekit%3Arugged&metric=coverage&view=treemap) @@ -30,7 +31,7 @@ images and correlation between sensors observing the same area. ### Official releases [Official Rugged releases](https://gitlab.orekit.org/orekit/rugged/-/releases) -are available on our [Gitlab instance](https://gitlab.orekit.org/). They are +are available on our [Gitlab instance](https://gitlab.orekit.org/orekit/rugged). They are also available in the [Maven repository](https://mvnrepository.com/artifact/org.orekit/rugged). @@ -93,6 +94,6 @@ More detailed information is available in the ## License -Rugged is licensed by [CS GROUP](https://www.c-s.fr/) under +Rugged is licensed by [CS GROUP](https://www.csgroup.eu/) under the [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html). A copy of this license is provided in the [LICENSE.txt](LICENSE.txt) file. diff --git a/checkstyle.xml b/checkstyle.xml index b6b597bb92298099adfcfd27638bc5dbd4274731..154548d400f2c89f06e0225b19d701583ab596aa 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -1,6 +1,7 @@ <?xml version="1.0"?> -<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" - "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> +<!DOCTYPE module PUBLIC + "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" + "https://checkstyle.org/dtds/configuration_1_3.dtd"> <module name="Checker"> <module name="TreeWalker"> diff --git a/pom.xml b/pom.xml index 45b79a53f7a93fddf18764a1f3a63659ed150894..645ba1b3d814000b4aaac992f44091f89157086f 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.orekit</groupId> <artifactId>rugged</artifactId> - <version>2.2</version> + <version>3.0</version> <packaging>jar</packaging> <name>Rugged</name> <url>https://www.orekit.org/rugged</url> @@ -19,8 +19,8 @@ <!-- COTS version --> - <rugged.orekit.version>10.2</rugged.orekit.version> - <rugged.junit.version>4.12</rugged.junit.version> + <rugged.orekit.version>11.2</rugged.orekit.version> + <rugged.junit.version>4.13.2</rugged.junit.version> <!-- Compilers and Tools version --> <rugged.compiler.source>1.8</rugged.compiler.source> @@ -32,31 +32,31 @@ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> - <rugged.spotbugs-maven-plugin.version>4.0.4</rugged.spotbugs-maven-plugin.version> - <rugged.jacoco-maven-plugin.version>0.8.5</rugged.jacoco-maven-plugin.version> - <rugged.maven-bundle-plugin.version>4.2.1</rugged.maven-bundle-plugin.version> + <rugged.spotbugs-maven-plugin.version>4.5.3.0</rugged.spotbugs-maven-plugin.version> + <rugged.jacoco-maven-plugin.version>0.8.7</rugged.jacoco-maven-plugin.version> + <rugged.maven-bundle-plugin.version>5.1.4</rugged.maven-bundle-plugin.version> <rugged.maven-changes-plugin.version>2.12.1</rugged.maven-changes-plugin.version> - <rugged.maven-checkstyle-plugin.version>3.1.1</rugged.maven-checkstyle-plugin.version> - <rugged.checkstyle.version>8.33</rugged.checkstyle.version> + <rugged.maven-checkstyle-plugin.version>3.1.2</rugged.maven-checkstyle-plugin.version> + <rugged.checkstyle.version>9.3</rugged.checkstyle.version> <rugged.maven-clean-plugin.version>3.1.0</rugged.maven-clean-plugin.version> - <rugged.maven-compiler-plugin.version>3.8.1</rugged.maven-compiler-plugin.version> - <rugged.maven-javadoc-plugin.version>3.2.0</rugged.maven-javadoc-plugin.version> - <rugged.maven-jar-plugin.version>3.2.0</rugged.maven-jar-plugin.version> - <rugged.maven-jxr-plugin.version>3.0.0</rugged.maven-jxr-plugin.version> + <rugged.maven-compiler-plugin.version>3.9.0</rugged.maven-compiler-plugin.version> + <rugged.maven-javadoc-plugin.version>3.3.1</rugged.maven-javadoc-plugin.version> + <rugged.maven-jar-plugin.version>3.2.2</rugged.maven-jar-plugin.version> + <rugged.maven-jxr-plugin.version>3.1.1</rugged.maven-jxr-plugin.version> <rugged.plantuml-maven-plugin.version>1.2</rugged.plantuml-maven-plugin.version> - <rugged.plantuml.version>1.2020.14</rugged.plantuml.version> - <rugged.maven-project-info-reports-plugin.version>3.1.0</rugged.maven-project-info-reports-plugin.version> - <rugged.maven-resources-plugin.version>3.1.0</rugged.maven-resources-plugin.version> - <rugged.maven-site-plugin.version>3.9.1</rugged.maven-site-plugin.version> + <rugged.plantuml.version>1.2022.1</rugged.plantuml.version> + <rugged.maven-project-info-reports-plugin.version>3.2.1</rugged.maven-project-info-reports-plugin.version> + <rugged.maven-resources-plugin.version>3.2.0</rugged.maven-resources-plugin.version> + <rugged.maven-site-plugin.version>3.10.0</rugged.maven-site-plugin.version> <rugged.maven-source-plugin.version>3.2.1</rugged.maven-source-plugin.version> <!-- Surefire 2.22.2 is the last to support CentOS/RedHat 7 due to https://issues.apache.org/jira/browse/SUREFIRE-1628 --> <rugged.maven-surefire-plugin.version>2.22.2</rugged.maven-surefire-plugin.version> <rugged.maven-surefire-report-plugin.version>3.0.0-M5</rugged.maven-surefire-report-plugin.version> <rugged.jgit.buildnumber.version>1.2.10</rugged.jgit.buildnumber.version> - <rugged.build-helper-maven-plugin.version>3.2.0</rugged.build-helper-maven-plugin.version> + <rugged.build-helper-maven-plugin.version>3.3.0</rugged.build-helper-maven-plugin.version> <rugged.nexus-staging-maven-plugin.version>1.6.8</rugged.nexus-staging-maven-plugin.version> - <rugged.maven-gpg-plugin.version>1.6</rugged.maven-gpg-plugin.version> + <rugged.maven-gpg-plugin.version>3.0.1</rugged.maven-gpg-plugin.version> <rugged.maven-install-plugin.version>3.0.0-M1</rugged.maven-install-plugin.version> </properties> @@ -122,13 +122,13 @@ <organization> <name>CS GROUP</name> - <url>http://www.c-s.fr/</url> + <url>https://www.csgroup.eu/</url> </organization> <licenses> <license> <name>The Apache Software License, Version 2.0</name> - <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> + <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url> </license> </licenses> @@ -317,6 +317,11 @@ </dependency> </dependencies> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-project-info-reports-plugin</artifactId> + <version>${rugged.maven-project-info-reports-plugin.version}</version> + </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changes-plugin</artifactId> @@ -420,6 +425,7 @@ <configuration> <threshold>Normal</threshold> <effort>Default</effort> + <onlyAnalyze>org.orekit.rugged.*</onlyAnalyze> <excludeFilterFile>${basedir}/spotbugs-exclude-filter.xml</excludeFilterFile> </configuration> </plugin> @@ -471,7 +477,7 @@ <version>${rugged.maven-jxr-plugin.version}</version> <configuration> <linkJavadoc>false</linkJavadoc> - <bottom><![CDATA[Copyright © ${project.inceptionYear}-{currentYear} <a href="http://www.c-s.fr">CS GROUP</a>. All rights reserved.]]></bottom> + <bottom><![CDATA[Copyright © ${project.inceptionYear}-{currentYear} <a href="https://www.csgroup.eu/">CS GROUP</a>. All rights reserved.]]></bottom> </configuration> </plugin> <plugin> @@ -479,7 +485,7 @@ <artifactId>maven-javadoc-plugin</artifactId> <version>${rugged.maven-javadoc-plugin.version}</version> <configuration> - <bottom><![CDATA[Copyright © ${project.inceptionYear}-{currentYear} <a href="http://www.c-s.fr">CS GROUP</a>. All rights reserved.]]></bottom> + <bottom><![CDATA[Copyright © ${project.inceptionYear}-{currentYear} <a href="https://www.csgroup.eu/">CS GROUP</a>. All rights reserved.]]></bottom> <links> <link>https://docs.oracle.com/javase/8/docs/api/</link> <link>https://www.hipparchus.org/apidocs/</link> @@ -540,6 +546,7 @@ <Implementation-Build>${rugged.implementation.build}</Implementation-Build> <X-Compile-Source-JDK>${rugged.compiler.source}</X-Compile-Source-JDK> <X-Compile-Target-JDK>${rugged.compiler.target}</X-Compile-Target-JDK> + <Automatic-Module-Name>org.orekit.rugged</Automatic-Module-Name> </manifestEntries> </archive> </configuration> diff --git a/spotbugs-exclude-filter.xml b/spotbugs-exclude-filter.xml index f06c28a6db3204c09a1c41ab9da95459eee03108..965bc1e5e94194674498eb47a2765b2c4d1a5e8e 100644 --- a/spotbugs-exclude-filter.xml +++ b/spotbugs-exclude-filter.xml @@ -6,4 +6,238 @@ --> <FindBugsFilter> + <!-- The following internal representation exposure are intentional, + They are used to pass data back and forth between classes + --> + <Match> + <Class name="org.orekit.rugged.adjustment.AdjustmentContext"/> + <Method name="<init>" + params="java.util.Collection, + org.orekit.rugged.adjustment.measurements.Observables" + returns="void" /> + <Bug pattern="EI_EXPOSE_REP2" /> + </Match> + <Match> + <Class name="org.orekit.rugged.adjustment.GroundOptimizationProblemBuilder"/> + <Method name="<init>" + params="java.util.List,org.orekit.rugged.adjustment.measurements.Observables, + org.orekit.rugged.api.Rugged" + returns="void" /> + <Bug pattern="EI_EXPOSE_REP2" /> + </Match> + <Match> + <Class name="org.orekit.rugged.adjustment.measurements.SensorToSensorMapping"/> + <Or> + <Method name="getBodyDistances" + params="" + returns="java.util.List" /> + <Method name="getLosDistances" + params="" + returns="java.util.List" /> + </Or> + <Bug pattern="EI_EXPOSE_REP" /> + </Match> + <Match> + <Class name="org.orekit.rugged.api.Rugged"/> + <Or> + <Method name="getEllipsoid" + params="" + returns="org.orekit.rugged.utils.ExtendedEllipsoid" /> + <Method name="getRefractionCorrection" + params="" + returns="org.orekit.rugged.refraction.AtmosphericRefraction" /> + </Or> + <Bug pattern="EI_EXPOSE_REP" /> + </Match> + <Match> + <Class name="org.orekit.rugged.api.RuggedBuilder"/> + <Or> + <Method name="getEllipsoid" + params="" + returns="org.orekit.rugged.utils.ExtendedEllipsoid" /> + <Method name="getPositionsVelocities" + params="" + returns="java.util.List" /> + <Method name="getQuaternions" + params="" + returns="java.util.List" /> + <Method name="getRefractionCorrection" + params="" + returns="org.orekit.rugged.refraction.AtmosphericRefraction" /> + </Or> + <Bug pattern="EI_EXPOSE_REP" /> + </Match> + <Match> + <Class name="org.orekit.rugged.api.RuggedBuilder"/> + <Or> + <Method name="setRefractionCorrection" + params="org.orekit.rugged.refraction.AtmosphericRefraction" + returns="org.orekit.rugged.api.RuggedBuilder" /> + <Method name="setTrajectory" + params="double, + int, + org.orekit.utils.CartesianDerivativesFilter, + org.orekit.utils.AngularDerivativesFilter, + org.orekit.propagation.Propagator" + returns="org.orekit.rugged.api.RuggedBuilder" /> + <Method name="setTrajectory" + params="org.orekit.frames.Frame, + java.util.List, + int, + org.orekit.utils.CartesianDerivativesFilter, + java.util.List, + int, + org.orekit.utils.AngularDerivativesFilter" + returns="org.orekit.rugged.api.RuggedBuilder" /> + </Or> + <Bug pattern="EI_EXPOSE_REP2" /> + </Match> + <Match> + <Class name="org.orekit.rugged.errors.RuggedExceptionWrapper"/> + <Method name="getException" + params="" + returns="org.orekit.rugged.errors.RuggedException" /> + <Bug pattern="EI_EXPOSE_REP" /> + </Match> + <Match> + <Class name="org.orekit.rugged.errors.RuggedExceptionWrapper"/> + <Method name="<init>" + params="org.orekit.rugged.errors.RuggedException" + returns="void" /> + <Bug pattern="EI_EXPOSE_REP2" /> + </Match> + <Match> + <Class name="org.orekit.rugged.linesensor.LineSensor"/> + <Method name="getPosition" + params="" + returns="org.hipparchus.geometry.euclidean.threed.Vector3D" /> + <Bug pattern="EI_EXPOSE_REP" /> + </Match> + <Match> + <Class name="org.orekit.rugged.linesensor.LineSensor"/> + <Method name="<init>" + params="java.lang.String, + org.orekit.rugged.linesensor.LineDatation, + org.hipparchus.geometry.euclidean.threed.Vector3D, + org.orekit.rugged.los.TimeDependentLOS" + returns="void" /> + <Bug pattern="EI_EXPOSE_REP2" /> + </Match> + <Match> + <Class name="org.orekit.rugged.linesensor.SensorMeanPlaneCrossing"/> + <Method name="getMeanPlaneNormal" + params="" + returns="org.hipparchus.geometry.euclidean.threed.Vector3D" /> + <Bug pattern="EI_EXPOSE_REP" /> + </Match> + <Match> + <Class name="org.orekit.rugged.linesensor.SensorMeanPlaneCrossing"/> + <Method name="<init>" + params="org.orekit.rugged.linesensor.LineSensor, + org.orekit.rugged.utils.SpacecraftToObservedBody, + int, + int, + boolean, + boolean, + int, + double, + org.hipparchus.geometry.euclidean.threed.Vector3D, + java.util.stream.Stream" + returns="void" /> + <Bug pattern="EI_EXPOSE_REP2" /> + </Match> + <Match> + <Class name="org.orekit.rugged.linesensor.SensorMeanPlaneCrossing$CrossingResult"/> + <Or> + <Method name="getTarget" + params="" + returns="org.hipparchus.geometry.euclidean.threed.Vector3D" /> + <Method name="getTargetDirection" + params="" + returns="org.hipparchus.geometry.euclidean.threed.Vector3D" /> + <Method name="getTargetDirectionDerivative" + params="" + returns="org.hipparchus.geometry.euclidean.threed.Vector3D" /> + </Or> + <Bug pattern="EI_EXPOSE_REP" /> + </Match> + <Match> + <Class name="org.orekit.rugged.linesensor.SensorMeanPlaneCrossing$CrossingResult"/> + <Method name="<init>" + params="org.orekit.time.AbsoluteDate, + double, + org.hipparchus.geometry.euclidean.threed.Vector3D, + org.hipparchus.geometry.euclidean.threed.Vector3D, + org.hipparchus.geometry.euclidean.threed.Vector3D" + returns="void" /> + <Bug pattern="EI_EXPOSE_REP2" /> + </Match> + <Match> + <Class name="org.orekit.rugged.los.FixedRotation"/> + <Method name="<init>" + params="java.lang.String, + org.hipparchus.geometry.euclidean.threed.Vector3D,double" + returns="void" /> + <Bug pattern="EI_EXPOSE_REP2" /> + </Match> + <Match> + <Class name="org.orekit.rugged.los.LOSBuilder"/> + <Method name="<init>" + params="java.util.List" + returns="void" /> + <Bug pattern="EI_EXPOSE_REP2" /> + </Match> + <Match> + <Class name="org.orekit.rugged.los.PolynomialRotation"/> + <Method name="<init>" + params="java.lang.String, + org.hipparchus.geometry.euclidean.threed.Vector3D, + org.orekit.time.AbsoluteDate, + double[]" + returns="void" /> + <Bug pattern="EI_EXPOSE_REP2" /> + </Match> + <Match> + <Class name="org.orekit.rugged.refraction.AtmosphericRefraction"/> + <Method name="getComputationParameters" + params="" + returns="org.orekit.rugged.refraction.AtmosphericComputationParameters" /> + <Bug pattern="EI_EXPOSE_REP" /> + </Match> + <Match> + <Class name="org.orekit.rugged.refraction.MultiLayerModel"/> + <Or> + <Method name="<init>" + params="org.orekit.rugged.utils.ExtendedEllipsoid" + returns="void" /> + <Method name="<init>" + params="org.orekit.rugged.utils.ExtendedEllipsoid, + java.util.List" + returns="void" /> + </Or> + <Bug pattern="EI_EXPOSE_REP2" /> + </Match> + <Match> + <Class name="org.orekit.rugged.utils.RoughVisibilityEstimator"/> + <Method name="<init>" + params="org.orekit.bodies.OneAxisEllipsoid, + org.orekit.frames.Frame,java.util.List" + returns="void" /> + <Bug pattern="EI_EXPOSE_REP2" /> + </Match> + <Match> + <Class name="org.orekit.rugged.utils.SpacecraftToObservedBody"/> + <Method name="<init>" + params="org.orekit.frames.Frame, + org.orekit.frames.Frame, + org.orekit.time.AbsoluteDate, + org.orekit.time.AbsoluteDate, + double, + double, + java.util.List, + java.util.List" + returns="void" /> + <Bug pattern="EI_EXPOSE_REP2" /> + </Match> + </FindBugsFilter> diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 5796e6fcf688346b6fb7b20eaa062a45ad44eb3f..5fddce06c462b48bfba7b97a60783004942f26c2 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<!-- Copyright 2013-2020 CS GROUP +<!-- Copyright 2013-2022 CS GROUP Licensed to CS GROUP (CS) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. @@ -20,7 +20,26 @@ <title>Rugged Changes</title> </properties> <body> - <release version="2.2" date="2020-07-31" description="This is a minor release. + <release version="3.0" date="2022-07-05" description="This is a major release. + It fixes a few bugs. + This version depends on Orekit 11.2 and Hipparchus 2.1."> + <action dev="luc" type="update" issue="388"> + Fixed longitude normalization issue with tiles. + </action> + <action dev="guylaine" type="update" issue="391"> + Fixed inverse location issue with atmospheric refraction. + </action> + <action dev="luc" type="update" issue="387"> + Updated dependencies to Orekit 11.2 (and Hipparchus 2.1 ). + </action> + <action dev="guylaine" type="update" issue="390"> + Changed CS Group website URL. + </action> + <action dev="guylaine" type="update"> + Updated link to Sergeï Tanygin's paper about attitude interpolation in documentation. + </action> + </release> + <release version="2.2" date="2020-07-31" description="This is a minor release. It adds access to algorithm identifier, corrects an Earth constant for model IERS96, improves documentation and fixes a few bugs. diff --git a/src/design/dem-loading-class-diagram.puml b/src/design/dem-loading-class-diagram.puml index 4aadee43391a28c9b43026ca4aac3b0a399ced65..d8b5059d228e28ebbbb3dc14e3fc6d5a2cfe141f 100644 --- a/src/design/dem-loading-class-diagram.puml +++ b/src/design/dem-loading-class-diagram.puml @@ -1,4 +1,4 @@ -' Copyright 2013-2020 CS GROUP +' Copyright 2013-2022 CS GROUP ' Licensed to CS GROUP (CS) under one or more ' contributor license agreements. See the NOTICE file distributed with ' this work for additional information regarding copyright ownership. diff --git a/src/design/direct-location-class-diagram.puml b/src/design/direct-location-class-diagram.puml index 0357175139e83e015c78d6ae5695a71d8f33a15a..5ef90fba59cacaee330d5d327594bee96f12653e 100644 --- a/src/design/direct-location-class-diagram.puml +++ b/src/design/direct-location-class-diagram.puml @@ -1,4 +1,4 @@ -' Copyright 2013-2020 CS GROUP +' Copyright 2013-2022 CS GROUP ' Licensed to CS GROUP (CS) under one or more ' contributor license agreements. See the NOTICE file distributed with ' this work for additional information regarding copyright ownership. diff --git a/src/design/direct-location-sequence-diagram.puml b/src/design/direct-location-sequence-diagram.puml index 0a77382a083c6e212fc471f7e398a88966fe62d8..f1a9fa4ab19427d1790f319dd761e20ab1f1b71c 100644 --- a/src/design/direct-location-sequence-diagram.puml +++ b/src/design/direct-location-sequence-diagram.puml @@ -1,4 +1,4 @@ -' Copyright 2013-2020 CS GROUP +' Copyright 2013-2022 CS GROUP ' Licensed to CS GROUP (CS) under one or more ' contributor license agreements. See the NOTICE file distributed with ' this work for additional information regarding copyright ownership. diff --git a/src/design/duvenhage-inner-recursion-activity-diagram.puml b/src/design/duvenhage-inner-recursion-activity-diagram.puml index ee90b3635d5e888234b2e7d2ccd305970f2647b5..cdac26eb03f950a5bef8276c789c3001a5b6f0eb 100644 --- a/src/design/duvenhage-inner-recursion-activity-diagram.puml +++ b/src/design/duvenhage-inner-recursion-activity-diagram.puml @@ -1,4 +1,4 @@ -' Copyright 2013-2020 CS GROUP +' Copyright 2013-2022 CS GROUP ' Licensed to CS GROUP (CS) under one or more ' contributor license agreements. See the NOTICE file distributed with ' this work for additional information regarding copyright ownership. diff --git a/src/design/duvenhage-top-loop-activity-diagram.puml b/src/design/duvenhage-top-loop-activity-diagram.puml index 2eee57f5130594ee8e5647e83b5275f6e560694c..9b46a7392c6c654c121912525fcfcee038066fd3 100644 --- a/src/design/duvenhage-top-loop-activity-diagram.puml +++ b/src/design/duvenhage-top-loop-activity-diagram.puml @@ -1,4 +1,4 @@ -' Copyright 2013-2020 CS GROUP +' Copyright 2013-2022 CS GROUP ' Licensed to CS GROUP (CS) under one or more ' contributor license agreements. See the NOTICE file distributed with ' this work for additional information regarding copyright ownership. diff --git a/src/design/initialization-class-diagram.puml b/src/design/initialization-class-diagram.puml index a46655221f6d44d4940fcdc04859866f53adae95..26081cd5e85f3e06e731229526d686b898ee1737 100644 --- a/src/design/initialization-class-diagram.puml +++ b/src/design/initialization-class-diagram.puml @@ -1,4 +1,4 @@ -' Copyright 2013-2020 CS GROUP +' Copyright 2013-2022 CS GROUP ' Licensed to CS GROUP (CS) under one or more ' contributor license agreements. See the NOTICE file distributed with ' this work for additional information regarding copyright ownership. diff --git a/src/design/initialization-sequence-diagram.puml b/src/design/initialization-sequence-diagram.puml index a56b664f3c3ca3da15356f036fa154ed85f077e2..2bab83d0d5e21dfd8c9f3c5c43f29ce359f02b1d 100644 --- a/src/design/initialization-sequence-diagram.puml +++ b/src/design/initialization-sequence-diagram.puml @@ -1,4 +1,4 @@ -' Copyright 2013-2020 CS GROUP +' Copyright 2013-2022 CS GROUP ' Licensed to CS GROUP (CS) under one or more ' contributor license agreements. See the NOTICE file distributed with ' this work for additional information regarding copyright ownership. diff --git a/src/design/inverse-location-sequence-diagram.puml b/src/design/inverse-location-sequence-diagram.puml index 32c31713c46acf5f0acba70b8ea1387dff7ecdaa..61840940a7ed60348e66059f1ca7d28c7e99c05a 100644 --- a/src/design/inverse-location-sequence-diagram.puml +++ b/src/design/inverse-location-sequence-diagram.puml @@ -1,4 +1,4 @@ -' Copyright 2013-2020 CS GROUP +' Copyright 2013-2022 CS GROUP ' Licensed to CS GROUP (CS) under one or more ' contributor license agreements. See the NOTICE file distributed with ' this work for additional information regarding copyright ownership. diff --git a/src/design/parametric-los-class-diagram.puml b/src/design/parametric-los-class-diagram.puml index c0eaf26013a53670b3239348f49f2119e689a2af..ba4d0e49b516523789774217be02d918d5597020 100644 --- a/src/design/parametric-los-class-diagram.puml +++ b/src/design/parametric-los-class-diagram.puml @@ -1,4 +1,4 @@ -' Copyright 2013-2020 CS GROUP +' Copyright 2013-2022 CS GROUP ' Licensed to CS GROUP (CS) under one or more ' contributor license agreements. See the NOTICE file distributed with ' this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/adjustment/AdjustmentContext.java b/src/main/java/org/orekit/rugged/adjustment/AdjustmentContext.java index eac5284cf9a3927da2908737b84ceaf2e21ff3d4..e21b4624ad1a55487d9d837389b2264954d49561 100644 --- a/src/main/java/org/orekit/rugged/adjustment/AdjustmentContext.java +++ b/src/main/java/org/orekit/rugged/adjustment/AdjustmentContext.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -119,8 +119,8 @@ public class AdjustmentContext { public Optimum estimateFreeParameters(final Collection<String> ruggedNameList, final int maxEvaluations, final double parametersConvergenceThreshold) { - final List<Rugged> ruggedList = new ArrayList<Rugged>(); - final List<LineSensor> selectedSensors = new ArrayList<LineSensor>(); + final List<Rugged> ruggedList = new ArrayList<>(); + final List<LineSensor> selectedSensors = new ArrayList<>(); for (String ruggedName : ruggedNameList) { final Rugged rugged = this.viewingModel.get(ruggedName); if (rugged == null) { diff --git a/src/main/java/org/orekit/rugged/adjustment/GroundOptimizationProblemBuilder.java b/src/main/java/org/orekit/rugged/adjustment/GroundOptimizationProblemBuilder.java index ec9c758d51204f1173054fd1cdff99c07365274d..28335b2a7c9458d39e3f5ec82f378cef28a97157 100644 --- a/src/main/java/org/orekit/rugged/adjustment/GroundOptimizationProblemBuilder.java +++ b/src/main/java/org/orekit/rugged/adjustment/GroundOptimizationProblemBuilder.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -93,7 +93,7 @@ public class GroundOptimizationProblemBuilder extends OptimizationProblemBuilder protected void initMapping() { final String ruggedName = rugged.getName(); - this.sensorToGroundMappings = new ArrayList<SensorToGroundMapping>(); + this.sensorToGroundMappings = new ArrayList<>(); for (final LineSensor lineSensor : this.getSensors()) { final SensorToGroundMapping mapping = this.getMeasurements().getGroundMapping(ruggedName, lineSensor.getName()); if (mapping != null) { diff --git a/src/main/java/org/orekit/rugged/adjustment/InterSensorsOptimizationProblemBuilder.java b/src/main/java/org/orekit/rugged/adjustment/InterSensorsOptimizationProblemBuilder.java index 4f6b98308a3df3297a4ce9fbac54a38af11df927..fdddbed9ba287cd1f9b99e5032600f71e5ca64ae 100644 --- a/src/main/java/org/orekit/rugged/adjustment/InterSensorsOptimizationProblemBuilder.java +++ b/src/main/java/org/orekit/rugged/adjustment/InterSensorsOptimizationProblemBuilder.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -90,7 +90,7 @@ public class InterSensorsOptimizationProblemBuilder extends OptimizationProblemB @Override protected void initMapping() { - this.sensorToSensorMappings = new ArrayList<SensorToSensorMapping>(); + this.sensorToSensorMappings = new ArrayList<>(); for (final String ruggedNameA : this.ruggedMap.keySet()) { for (final String ruggedNameB : this.ruggedMap.keySet()) { diff --git a/src/main/java/org/orekit/rugged/adjustment/LeastSquareAdjuster.java b/src/main/java/org/orekit/rugged/adjustment/LeastSquareAdjuster.java index 9c893db88a749ef346439484ad5c7fdde10932f2..e744c1ff03159e3d0274040ebd8feeb40787ac16 100644 --- a/src/main/java/org/orekit/rugged/adjustment/LeastSquareAdjuster.java +++ b/src/main/java/org/orekit/rugged/adjustment/LeastSquareAdjuster.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/adjustment/OptimizationProblemBuilder.java b/src/main/java/org/orekit/rugged/adjustment/OptimizationProblemBuilder.java index 1dd9945076f6ff4c88170f67045aec3fe29ee375..0bd12a0a51fe37a9c1e64189b3f7ff2ecf1c69a2 100644 --- a/src/main/java/org/orekit/rugged/adjustment/OptimizationProblemBuilder.java +++ b/src/main/java/org/orekit/rugged/adjustment/OptimizationProblemBuilder.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/adjustment/OptimizerId.java b/src/main/java/org/orekit/rugged/adjustment/OptimizerId.java index 3be925295f3412a4105486d1663583c9c3780285..ba62a68a0ef60aada875ca84dc20f4fe9d91230f 100644 --- a/src/main/java/org/orekit/rugged/adjustment/OptimizerId.java +++ b/src/main/java/org/orekit/rugged/adjustment/OptimizerId.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/adjustment/measurements/Observables.java b/src/main/java/org/orekit/rugged/adjustment/measurements/Observables.java index 418e06cb5a59c596898c1c74f70d591ecad54429..94d77b0f3a64c6c784abc5b56e8d9c634a7f29ab 100644 --- a/src/main/java/org/orekit/rugged/adjustment/measurements/Observables.java +++ b/src/main/java/org/orekit/rugged/adjustment/measurements/Observables.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/adjustment/measurements/SensorMapping.java b/src/main/java/org/orekit/rugged/adjustment/measurements/SensorMapping.java index 64b290b35041a91f4948c283f0e72ab39678bd19..22b9ebc2adc5bf51716c7688aa7c90269268c760 100644 --- a/src/main/java/org/orekit/rugged/adjustment/measurements/SensorMapping.java +++ b/src/main/java/org/orekit/rugged/adjustment/measurements/SensorMapping.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/adjustment/measurements/SensorToGroundMapping.java b/src/main/java/org/orekit/rugged/adjustment/measurements/SensorToGroundMapping.java index 8962a9f221e5e70edb2ee032aed18019ea49e7d6..623befb6ddcffebf8061acaf685b193469a55f7a 100644 --- a/src/main/java/org/orekit/rugged/adjustment/measurements/SensorToGroundMapping.java +++ b/src/main/java/org/orekit/rugged/adjustment/measurements/SensorToGroundMapping.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -56,7 +56,7 @@ public class SensorToGroundMapping { public SensorToGroundMapping(final String ruggedName, final String sensorName) { this.sensorName = sensorName; - this.groundMapping = new SensorMapping<GeodeticPoint>(sensorName, ruggedName); + this.groundMapping = new SensorMapping<>(sensorName, ruggedName); } /** Get the name of the sensor to which mapping applies. diff --git a/src/main/java/org/orekit/rugged/adjustment/measurements/SensorToSensorMapping.java b/src/main/java/org/orekit/rugged/adjustment/measurements/SensorToSensorMapping.java index f5d950fe4237f3a1d73fd80e4e1a46cb3e3bbbf4..bef0ceda2a9aac4261f827a977998227fb5f2ac5 100644 --- a/src/main/java/org/orekit/rugged/adjustment/measurements/SensorToSensorMapping.java +++ b/src/main/java/org/orekit/rugged/adjustment/measurements/SensorToSensorMapping.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -82,11 +82,11 @@ public class SensorToSensorMapping { final String sensorNameB, final String ruggedNameB, final double bodyConstraintWeight) { - this.interMapping = new SensorMapping<SensorPixel>(sensorNameA, ruggedNameA); + this.interMapping = new SensorMapping<>(sensorNameA, ruggedNameA); this.sensorNameB = sensorNameB; this.ruggedNameB = ruggedNameB; - this.losDistances = new ArrayList<Double>(); - this.bodyDistances = new ArrayList<Double>(); + this.losDistances = new ArrayList<>(); + this.bodyDistances = new ArrayList<>(); this.bodyConstraintWeight = bodyConstraintWeight; } diff --git a/src/main/java/org/orekit/rugged/adjustment/measurements/package-info.java b/src/main/java/org/orekit/rugged/adjustment/measurements/package-info.java index f4cdf80af18638375177a962def144075029b83a..5814fbf3c989462e7d4a14e21cee155a5a4041f6 100644 --- a/src/main/java/org/orekit/rugged/adjustment/measurements/package-info.java +++ b/src/main/java/org/orekit/rugged/adjustment/measurements/package-info.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/adjustment/package-info.java b/src/main/java/org/orekit/rugged/adjustment/package-info.java index 04bef2dd1398c701a3ee136b1d0d5f1ec814cdf7..6adb28ed99631dd3228e397f8ef9356317460125 100644 --- a/src/main/java/org/orekit/rugged/adjustment/package-info.java +++ b/src/main/java/org/orekit/rugged/adjustment/package-info.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/api/AlgorithmId.java b/src/main/java/org/orekit/rugged/api/AlgorithmId.java index 1669b0a7e26d8242ef4d470e2bdd4e0cc047806f..b8efd8c172cbfbe070728efa580fe7f9a3f656d1 100644 --- a/src/main/java/org/orekit/rugged/api/AlgorithmId.java +++ b/src/main/java/org/orekit/rugged/api/AlgorithmId.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/api/BodyRotatingFrameId.java b/src/main/java/org/orekit/rugged/api/BodyRotatingFrameId.java index ab8fa1fc8ec7009dbddea21045a74be827ba1351..67aa214d3176b7ef03bfe7782b53e283ebafcc73 100644 --- a/src/main/java/org/orekit/rugged/api/BodyRotatingFrameId.java +++ b/src/main/java/org/orekit/rugged/api/BodyRotatingFrameId.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/api/EllipsoidId.java b/src/main/java/org/orekit/rugged/api/EllipsoidId.java index d0ddbd1ac65ac447553b9aabead6579de4858cec..b8f0e1b9918086011b87678855d03ca471fb42db 100644 --- a/src/main/java/org/orekit/rugged/api/EllipsoidId.java +++ b/src/main/java/org/orekit/rugged/api/EllipsoidId.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/api/InertialFrameId.java b/src/main/java/org/orekit/rugged/api/InertialFrameId.java index bc7680307ea1566a3e30fdbe004cdbe50ca012f8..295405155b30b80a9fc2a18d17a7f3dd0c694c82 100644 --- a/src/main/java/org/orekit/rugged/api/InertialFrameId.java +++ b/src/main/java/org/orekit/rugged/api/InertialFrameId.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/api/Rugged.java b/src/main/java/org/orekit/rugged/api/Rugged.java index 6e767b1737f4b1fd7d6298e8eb9c48b0f5705def..a6ab89e1e93fa1bf296c98d64d799c0d050cfd04 100644 --- a/src/main/java/org/orekit/rugged/api/Rugged.java +++ b/src/main/java/org/orekit/rugged/api/Rugged.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -66,9 +66,6 @@ public class Rugged { /** Maximum number of evaluations for crossing algorithms. */ private static final int MAX_EVAL = 50; - /** Margin for computation of inverse location with atmospheric refraction correction. */ - private static final double INVLOC_MARGIN = 0.8; - /** Threshold for pixel convergence in fixed point method * (for inverse location with atmospheric refraction correction). */ private static final double PIXEL_CV_THRESHOLD = 1.e-4; @@ -686,7 +683,7 @@ public class Rugged { // =========================================== // Need to be computed only once for a given sensor (with the same minLine and maxLine) if (atmosphericRefraction.getBifPixel() == null || atmosphericRefraction.getBifLine() == null || // lazy evaluation - (!atmosphericRefraction.isSameContext(sensorName, minLine, maxLine))) { // Must be recomputed if the context changed + !atmosphericRefraction.isSameContext(sensorName, minLine, maxLine)) { // Must be recomputed if the context changed // Definition of a regular grid (at sensor level) atmosphericRefraction.configureCorrectionGrid(sensor, minLine, maxLine); @@ -730,8 +727,9 @@ public class Rugged { if (sp0 == null) { // In order for the dump to end nicely DumpManager.endNicely(); - // Impossible to find the point in the given min line and max line (without atmosphere) - throw new RuggedException(RuggedMessages.INVALID_RANGE_FOR_LINES, minLine, maxLine, ""); + + // Impossible to find the sensor pixel in the given range lines (without atmosphere) + throw new RuggedException(RuggedMessages.SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES, minLine, maxLine); } // set up the starting point of the fixed point method @@ -814,14 +812,20 @@ public class Rugged { } // Check if the pixel is inside the sensor (with a margin) OR if the inverse location was impossible (null result) - if ((sensorPixelGrid[uIndex][vIndex] != null && - (sensorPixelGrid[uIndex][vIndex].getPixelNumber() < (-INVLOC_MARGIN) || - sensorPixelGrid[uIndex][vIndex].getPixelNumber() > (INVLOC_MARGIN + sensor.getNbPixels() - 1))) || - (sensorPixelGrid[uIndex][vIndex] == null) ) { + if (!pixelIsInside(sensorPixelGrid[uIndex][vIndex], sensor)) { + // In order for the dump to end nicely DumpManager.endNicely(); - // Impossible to find the point in the given min line - throw new RuggedException(RuggedMessages.INVALID_RANGE_FOR_LINES, minLine, maxLine, ""); + + if (sensorPixelGrid[uIndex][vIndex] == null) { + // Impossible to find the sensor pixel in the given range lines + throw new RuggedException(RuggedMessages.SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES, minLine, maxLine); + } else { + // Impossible to find the sensor pixel + final double invLocationMargin = atmosphericRefraction.getComputationParameters().getInverseLocMargin(); + throw new RuggedException(RuggedMessages.SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE, sensorPixelGrid[uIndex][vIndex].getPixelNumber(), + -invLocationMargin, invLocationMargin + sensor.getNbPixels() - 1, invLocationMargin); + } } } else { // groundGrid[uIndex][vIndex] == null: impossible to compute inverse loc because ground point not defined @@ -839,6 +843,18 @@ public class Rugged { return sensorPixelGrid; } + /** Check if pixel is inside the sensor with a margin. + * @param pixel pixel to check (may be null if not found) + * @param sensor the line sensor + * @return true if the pixel is inside the sensor + */ + private boolean pixelIsInside(final SensorPixel pixel, final LineSensor sensor) { + // Get the inverse location margin + final double invLocationMargin = atmosphericRefraction.getComputationParameters().getInverseLocMargin(); + + return pixel != null && pixel.getPixelNumber() >= -invLocationMargin && pixel.getPixelNumber() < invLocationMargin + sensor.getNbPixels() - 1; + } + /** Computation, for the sensor pixels grid, of the direct location WITH atmospheric refraction. * (full computation) * @param pixelGrid the pixel grid diff --git a/src/main/java/org/orekit/rugged/api/RuggedBuilder.java b/src/main/java/org/orekit/rugged/api/RuggedBuilder.java index b1ffd05dc0a186e715f96dd846da65abc90c0728..51e74f94eb8866bfea481418fc49daa7796f4eac 100644 --- a/src/main/java/org/orekit/rugged/api/RuggedBuilder.java +++ b/src/main/java/org/orekit/rugged/api/RuggedBuilder.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -32,8 +32,6 @@ import org.orekit.bodies.OneAxisEllipsoid; import org.orekit.frames.Frame; import org.orekit.frames.FramesFactory; import org.orekit.propagation.Propagator; -import org.orekit.propagation.SpacecraftState; -import org.orekit.propagation.sampling.OrekitFixedStepHandler; import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.errors.RuggedInternalError; import org.orekit.rugged.errors.RuggedMessages; @@ -173,7 +171,7 @@ public class RuggedBuilder { * </p> */ public RuggedBuilder() { - sensors = new ArrayList<LineSensor>(); + sensors = new ArrayList<>(); constantElevation = Double.NaN; lightTimeCorrection = true; aberrationOfLightCorrection = true; @@ -730,22 +728,17 @@ public class RuggedBuilder { // extract position/attitude samples from propagator final List<TimeStampedPVCoordinates> positionsVelocities = - new ArrayList<TimeStampedPVCoordinates>(); + new ArrayList<>(); final List<TimeStampedAngularCoordinates> quaternions = - new ArrayList<TimeStampedAngularCoordinates>(); - propagator.setMasterMode(interpolationStep, new OrekitFixedStepHandler() { - - /** {@inheritDoc} */ - @Override - public void handleStep(final SpacecraftState currentState, final boolean isLast) { + new ArrayList<>(); + propagator.getMultiplexer().add(interpolationStep, + currentState -> { final AbsoluteDate date = currentState.getDate(); final PVCoordinates pv = currentState.getPVCoordinates(inertialFrame); final Rotation q = currentState.getAttitude().getRotation(); positionsVelocities.add(new TimeStampedPVCoordinates(date, pv.getPosition(), pv.getVelocity(), Vector3D.ZERO)); quaternions.add(new TimeStampedAngularCoordinates(date, q, Vector3D.ZERO, Vector3D.ZERO)); - } - - }); + }); propagator.propagate(minDate.shiftedBy(-interpolationStep), maxDate.shiftedBy(interpolationStep)); // orbit/attitude to body converter diff --git a/src/main/java/org/orekit/rugged/api/package-info.java b/src/main/java/org/orekit/rugged/api/package-info.java index 45405e8f203e2c4fce05afbd8c078a4573b4d11b..d862d25328c618ee97a78a9a007ac3407fd1ac1c 100644 --- a/src/main/java/org/orekit/rugged/api/package-info.java +++ b/src/main/java/org/orekit/rugged/api/package-info.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/errors/Dump.java b/src/main/java/org/orekit/rugged/errors/Dump.java index 71c5b78bbb91195f3ba750b76e15fdfa61ef692f..23de046a43df8ef4e44870b1c61d81e5407f734f 100644 --- a/src/main/java/org/orekit/rugged/errors/Dump.java +++ b/src/main/java/org/orekit/rugged/errors/Dump.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -75,8 +75,8 @@ class Dump { */ Dump(final PrintWriter writer) { this.writer = writer; - this.tiles = new ArrayList<DumpedTileData>(); - this.sensors = new ArrayList<DumpedSensorData>(); + this.tiles = new ArrayList<>(); + this.sensors = new ArrayList<>(); this.algorithmDumped = false; this.ellipsoidDumped = false; this.tranformsDumped = null; diff --git a/src/main/java/org/orekit/rugged/errors/DumpManager.java b/src/main/java/org/orekit/rugged/errors/DumpManager.java index 7804e395467053116c11cd79b2b9ebbc4798ddcf..932e9b83318673f82e966dc1c295c9823cb30a51 100644 --- a/src/main/java/org/orekit/rugged/errors/DumpManager.java +++ b/src/main/java/org/orekit/rugged/errors/DumpManager.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -47,7 +47,7 @@ import org.orekit.time.AbsoluteDate; public class DumpManager { /** Dump file (default initial value is null, i.e. nothing is dumped). */ - private static final ThreadLocal<Dump> DUMP = new ThreadLocal<Dump>(); + private static final ThreadLocal<Dump> DUMP = new ThreadLocal<>(); /** Boolean to check if the dump is suspended. */ private static boolean isSuspended = false; diff --git a/src/main/java/org/orekit/rugged/errors/DumpReplayer.java b/src/main/java/org/orekit/rugged/errors/DumpReplayer.java index fb22fd5d58c4322e0f935a74126c9842b4298328..a4bbf7aef10ba239eb1b5748d3378fbd5218e1d5 100644 --- a/src/main/java/org/orekit/rugged/errors/DumpReplayer.java +++ b/src/main/java/org/orekit/rugged/errors/DumpReplayer.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -283,9 +283,9 @@ public class DumpReplayer { /** Simple constructor. */ public DumpReplayer() { - tiles = new ArrayList<ParsedTile>(); - sensors = new ArrayList<ParsedSensor>(); - calls = new ArrayList<DumpedCall>(); + tiles = new ArrayList<>(); + sensors = new ArrayList<>(); + calls = new ArrayList<>(); } /** Parse a dump file. @@ -350,8 +350,8 @@ public class DumpReplayer { // build missing transforms by extrapolating the parsed ones final int n = (int) FastMath.ceil(maxDate.durationFrom(minDate) / tStep); - final List<Transform> b2iList = new ArrayList<Transform>(n); - final List<Transform> s2iList = new ArrayList<Transform>(n); + final List<Transform> b2iList = new ArrayList<>(n); + final List<Transform> s2iList = new ArrayList<>(n); for (int i = 0; i < n; ++i) { if (bodyToInertial.containsKey(i)) { // the i-th transform was dumped @@ -385,7 +385,7 @@ public class DumpReplayer { final ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray()); builder.setTrajectoryAndTimeSpan(bis); - final List<SensorMeanPlaneCrossing> planeCrossings = new ArrayList<SensorMeanPlaneCrossing>(); + final List<SensorMeanPlaneCrossing> planeCrossings = new ArrayList<>(); for (final ParsedSensor parsedSensor : sensors) { final LineSensor sensor = new LineSensor(parsedSensor.name, parsedSensor, @@ -415,21 +415,7 @@ public class DumpReplayer { return rugged; - } catch (IOException ioe) { - throw new RuggedException(ioe, LocalizedCoreFormats.SIMPLE_MESSAGE, ioe.getLocalizedMessage()); - } catch (SecurityException e) { - // this should never happen - throw new RuggedInternalError(e); - } catch (NoSuchMethodException e) { - // this should never happen - throw new RuggedInternalError(e); - } catch (IllegalArgumentException e) { - // this should never happen - throw new RuggedInternalError(e); - } catch (IllegalAccessException e) { - // this should never happen - throw new RuggedInternalError(e); - } catch (InvocationTargetException e) { + } catch (IOException | NoSuchMethodException | IllegalAccessException | InvocationTargetException e) { // this should never happen throw new RuggedInternalError(e); } @@ -1072,8 +1058,8 @@ public class DumpReplayer { public boolean isInterpolable(final double latitude, final double longitude) { final int latitudeIndex = (int) FastMath.floor((latitude - minLatitude) / latitudeStep); final int longitudeIndex = (int) FastMath.floor((longitude - minLongitude) / longitudeStep); - return (latitudeIndex >= 0) && (latitudeIndex <= latitudeRows - 2) && - (longitudeIndex >= 0) && (longitudeIndex <= longitudeColumns - 2); + return latitudeIndex >= 0 && latitudeIndex <= latitudeRows - 2 && + longitudeIndex >= 0 && longitudeIndex <= longitudeColumns - 2; } /** Update the tile according to the Digital Elevation Model. diff --git a/src/main/java/org/orekit/rugged/errors/RuggedException.java b/src/main/java/org/orekit/rugged/errors/RuggedException.java index d13917c0563f003078339232625ca890d175672c..ddd461260e9159859bd18b23af6b9f07443f3354 100644 --- a/src/main/java/org/orekit/rugged/errors/RuggedException.java +++ b/src/main/java/org/orekit/rugged/errors/RuggedException.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/errors/RuggedExceptionWrapper.java b/src/main/java/org/orekit/rugged/errors/RuggedExceptionWrapper.java index 77a3507cc62b1ca5ab5d879c57a7c72ff20c98bd..4b57665bafde7cba72943c1361e092cc52f89ebe 100644 --- a/src/main/java/org/orekit/rugged/errors/RuggedExceptionWrapper.java +++ b/src/main/java/org/orekit/rugged/errors/RuggedExceptionWrapper.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/errors/RuggedInternalError.java b/src/main/java/org/orekit/rugged/errors/RuggedInternalError.java index 7c12634ceddc5e13a96a2dac15996c24df7de680..1c91afdb6f124e37eb33fac333cc1bf920d62ec9 100644 --- a/src/main/java/org/orekit/rugged/errors/RuggedInternalError.java +++ b/src/main/java/org/orekit/rugged/errors/RuggedInternalError.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/errors/RuggedMessages.java b/src/main/java/org/orekit/rugged/errors/RuggedMessages.java index 98accfea1a8d160274ffda1df62ead21d62997bc..f6b6f3bc94c3b77b822fff77dc994f36dcfc9f23 100644 --- a/src/main/java/org/orekit/rugged/errors/RuggedMessages.java +++ b/src/main/java/org/orekit/rugged/errors/RuggedMessages.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -84,7 +84,10 @@ public enum RuggedMessages implements Localizable { UNSUPPORTED_REFINING_CONTEXT("refining using {0} rugged instance is not handled"), NO_LAYER_DATA("no atmospheric layer data at altitude {0} (lowest altitude: {1})"), INVALID_STEP("step {0} is not valid : {1}"), - INVALID_RANGE_FOR_LINES("range between min line {0} and max line {1} is invalid {2}"); + INVALID_RANGE_FOR_LINES("range between min line {0} and max line {1} is invalid {2}"), + SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES("impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1}"), + SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE("impossible to find sensor pixel: pixel {0} outside interval [ {1} , {2} [ (with atmospheric refraction margin = {3})"); + // CHECKSTYLE: resume JavadocVariable check @@ -116,9 +119,8 @@ public enum RuggedMessages implements Localizable { ResourceBundle.getBundle(RESOURCE_BASE_NAME, locale, new UTF8Control()); if (bundle.getLocale().getLanguage().equals(locale.getLanguage())) { final String translated = bundle.getString(name()); - if ((translated != null) && - (translated.length() > 0) && - (!translated.toLowerCase(locale).contains("missing translation"))) { + if (translated.length() > 0 && + !translated.toLowerCase(locale).contains("missing translation")) { // the value of the resource is the translated format return translated; } diff --git a/src/main/java/org/orekit/rugged/errors/package-info.java b/src/main/java/org/orekit/rugged/errors/package-info.java index 6cecf77acd35499ab85918c7f62d230048379906..3d98390211703f2703e553cef32727568d846d91 100644 --- a/src/main/java/org/orekit/rugged/errors/package-info.java +++ b/src/main/java/org/orekit/rugged/errors/package-info.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/intersection/BasicScanAlgorithm.java b/src/main/java/org/orekit/rugged/intersection/BasicScanAlgorithm.java index 18696efb3ad1f988aa97e157fbdc82ff45790c39..97abdbd181153bc5e28a63613315a0c691eb468d 100644 --- a/src/main/java/org/orekit/rugged/intersection/BasicScanAlgorithm.java +++ b/src/main/java/org/orekit/rugged/intersection/BasicScanAlgorithm.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -61,7 +61,7 @@ public class BasicScanAlgorithm implements IntersectionAlgorithm { * @param maxCachedTiles maximum number of tiles stored in the cache */ public BasicScanAlgorithm(final TileUpdater updater, final int maxCachedTiles) { - this.cache = new TilesCache<SimpleTile>(new SimpleTileFactory(), updater, maxCachedTiles); + this.cache = new TilesCache<>(new SimpleTileFactory(), updater, maxCachedTiles); this.hMin = Double.POSITIVE_INFINITY; this.hMax = Double.NEGATIVE_INFINITY; this.algorithmId = AlgorithmId.BASIC_SLOW_EXHAUSTIVE_SCAN_FOR_TESTS_ONLY; @@ -81,7 +81,7 @@ public class BasicScanAlgorithm implements IntersectionAlgorithm { double maxLatitude = Double.NaN; double minLongitude = Double.NaN; double maxLongitude = Double.NaN; - final List<SimpleTile> scannedTiles = new ArrayList<SimpleTile>(); + final List<SimpleTile> scannedTiles = new ArrayList<>(); double centralLongitude = Double.NaN; for (boolean changedMinMax = true; changedMinMax; changedMinMax = checkMinMax(scannedTiles)) { diff --git a/src/main/java/org/orekit/rugged/intersection/ConstantElevationAlgorithm.java b/src/main/java/org/orekit/rugged/intersection/ConstantElevationAlgorithm.java index 93a24f1e7228d80606c9fdc19239091547ad2005..f371b0a2cb8027bb9ef6ce91244b007b1d6a0cff 100644 --- a/src/main/java/org/orekit/rugged/intersection/ConstantElevationAlgorithm.java +++ b/src/main/java/org/orekit/rugged/intersection/ConstantElevationAlgorithm.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/intersection/IgnoreDEMAlgorithm.java b/src/main/java/org/orekit/rugged/intersection/IgnoreDEMAlgorithm.java index 68f331a67ac47eb332b73466e68e20b025f1a2f5..74a488dedca178abf5502702258ce2013a4ca516 100644 --- a/src/main/java/org/orekit/rugged/intersection/IgnoreDEMAlgorithm.java +++ b/src/main/java/org/orekit/rugged/intersection/IgnoreDEMAlgorithm.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/intersection/IntersectionAlgorithm.java b/src/main/java/org/orekit/rugged/intersection/IntersectionAlgorithm.java index 438e7b05bdd106ed51328ca4290eb8a617b9011a..71699e0d3574c6da25bbfb057ddcbf7e82578b26 100644 --- a/src/main/java/org/orekit/rugged/intersection/IntersectionAlgorithm.java +++ b/src/main/java/org/orekit/rugged/intersection/IntersectionAlgorithm.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -17,7 +17,6 @@ package org.orekit.rugged.intersection; import org.hipparchus.geometry.euclidean.threed.Vector3D; -import org.orekit.bodies.GeodeticPoint; import org.orekit.rugged.api.AlgorithmId; import org.orekit.rugged.utils.ExtendedEllipsoid; import org.orekit.rugged.utils.NormalizedGeodeticPoint; @@ -40,7 +39,7 @@ public interface IntersectionAlgorithm { * <p> * This method is used to refine an intersection when a close guess is * already known. The intersection is typically looked for by a direct - * {@link org.orekit.rugged.raster.Tile#cellIntersection(GeodeticPoint, + * {@link org.orekit.rugged.raster.Tile#cellIntersection(NormalizedGeodeticPoint, * Vector3D, int, int) cell intersection} in the tile which already * contains the close guess, or any similar very fast algorithm. * </p> diff --git a/src/main/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithm.java b/src/main/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithm.java index 1b9f23e312f54563ae80e988148f05be41db4983..0beb019796a0aadb4c8bad6a2d2c259f58bde490 100644 --- a/src/main/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithm.java +++ b/src/main/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithm.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -74,7 +74,7 @@ public class DuvenhageAlgorithm implements IntersectionAlgorithm { */ public DuvenhageAlgorithm(final TileUpdater updater, final int maxCachedTiles, final boolean flatBody) { - this.cache = new TilesCache<MinMaxTreeTile>(new MinMaxTreeTileFactory(), updater, maxCachedTiles); + this.cache = new TilesCache<>(new MinMaxTreeTileFactory(), updater, maxCachedTiles); this.flatBody = flatBody; this.algorithmId = flatBody ? AlgorithmId.DUVENHAGE_FLAT_BODY : AlgorithmId.DUVENHAGE; } diff --git a/src/main/java/org/orekit/rugged/intersection/duvenhage/MinMaxTreeTile.java b/src/main/java/org/orekit/rugged/intersection/duvenhage/MinMaxTreeTile.java index e7032157dd9d79051887d3f7ab1514d585398ec9..92c378d7b72872a8fea2020b8778d848e21f99ef 100644 --- a/src/main/java/org/orekit/rugged/intersection/duvenhage/MinMaxTreeTile.java +++ b/src/main/java/org/orekit/rugged/intersection/duvenhage/MinMaxTreeTile.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/intersection/duvenhage/MinMaxTreeTileFactory.java b/src/main/java/org/orekit/rugged/intersection/duvenhage/MinMaxTreeTileFactory.java index 4657ad4b59888e95fb5d7be765cd8d2b6d1c4559..1c4cdcf7693bd1ea9774886e51ae418ed41ae41f 100644 --- a/src/main/java/org/orekit/rugged/intersection/duvenhage/MinMaxTreeTileFactory.java +++ b/src/main/java/org/orekit/rugged/intersection/duvenhage/MinMaxTreeTileFactory.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/intersection/duvenhage/package-info.java b/src/main/java/org/orekit/rugged/intersection/duvenhage/package-info.java index be6b0bebdfaac429e060dab369527528835f05c8..de741536ee0c10be3082342ecf2bf74d044ad8e0 100644 --- a/src/main/java/org/orekit/rugged/intersection/duvenhage/package-info.java +++ b/src/main/java/org/orekit/rugged/intersection/duvenhage/package-info.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/intersection/package-info.java b/src/main/java/org/orekit/rugged/intersection/package-info.java index a8761e29a17cb8e687851d47ffe9d3faa8246207..e2b84d3d7d5f0ff52f8653e27dd5bf505e408483 100644 --- a/src/main/java/org/orekit/rugged/intersection/package-info.java +++ b/src/main/java/org/orekit/rugged/intersection/package-info.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/linesensor/LineDatation.java b/src/main/java/org/orekit/rugged/linesensor/LineDatation.java index 34527fb54120772343a30d3250e149ab9914d561..e6299574424c248916c570fc3a90d11b34c43d3f 100644 --- a/src/main/java/org/orekit/rugged/linesensor/LineDatation.java +++ b/src/main/java/org/orekit/rugged/linesensor/LineDatation.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/linesensor/LineSensor.java b/src/main/java/org/orekit/rugged/linesensor/LineSensor.java index ca9fd053173413b20682e728b868f9fad85741c5..cdc266fa3067c7dbf7ab9c09332c12836daae399 100644 --- a/src/main/java/org/orekit/rugged/linesensor/LineSensor.java +++ b/src/main/java/org/orekit/rugged/linesensor/LineSensor.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/linesensor/LinearLineDatation.java b/src/main/java/org/orekit/rugged/linesensor/LinearLineDatation.java index aa0d2bb14c2e0447aa7d0ee9b0a52fbffa3e7b20..9d477a27c84455af3879e254465c0689c180e063 100644 --- a/src/main/java/org/orekit/rugged/linesensor/LinearLineDatation.java +++ b/src/main/java/org/orekit/rugged/linesensor/LinearLineDatation.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/linesensor/SensorMeanPlaneCrossing.java b/src/main/java/org/orekit/rugged/linesensor/SensorMeanPlaneCrossing.java index 06f3b81fd27e9485fa8713e67a25dd20fbc3e5e9..23c0b9d6be6baf41082d03a3ded0e16fa9063b97 100644 --- a/src/main/java/org/orekit/rugged/linesensor/SensorMeanPlaneCrossing.java +++ b/src/main/java/org/orekit/rugged/linesensor/SensorMeanPlaneCrossing.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -152,7 +152,7 @@ public class SensorMeanPlaneCrossing { this.meanPlaneNormal = meanPlaneNormal; - this.cachedResults = new ArrayList<CrossingResult>(CACHED_RESULTS); + this.cachedResults = new ArrayList<>(CACHED_RESULTS); cachedResults.forEach(crossingResult -> { if (crossingResult != null && this.cachedResults.size() < CACHED_RESULTS) { this.cachedResults.add(crossingResult); diff --git a/src/main/java/org/orekit/rugged/linesensor/SensorPixel.java b/src/main/java/org/orekit/rugged/linesensor/SensorPixel.java index 04526b63ef8002adf76cc2a9118da1929d8fa4b3..514ebc7969db55a59a652f633612fd9825c37439 100644 --- a/src/main/java/org/orekit/rugged/linesensor/SensorPixel.java +++ b/src/main/java/org/orekit/rugged/linesensor/SensorPixel.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/linesensor/SensorPixelCrossing.java b/src/main/java/org/orekit/rugged/linesensor/SensorPixelCrossing.java index da77e0715fb12df04175159bbc21934656d82fda..57b531fec9fa7f3f78d35fcfac3a284e04f5f5ce 100644 --- a/src/main/java/org/orekit/rugged/linesensor/SensorPixelCrossing.java +++ b/src/main/java/org/orekit/rugged/linesensor/SensorPixelCrossing.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/linesensor/package-info.java b/src/main/java/org/orekit/rugged/linesensor/package-info.java index 85e6b78adf04d8e26e7737ab27d260a059a24333..733adc93cf04c71d03aff7a5a904ebd7e3a68414 100644 --- a/src/main/java/org/orekit/rugged/linesensor/package-info.java +++ b/src/main/java/org/orekit/rugged/linesensor/package-info.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/los/FixedRotation.java b/src/main/java/org/orekit/rugged/los/FixedRotation.java index 40187de276418cfd0b68d7ca9da3b86192640aa4..5b416136738f83367c583ab4ad13fdb16e1f724f 100644 --- a/src/main/java/org/orekit/rugged/los/FixedRotation.java +++ b/src/main/java/org/orekit/rugged/los/FixedRotation.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/los/FixedZHomothety.java b/src/main/java/org/orekit/rugged/los/FixedZHomothety.java index 071b5672b8d04544d44e298a10499d112da102ce..f1f5c33b644addde78b9e5e11813317f2dbfbb67 100644 --- a/src/main/java/org/orekit/rugged/los/FixedZHomothety.java +++ b/src/main/java/org/orekit/rugged/los/FixedZHomothety.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/los/LOSBuilder.java b/src/main/java/org/orekit/rugged/los/LOSBuilder.java index c65796850490c5ffcbdeb59c3caa5c2a09e0e816..3bc88855a3279cc0b235ea0c414d2e9c41a8fe3e 100644 --- a/src/main/java/org/orekit/rugged/los/LOSBuilder.java +++ b/src/main/java/org/orekit/rugged/los/LOSBuilder.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -63,7 +63,7 @@ public class LOSBuilder { */ public LOSBuilder(final List<Vector3D> rawLOS) { this.rawLOS = rawLOS; - this.transforms = new ArrayList<LOSTransform>(); + this.transforms = new ArrayList<>(); this.timeIndependent = true; } @@ -158,7 +158,7 @@ public class LOSBuilder { this.raw[i] = raw.get(i); } - this.transforms = new ArrayList<LOSTransform>(transforms); + this.transforms = new ArrayList<>(transforms); } diff --git a/src/main/java/org/orekit/rugged/los/LOSTransform.java b/src/main/java/org/orekit/rugged/los/LOSTransform.java index 7fd71d574c401662e96f19351d1904b9e6eb8600..76e367f7de52aa69c14766591559802d4d0b92ae 100644 --- a/src/main/java/org/orekit/rugged/los/LOSTransform.java +++ b/src/main/java/org/orekit/rugged/los/LOSTransform.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/los/PolynomialRotation.java b/src/main/java/org/orekit/rugged/los/PolynomialRotation.java index e548781a69f8fa548625a1324075ddad916ab807..63e3082aa271ae64ccb6d99ef31af809043dd355 100644 --- a/src/main/java/org/orekit/rugged/los/PolynomialRotation.java +++ b/src/main/java/org/orekit/rugged/los/PolynomialRotation.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/los/TimeDependentLOS.java b/src/main/java/org/orekit/rugged/los/TimeDependentLOS.java index d12d6aba476b96f143276acab8c6088030a217c6..09acacda4dcfa2efaf95100de33edad8f6214d64 100644 --- a/src/main/java/org/orekit/rugged/los/TimeDependentLOS.java +++ b/src/main/java/org/orekit/rugged/los/TimeDependentLOS.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/los/TimeIndependentLOSTransform.java b/src/main/java/org/orekit/rugged/los/TimeIndependentLOSTransform.java index 6c433a6fb96f8d00776e4441694491a52b77c391..10ab25052714c4a975169ca807a0e720ec289ed4 100644 --- a/src/main/java/org/orekit/rugged/los/TimeIndependentLOSTransform.java +++ b/src/main/java/org/orekit/rugged/los/TimeIndependentLOSTransform.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/los/package-info.java b/src/main/java/org/orekit/rugged/los/package-info.java index 5bfad94445f8b863fc5fa668a9f1f38dc6bc5e4f..97fd1351a81e3857d57ad0a8e49260c0eba94f2f 100644 --- a/src/main/java/org/orekit/rugged/los/package-info.java +++ b/src/main/java/org/orekit/rugged/los/package-info.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/raster/SimpleTile.java b/src/main/java/org/orekit/rugged/raster/SimpleTile.java index 07e8dade5c703ed1d61abd65f3cccaf403d976b8..4094bca260d09b1f341e9986f871c460aa527c7b 100644 --- a/src/main/java/org/orekit/rugged/raster/SimpleTile.java +++ b/src/main/java/org/orekit/rugged/raster/SimpleTile.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -16,12 +16,11 @@ */ package org.orekit.rugged.raster; +import java.util.Arrays; + import org.hipparchus.geometry.euclidean.threed.Vector3D; import org.hipparchus.util.FastMath; import org.hipparchus.util.Precision; -import java.util.Arrays; - -import org.orekit.bodies.GeodeticPoint; import org.orekit.rugged.errors.DumpManager; import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.errors.RuggedMessages; @@ -302,7 +301,7 @@ public class SimpleTile implements Tile { /** {@inheritDoc} */ @Override - public NormalizedGeodeticPoint cellIntersection(final GeodeticPoint p, final Vector3D los, + public NormalizedGeodeticPoint cellIntersection(final NormalizedGeodeticPoint p, final Vector3D los, final int latitudeIndex, final int longitudeIndex) { // ensure neighboring cells to not fall out of tile @@ -317,10 +316,16 @@ public class SimpleTile implements Tile { final double z10 = getElevationAtIndices(iLat, jLong + 1); final double z11 = getElevationAtIndices(iLat + 1, jLong + 1); + // normalize back to tile coordinates + final NormalizedGeodeticPoint tileP = new NormalizedGeodeticPoint(p.getLatitude(), + p.getLongitude(), + p.getAltitude(), + x00); + // line-of-sight coordinates at close points - final double dxA = (p.getLongitude() - x00) / longitudeStep; - final double dyA = (p.getLatitude() - y00) / latitudeStep; - final double dzA = p.getAltitude(); + final double dxA = (tileP.getLongitude() - x00) / longitudeStep; + final double dyA = (tileP.getLatitude() - y00) / latitudeStep; + final double dzA = tileP.getAltitude(); final double dxB = dxA + los.getX() / longitudeStep; final double dyB = dyA + los.getY() / latitudeStep; final double dzB = dzA + los.getZ(); @@ -368,8 +373,8 @@ public class SimpleTile implements Tile { } - final NormalizedGeodeticPoint p1 = interpolate(t1, p, dxA, dyA, los, x00); - final NormalizedGeodeticPoint p2 = interpolate(t2, p, dxA, dyA, los, x00); + final NormalizedGeodeticPoint p1 = interpolate(t1, tileP, dxA, dyA, los, x00); + final NormalizedGeodeticPoint p2 = interpolate(t2, tileP, dxA, dyA, los, x00); // select the first point along line-of-sight if (p1 == null) { @@ -384,7 +389,7 @@ public class SimpleTile implements Tile { /** Interpolate point along a line. * @param t abscissa along the line - * @param p start point + * @param tileP start point, normalized to tile area * @param dxP relative coordinate of the start point with respect to current cell * @param dyP relative coordinate of the start point with respect to current cell * @param los direction of the line-of-sight, in geodetic space @@ -392,7 +397,7 @@ public class SimpleTile implements Tile { * be normalized between lc-Ï€ and lc+Ï€ * @return interpolated point along the line */ - private NormalizedGeodeticPoint interpolate(final double t, final GeodeticPoint p, + private NormalizedGeodeticPoint interpolate(final double t, final NormalizedGeodeticPoint tileP, final double dxP, final double dyP, final Vector3D los, final double centralLongitude) { @@ -403,9 +408,9 @@ public class SimpleTile implements Tile { final double dx = dxP + t * los.getX() / longitudeStep; final double dy = dyP + t * los.getY() / latitudeStep; if (dx >= -TOLERANCE && dx <= 1 + TOLERANCE && dy >= -TOLERANCE && dy <= 1 + TOLERANCE) { - return new NormalizedGeodeticPoint(p.getLatitude() + t * los.getY(), - p.getLongitude() + t * los.getX(), - p.getAltitude() + t * los.getZ(), + return new NormalizedGeodeticPoint(tileP.getLatitude() + t * los.getY(), + tileP.getLongitude() + t * los.getX(), + tileP.getAltitude() + t * los.getZ(), centralLongitude); } else { return null; diff --git a/src/main/java/org/orekit/rugged/raster/SimpleTileFactory.java b/src/main/java/org/orekit/rugged/raster/SimpleTileFactory.java index c032d6b319f207c38d04ac8f7076c1fb51289600..8376541c0f9b50b21e559055eed308189c5d97f0 100644 --- a/src/main/java/org/orekit/rugged/raster/SimpleTileFactory.java +++ b/src/main/java/org/orekit/rugged/raster/SimpleTileFactory.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/raster/Tile.java b/src/main/java/org/orekit/rugged/raster/Tile.java index ce66a12607a7b4fe809a0d791882eb7aa6da90e0..00d11623580a1190424651b8ed11d4530f13e99f 100644 --- a/src/main/java/org/orekit/rugged/raster/Tile.java +++ b/src/main/java/org/orekit/rugged/raster/Tile.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -17,7 +17,6 @@ package org.orekit.rugged.raster; import org.hipparchus.geometry.euclidean.threed.Vector3D; -import org.orekit.bodies.GeodeticPoint; import org.orekit.rugged.utils.NormalizedGeodeticPoint; /** Interface representing a raster tile. @@ -257,7 +256,19 @@ public interface Tile extends UpdatableTile { double interpolateElevation(double latitude, double longitude); /** Find the intersection of a line-of-sight and a Digital Elevation Model cell. - * @param p point on the line + * <p> + * Beware that for continuity reasons, the point argument in {@code cellIntersection} is normalized + * with respect to other points used by the caller. This implies that the longitude may be + * outside of the [-Ï€ ; +Ï€] interval (or the [0 ; 2Ï€] interval, depending on the DEM). In particular, + * when a Line Of Sight crosses the antimeridian at ±π longitude, the library may call the + * {@code cellIntersection} method with a point having a longitude of -Ï€-ε to ensure this continuity. + * As tiles are stored with longitude clipped to a some DEM specific interval (either [-Ï€ ; +Ï€] or [0 ; 2Ï€]), + * implementations MUST take care to clip the input point back to the tile interval using + * {@link org.hipparchus.util.MathUtils#normalizeAngle(double, double) MathUtils.normalizeAngle(p.getLongitude(), + * someLongitudeWithinTheTile)}. The output point normalization should also be made consistent with + * the current tile. + * </p> + * @param p point on the line (beware its longitude is <em>not</em> normalized with respect to tile) * @param los line-of-sight, in the topocentric frame (East, North, Zenith) of the point, * scaled to match radians in the horizontal plane and meters along the vertical axis * @param latitudeIndex latitude index of the Digital Elevation Model cell @@ -265,8 +276,8 @@ public interface Tile extends UpdatableTile { * @return point corresponding to line-of-sight crossing the Digital Elevation Model surface * if it lies within the cell, null otherwise */ - NormalizedGeodeticPoint cellIntersection(GeodeticPoint p, Vector3D los, - int latitudeIndex, int longitudeIndex); + NormalizedGeodeticPoint cellIntersection(NormalizedGeodeticPoint p, Vector3D los, + int latitudeIndex, int longitudeIndex); /** Check if a tile covers a ground point. * @param latitude ground point latitude diff --git a/src/main/java/org/orekit/rugged/raster/TileFactory.java b/src/main/java/org/orekit/rugged/raster/TileFactory.java index ca889f682736226d9e1afd248f3ab6b0d28a4353..ccb2644a08df897eccb7d87ab267851961daf156 100644 --- a/src/main/java/org/orekit/rugged/raster/TileFactory.java +++ b/src/main/java/org/orekit/rugged/raster/TileFactory.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/raster/TileUpdater.java b/src/main/java/org/orekit/rugged/raster/TileUpdater.java index 509ca6e9075dcf955e3fb52bbf87e8979a1645cd..ffaecf812dcb7154ec969342314925440e5f5297 100644 --- a/src/main/java/org/orekit/rugged/raster/TileUpdater.java +++ b/src/main/java/org/orekit/rugged/raster/TileUpdater.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/raster/TilesCache.java b/src/main/java/org/orekit/rugged/raster/TilesCache.java index 43c1191029b9bc9fe53d501ab13373a58fb5a672..63e2af1bf8c7ba9c920db286e9e7489490e4d8d5 100644 --- a/src/main/java/org/orekit/rugged/raster/TilesCache.java +++ b/src/main/java/org/orekit/rugged/raster/TilesCache.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/raster/UpdatableTile.java b/src/main/java/org/orekit/rugged/raster/UpdatableTile.java index 5cb18f92ee9e31ef67d8af0526f69bcf32266909..ad06213ddcb705c8539b853f37411a6059bebe06 100644 --- a/src/main/java/org/orekit/rugged/raster/UpdatableTile.java +++ b/src/main/java/org/orekit/rugged/raster/UpdatableTile.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/raster/package-info.java b/src/main/java/org/orekit/rugged/raster/package-info.java index e349af7381d5b97041047aa2f397429c31f7edba..6a09d34dc8fa870d85beadae1f5c686681ef443e 100644 --- a/src/main/java/org/orekit/rugged/raster/package-info.java +++ b/src/main/java/org/orekit/rugged/raster/package-info.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/refraction/AtmosphericComputationParameters.java b/src/main/java/org/orekit/rugged/refraction/AtmosphericComputationParameters.java index 2b30c63e36794d970f31f4f74072b339f02e076b..7eb96d681d1e62e1594df69aef35e1ca9df0a1f9 100644 --- a/src/main/java/org/orekit/rugged/refraction/AtmosphericComputationParameters.java +++ b/src/main/java/org/orekit/rugged/refraction/AtmosphericComputationParameters.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -27,6 +27,7 @@ import org.orekit.rugged.utils.GridCreation; * @author Guylaine Prat * @since 2.1 */ + public class AtmosphericComputationParameters { /** Margin for definition of the interpolation grid. @@ -38,11 +39,21 @@ public class AtmosphericComputationParameters { /** Default value for line step. */ private static final int DEFAULT_STEP_LINE = 100; + /** Default margin for computation of inverse location with atmospheric refraction correction. + * @since 3.0 + */ + private static final double DEFAULT_INVLOC_MARGIN = 0.8; + /** Actual values for pixel step in case default are overwritten. */ private int pixelStep; /** Actual values for line step in case default are overwritten. */ private int lineStep; + /** Actual values for inverse location margin with atmospheric refraction in case default are overwritten. + * @since 3.0 + */ + private double invlocMargin; + // Definition of grids for sensor (u = along pixel; v = along line) /** Linear grid in pixel. */ private double[] uGrid; @@ -67,6 +78,7 @@ public class AtmosphericComputationParameters { public AtmosphericComputationParameters() { this.pixelStep = DEFAULT_STEP_PIXEL; this.lineStep = DEFAULT_STEP_LINE; + this.invlocMargin = DEFAULT_INVLOC_MARGIN; } /** Configuration of the interpolation grid. This grid is associated to the given sensor, @@ -120,6 +132,33 @@ public class AtmosphericComputationParameters { this.lineStep = gridLineStep; } + /** + * Set the margin for computation of inverse location with atmospheric refraction correction. + * Overwrite the default value DEFAULT_INVLOC_MARGIN. + * No check is done about this margin. A recommended value is around 1. + * @param inverseLocMargin margin in pixel size to compute inverse location with atmospheric refraction correction. + * @since 3.0 + */ + public void setInverseLocMargin(final double inverseLocMargin) { + this.invlocMargin = inverseLocMargin; + } + + /** + * @return the inverse location margin for computation of inverse location with atmospheric refraction correction. + * @since 3.0 + */ + public double getInverseLocMargin () { + return this.invlocMargin; + } + + /** + * @return the default inverse location margin for computation of inverse location with atmospheric refraction correction. + * @since 3.0 + */ + public double getDefaultInverseLocMargin () { + return DEFAULT_INVLOC_MARGIN; + } + /** * @return the size of pixel grid */ diff --git a/src/main/java/org/orekit/rugged/refraction/AtmosphericRefraction.java b/src/main/java/org/orekit/rugged/refraction/AtmosphericRefraction.java index 17aaf40fb7ac0c4e67fd495a2af944196f4575c8..02416a1f724719f1bd239c92bf44dc766f9483f8 100644 --- a/src/main/java/org/orekit/rugged/refraction/AtmosphericRefraction.java +++ b/src/main/java/org/orekit/rugged/refraction/AtmosphericRefraction.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -120,9 +120,9 @@ public abstract class AtmosphericRefraction { */ public Boolean isSameContext(final String sensorName, final int minLine, final int maxLine) { - return (Double.compare(atmosphericParams.getMinLineSensor(), minLine) == 0) && - (Double.compare(atmosphericParams.getMaxLineSensor(), maxLine) == 0) && - (atmosphericParams.getSensorName().compareTo(sensorName) == 0); + return Double.compare(atmosphericParams.getMinLineSensor(), minLine) == 0 && + Double.compare(atmosphericParams.getMaxLineSensor(), maxLine) == 0 && + atmosphericParams.getSensorName().compareTo(sensorName) == 0; } /** Get the computation parameters. @@ -143,6 +143,17 @@ public abstract class AtmosphericRefraction { atmosphericParams.setGridSteps(pixelStep, lineStep); } + /** + * Set the margin for computation of inverse location with atmospheric refraction correction. + * Overwrite the default value DEFAULT_INVLOC_MARGIN. + * No check is done about this margin. A recommended value is around 1. + * @param inverseLocMargin margin in pixel size to compute inverse location with atmospheric refraction correction. + * @since 3.0 + */ + public void setInverseLocMargin(final double inverseLocMargin) { + atmosphericParams.setInverseLocMargin(inverseLocMargin); + } + /** Compute the correction functions for pixel and lines. * The corrections are computed for pixels and lines, on a regular grid at sensor level. * The corrections are based on the difference on grid nodes (where direct loc is known with atmosphere refraction) @@ -174,9 +185,9 @@ public abstract class AtmosphericRefraction { gridDiffLine[pixelIndex][lineIndex] = diffLine; } else { - // Impossible to find the point in the given min line and max line - throw new RuggedException(RuggedMessages.INVALID_RANGE_FOR_LINES, - atmosphericParams.getMinLineSensor(), atmosphericParams.getMaxLineSensor(), ""); + // Impossible to find the sensor pixel in the given range lines + throw new RuggedException(RuggedMessages.SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES, + atmosphericParams.getMinLineSensor(), atmosphericParams.getMaxLineSensor()); } } } diff --git a/src/main/java/org/orekit/rugged/refraction/ConstantRefractionLayer.java b/src/main/java/org/orekit/rugged/refraction/ConstantRefractionLayer.java index 65e40c968dff686bbe8de7ba01d8f11f20db51c3..5d95986e9782d5ea199f28b35b504db9eff5846c 100644 --- a/src/main/java/org/orekit/rugged/refraction/ConstantRefractionLayer.java +++ b/src/main/java/org/orekit/rugged/refraction/ConstantRefractionLayer.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/refraction/MultiLayerModel.java b/src/main/java/org/orekit/rugged/refraction/MultiLayerModel.java index 8f294997848b74177813277dc51e7fd47e01bf33..4aeeeeeffc5d9427a1710b42413be43e284d41ed 100644 --- a/src/main/java/org/orekit/rugged/refraction/MultiLayerModel.java +++ b/src/main/java/org/orekit/rugged/refraction/MultiLayerModel.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -59,7 +59,7 @@ public class MultiLayerModel extends AtmosphericRefraction { this.ellipsoid = ellipsoid; - this.refractionLayers = new ArrayList<ConstantRefractionLayer>(15); + this.refractionLayers = new ArrayList<>(15); this.refractionLayers.add(new ConstantRefractionLayer(100000.00, 1.000000)); this.refractionLayers.add(new ConstantRefractionLayer( 50000.00, 1.000000)); this.refractionLayers.add(new ConstantRefractionLayer( 40000.00, 1.000001)); diff --git a/src/main/java/org/orekit/rugged/refraction/package-info.java b/src/main/java/org/orekit/rugged/refraction/package-info.java index fa2a897cf50c8b01dc2137192a31cd34c9c80d2f..1ba9975392e2b8434f783f3c70905c763bb9d6ab 100644 --- a/src/main/java/org/orekit/rugged/refraction/package-info.java +++ b/src/main/java/org/orekit/rugged/refraction/package-info.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/utils/DSGenerator.java b/src/main/java/org/orekit/rugged/utils/DSGenerator.java index 938a32bae1a9290496b322293167d083dc834552..6fefff07ade5e4debf8cf2efae081a90cc09d631 100644 --- a/src/main/java/org/orekit/rugged/utils/DSGenerator.java +++ b/src/main/java/org/orekit/rugged/utils/DSGenerator.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/utils/DerivativeGenerator.java b/src/main/java/org/orekit/rugged/utils/DerivativeGenerator.java index be87b7e7f953114597eb05121f56b8b37d2bf9a7..6603e7683bf6b48c90185dd5d7f43afd7bc7d00f 100644 --- a/src/main/java/org/orekit/rugged/utils/DerivativeGenerator.java +++ b/src/main/java/org/orekit/rugged/utils/DerivativeGenerator.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/utils/ExtendedEllipsoid.java b/src/main/java/org/orekit/rugged/utils/ExtendedEllipsoid.java index 96e64f45e9d4cb2550f731f3fdfb5237235e4cb8..5541eab6f7d91e206bc09865e411327a0a2d81fc 100644 --- a/src/main/java/org/orekit/rugged/utils/ExtendedEllipsoid.java +++ b/src/main/java/org/orekit/rugged/utils/ExtendedEllipsoid.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/utils/GridCreation.java b/src/main/java/org/orekit/rugged/utils/GridCreation.java index 308c0b978baf73a0805fd41598fa3e51aaf421cd..07b4695bc686f8ff92872dbbd4071b8d96298a03 100644 --- a/src/main/java/org/orekit/rugged/utils/GridCreation.java +++ b/src/main/java/org/orekit/rugged/utils/GridCreation.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/utils/MaxSelector.java b/src/main/java/org/orekit/rugged/utils/MaxSelector.java index ee6a073fbad139be602ba55a6b99f412d7ca803e..02e23e156da2152d18b3857e7a54a01ebf687f1d 100644 --- a/src/main/java/org/orekit/rugged/utils/MaxSelector.java +++ b/src/main/java/org/orekit/rugged/utils/MaxSelector.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/utils/MinSelector.java b/src/main/java/org/orekit/rugged/utils/MinSelector.java index 4a411825488fd7128eae07f50316c59aa2bf79ac..07e729dfd9af1c9793c0163bd642a310c398751e 100644 --- a/src/main/java/org/orekit/rugged/utils/MinSelector.java +++ b/src/main/java/org/orekit/rugged/utils/MinSelector.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/utils/NormalizedGeodeticPoint.java b/src/main/java/org/orekit/rugged/utils/NormalizedGeodeticPoint.java index 5f673de2460e13456eaabf29cf2a44304a92a6eb..bab2c086fb4a6b75bde885ad028f3990a0a5bbc0 100644 --- a/src/main/java/org/orekit/rugged/utils/NormalizedGeodeticPoint.java +++ b/src/main/java/org/orekit/rugged/utils/NormalizedGeodeticPoint.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/utils/RoughVisibilityEstimator.java b/src/main/java/org/orekit/rugged/utils/RoughVisibilityEstimator.java index 44c5bbc328124d02eeb7c2b952f53fe519e4fcd3..ed20cac42e61feb05207de051c12479e6286f00b 100644 --- a/src/main/java/org/orekit/rugged/utils/RoughVisibilityEstimator.java +++ b/src/main/java/org/orekit/rugged/utils/RoughVisibilityEstimator.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -72,7 +72,7 @@ public class RoughVisibilityEstimator { // project spacecraft position-velocity to ground final Frame bodyFrame = ellipsoid.getBodyFrame(); final int n = positionsVelocities.size(); - this.pvGround = new ArrayList<TimeStampedPVCoordinates>(n); + this.pvGround = new ArrayList<>(n); for (final TimeStampedPVCoordinates pv : positionsVelocities) { final Transform t = frame.getTransformTo(bodyFrame, pv.getDate()); pvGround.add(ellipsoid.projectToGround(t.transformPVCoordinates(pv), bodyFrame)); diff --git a/src/main/java/org/orekit/rugged/utils/Selector.java b/src/main/java/org/orekit/rugged/utils/Selector.java index 880e8d7726a16d9aa6fe9396fff2d2da1c0d5932..cfd69c653619022ba7e6bf482eb5f85752a30ab6 100644 --- a/src/main/java/org/orekit/rugged/utils/Selector.java +++ b/src/main/java/org/orekit/rugged/utils/Selector.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/java/org/orekit/rugged/utils/SpacecraftToObservedBody.java b/src/main/java/org/orekit/rugged/utils/SpacecraftToObservedBody.java index decb81efaec6ae5c664585fbd09fbd67a207ae4b..449cb9024596a53337264308b3984871f229420c 100644 --- a/src/main/java/org/orekit/rugged/utils/SpacecraftToObservedBody.java +++ b/src/main/java/org/orekit/rugged/utils/SpacecraftToObservedBody.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -121,17 +121,17 @@ public class SpacecraftToObservedBody implements Serializable { // set up the cache for position-velocities final TimeStampedCache<TimeStampedPVCoordinates> pvCache = - new ImmutableTimeStampedCache<TimeStampedPVCoordinates>(pvInterpolationNumber, positionsVelocities); + new ImmutableTimeStampedCache<>(pvInterpolationNumber, positionsVelocities); // set up the cache for attitudes final TimeStampedCache<TimeStampedAngularCoordinates> aCache = - new ImmutableTimeStampedCache<TimeStampedAngularCoordinates>(aInterpolationNumber, quaternions); + new ImmutableTimeStampedCache<>(aInterpolationNumber, quaternions); final int n = (int) FastMath.ceil(maxDate.durationFrom(minDate) / tStep); this.tStep = tStep; - this.bodyToInertial = new ArrayList<Transform>(n); - this.inertialToBody = new ArrayList<Transform>(n); - this.scToInertial = new ArrayList<Transform>(n); + this.bodyToInertial = new ArrayList<>(n); + this.inertialToBody = new ArrayList<>(n); + this.scToInertial = new ArrayList<>(n); for (AbsoluteDate date = minDate; bodyToInertial.size() < n; date = date.shiftedBy(tStep)) { // interpolate position-velocity, allowing slight extrapolation near the boundaries @@ -200,7 +200,7 @@ public class SpacecraftToObservedBody implements Serializable { this.bodyToInertial = bodyToInertial; this.scToInertial = scToInertial; - this.inertialToBody = new ArrayList<Transform>(bodyToInertial.size()); + this.inertialToBody = new ArrayList<>(bodyToInertial.size()); for (final Transform b2i : bodyToInertial) { inertialToBody.add(b2i.getInverse()); } @@ -300,8 +300,8 @@ public class SpacecraftToObservedBody implements Serializable { * @return true if date is in the supported range */ public boolean isInRange(final AbsoluteDate date) { - return (minDate.durationFrom(date) <= overshootTolerance) && - (date.durationFrom(maxDate) <= overshootTolerance); + return minDate.durationFrom(date) <= overshootTolerance && + date.durationFrom(maxDate) <= overshootTolerance; } } diff --git a/src/main/java/org/orekit/rugged/utils/package-info.java b/src/main/java/org/orekit/rugged/utils/package-info.java index 7507188f080836dd29f3dd07e051988d1a138654..cf44e9619c901ca033b062462dd1a5808441dc0a 100644 --- a/src/main/java/org/orekit/rugged/utils/package-info.java +++ b/src/main/java/org/orekit/rugged/utils/package-info.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_da.utf8 b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_da.utf8 index 30a675f16e0c3bb415f7866d69203832895380ef..ecb9bd7eeb717b1f17404812f3f2687c62c2d80b 100644 --- a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_da.utf8 +++ b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_da.utf8 @@ -96,3 +96,9 @@ INVALID_STEP = skridt {0} er ikke gyldigt : {1} # range between min line {0} and max line {1} too small {2} INVALID_RANGE_FOR_LINES = interval mellem minimumslinje {0} og maksimumslinje {1} for lille {2} + +# impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} +SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES = <MISSING TRANSLATION> + +# impossible to find sensor pixel: pixel {0} outside interval [ {1} , {2} [ (with atmospheric refraction margin = {3}) +SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE = <MISSING TRANSLATION> diff --git a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_de.utf8 b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_de.utf8 index 63f06fe26e823245d490aeab49e6a28714125ced..9cda208b301d4714b3970c91c49f8970059372b6 100644 --- a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_de.utf8 +++ b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_de.utf8 @@ -96,3 +96,9 @@ INVALID_STEP = <MISSING TRANSLATION> # range between min line {0} and max line {1} is invalid {2} INVALID_RANGE_FOR_LINES = <MISSING TRANSLATION> + +# impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} +SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES = <MISSING TRANSLATION> + +# impossible to find sensor pixel: pixel {0} outside interval [ {1} , {2} [ (with atmospheric refraction margin = {3}) +SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE = <MISSING TRANSLATION> diff --git a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_en.utf8 b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_en.utf8 index ec8394218db8d9c69365b155fed52d251c16a6aa..97b94dfc34b4e354e86b3160489b5faa6a19208b 100644 --- a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_en.utf8 +++ b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_en.utf8 @@ -96,3 +96,9 @@ INVALID_STEP = step {0} is not valid : {1} # range between min line {0} and max line {1} is invalid {2} INVALID_RANGE_FOR_LINES = range between min line {0} and max line {1} is invalid {2} + +# impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} +SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES = impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} + +# impossible to find sensor pixel: pixel {0} outside interval [ {1} , {2} [ (with atmospheric refraction margin = {3}) +SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE = impossible to find sensor pixel: pixel {0} outside interval [ {1} , {2} [ (with atmospheric refraction margin = {3}) diff --git a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_es.utf8 b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_es.utf8 index 872c2fcb92de319989c71fcee05431ba5ffa6b91..b29c953a4b995bf04b1831ca1cd9508f87cb70a3 100644 --- a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_es.utf8 +++ b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_es.utf8 @@ -96,3 +96,9 @@ INVALID_STEP = <MISSING TRANSLATION> # range between min line {0} and max line {1} is invalid {2} INVALID_RANGE_FOR_LINES = <MISSING TRANSLATION> + +# impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} +SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES = <MISSING TRANSLATION> + +# impossible to find sensor pixel: pixel {0} outside interval [ {1} , {2} [ (with atmospheric refraction margin = {3}) +SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE = <MISSING TRANSLATION> diff --git a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_fr.utf8 b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_fr.utf8 index 59152480f0f0a248198f43aa31e0b356e0affa4b..7c9f324e05f7300fb994e2e02fce2a0fa64fd702 100644 --- a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_fr.utf8 +++ b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_fr.utf8 @@ -96,3 +96,9 @@ INVALID_STEP = le pas {0} n''est pas valable : {1} # range between min line {0} and max line {1} is invalid {2} INVALID_RANGE_FOR_LINES = l''écart entre la ligne min {0} et la ligne max {1} est non valide {2} + +# impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} +SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES = impossible de trouver le pixel senseur dans l''intervalle de lignes (avec réfraction atmosphérique) entre les lignes {0} et {1} + +# impossible to find sensor pixel: pixel {0} outside interval [ {1} , {2} [ (with atmospheric refraction margin = {3}) +SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE = impossible de trouver le pixel senseur: pixel {0} en dehors de l''intervalle [ {1} , {2} [ (avec la marge pour la réfraction atmosphérique = {3}) diff --git a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_gl.utf8 b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_gl.utf8 index 7953c301262bff78a6be8e08af1cb01cd78e29a5..a459e9b0c12c9d9fa9b7115bca9b22861897c35b 100644 --- a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_gl.utf8 +++ b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_gl.utf8 @@ -96,3 +96,9 @@ INVALID_STEP = <MISSING TRANSLATION> # range between min line {0} and max line {1} is invalid {2} INVALID_RANGE_FOR_LINES = <MISSING TRANSLATION> + +# impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} +SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES = <MISSING TRANSLATION> + +# impossible to find sensor pixel: pixel {0} outside interval [ {1} , {2} [ (with atmospheric refraction margin = {3}) +SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE = <MISSING TRANSLATION> diff --git a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_it.utf8 b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_it.utf8 index b6101683412513d15e9a761c7e5ec9f25efa0595..7d55d0fa9b9c56674dc70d6cf484f9b418a0b789 100644 --- a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_it.utf8 +++ b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_it.utf8 @@ -95,4 +95,10 @@ NO_LAYER_DATA = nessun dato atmosferico all''altitudine {0} (altitudine più bas INVALID_STEP = Step {0} non valido: {1} # range between min line {0} and max line {1} too small {2} - INVALID_RANGE_FOR_LINES = Scarto fra la linea min {0} e la linea max {1} troppo piccolo {2} +INVALID_RANGE_FOR_LINES = Scarto fra la linea min {0} e la linea max {1} troppo piccolo {2} + +# impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} +SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES = <MISSING TRANSLATION> + +# impossible to find sensor pixel: pixel {0} outside interval [ {1} , {2} [ (with atmospheric refraction margin = {3}) +SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE = <MISSING TRANSLATION> diff --git a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_no.utf8 b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_no.utf8 index 33a5f7d52284c566c277b958edbbb5a0d025777d..e8bd40390ffdc3f92377a4559605b941c1be0a32 100644 --- a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_no.utf8 +++ b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_no.utf8 @@ -96,3 +96,10 @@ INVALID_STEP = steget {0} er ikke gyldig: {1} # range between min line {0} and max line {1} is invalid {2} INVALID_RANGE_FOR_LINES = avstanden mellom min linje {0} og max linje {1} er ugyldig {2} + +# impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} +SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES = <MISSING TRANSLATION> + +# impossible to find sensor pixel: pixel {0} outside interval [ {1} , {2} [ (with atmospheric refraction margin = {3}) +SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE = <MISSING TRANSLATION> + diff --git a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_ro.utf8 b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_ro.utf8 index d2a286608423c53dfbce9fc037c9dda42f8aacc9..b77290b0947b2ccfb16cd14d47358e30880a837c 100644 --- a/src/main/resources/assets/org/orekit/rugged/RuggedMessages_ro.utf8 +++ b/src/main/resources/assets/org/orekit/rugged/RuggedMessages_ro.utf8 @@ -96,3 +96,10 @@ INVALID_STEP = <MISSING TRANSLATION> # range between min line {0} and max line {1} is invalid {2} INVALID_RANGE_FOR_LINES = <MISSING TRANSLATION> + +# impossible to find sensor pixel in given range lines (with atmospheric refraction) between lines {0} and {1} +SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES = <MISSING TRANSLATION> + +# impossible to find sensor pixel: pixel {0} outside interval [ {1} , {2} [ (with atmospheric refraction margin = {3}) +SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE = <MISSING TRANSLATION> + diff --git a/src/site/markdown/building.md b/src/site/markdown/building.md index 6bdfaaefaf320bdcbff9e8e18372dadc0861104c..a04bc7a6f9a3c3586c840f4bb646a7f589ff81fe 100644 --- a/src/site/markdown/building.md +++ b/src/site/markdown/building.md @@ -1,4 +1,4 @@ -<!--- Copyright 2013-2020 CS GROUP +<!--- Copyright 2013-2022 CS GROUP Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/site/markdown/configuration.md b/src/site/markdown/configuration.md index d11f53a013f6a11ddb790423fe7c4cbd5c4305eb..612dd0a58a1fd935564d4a47bf41542e88d42ee3 100644 --- a/src/site/markdown/configuration.md +++ b/src/site/markdown/configuration.md @@ -1,4 +1,4 @@ -<!--- Copyright 2013-2020 CS GROUP +<!--- Copyright 2013-2022 CS GROUP Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/site/markdown/contact.md b/src/site/markdown/contact.md index fae9fc0b2e65f72beadf1370c7053ad49a459ada..9aa29091f7ef20e8defcbaadeca67e8cd3cffe3f 100644 --- a/src/site/markdown/contact.md +++ b/src/site/markdown/contact.md @@ -1,4 +1,4 @@ -<!--- Copyright 2013-2020 CS GROUP +<!--- Copyright 2013-2022 CS GROUP Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/site/markdown/contributing.md b/src/site/markdown/contributing.md index dc367dffacfe03361f466911c6c88afb9f0d9175..033b8d2de8c59ab1e634577120c68c905563dd94 100644 --- a/src/site/markdown/contributing.md +++ b/src/site/markdown/contributing.md @@ -1,4 +1,4 @@ -<!--- Copyright 2013-2020 CS GROUP +<!--- Copyright 2013-2022 CS GROUP Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/site/markdown/design/design-major-functions.md b/src/site/markdown/design/design-major-functions.md index c44bfeb4ef921e167f47b38eb9d12ddb814a8237..5853d9c046a6231764bd80263091f2b8be761356 100644 --- a/src/site/markdown/design/design-major-functions.md +++ b/src/site/markdown/design/design-major-functions.md @@ -1,4 +1,4 @@ -<!--- Copyright 2013-2020 CS GROUP +<!--- Copyright 2013-2022 CS GROUP Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/site/markdown/design/digital-elevation-model.md b/src/site/markdown/design/digital-elevation-model.md index 4c88f6cae8244b8d1a99fa89baccd146a8afcd69..09b7a94d52d4534b114e074fe9f7439b3bb64940 100644 --- a/src/site/markdown/design/digital-elevation-model.md +++ b/src/site/markdown/design/digital-elevation-model.md @@ -1,4 +1,4 @@ -<!--- Copyright 2013-2020 CS GROUP +<!--- Copyright 2013-2022 CS GROUP Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/site/markdown/design/overview.md b/src/site/markdown/design/overview.md index c1ffb0baa92a636662da467225735ea9c58854da..99b0195e0701aed05c98ad293c24edb238b0badb 100644 --- a/src/site/markdown/design/overview.md +++ b/src/site/markdown/design/overview.md @@ -1,4 +1,4 @@ -<!--- Copyright 2013-2020 CS GROUP +<!--- Copyright 2013-2022 CS GROUP Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/site/markdown/design/technical-choices.md b/src/site/markdown/design/technical-choices.md index 65a1eaedc7628023fbae1f9b0d04bc49abaf437c..58233b3d53ce6bd2ceeb4553e6cf6346849274ae 100644 --- a/src/site/markdown/design/technical-choices.md +++ b/src/site/markdown/design/technical-choices.md @@ -1,4 +1,4 @@ -<!--- Copyright 2013-2020 CS GROUP +<!--- Copyright 2013-2022 CS GROUP Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -105,7 +105,7 @@ components between Q1 and Q2 or -Q1 and Q2 leads to completely different rotatio will typically have one sign change per orbit at some random point. The third reason is that instead of doing an interpolation that respect quaternions constraint, the interpolation departs from the constraint first and attempts to recover afterwards in a normalization step. Orekit uses a method based on Sergeï Tanygin's paper -[Attitude interpolation](http://www.agi.com/resources/white-papers/attitude-interpolation) with slight +[Attitude interpolation](https://www.agi.com/resources/whitepapers/attitude-interpolation) with slight changes to use modified Rodrigues vectors as defined in Malcolm D Shuster's [A Survey of Attitude Representations](http://www.ladispe.polito.it/corsi/Meccatronica/02JHCOR/2011-12/Slides/Shuster_Pub_1993h_J_Repsurv_scan.pdf), despite attitude is still represented by quaternions in Orekit (Rodrigues vectors are used only for interpolation). diff --git a/src/site/markdown/downloads.md.vm b/src/site/markdown/downloads.md.vm index 16afd1b245f041ebd6d25a6b0a98fad003b12542..bdef3066bb532c76d153f6a38c7f470a189e6677 100644 --- a/src/site/markdown/downloads.md.vm +++ b/src/site/markdown/downloads.md.vm @@ -1,4 +1,4 @@ -<!--- Copyright 2013-2020 CS GROUP +<!--- Copyright 2013-2022 CS GROUP Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -43,7 +43,7 @@ with groupID org.orekit and artifactId rugged so maven internal mechanism will download automatically all artifacts and dependencies as required. -#set ( $versions = {"2.2": "2020-07-31", "2.1": "2019-03-14", "2.0": "2017-12-19", "1.0": "2016-02-10"} ) +#set ( $versions = {"3.0": "2022-07-05", "2.2": "2020-07-31", "2.1": "2019-03-14", "2.0": "2017-12-19", "1.0": "2016-02-10"} ) #foreach( $version in $versions.entrySet() ) | package | link | diff --git a/src/site/markdown/faq.md b/src/site/markdown/faq.md index 77088e7243c2bb33182327165477f34dde77c499..441e9443154902bbdc1551dd35841fad0e9637e1 100644 --- a/src/site/markdown/faq.md +++ b/src/site/markdown/faq.md @@ -1,4 +1,4 @@ -<!--- Copyright 2013-2020 CS GROUP +<!--- Copyright 2013-2022 CS GROUP Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/site/markdown/guidelines.md b/src/site/markdown/guidelines.md index 692f03c8e4bd4a555a5854417981137dc8b9396e..1d26084667d5509510c72357c89e780beed9b39c 100644 --- a/src/site/markdown/guidelines.md +++ b/src/site/markdown/guidelines.md @@ -1,4 +1,4 @@ -<!--- Copyright 2013-2020 CS GROUP +<!--- Copyright 2013-2022 CS GROUP Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md index da4f937de519388509304be8c0573628a82769ae..904fef2f68ee6c7788a35b8527a3045455c055ff 100644 --- a/src/site/markdown/index.md +++ b/src/site/markdown/index.md @@ -1,4 +1,4 @@ -<!--- Copyright 2013-2020 CS GROUP +<!--- Copyright 2013-2022 CS GROUP Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -98,7 +98,7 @@ interoperability in space systems. ## Maintained library -Rugged has been in development since 2014 inside [CS GROUP](http://www.c-s.fr/ "CS GROUP homepage") +Rugged has been in development since 2014 inside [CS GROUP](https://www.csgroup.eu/ "CS GROUP homepage") and is still used and maintained by its dual teams of space dynamics and image processing experts. diff --git a/src/site/markdown/release-guide.md b/src/site/markdown/release-guide.md index 238d31ddfd2d4565e6699d1aeeb8e6101a9c2067..0a2e02f57db4421c18b56d163923b499afc253e0 100644 --- a/src/site/markdown/release-guide.md +++ b/src/site/markdown/release-guide.md @@ -326,6 +326,21 @@ set the artifacts in the release notes. Navigate to Projects > Rugged > Project Overview > Releases and make sure it looks nice. +## Synchronize the Github mirror + +To enhance the visibility of the project, [a mirror](https://github.com/CS-SI/Rugged) is maintained on Github. +The releases created on Gitlab are not automatically pushed on this mirror. +They have to be declared manually to make visible the vitality of Rugged. + +1. Login to Github +2. Go to the [Rugged releases](https://github.com/CS-SI/Rugged/releases) page +3. Click on the [Draft a new release](https://github.com/CS-SI/Rugged/releases) button +4. In the "Tag version" field of the form and in the "Release title" field, enter the tag of the release to be declared +5. Describe the release as it has been done on Gitlab +6. Click on "Publish release" + +Github automically adds two assets (zip and tarball archives of the tagged source code). + ## Update Rugged website Several edits need to be made to the Rugged website after the vote. @@ -336,13 +351,13 @@ with the ones used to create the release notes. Edit `_layouts/home_rugged.html` and edit the text of the button to use the new version. Edit `rugged/overview.html` with the new Orekit and Hipparchus versions. Don't forget to update the -rugged/img/overview.png image with the new dependencies. +rugged/img/rugged-architecture.png image with the new dependencies. -Create a new post for the release in `_post/` using as template a previous Rugged post (in order to be published in the Rugged News page). +Create a new post for the release in `_post/` using as template a previous Rugged post (in order to be published in the Rugged News page). To be noticed the `--future` option is needed to see a post in the future, otherwise `jekyll serve` will ignore it ! Run: - jekyll serve + jekyll serve --future and make sure the website looks nice. View it on http://localhost:4000/ diff --git a/src/site/markdown/sources.md b/src/site/markdown/sources.md index 44db518110a8c13d894a52fc775d58a7ed6e13ff..abce9d2a7ed9752fb64d8bb9276bf7d4a5c47b15 100644 --- a/src/site/markdown/sources.md +++ b/src/site/markdown/sources.md @@ -1,4 +1,4 @@ -<!--- Copyright 2013-2020 CS GROUP +<!--- Copyright 2013-2022 CS GROUP Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/site/markdown/tutorials/direct-location-with-DEM.md b/src/site/markdown/tutorials/direct-location-with-DEM.md index 7dde63d46e50e8c751f47b4099482fd34c8d308e..13449228a51a1d285be101693a4ed1b34874e09a 100644 --- a/src/site/markdown/tutorials/direct-location-with-DEM.md +++ b/src/site/markdown/tutorials/direct-location-with-DEM.md @@ -1,4 +1,4 @@ -<!--- Copyright 2013-2020 CS GROUP +<!--- Copyright 2013-2022 CS GROUP Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/site/markdown/tutorials/direct-location.md b/src/site/markdown/tutorials/direct-location.md index f26b31b039fe4911d424be15b9c09d82aca75cf2..ae4430bfd46e038e292d4e0f947da20418aff7ce 100644 --- a/src/site/markdown/tutorials/direct-location.md +++ b/src/site/markdown/tutorials/direct-location.md @@ -1,4 +1,4 @@ -<!--- Copyright 2013-2020 CS GROUP +<!--- Copyright 2013-2022 CS GROUP Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/site/markdown/tutorials/inverse-location.md b/src/site/markdown/tutorials/inverse-location.md index da9a60315d66c6b3443854d3f7fc9c52d832b3e3..75fc5b4a528b8b2cb50bf134e4d9d95cf4bf7854 100644 --- a/src/site/markdown/tutorials/inverse-location.md +++ b/src/site/markdown/tutorials/inverse-location.md @@ -1,4 +1,4 @@ -<!--- Copyright 2013-2020 CS GROUP +<!--- Copyright 2013-2022 CS GROUP Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/site/markdown/tutorials/matlab-example.md b/src/site/markdown/tutorials/matlab-example.md index c664b7534fac45eba077b24b9a537984db81678f..0bd53ce86f5937227aa9d5f7f3b7b691a49c97e2 100644 --- a/src/site/markdown/tutorials/matlab-example.md +++ b/src/site/markdown/tutorials/matlab-example.md @@ -1,4 +1,4 @@ -<!--- Copyright 2013-2020 CS GROUP +<!--- Copyright 2013-2022 CS GROUP Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/site/markdown/tutorials/tile-updater.md b/src/site/markdown/tutorials/tile-updater.md index fda9dd34771328605e98a1074071bc5f457d06ec..1f45088705af19f6767573214e1a63c83d76c561 100644 --- a/src/site/markdown/tutorials/tile-updater.md +++ b/src/site/markdown/tutorials/tile-updater.md @@ -1,4 +1,4 @@ -<!--- Copyright 2013-2020 CS GROUP +<!--- Copyright 2013-2022 CS GROUP Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/site/resources/images/logo_cs_2008_baseline_ang.jpg b/src/site/resources/images/logo_cs_2008_baseline_ang.jpg deleted file mode 100644 index 6048a9c633821780b68be257486b7c963f92cfb5..0000000000000000000000000000000000000000 Binary files a/src/site/resources/images/logo_cs_2008_baseline_ang.jpg and /dev/null differ diff --git a/src/site/resources/images/logo_cs_group.png b/src/site/resources/images/logo_cs_group.png new file mode 100644 index 0000000000000000000000000000000000000000..481fe0c708a7cefb80858a62de20cc947c9ea010 Binary files /dev/null and b/src/site/resources/images/logo_cs_group.png differ diff --git a/src/site/resources/images/rugged-architecture.odg b/src/site/resources/images/rugged-architecture.odg index de5aeba4847f6441e3d9b1bcd9794ecfb35896b2..8af1bc445aa0702a161cd0265242a8f18b6b5fe9 100644 Binary files a/src/site/resources/images/rugged-architecture.odg and b/src/site/resources/images/rugged-architecture.odg differ diff --git a/src/site/resources/images/rugged-architecture.png b/src/site/resources/images/rugged-architecture.png index 49d69e940a8fa4d661963544d84fba29072af632..1fcde7952d56fb79eaf139c111da864217da0705 100644 Binary files a/src/site/resources/images/rugged-architecture.png and b/src/site/resources/images/rugged-architecture.png differ diff --git a/src/site/site.xml b/src/site/site.xml index 4b9af80723657a8d02610519b7b32804c02e278d..c29146d5f352637b3a25e64250ababaa28e46b2c 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Copyright 2013-2020 CS GROUP + Copyright 2013-2022 CS GROUP Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -16,9 +16,8 @@ <project name="Rugged"> <bannerLeft> <name>CS GROUP</name> - <src>/images/logo_cs_2008_baseline_ang.jpg</src> - <height>180</height> - <href>http://www.c-s.fr/</href> + <src>/images/logo_cs_group.png</src> + <href>https://www.csgroup.eu/</href> </bannerLeft> <bannerRight> <name>Rugged</name> diff --git a/src/test/java/org/orekit/rugged/TestUtils.java b/src/test/java/org/orekit/rugged/TestUtils.java index 418a9a1b3b9288e447ebadca51284889d6c1f9ce..c40a8d7c4e9ec55717d8e8512222edbb1f4df648 100644 --- a/src/test/java/org/orekit/rugged/TestUtils.java +++ b/src/test/java/org/orekit/rugged/TestUtils.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -58,7 +58,6 @@ import org.orekit.propagation.Propagator; import org.orekit.propagation.SpacecraftState; import org.orekit.propagation.analytical.KeplerianPropagator; import org.orekit.propagation.numerical.NumericalPropagator; -import org.orekit.propagation.sampling.OrekitFixedStepHandler; import org.orekit.propagation.semianalytical.dsst.utilities.JacobiPolynomials; import org.orekit.propagation.semianalytical.dsst.utilities.NewcombOperators; import org.orekit.rugged.linesensor.SensorPixel; @@ -302,14 +301,10 @@ public class TestUtils { propagator.setAttitudeProvider(new YawCompensation(orbit.getFrame(), new NadirPointing(orbit.getFrame(), earth))); propagator.propagate(minDate); final List<TimeStampedPVCoordinates> list = new ArrayList<TimeStampedPVCoordinates>(); - propagator.setMasterMode(step, new OrekitFixedStepHandler() { - public void handleStep(SpacecraftState currentState, boolean isLast) { - list.add(new TimeStampedPVCoordinates(currentState.getDate(), - currentState.getPVCoordinates().getPosition(), - currentState.getPVCoordinates().getVelocity(), - Vector3D.ZERO)); - } - }); + propagator.getMultiplexer().add(step, currentState -> list.add(new TimeStampedPVCoordinates(currentState.getDate(), + currentState.getPVCoordinates().getPosition(), + currentState.getPVCoordinates().getVelocity(), + Vector3D.ZERO))); propagator.propagate(maxDate); return list; } @@ -325,13 +320,9 @@ public class TestUtils { propagator.setAttitudeProvider(new YawCompensation(orbit.getFrame(), new NadirPointing(orbit.getFrame(), earth))); propagator.propagate(minDate); final List<TimeStampedAngularCoordinates> list = new ArrayList<TimeStampedAngularCoordinates>(); - propagator.setMasterMode(step, new OrekitFixedStepHandler() { - public void handleStep(SpacecraftState currentState, boolean isLast) { - list.add(new TimeStampedAngularCoordinates(currentState.getDate(), - currentState.getAttitude().getRotation(), - Vector3D.ZERO, Vector3D.ZERO)); - } - }); + propagator.getMultiplexer().add(step, currentState -> list.add(new TimeStampedAngularCoordinates(currentState.getDate(), + currentState.getAttitude().getRotation(), + Vector3D.ZERO, Vector3D.ZERO))); propagator.propagate(maxDate); return list; } diff --git a/src/test/java/org/orekit/rugged/adjustment/AdjustmentContextTest.java b/src/test/java/org/orekit/rugged/adjustment/AdjustmentContextTest.java index c5682cb84f8be7f3d254a76627ae99cf59b306d5..17dc22aa3cd6d2c36032273e1a2cbcb9f0bfd944 100644 --- a/src/test/java/org/orekit/rugged/adjustment/AdjustmentContextTest.java +++ b/src/test/java/org/orekit/rugged/adjustment/AdjustmentContextTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/adjustment/InterSensorOptimizationProblemBuilderTest.java b/src/test/java/org/orekit/rugged/adjustment/InterSensorOptimizationProblemBuilderTest.java index a28d45fff05a7699721fcf3629ea35bc9f7fa28b..32bd04330ca87563c141e46be3d9eb7e543d2d68 100644 --- a/src/test/java/org/orekit/rugged/adjustment/InterSensorOptimizationProblemBuilderTest.java +++ b/src/test/java/org/orekit/rugged/adjustment/InterSensorOptimizationProblemBuilderTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/adjustment/util/PleiadesOrbitModel.java b/src/test/java/org/orekit/rugged/adjustment/util/PleiadesOrbitModel.java index 5f76ebb808a0f108adb6a8eea66650655959c8e3..cca8dbc4d0a7e557a8f0ca387aeeab0826b79243 100644 --- a/src/test/java/org/orekit/rugged/adjustment/util/PleiadesOrbitModel.java +++ b/src/test/java/org/orekit/rugged/adjustment/util/PleiadesOrbitModel.java @@ -166,12 +166,11 @@ public class PleiadesOrbitModel { propagator.propagate(minDate); final List<TimeStampedPVCoordinates> list = new ArrayList<TimeStampedPVCoordinates>(); - propagator.setMasterMode(step, - (currentState, isLast) -> - list.add(new TimeStampedPVCoordinates(currentState.getDate(), - currentState.getPVCoordinates().getPosition(), - currentState.getPVCoordinates().getVelocity(), - Vector3D.ZERO))); + propagator.getMultiplexer().add(step, + currentState -> list.add(new TimeStampedPVCoordinates(currentState.getDate(), + currentState.getPVCoordinates().getPosition(), + currentState.getPVCoordinates().getVelocity(), + Vector3D.ZERO))); propagator.propagate(maxDate); return list; @@ -187,12 +186,11 @@ public class PleiadesOrbitModel { propagator.setAttitudeProvider(createAttitudeProvider(earth, orbit)); propagator.propagate(minDate); final List<TimeStampedAngularCoordinates> list = new ArrayList<>(); - propagator.setMasterMode(step, - (currentState, isLast) -> - list.add(new TimeStampedAngularCoordinates(currentState.getDate(), - currentState.getAttitude().getRotation(), - Vector3D.ZERO, - Vector3D.ZERO))); + propagator.getMultiplexer().add(step, + currentState -> list.add(new TimeStampedAngularCoordinates(currentState.getDate(), + currentState.getAttitude().getRotation(), + Vector3D.ZERO, + Vector3D.ZERO))); propagator.propagate(maxDate); return list; diff --git a/src/test/java/org/orekit/rugged/api/RuggedBuilderTest.java b/src/test/java/org/orekit/rugged/api/RuggedBuilderTest.java index f24730bda5eee803bbd53af9ca1afa73f77473f8..22fd1f4823604a48c0c84af83c9125d8f2ab4a76 100644 --- a/src/test/java/org/orekit/rugged/api/RuggedBuilderTest.java +++ b/src/test/java/org/orekit/rugged/api/RuggedBuilderTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -63,7 +63,6 @@ import org.orekit.propagation.Propagator; import org.orekit.propagation.SpacecraftState; import org.orekit.propagation.analytical.KeplerianPropagator; import org.orekit.propagation.numerical.NumericalPropagator; -import org.orekit.propagation.sampling.OrekitFixedStepHandler; import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.errors.RuggedMessages; import org.orekit.rugged.linesensor.LineDatation; @@ -825,14 +824,10 @@ public class RuggedBuilderTest { propagator.setAttitudeProvider(new YawCompensation(orbit.getFrame(), new NadirPointing(orbit.getFrame(), earth))); propagator.propagate(minDate); final List<TimeStampedPVCoordinates> list = new ArrayList<TimeStampedPVCoordinates>(); - propagator.setMasterMode(step, new OrekitFixedStepHandler() { - public void handleStep(SpacecraftState currentState, boolean isLast) { - list.add(new TimeStampedPVCoordinates(currentState.getDate(), - currentState.getPVCoordinates().getPosition(), - currentState.getPVCoordinates().getVelocity(), - Vector3D.ZERO)); - } - }); + propagator.getMultiplexer().add(step, currentState -> list.add(new TimeStampedPVCoordinates(currentState.getDate(), + currentState.getPVCoordinates().getPosition(), + currentState.getPVCoordinates().getVelocity(), + Vector3D.ZERO))); propagator.propagate(maxDate); return list; } @@ -845,13 +840,9 @@ public class RuggedBuilderTest { propagator.setAttitudeProvider(new YawCompensation(orbit.getFrame(), new NadirPointing(orbit.getFrame(), earth))); propagator.propagate(minDate); final List<TimeStampedAngularCoordinates> list = new ArrayList<TimeStampedAngularCoordinates>(); - propagator.setMasterMode(step, new OrekitFixedStepHandler() { - public void handleStep(SpacecraftState currentState, boolean isLast) { - list.add(new TimeStampedAngularCoordinates(currentState.getDate(), - currentState.getAttitude().getRotation(), - Vector3D.ZERO, Vector3D.ZERO)); - } - }); + propagator.getMultiplexer().add(step, currentState -> list.add(new TimeStampedAngularCoordinates(currentState.getDate(), + currentState.getAttitude().getRotation(), + Vector3D.ZERO, Vector3D.ZERO))); propagator.propagate(maxDate); return list; } diff --git a/src/test/java/org/orekit/rugged/api/RuggedTest.java b/src/test/java/org/orekit/rugged/api/RuggedTest.java index cd8aae3f4f3f95bc64e7b56894fc2eb6032b2c78..5c19b72cd724aed75241b1ce7eef7d8d1631b1b3 100644 --- a/src/test/java/org/orekit/rugged/api/RuggedTest.java +++ b/src/test/java/org/orekit/rugged/api/RuggedTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -59,6 +59,7 @@ import org.orekit.forces.gravity.potential.NormalizedSphericalHarmonicsProvider; import org.orekit.frames.Frame; import org.orekit.frames.FramesFactory; import org.orekit.orbits.Orbit; +import org.orekit.propagation.EphemerisGenerator; import org.orekit.propagation.Propagator; import org.orekit.rugged.TestUtils; import org.orekit.rugged.adjustment.GroundOptimizationProblemBuilder; @@ -67,6 +68,7 @@ import org.orekit.rugged.adjustment.util.InitInterRefiningTest; import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.errors.RuggedMessages; import org.orekit.rugged.intersection.IgnoreDEMAlgorithm; +import org.orekit.rugged.intersection.IntersectionAlgorithm; import org.orekit.rugged.linesensor.LineDatation; import org.orekit.rugged.linesensor.LineSensor; import org.orekit.rugged.linesensor.LinearLineDatation; @@ -77,7 +79,9 @@ import org.orekit.rugged.los.TimeDependentLOS; import org.orekit.rugged.raster.RandomLandscapeUpdater; import org.orekit.rugged.raster.TileUpdater; import org.orekit.rugged.raster.VolcanicConeElevationUpdater; +import org.orekit.rugged.refraction.AtmosphericRefraction; import org.orekit.rugged.utils.DerivativeGenerator; +import org.orekit.rugged.utils.NormalizedGeodeticPoint; import org.orekit.time.AbsoluteDate; import org.orekit.time.TimeScale; import org.orekit.time.TimeScalesFactory; @@ -136,9 +140,9 @@ public class RuggedTest { Propagator propagator = TestUtils.createPropagator(earth, gravityField, orbit); propagator.propagate(lineDatation.getDate(firstLine).shiftedBy(-1.0)); - propagator.setEphemerisMode(); + final EphemerisGenerator generator = propagator.getEphemerisGenerator(); propagator.propagate(lineDatation.getDate(lastLine).shiftedBy(+1.0)); - Propagator ephemeris = propagator.getGeneratedEphemeris(); + Propagator ephemeris = generator.getGeneratedEphemeris(); Rugged rugged = new RuggedBuilder(). setDigitalElevationModel(updater, 8). @@ -879,6 +883,17 @@ public class RuggedTest { LinearLineDatation lineDatation = new LinearLineDatation(absDate, 0.03125d, 19.95565693384045); LineSensor lineSensor = new LineSensor("QUICK_LOOK", lineDatation, offset, new LOSBuilder(lineOfSight).build()); + + // in order not to have a problem when calling the pixelIsInside method (AtmosphericRefraction must be not null) + AtmosphericRefraction atmos = new AtmosphericRefraction() { + @Override + public NormalizedGeodeticPoint applyCorrection(Vector3D satPos, Vector3D satLos, + NormalizedGeodeticPoint rawIntersection, IntersectionAlgorithm algorithm) { + return rawIntersection; + } + }; + atmos.deactivateComputation(); + Rugged rugged = new RuggedBuilder(). setAlgorithm(AlgorithmId.IGNORE_DEM_USE_ELLIPSOID). setEllipsoid(EllipsoidId.WGS84, BodyRotatingFrameId.ITRF). @@ -888,6 +903,7 @@ public class RuggedTest { satellitePVList, 6, CartesianDerivativesFilter.USE_P, satelliteQList, 8, AngularDerivativesFilter.USE_R). addLineSensor(lineSensor). + setRefractionCorrection(atmos). build(); GeodeticPoint[] temp = rugged.directLocation("QUICK_LOOK", -250); @@ -904,6 +920,28 @@ public class RuggedTest { Assert.assertNotNull(sensorPixel); + Assert.assertFalse(inside(rugged, null, lineSensor)); + Assert.assertFalse(inside(rugged, new SensorPixel(-100, -100), lineSensor)); + Assert.assertFalse(inside(rugged, new SensorPixel(-100, +100), lineSensor)); + Assert.assertFalse(inside(rugged, new SensorPixel(+100, -100), lineSensor)); + Assert.assertFalse(inside(rugged, new SensorPixel(+100, +100), lineSensor)); + Assert.assertTrue(inside(rugged, new SensorPixel(0.2, 0.3), lineSensor)); + + } + + private boolean inside(final Rugged rugged, final SensorPixel sensorPixel, LineSensor lineSensor) { + try { + final Method inside = + Rugged.class.getDeclaredMethod("pixelIsInside", + SensorPixel.class, + LineSensor.class); + inside.setAccessible(true); + return ((Boolean) inside.invoke(rugged, sensorPixel, lineSensor)).booleanValue(); + } catch (NoSuchMethodException | IllegalAccessException | + IllegalArgumentException | InvocationTargetException e) { + Assert.fail(e.getLocalizedMessage()); + return false; + } } @Test diff --git a/src/test/java/org/orekit/rugged/errors/DumpManagerTest.java b/src/test/java/org/orekit/rugged/errors/DumpManagerTest.java index 92d4f041164013032469c6e0f04b3b7bef1d0ace..9901b2fcdc3ab8974f9dbb94390ca062386ba5a3 100644 --- a/src/test/java/org/orekit/rugged/errors/DumpManagerTest.java +++ b/src/test/java/org/orekit/rugged/errors/DumpManagerTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/errors/DumpReplayerTest.java b/src/test/java/org/orekit/rugged/errors/DumpReplayerTest.java index dd0330c9494c178a12df4fc12c0b9c8dbe809ada..a19b2e4cd29d1aa1334d451cd0952f85c3305ca5 100644 --- a/src/test/java/org/orekit/rugged/errors/DumpReplayerTest.java +++ b/src/test/java/org/orekit/rugged/errors/DumpReplayerTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/errors/DumpTest.java b/src/test/java/org/orekit/rugged/errors/DumpTest.java index fd79d081fd193a552da563f57ce2810f22902416..38c9790aca4425cfce0a392cd740072e64e0e8bc 100644 --- a/src/test/java/org/orekit/rugged/errors/DumpTest.java +++ b/src/test/java/org/orekit/rugged/errors/DumpTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/errors/RuggedExceptionTest.java b/src/test/java/org/orekit/rugged/errors/RuggedExceptionTest.java index 5a65a3983703e9bf04dd141aca27bc6dd6eee0a8..35ab40d43134c39c3eb7ebc987ecb8ba1dbe49d5 100644 --- a/src/test/java/org/orekit/rugged/errors/RuggedExceptionTest.java +++ b/src/test/java/org/orekit/rugged/errors/RuggedExceptionTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/errors/RuggedMessagesTest.java b/src/test/java/org/orekit/rugged/errors/RuggedMessagesTest.java index 3a3c98a321a07f7da13560e0b1ddcda82ae6b88c..d70b430c3538f73ca391e0c409ade68b28283132 100644 --- a/src/test/java/org/orekit/rugged/errors/RuggedMessagesTest.java +++ b/src/test/java/org/orekit/rugged/errors/RuggedMessagesTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -30,7 +30,7 @@ public class RuggedMessagesTest { private final String[] LANGUAGES_LIST = { "da", "de", "en", "es", "fr", "gl", "it", "no", "ro" } ; @Test public void testMessageNumber() { - Assert.assertEquals(33, RuggedMessages.values().length); + Assert.assertEquals(35, RuggedMessages.values().length); } @Test @@ -96,6 +96,18 @@ public class RuggedMessagesTest { } } + @Test + public void testMissingLanguageMissingTranslation() { + Assert.assertEquals(RuggedMessages.INTERNAL_ERROR.getSourceString(), + RuggedMessages.INTERNAL_ERROR.getLocalizedString(Locale.KOREAN)); + Assert.assertEquals(RuggedMessages.NO_DEM_DATA.getSourceString(), + RuggedMessages.NO_DEM_DATA.getLocalizedString(Locale.KOREAN)); + Assert.assertEquals("ABCDEF {0}", + RuggedMessages.UNKNOWN_SENSOR.getLocalizedString(Locale.KOREAN)); + Assert.assertEquals(RuggedMessages.EMPTY_TILE.getSourceString(), + RuggedMessages.EMPTY_TILE.getLocalizedString(Locale.KOREAN)); + } + @Test public void testVariablePartsConsistency() { for (final String language : LANGUAGES_LIST) { diff --git a/src/test/java/org/orekit/rugged/intersection/AbstractAlgorithmTest.java b/src/test/java/org/orekit/rugged/intersection/AbstractAlgorithmTest.java index 6503cf02233dc5d59996f7e8a348de841e65b109..d8ce5af3d54189aacf29cbbd8d59766c252f073a 100644 --- a/src/test/java/org/orekit/rugged/intersection/AbstractAlgorithmTest.java +++ b/src/test/java/org/orekit/rugged/intersection/AbstractAlgorithmTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/intersection/BasicScanAlgorithmTest.java b/src/test/java/org/orekit/rugged/intersection/BasicScanAlgorithmTest.java index 8584941939aee3ce27a9226da3304a9c64dee113..d236fe73ad75f6c8ad84b77ee05ffefdf1175cec 100644 --- a/src/test/java/org/orekit/rugged/intersection/BasicScanAlgorithmTest.java +++ b/src/test/java/org/orekit/rugged/intersection/BasicScanAlgorithmTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/intersection/ConstantElevationAlgorithmTest.java b/src/test/java/org/orekit/rugged/intersection/ConstantElevationAlgorithmTest.java index af5933c68a53a6d34a4a07586c56c826a485823d..7d932363f13fe2e7cc9a94a4766bae17a6aa671c 100644 --- a/src/test/java/org/orekit/rugged/intersection/ConstantElevationAlgorithmTest.java +++ b/src/test/java/org/orekit/rugged/intersection/ConstantElevationAlgorithmTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithmTest.java b/src/test/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithmTest.java index 55830c25d237d94f705758f75afb5b601c663fdc..0b129554d66d5b02421f81da1546f7ddf0e3f08b 100644 --- a/src/test/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithmTest.java +++ b/src/test/java/org/orekit/rugged/intersection/duvenhage/DuvenhageAlgorithmTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/intersection/duvenhage/MinMaxTreeTileTest.java b/src/test/java/org/orekit/rugged/intersection/duvenhage/MinMaxTreeTileTest.java index 06532770e7b7d7f767749744e732699f1733b385..dbd8778374cd89ed17c4e0782d09c7fbaa2c9b24 100644 --- a/src/test/java/org/orekit/rugged/intersection/duvenhage/MinMaxTreeTileTest.java +++ b/src/test/java/org/orekit/rugged/intersection/duvenhage/MinMaxTreeTileTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/linesensor/FixedRotationTest.java b/src/test/java/org/orekit/rugged/linesensor/FixedRotationTest.java index cad43aeaac0cacb56540a6b8fa05bab3838ea67a..5d69b5fd35921e20724f7f8dd520f97740e8e0ef 100644 --- a/src/test/java/org/orekit/rugged/linesensor/FixedRotationTest.java +++ b/src/test/java/org/orekit/rugged/linesensor/FixedRotationTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/linesensor/PolynomialRotationTest.java b/src/test/java/org/orekit/rugged/linesensor/PolynomialRotationTest.java index 338bb26d6dc1fed2eed8cfd552436c30197f636f..b14891f5087ff383efbda5607a00b5f514bbd717 100644 --- a/src/test/java/org/orekit/rugged/linesensor/PolynomialRotationTest.java +++ b/src/test/java/org/orekit/rugged/linesensor/PolynomialRotationTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/linesensor/SensorMeanPlaneCrossingTest.java b/src/test/java/org/orekit/rugged/linesensor/SensorMeanPlaneCrossingTest.java index 9107078602bfd311812dc4fd407ff33d9d07f6c9..753d103f0412d5986370dc00d694ccc6aac153a0 100644 --- a/src/test/java/org/orekit/rugged/linesensor/SensorMeanPlaneCrossingTest.java +++ b/src/test/java/org/orekit/rugged/linesensor/SensorMeanPlaneCrossingTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -44,10 +44,10 @@ import org.orekit.orbits.CircularOrbit; import org.orekit.orbits.Orbit; import org.orekit.orbits.PositionAngle; import org.orekit.propagation.Propagator; -import org.orekit.propagation.SpacecraftState; import org.orekit.propagation.analytical.KeplerianPropagator; -import org.orekit.propagation.sampling.OrekitFixedStepHandler; import org.orekit.rugged.TestUtils; +import org.orekit.rugged.errors.RuggedException; +import org.orekit.rugged.errors.RuggedMessages; import org.orekit.rugged.linesensor.SensorMeanPlaneCrossing.CrossingResult; import org.orekit.rugged.los.LOSBuilder; import org.orekit.rugged.utils.SpacecraftToObservedBody; @@ -148,8 +148,7 @@ public class SensorMeanPlaneCrossingTest { private void doTestDerivative(boolean lightTimeCorrection, boolean aberrationOfLightCorrection, - double tol) - { + double tol) { final Vector3D position = new Vector3D(1.5, Vector3D.PLUS_I); final Vector3D normal = Vector3D.PLUS_I; @@ -217,6 +216,20 @@ public class SensorMeanPlaneCrossingTest { Vector3D.distance(result.getTargetDirectionDerivative(), dirDer), tol * dirDer.getNorm()); + try { + mean.getScToBody().getBodyToInertial(refDate.shiftedBy(-Constants.JULIAN_CENTURY)); + Assert.fail("an exception should have been thrown"); + } catch (RuggedException re) { + Assert.assertEquals(RuggedMessages.OUT_OF_TIME_RANGE, re.getSpecifier()); + } + try { + mean.getScToBody().getBodyToInertial(refDate.shiftedBy(Constants.JULIAN_CENTURY)); + Assert.fail("an exception should have been thrown"); + } catch (RuggedException re) { + Assert.assertEquals(RuggedMessages.OUT_OF_TIME_RANGE, re.getSpecifier()); + } + Assert.assertNotNull(mean.getScToBody().getBodyToInertial(refDate)); + } @Test @@ -316,14 +329,10 @@ public class SensorMeanPlaneCrossingTest { propagator.setAttitudeProvider(new YawCompensation(orbit.getFrame(), new NadirPointing(orbit.getFrame(), earth))); propagator.propagate(minDate); final List<TimeStampedPVCoordinates> list = new ArrayList<TimeStampedPVCoordinates>(); - propagator.setMasterMode(step, new OrekitFixedStepHandler() { - public void handleStep(SpacecraftState currentState, boolean isLast) { - list.add(new TimeStampedPVCoordinates(currentState.getDate(), - currentState.getPVCoordinates().getPosition(), - currentState.getPVCoordinates().getVelocity(), - Vector3D.ZERO)); - } - }); + propagator.getMultiplexer().add(step, currentState -> list.add(new TimeStampedPVCoordinates(currentState.getDate(), + currentState.getPVCoordinates().getPosition(), + currentState.getPVCoordinates().getVelocity(), + Vector3D.ZERO))); propagator.propagate(maxDate); return list; } @@ -336,13 +345,9 @@ public class SensorMeanPlaneCrossingTest { propagator.setAttitudeProvider(new YawCompensation(orbit.getFrame(), new NadirPointing(orbit.getFrame(), earth))); propagator.propagate(minDate); final List<TimeStampedAngularCoordinates> list = new ArrayList<TimeStampedAngularCoordinates>(); - propagator.setMasterMode(step, new OrekitFixedStepHandler() { - public void handleStep(SpacecraftState currentState, boolean isLast) { - list.add(new TimeStampedAngularCoordinates(currentState.getDate(), - currentState.getAttitude().getRotation(), - Vector3D.ZERO, Vector3D.ZERO)); - } - }); + propagator.getMultiplexer().add(step, currentState -> list.add(new TimeStampedAngularCoordinates(currentState.getDate(), + currentState.getAttitude().getRotation(), + Vector3D.ZERO, Vector3D.ZERO))); propagator.propagate(maxDate); return list; } diff --git a/src/test/java/org/orekit/rugged/raster/CheckedPatternElevationUpdater.java b/src/test/java/org/orekit/rugged/raster/CheckedPatternElevationUpdater.java index 2768168fa710d1d2043326d3c872e45758cca902..7d5adbcff1bfa11a2923da6ab98b5ccf17d766dd 100644 --- a/src/test/java/org/orekit/rugged/raster/CheckedPatternElevationUpdater.java +++ b/src/test/java/org/orekit/rugged/raster/CheckedPatternElevationUpdater.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/raster/CliffsElevationUpdater.java b/src/test/java/org/orekit/rugged/raster/CliffsElevationUpdater.java index 75961fbc3cf6e85cbcf9bf40947193fcf1365b17..ad1a69036714f6882d692b19c299d479dc3c9a6b 100644 --- a/src/test/java/org/orekit/rugged/raster/CliffsElevationUpdater.java +++ b/src/test/java/org/orekit/rugged/raster/CliffsElevationUpdater.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/raster/CountingFactory.java b/src/test/java/org/orekit/rugged/raster/CountingFactory.java index 03bbad8e8d09b83d1c4a36d51134d703f07da4c0..ad714f48a821df6bdaa50c5c39c1159a9008b4c2 100644 --- a/src/test/java/org/orekit/rugged/raster/CountingFactory.java +++ b/src/test/java/org/orekit/rugged/raster/CountingFactory.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/raster/RandomLandscapeUpdater.java b/src/test/java/org/orekit/rugged/raster/RandomLandscapeUpdater.java index 2ba204cd2a431559607d36c0277366b8a52b910a..df3940dc8808fef86162d7f9246506ef9f6ee77a 100644 --- a/src/test/java/org/orekit/rugged/raster/RandomLandscapeUpdater.java +++ b/src/test/java/org/orekit/rugged/raster/RandomLandscapeUpdater.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/raster/SimpleTileTest.java b/src/test/java/org/orekit/rugged/raster/SimpleTileTest.java index a5b219ed3328bcb73862adc3823432512042db4d..75a63ab0342d7129f47793a381c5eadaa7037e3a 100644 --- a/src/test/java/org/orekit/rugged/raster/SimpleTileTest.java +++ b/src/test/java/org/orekit/rugged/raster/SimpleTileTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -18,12 +18,14 @@ package org.orekit.rugged.raster; import org.hipparchus.geometry.euclidean.threed.Vector3D; import org.hipparchus.util.FastMath; +import org.hipparchus.util.MathUtils; import org.junit.Assert; import org.junit.Test; import org.orekit.bodies.GeodeticPoint; import org.orekit.rugged.errors.RuggedException; import org.orekit.rugged.errors.RuggedMessages; import org.orekit.rugged.raster.Tile.Location; +import org.orekit.rugged.utils.NormalizedGeodeticPoint; public class SimpleTileTest { @@ -216,16 +218,44 @@ public class SimpleTileTest { tile.setElevation(21, 14, 162.0); tile.setElevation(21, 15, 95.0); tile.tileUpdateCompleted(); - GeodeticPoint gpA = new GeodeticPoint(tile.getLatitudeAtIndex(20) + 0.1 * tile.getLatitudeStep(), - tile.getLongitudeAtIndex(14) + 0.2 * tile.getLongitudeStep(), - 300.0); - GeodeticPoint gpB = new GeodeticPoint(tile.getLatitudeAtIndex(20) + 0.7 * tile.getLatitudeStep(), - tile.getLongitudeAtIndex(14) + 0.9 * tile.getLongitudeStep(), - 10.0); - GeodeticPoint gpIAB = tile.cellIntersection(gpA, los(gpA, gpB), 20, 14); + NormalizedGeodeticPoint gpA = new NormalizedGeodeticPoint(tile.getLatitudeAtIndex(20) + 0.1 * tile.getLatitudeStep(), + tile.getLongitudeAtIndex(14) + 0.2 * tile.getLongitudeStep(), + 300.0, tile.getLongitudeAtIndex(14)); + NormalizedGeodeticPoint gpB = new NormalizedGeodeticPoint(tile.getLatitudeAtIndex(20) + 0.7 * tile.getLatitudeStep(), + tile.getLongitudeAtIndex(14) + 0.9 * tile.getLongitudeStep(), + 10.0, tile.getLongitudeAtIndex(14)); + NormalizedGeodeticPoint gpIAB = tile.cellIntersection(gpA, los(gpA, gpB), 20, 14); checkInLine(gpA, gpB, gpIAB); checkOnTile(tile, gpIAB); - GeodeticPoint gpIBA = tile.cellIntersection(gpB, los(gpB, gpA), 20, 14); + NormalizedGeodeticPoint gpIBA = tile.cellIntersection(gpB, los(gpB, gpA), 20, 14); + checkInLine(gpA, gpB, gpIBA); + checkOnTile(tile, gpIBA); + + Assert.assertEquals(gpIAB.getLatitude(), gpIBA.getLatitude(), 1.0e-10); + Assert.assertEquals(gpIAB.getLongitude(), gpIBA.getLongitude(), 1.0e-10); + Assert.assertEquals(gpIAB.getAltitude(), gpIBA.getAltitude(), 1.0e-10); + + } + + @Test + public void testCellIntersection2PiWrapping() { + SimpleTile tile = new SimpleTileFactory().createTile(); + tile.setGeometry(0.0, 0.0, 0.025, 0.025, 50, 50); + tile.setElevation(20, 14, 91.0); + tile.setElevation(20, 15, 210.0); + tile.setElevation(21, 14, 162.0); + tile.setElevation(21, 15, 95.0); + tile.tileUpdateCompleted(); + NormalizedGeodeticPoint gpA = new NormalizedGeodeticPoint(tile.getLatitudeAtIndex(20) + 0.1 * tile.getLatitudeStep(), + tile.getLongitudeAtIndex(14) + 0.2 * tile.getLongitudeStep(), + 300.0, +4 * FastMath.PI); + NormalizedGeodeticPoint gpB = new NormalizedGeodeticPoint(tile.getLatitudeAtIndex(20) + 0.7 * tile.getLatitudeStep(), + tile.getLongitudeAtIndex(14) + 0.9 * tile.getLongitudeStep(), + 10.0, +4 * FastMath.PI); + NormalizedGeodeticPoint gpIAB = tile.cellIntersection(gpA, los(gpA, gpB), 20, 14); + checkInLine(gpA, gpB, gpIAB); + checkOnTile(tile, gpIAB); + NormalizedGeodeticPoint gpIBA = tile.cellIntersection(gpB, los(gpB, gpA), 20, 14); checkInLine(gpA, gpB, gpIBA); checkOnTile(tile, gpIBA); @@ -244,19 +274,19 @@ public class SimpleTileTest { tile.setElevation(21, 14, 162.0); tile.setElevation(21, 15, 95.0); tile.tileUpdateCompleted(); - GeodeticPoint gpA = new GeodeticPoint(tile.getLatitudeAtIndex(20) + 0.1 * tile.getLatitudeStep(), - tile.getLongitudeAtIndex(14) + 0.2 * tile.getLongitudeStep(), - 120.0); - GeodeticPoint gpB = new GeodeticPoint(tile.getLatitudeAtIndex(20) + 0.7 * tile.getLatitudeStep(), - tile.getLongitudeAtIndex(14) + 0.9 * tile.getLongitudeStep(), - 130.0); + NormalizedGeodeticPoint gpA = new NormalizedGeodeticPoint(tile.getLatitudeAtIndex(20) + 0.1 * tile.getLatitudeStep(), + tile.getLongitudeAtIndex(14) + 0.2 * tile.getLongitudeStep(), + 120.0, tile.getLongitudeAtIndex(14)); + NormalizedGeodeticPoint gpB = new NormalizedGeodeticPoint(tile.getLatitudeAtIndex(20) + 0.7 * tile.getLatitudeStep(), + tile.getLongitudeAtIndex(14) + 0.9 * tile.getLongitudeStep(), + 130.0, tile.getLongitudeAtIndex(14)); // the line from gpA to gpB should traverse the DEM twice within the tile // we use the points in the two different orders to retrieve both solutions - GeodeticPoint gpIAB = tile.cellIntersection(gpA, los(gpA, gpB), 20, 14); + NormalizedGeodeticPoint gpIAB = tile.cellIntersection(gpA, los(gpA, gpB), 20, 14); checkInLine(gpA, gpB, gpIAB); checkOnTile(tile, gpIAB); - GeodeticPoint gpIBA = tile.cellIntersection(gpB, los(gpB, gpA), 20, 14); + NormalizedGeodeticPoint gpIBA = tile.cellIntersection(gpB, los(gpB, gpA), 20, 14); checkInLine(gpA, gpB, gpIBA); checkOnTile(tile, gpIBA); @@ -275,12 +305,12 @@ public class SimpleTileTest { tile.setElevation(21, 14, 162.0); tile.setElevation(21, 15, 95.0); tile.tileUpdateCompleted(); - GeodeticPoint gpA = new GeodeticPoint(tile.getLatitudeAtIndex(20) + 0.1 * tile.getLatitudeStep(), - tile.getLongitudeAtIndex(14) + 0.2 * tile.getLongitudeStep(), - 180.0); - GeodeticPoint gpB = new GeodeticPoint(tile.getLatitudeAtIndex(20) + 0.7 * tile.getLatitudeStep(), - tile.getLongitudeAtIndex(14) + 0.9 * tile.getLongitudeStep(), - 190.0); + NormalizedGeodeticPoint gpA = new NormalizedGeodeticPoint(tile.getLatitudeAtIndex(20) + 0.1 * tile.getLatitudeStep(), + tile.getLongitudeAtIndex(14) + 0.2 * tile.getLongitudeStep(), + 180.0, tile.getLongitudeAtIndex(14)); + NormalizedGeodeticPoint gpB = new NormalizedGeodeticPoint(tile.getLatitudeAtIndex(20) + 0.7 * tile.getLatitudeStep(), + tile.getLongitudeAtIndex(14) + 0.9 * tile.getLongitudeStep(), + 190.0, tile.getLongitudeAtIndex(14)); Assert.assertNull(tile.cellIntersection(gpA, los(gpA, gpB), 20, 14)); @@ -295,17 +325,17 @@ public class SimpleTileTest { tile.setElevation(1, 0, 40.0); tile.setElevation(1, 1, 40.0); tile.tileUpdateCompleted(); - GeodeticPoint gpA = new GeodeticPoint(tile.getLatitudeAtIndex(0) + 0.25 * tile.getLatitudeStep(), - tile.getLongitudeAtIndex(0) + 0.50 * tile.getLongitudeStep(), - 50.0); - GeodeticPoint gpB = new GeodeticPoint(tile.getLatitudeAtIndex(0) + 0.75 * tile.getLatitudeStep(), - tile.getLongitudeAtIndex(0) + 0.50 * tile.getLongitudeStep(), - 20.0); - - GeodeticPoint gpIAB = tile.cellIntersection(gpA, los(gpA, gpB), 0, 0); + NormalizedGeodeticPoint gpA = new NormalizedGeodeticPoint(tile.getLatitudeAtIndex(0) + 0.25 * tile.getLatitudeStep(), + tile.getLongitudeAtIndex(0) + 0.50 * tile.getLongitudeStep(), + 50.0, tile.getLongitudeAtIndex(0)); + NormalizedGeodeticPoint gpB = new NormalizedGeodeticPoint(tile.getLatitudeAtIndex(0) + 0.75 * tile.getLatitudeStep(), + tile.getLongitudeAtIndex(0) + 0.50 * tile.getLongitudeStep(), + 20.0, tile.getLongitudeAtIndex(0)); + + NormalizedGeodeticPoint gpIAB = tile.cellIntersection(gpA, los(gpA, gpB), 0, 0); checkInLine(gpA, gpB, gpIAB); checkOnTile(tile, gpIAB); - GeodeticPoint gpIBA = tile.cellIntersection(gpB, los(gpB, gpA), 0, 0); + NormalizedGeodeticPoint gpIBA = tile.cellIntersection(gpB, los(gpB, gpA), 0, 0); checkInLine(gpA, gpB, gpIBA); checkOnTile(tile, gpIBA); @@ -324,12 +354,12 @@ public class SimpleTileTest { tile.setElevation(1, 0, 40.0); tile.setElevation(1, 1, 40.0); tile.tileUpdateCompleted(); - GeodeticPoint gpA = new GeodeticPoint(tile.getLatitudeAtIndex(0) + 0.25 * tile.getLatitudeStep(), - tile.getLongitudeAtIndex(0) + 0.50 * tile.getLongitudeStep(), - 45.0); - GeodeticPoint gpB = new GeodeticPoint(tile.getLatitudeAtIndex(0) + 0.75 * tile.getLatitudeStep(), - tile.getLongitudeAtIndex(0) + 0.50 * tile.getLongitudeStep(), - 55.0); + NormalizedGeodeticPoint gpA = new NormalizedGeodeticPoint(tile.getLatitudeAtIndex(0) + 0.25 * tile.getLatitudeStep(), + tile.getLongitudeAtIndex(0) + 0.50 * tile.getLongitudeStep(), + 45.0, tile.getLongitudeAtIndex(0)); + NormalizedGeodeticPoint gpB = new NormalizedGeodeticPoint(tile.getLatitudeAtIndex(0) + 0.75 * tile.getLatitudeStep(), + tile.getLongitudeAtIndex(0) + 0.50 * tile.getLongitudeStep(), + 55.0, tile.getLongitudeAtIndex(0)); Assert.assertNull(tile.cellIntersection(gpA, los(gpA, gpB), 0, 0)); @@ -344,12 +374,12 @@ public class SimpleTileTest { tile.setElevation(1, 0, 40.0); tile.setElevation(1, 1, 40.0); tile.tileUpdateCompleted(); - GeodeticPoint gpA = new GeodeticPoint(tile.getLatitudeAtIndex(0) + 0.25 * tile.getLatitudeStep(), - tile.getLongitudeAtIndex(0) + 0.50 * tile.getLongitudeStep(), - 45.0); - GeodeticPoint gpB = new GeodeticPoint(tile.getLatitudeAtIndex(0) + 0.75 * tile.getLatitudeStep(), - tile.getLongitudeAtIndex(0) + 0.50 * tile.getLongitudeStep(), - 50.0); + NormalizedGeodeticPoint gpA = new NormalizedGeodeticPoint(tile.getLatitudeAtIndex(0) + 0.25 * tile.getLatitudeStep(), + tile.getLongitudeAtIndex(0) + 0.50 * tile.getLongitudeStep(), + 45.0, tile.getLongitudeAtIndex(0)); + NormalizedGeodeticPoint gpB = new NormalizedGeodeticPoint(tile.getLatitudeAtIndex(0) + 0.75 * tile.getLatitudeStep(), + tile.getLongitudeAtIndex(0) + 0.50 * tile.getLongitudeStep(), + 50.0, tile.getLongitudeAtIndex(0)); Assert.assertNull(tile.cellIntersection(gpA, los(gpA, gpB), 0, 0)); @@ -364,17 +394,17 @@ public class SimpleTileTest { tile.setElevation(1, 0, 40.0); tile.setElevation(1, 1, 40.0); tile.tileUpdateCompleted(); - GeodeticPoint gpA = new GeodeticPoint(tile.getLatitudeAtIndex(0) + 0.25 * tile.getLatitudeStep(), - tile.getLongitudeAtIndex(0) + 0.50 * tile.getLongitudeStep(), - 32.5); - GeodeticPoint gpB = new GeodeticPoint(tile.getLatitudeAtIndex(0) + 0.75 * tile.getLatitudeStep(), - tile.getLongitudeAtIndex(0) + 0.50 * tile.getLongitudeStep(), - 37.5); - - GeodeticPoint gpIAB = tile.cellIntersection(gpA, los(gpA, gpB), 0, 0); + NormalizedGeodeticPoint gpA = new NormalizedGeodeticPoint(tile.getLatitudeAtIndex(0) + 0.25 * tile.getLatitudeStep(), + tile.getLongitudeAtIndex(0) + 0.50 * tile.getLongitudeStep(), + 32.5, tile.getLongitudeAtIndex(0)); + NormalizedGeodeticPoint gpB = new NormalizedGeodeticPoint(tile.getLatitudeAtIndex(0) + 0.75 * tile.getLatitudeStep(), + tile.getLongitudeAtIndex(0) + 0.50 * tile.getLongitudeStep(), + 37.5, tile.getLongitudeAtIndex(0)); + + NormalizedGeodeticPoint gpIAB = tile.cellIntersection(gpA, los(gpA, gpB), 0, 0); checkInLine(gpA, gpB, gpIAB); checkOnTile(tile, gpIAB); - GeodeticPoint gpIBA = tile.cellIntersection(gpB, los(gpB, gpA), 0, 0); + NormalizedGeodeticPoint gpIBA = tile.cellIntersection(gpB, los(gpB, gpA), 0, 0); checkInLine(gpA, gpB, gpIBA); checkOnTile(tile, gpIBA); @@ -432,7 +462,7 @@ public class SimpleTileTest { 1.0e-10); Assert.assertEquals(gpI.getLongitude(), - gpA.getLongitude() * (1 - t) + gpB.getLongitude() * t, + MathUtils.normalizeAngle(gpA.getLongitude() * (1 - t) + gpB.getLongitude() * t, gpI.getLongitude()), 1.0e-10); } diff --git a/src/test/java/org/orekit/rugged/raster/TilesCacheTest.java b/src/test/java/org/orekit/rugged/raster/TilesCacheTest.java index 8e588239dcfc282c04deeb3fd965d82600bf426b..7038ac9e17d98af20b414e8566809de28d62dcb1 100644 --- a/src/test/java/org/orekit/rugged/raster/TilesCacheTest.java +++ b/src/test/java/org/orekit/rugged/raster/TilesCacheTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/raster/VolcanicConeElevationUpdater.java b/src/test/java/org/orekit/rugged/raster/VolcanicConeElevationUpdater.java index 2425d01f234047a96c7a29f4c5a3409cb907a078..8626c4ca31febc223924e3da62d8c2156270392c 100644 --- a/src/test/java/org/orekit/rugged/raster/VolcanicConeElevationUpdater.java +++ b/src/test/java/org/orekit/rugged/raster/VolcanicConeElevationUpdater.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/refraction/AtmosphericRefractionTest.java b/src/test/java/org/orekit/rugged/refraction/AtmosphericRefractionTest.java index ab6bf69e7559d8eb023457a99160e83ef2308687..5a270b7afa75f59fdd12526f2e432ce34e9a0944 100644 --- a/src/test/java/org/orekit/rugged/refraction/AtmosphericRefractionTest.java +++ b/src/test/java/org/orekit/rugged/refraction/AtmosphericRefractionTest.java @@ -8,7 +8,12 @@ import static org.junit.Assert.fail; import java.io.File; import java.net.URISyntaxException; import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Stream; +import org.hipparchus.analysis.differentiation.Derivative; +import org.hipparchus.geometry.euclidean.threed.FieldVector3D; import org.hipparchus.geometry.euclidean.threed.Rotation; import org.hipparchus.geometry.euclidean.threed.RotationConvention; import org.hipparchus.geometry.euclidean.threed.Vector3D; @@ -19,6 +24,9 @@ import org.orekit.bodies.BodyShape; import org.orekit.bodies.GeodeticPoint; import org.orekit.data.DataContext; import org.orekit.data.DirectoryCrawler; +import org.orekit.frames.Frame; +import org.orekit.frames.FramesFactory; +import org.orekit.models.earth.ReferenceEllipsoid; import org.orekit.orbits.Orbit; import org.orekit.rugged.TestUtils; import org.orekit.rugged.api.AlgorithmId; @@ -37,12 +45,17 @@ import org.orekit.rugged.los.LOSBuilder; import org.orekit.rugged.los.TimeDependentLOS; import org.orekit.rugged.raster.RandomLandscapeUpdater; import org.orekit.rugged.raster.TileUpdater; +import org.orekit.rugged.utils.DerivativeGenerator; import org.orekit.rugged.utils.GeodeticUtilities; import org.orekit.time.AbsoluteDate; import org.orekit.time.TimeScalesFactory; import org.orekit.utils.AngularDerivativesFilter; import org.orekit.utils.CartesianDerivativesFilter; import org.orekit.utils.Constants; +import org.orekit.utils.IERSConventions; +import org.orekit.utils.ParameterDriver; +import org.orekit.utils.TimeStampedAngularCoordinates; +import org.orekit.utils.TimeStampedPVCoordinates; public class AtmosphericRefractionTest { @@ -120,9 +133,29 @@ public class AtmosphericRefractionTest { GeodeticPoint dummyGP = new GeodeticPoint(dummyLat, dummyLon, 0.); try { ruggedWith.inverseLocation(sensorName, dummyGP, minLine, maxLine); + Assert.fail("an exeption should have been thrown"); } catch (RuggedException re) { - Assert.assertEquals(RuggedMessages.INVALID_RANGE_FOR_LINES, re.getSpecifier()); + Assert.assertEquals(RuggedMessages.SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES, re.getSpecifier()); } + + try { + ruggedWith.inverseLocation(sensorName, + gpWithAtmosphericRefractionCorrection[0], + 210, maxLine); + Assert.fail("an exeption should have been thrown"); + } catch (RuggedException re) { + Assert.assertEquals(RuggedMessages.SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES, re.getSpecifier()); + } + + try { + ruggedWith.inverseLocation(sensorName, + gpWithAtmosphericRefractionCorrection[0], + minLine, 190); + Assert.fail("an exeption should have been thrown"); + } catch (RuggedException re) { + Assert.assertEquals(RuggedMessages.SENSOR_PIXEL_NOT_FOUND_IN_RANGE_LINES, re.getSpecifier()); + } + } private RuggedBuilder initRuggedForAtmosphericTests(final int dimension, final String sensorName) throws URISyntaxException { @@ -173,6 +206,116 @@ public class AtmosphericRefractionTest { return builder; } + /** + * Test for issue #391 + */ + @Test + public void testInverseLocationMargin() throws URISyntaxException { + + String path = getClass().getClassLoader().getResource("orekit-data").toURI().getPath(); + DataContext.getDefault().getDataProvidersManager().addProvider(new DirectoryCrawler(new File(path))); + + RuggedBuilder builder = new RuggedBuilder(); + + Frame ecf = FramesFactory.getITRF(IERSConventions.IERS_2010, true); + builder.setEllipsoid(ReferenceEllipsoid.getWgs84(ecf)); + + MultiLayerModel atmosphere = new MultiLayerModel(builder.getEllipsoid()); + builder.setRefractionCorrection(atmosphere); + + builder.setLightTimeCorrection(true); + builder.setAberrationOfLightCorrection(true); + builder.setAlgorithm(AlgorithmId.IGNORE_DEM_USE_ELLIPSOID); + + AbsoluteDate start = AbsoluteDate.ARBITRARY_EPOCH; + AbsoluteDate end = start.shiftedBy(10); + AbsoluteDate middle = start.shiftedBy(end.durationFrom(start) / 2); + builder.setTimeSpan(start, end, 1e-3, 1e-3); + + final double h = 500e3; + Vector3D p = new Vector3D(6378137 + h, 0, 0); + Vector3D v = Vector3D.ZERO; + List<TimeStampedPVCoordinates> pvs = Arrays.asList( + new TimeStampedPVCoordinates(start, p, v), + new TimeStampedPVCoordinates(end, p, v)); + + Rotation rotation = new Rotation(Vector3D.MINUS_I, Vector3D.MINUS_K, Vector3D.PLUS_K, Vector3D.PLUS_I); + TimeStampedAngularCoordinates attitude = + new TimeStampedAngularCoordinates( + middle, rotation, + Vector3D.PLUS_I.scalarMultiply(0.1), Vector3D.ZERO); + List<TimeStampedAngularCoordinates> attitudes = Arrays.asList( + attitude.shiftedBy(start.durationFrom(attitude.getDate())), + attitude, + attitude.shiftedBy(end.durationFrom(attitude.getDate()))); + + builder.setTrajectory(ecf, + pvs, 2, CartesianDerivativesFilter.USE_P, + attitudes, 2, AngularDerivativesFilter.USE_R); + + final double iFov = 1e-6; + TimeDependentLOS los = new TimeDependentLOS() { + @Override + public int getNbPixels() { + return 1000; + } + + @Override + public Vector3D getLOS(int index, AbsoluteDate date) { + // simplistic pinhole camera, assumes small angle + final double center = getNbPixels() / 2.0; + final double x = (index - center); + final double los = x * iFov; + return new Vector3D(los, 0, 1); + } + + @Override + public <T extends Derivative<T>> FieldVector3D<T> getLOSDerivatives( + int index, + AbsoluteDate date, + DerivativeGenerator<T> generator) { + throw new UnsupportedOperationException("not implemented"); + } + + @Override + public Stream<ParameterDriver> getParametersDrivers() { + return Stream.empty(); + } + }; + + LineSensor sensor = new LineSensor("sensor", + new LinearLineDatation(middle, 0, 1000), + Vector3D.ZERO, + los); + builder.addLineSensor(sensor); + + Rugged ruggedWithDefaultMargin = builder.build(); + + GeodeticPoint point = ruggedWithDefaultMargin.directLocation(sensor.getName(), 1000)[500]; + try { + final int maxLine = 4999; // works with 4980, fails with 4999 + ruggedWithDefaultMargin.inverseLocation(sensor.getName(), point, 0, maxLine); + Assert.fail("An exception should have been thrown"); + + } catch (RuggedException re) { + Assert.assertEquals(RuggedMessages.SENSOR_PIXEL_NOT_FOUND_IN_PIXELS_LINE,re.getSpecifier()); + } + + // Check the default margin is equal to the used one + Assert.assertEquals(builder.getRefractionCorrection().getComputationParameters().getDefaultInverseLocMargin(), + builder.getRefractionCorrection().getComputationParameters().getInverseLocMargin(), + 1.0e-10); + + // Change the margin to an admissible one for this case + builder.getRefractionCorrection().setInverseLocMargin(0.81); + Rugged ruggedWithCustomMargin = builder.build(); + + point = ruggedWithCustomMargin.directLocation(sensor.getName(), 1000)[500]; + final int maxLine = 4999; // works with a margin > 0.803 + SensorPixel pixel = ruggedWithCustomMargin.inverseLocation(sensor.getName(), point, 0, maxLine); + Assert.assertTrue(pixel != null); + + } @Test public void testBadConfig() { diff --git a/src/test/java/org/orekit/rugged/refraction/MultiLayerModelTest.java b/src/test/java/org/orekit/rugged/refraction/MultiLayerModelTest.java index 9436db32754085a5d7203535d4c541ab7aba8455..d3cbf3262c8c43370ecf531f3b27b1c6f1f8d216 100644 --- a/src/test/java/org/orekit/rugged/refraction/MultiLayerModelTest.java +++ b/src/test/java/org/orekit/rugged/refraction/MultiLayerModelTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/utils/ExtendedEllipsoidTest.java b/src/test/java/org/orekit/rugged/utils/ExtendedEllipsoidTest.java index 90848214b940304353f9d7ac828288af3d3d64ee..d262242a99910981d4984f5feb57838c37a6c423 100644 --- a/src/test/java/org/orekit/rugged/utils/ExtendedEllipsoidTest.java +++ b/src/test/java/org/orekit/rugged/utils/ExtendedEllipsoidTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/utils/GeodeticUtilities.java b/src/test/java/org/orekit/rugged/utils/GeodeticUtilities.java index 9c203d5d8b50b548e4bd82f13c16b687d5ae5164..f221014bf9aa67f44b716807886f1203ae89b4ef 100644 --- a/src/test/java/org/orekit/rugged/utils/GeodeticUtilities.java +++ b/src/test/java/org/orekit/rugged/utils/GeodeticUtilities.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/utils/NormalizedGeodeticPointTest.java b/src/test/java/org/orekit/rugged/utils/NormalizedGeodeticPointTest.java index 1b60d7a06155fd201cc38833aec80f833ce0e418..244c482321b4e6a03696c06d498751e0ba8967cb 100644 --- a/src/test/java/org/orekit/rugged/utils/NormalizedGeodeticPointTest.java +++ b/src/test/java/org/orekit/rugged/utils/NormalizedGeodeticPointTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/java/org/orekit/rugged/utils/RoughVisibilityEstimatorTest.java b/src/test/java/org/orekit/rugged/utils/RoughVisibilityEstimatorTest.java index e26b8eaf21381954906f9a64544905e0116e9b14..e0740bb7e800d9b87804ee78419713844da8a900 100644 --- a/src/test/java/org/orekit/rugged/utils/RoughVisibilityEstimatorTest.java +++ b/src/test/java/org/orekit/rugged/utils/RoughVisibilityEstimatorTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -50,7 +50,6 @@ import org.orekit.orbits.PositionAngle; import org.orekit.propagation.Propagator; import org.orekit.propagation.SpacecraftState; import org.orekit.propagation.numerical.NumericalPropagator; -import org.orekit.propagation.sampling.OrekitFixedStepHandler; import org.orekit.time.AbsoluteDate; import org.orekit.time.TimeScalesFactory; import org.orekit.utils.Constants; @@ -69,18 +68,17 @@ public class RoughVisibilityEstimatorTest { Orbit orbit = createOrbit(gravityField.getMu()); Propagator propagator = createPropagator(earth, gravityField, orbit); final List<TimeStampedPVCoordinates> pv = new ArrayList<TimeStampedPVCoordinates>(); - propagator.setMasterMode(1.0, new OrekitFixedStepHandler() { - public void handleStep(SpacecraftState currentState, boolean isLast) { - pv.add(currentState.getPVCoordinates()); - } - }); + propagator.getMultiplexer().add(1.0, currentState -> pv.add(currentState.getPVCoordinates())); propagator.propagate(orbit.getDate().shiftedBy(3 * orbit.getKeplerianPeriod())); RoughVisibilityEstimator estimator = new RoughVisibilityEstimator(ellipsoid, orbit.getFrame(), pv); AbsoluteDate d = estimator.estimateVisibility(new GeodeticPoint(FastMath.toRadians(-81.5), FastMath.toRadians(-2.0), 0.0)); - Assert.assertEquals("2012-01-01T03:47:08.814", d.toString(TimeScalesFactory.getUTC())); + Assert.assertEquals(0.0, + new AbsoluteDate("2012-01-01T03:47:08.814121623", + TimeScalesFactory.getUTC()).durationFrom(d), + 1.0e-8); } @@ -94,18 +92,17 @@ public class RoughVisibilityEstimatorTest { Orbit orbit = createOrbit(gravityField.getMu()); Propagator propagator = createPropagator(earth, gravityField, orbit); final List<TimeStampedPVCoordinates> pv = new ArrayList<TimeStampedPVCoordinates>(); - propagator.setMasterMode(1.0, new OrekitFixedStepHandler() { - public void handleStep(SpacecraftState currentState, boolean isLast) { - pv.add(currentState.getPVCoordinates()); - } - }); + propagator.getMultiplexer().add(1.0, currentState -> pv.add(currentState.getPVCoordinates())); propagator.propagate(orbit.getDate().shiftedBy(orbit.getKeplerianPeriod())); RoughVisibilityEstimator estimator = new RoughVisibilityEstimator(ellipsoid, orbit.getFrame(), pv); AbsoluteDate d = estimator.estimateVisibility(new GeodeticPoint(FastMath.toRadians(43.303), FastMath.toRadians(-46.126), 0.0)); - Assert.assertEquals("2012-01-01T01:02:39.123", d.toString(TimeScalesFactory.getUTC())); + Assert.assertEquals(0.0, + new AbsoluteDate("2012-01-01T01:02:39.122526662", + TimeScalesFactory.getUTC()).durationFrom(d), + 1.0e-8); } diff --git a/src/test/java/org/orekit/rugged/utils/SpacecraftToObservedBodyTest.java b/src/test/java/org/orekit/rugged/utils/SpacecraftToObservedBodyTest.java index f95bbe2f03b7a50a8abc231240faae35a008975d..6717b2936af56447cb9a7e108337b0146f082be6 100644 --- a/src/test/java/org/orekit/rugged/utils/SpacecraftToObservedBodyTest.java +++ b/src/test/java/org/orekit/rugged/utils/SpacecraftToObservedBodyTest.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/test/resources/assets/org/orekit/rugged/RuggedMessages_ko.utf8 b/src/test/resources/assets/org/orekit/rugged/RuggedMessages_ko.utf8 new file mode 100644 index 0000000000000000000000000000000000000000..ab4e739779cb393190efdf1a20b26bb440e08f1b --- /dev/null +++ b/src/test/resources/assets/org/orekit/rugged/RuggedMessages_ko.utf8 @@ -0,0 +1,8 @@ +# no Digital Elevation Model data at latitude {0} and longitude {1} +NO_DEM_DATA = <MISSING TRANSLATION> + +# unknown sensor {0} +UNKNOWN_SENSOR = ABCDEF {0} + +# tile is empty: {0} ⨉ {1} +EMPTY_TILE = \ No newline at end of file diff --git a/src/tutorials/java/fr/cs/examples/AtmosphericRefractionExamples.java b/src/tutorials/java/fr/cs/examples/AtmosphericRefractionExamples.java index a6e9706695d505088c0778d4ea204b6833f604ab..b4a625b3c8306af631e5d07b8170febf6c177558 100644 --- a/src/tutorials/java/fr/cs/examples/AtmosphericRefractionExamples.java +++ b/src/tutorials/java/fr/cs/examples/AtmosphericRefractionExamples.java @@ -150,10 +150,17 @@ public class AtmosphericRefractionExamples { int pixelStep = 100; int lineStep = 100; atmosphericRefraction.setGridSteps(pixelStep, lineStep); + + // To compute the inverse location grid with atmospheric refraction, a default margin is available: + // atmosphericRefraction.getComputationParameters().getDefaultInverseLocMargin(); + + // but can be modified with: + // atmosphericRefraction.setInverseLocMargin(margin); // Build Rugged with atmospheric refraction model builder.setRefractionCorrection(atmosphericRefraction); Rugged ruggedWith = builder.build(); + // Direct location on a line WITHOUT and WITH atmospheric correction // ----------------------------------------------------------------- diff --git a/src/tutorials/java/fr/cs/examples/DirectLocation.java b/src/tutorials/java/fr/cs/examples/DirectLocation.java index 8381d588beb387f9a487666a30d249665fb12687..8998fbfe7948ae8fe934aab9ba51c5103fa6ddcf 100644 --- a/src/tutorials/java/fr/cs/examples/DirectLocation.java +++ b/src/tutorials/java/fr/cs/examples/DirectLocation.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/tutorials/java/fr/cs/examples/DirectLocationWithDEM.java b/src/tutorials/java/fr/cs/examples/DirectLocationWithDEM.java index 6ca882eb4d220fcf9a704c7af8055a026df66364..f0b8e391f4b0f6e2c0b9448183b65d9a1e7d9224 100644 --- a/src/tutorials/java/fr/cs/examples/DirectLocationWithDEM.java +++ b/src/tutorials/java/fr/cs/examples/DirectLocationWithDEM.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/tutorials/java/fr/cs/examples/InverseLocation.java b/src/tutorials/java/fr/cs/examples/InverseLocation.java index 9e9613354a5f2db3d66d1f8ecb96ef8e7170834a..2b8f5502fb9823b240fd5a69a28eb370c097663c 100644 --- a/src/tutorials/java/fr/cs/examples/InverseLocation.java +++ b/src/tutorials/java/fr/cs/examples/InverseLocation.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/tutorials/java/fr/cs/examples/refiningPleiades/GroundRefining.java b/src/tutorials/java/fr/cs/examples/refiningPleiades/GroundRefining.java index 61d8d1eb55e6bc2a2f2d8c6e1f672a8eeef3376d..47974d9e576e040c13e6266bb265e069ca0442ed 100644 --- a/src/tutorials/java/fr/cs/examples/refiningPleiades/GroundRefining.java +++ b/src/tutorials/java/fr/cs/examples/refiningPleiades/GroundRefining.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/tutorials/java/fr/cs/examples/refiningPleiades/InterRefining.java b/src/tutorials/java/fr/cs/examples/refiningPleiades/InterRefining.java index e5a6e94e488c7fe71ff0ab0d0b94f95d980fd4d9..fe402a9074f840b1561729c61328c353e05aa3a2 100644 --- a/src/tutorials/java/fr/cs/examples/refiningPleiades/InterRefining.java +++ b/src/tutorials/java/fr/cs/examples/refiningPleiades/InterRefining.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/tutorials/java/fr/cs/examples/refiningPleiades/Refining.java b/src/tutorials/java/fr/cs/examples/refiningPleiades/Refining.java index 8849672d4da43a0c38d7f8aacfee33a89284fa87..f1f09c76175b9d3cd646f4b35b7776af98f89159 100644 --- a/src/tutorials/java/fr/cs/examples/refiningPleiades/Refining.java +++ b/src/tutorials/java/fr/cs/examples/refiningPleiades/Refining.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/GroundMeasurementGenerator.java b/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/GroundMeasurementGenerator.java index fc5c21530624be5ca0b1dbccc4916edac9a5cea0..c81a54801fe1d41fdacd9e50373d444a9d035c17 100644 --- a/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/GroundMeasurementGenerator.java +++ b/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/GroundMeasurementGenerator.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/InterMeasurementGenerator.java b/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/InterMeasurementGenerator.java index 3efb9fe5045a5264a77af1bc469620b33787805d..88f5c0a6a24fe0a81a31b5919798ce15d0d38b21 100644 --- a/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/InterMeasurementGenerator.java +++ b/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/InterMeasurementGenerator.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/Measurable.java b/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/Measurable.java index d399514f6b194dbbe7048fdee696bc75b3a7c025..c1c3ae0f3f5407dd3c32f31d2dd41b4fb2c8ce2a 100644 --- a/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/Measurable.java +++ b/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/Measurable.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/Noise.java b/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/Noise.java index d921ffef77b159c7d77f6ca9af0dbb78a8126941..014819e20e1eb414dbbebee315da875092fe00be 100644 --- a/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/Noise.java +++ b/src/tutorials/java/fr/cs/examples/refiningPleiades/generators/Noise.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/tutorials/java/fr/cs/examples/refiningPleiades/metrics/DistanceTools.java b/src/tutorials/java/fr/cs/examples/refiningPleiades/metrics/DistanceTools.java index ba2d1bed21e0352b5b2960e61fc089db60f9d64b..d6eb575bbd5d9e6a38906a081aed9927622ff29f 100644 --- a/src/tutorials/java/fr/cs/examples/refiningPleiades/metrics/DistanceTools.java +++ b/src/tutorials/java/fr/cs/examples/refiningPleiades/metrics/DistanceTools.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/tutorials/java/fr/cs/examples/refiningPleiades/metrics/LocalisationMetrics.java b/src/tutorials/java/fr/cs/examples/refiningPleiades/metrics/LocalisationMetrics.java index ef196d162cfe3dacb555b3fd02ef2ef4d00a0e56..9a5e8bd4429a715a6381c3ecb48ef616d851972b 100644 --- a/src/tutorials/java/fr/cs/examples/refiningPleiades/metrics/LocalisationMetrics.java +++ b/src/tutorials/java/fr/cs/examples/refiningPleiades/metrics/LocalisationMetrics.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. diff --git a/src/tutorials/java/fr/cs/examples/refiningPleiades/models/OrbitModel.java b/src/tutorials/java/fr/cs/examples/refiningPleiades/models/OrbitModel.java index b72877a3ae84b9a53a89e3cbff91f73217fc1db4..f1150907df9941ee330f867a01df34ea009a7da9 100644 --- a/src/tutorials/java/fr/cs/examples/refiningPleiades/models/OrbitModel.java +++ b/src/tutorials/java/fr/cs/examples/refiningPleiades/models/OrbitModel.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -248,12 +248,12 @@ public class OrbitModel { propagator.propagate(minDate); final List<TimeStampedPVCoordinates> list = new ArrayList<TimeStampedPVCoordinates>(); - propagator.setMasterMode(step, - (currentState, isLast) -> - list.add(new TimeStampedPVCoordinates(currentState.getDate(), - currentState.getPVCoordinates().getPosition(), - currentState.getPVCoordinates().getVelocity(), - Vector3D.ZERO))); + propagator.getMultiplexer().add(step, + currentState -> + list.add(new TimeStampedPVCoordinates(currentState.getDate(), + currentState.getPVCoordinates().getPosition(), + currentState.getPVCoordinates().getVelocity(), + Vector3D.ZERO))); propagator.propagate(maxDate); return list; @@ -269,12 +269,12 @@ public class OrbitModel { propagator.setAttitudeProvider(createAttitudeProvider(earth, orbit)); propagator.propagate(minDate); final List<TimeStampedAngularCoordinates> list = new ArrayList<>(); - propagator.setMasterMode(step, - (currentState, isLast) -> - list.add(new TimeStampedAngularCoordinates(currentState.getDate(), - currentState.getAttitude().getRotation(), - Vector3D.ZERO, - Vector3D.ZERO))); + propagator.getMultiplexer().add(step, + currentState -> + list.add(new TimeStampedAngularCoordinates(currentState.getDate(), + currentState.getAttitude().getRotation(), + Vector3D.ZERO, + Vector3D.ZERO))); propagator.propagate(maxDate); return list; diff --git a/src/tutorials/java/fr/cs/examples/refiningPleiades/models/PleiadesViewingModel.java b/src/tutorials/java/fr/cs/examples/refiningPleiades/models/PleiadesViewingModel.java index 17080e5e4965cb3e3e9c212f25e8d4568a40cd59..90c665d3d8bbf0a80b545290f9d0429ad9559966 100644 --- a/src/tutorials/java/fr/cs/examples/refiningPleiades/models/PleiadesViewingModel.java +++ b/src/tutorials/java/fr/cs/examples/refiningPleiades/models/PleiadesViewingModel.java @@ -1,4 +1,4 @@ -/* Copyright 2013-2020 CS GROUP +/* Copyright 2013-2022 CS GROUP * Licensed to CS GROUP (CS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership.