Commit b0a55561 authored by Bryan Cazabonne's avatar Bryan Cazabonne

Merge branch 'release-10.2'

parents d43ad127 b7fd0304
Pipeline #553 passed with stages
in 1 minute and 36 seconds
A directory for Continuous Integration tooling.
\ No newline at end of file
<settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xsi:schemalocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<!-- mirror
| Specifies a repository mirror site to use instead of a given repository. The repository that
| this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
| for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
|
<mirror>
<id>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://my.repository.com/repo/path</url>
</mirror>
-->
<mirror>
<id>Nexus-Orekit</id>
<name>Maven Repository Manager</name>
<url>https://packages.orekit.org/repository/maven-public/</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
<servers>
<server>
<id>website</id>
<privateKey>${user.home}/.ssh/id_website</privateKey>
</server>
</servers>
<profiles>
<profile>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>Nexus-Orekit</id>
<name>Nexus Public Repository</name>
<url>https://packages.orekit.org/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
</settings>
stages:
- verify
- deploy
default:
# Default image
image: registry.orekit.org/orekit/ci-utils/maven:3.3.9-jdk-8
# Cache downloaded dependencies and plugins between builds.
# To keep cache across branches add 'key: "$CI_JOB_REF_NAME"'
cache:
paths:
- .m2/repository
variables:
# This will supress any download for dependencies and plugins or upload messages which would clutter the console log.
# `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
# As of Maven 3.3.0 instead of this you may define these options in `.mvn/maven.config` so the same config is used
# when running from the command line.
# `installAtEnd` and `deployAtEnd` are only effective with recent version of the corresponding plugins.
MAVEN_CLI_OPTS: "-s .CI/maven-settings.xml --batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
verify:
stage: verify
script:
- mvn $MAVEN_CLI_OPTS javadoc:javadoc verify site
artifacts:
paths:
- target/*.jar
- target/site
deploy:site:
stage: deploy
before_script:
##
## Create the SSH directory and give it the right permissions
##
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
##
## We're using tr to fix line endings which makes ed25519 keys work
## without extra base64 encoding.
## https://gitlab.com/gitlab-examples/ssh-private-key/issues/1#note_48526556
##
- echo "$SSH_SECRET_KEY" > ~/.ssh/id_website
- chmod 700 ~/.ssh/id_website
##
## Add known hosts
##
- cp $SSH_KNOWN_HOSTS ~/.ssh/known_hosts
script:
- mvn $MAVEN_CLI_OPTS site:deploy
only:
- master@orekit/orekit-tutorials
- /^release-[.0-9]+$/@orekit/orekit-tutorials
- develop@orekit/orekit-tutorials
......@@ -51,6 +51,6 @@ all released under business friendly FOSS licenses.
## License
Orekit tutorials are licensed by [CS Systèmes d'Information](https://www.c-s.fr/) under
Orekit tutorials are licensed by [CS GROUP](https://www.c-s.fr/) 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.
......@@ -29,7 +29,6 @@
<property name="caseIndent" value="4"/>
</module>
<module name="JavadocMethod">
<property name="allowUndeclaredRTE" value="true"/>
<property name="validateThrows" value="false"/>
</module>
<module name="JavadocStyle"/>
......@@ -103,7 +102,10 @@
</module>
<module name="RegexpHeader">
<property name="headerFile" value="${checkstyle.header.file}" />
<property name="fileExtensions" value="java" />
</module>
<module name="FileTabCharacter"/>
<module name="NewlineAtEndOfFile"/>
<module name="NewlineAtEndOfFile">
<property name="lineSeparator" value="LF_CR_CRLF"/>
</module>
</module>
......@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.orekit</groupId>
<artifactId>orekit-tutorials</artifactId>
<version>10.1-SNAPSHOT</version>
<version>10.2</version>
<name>Orekit Tutorials</name>
<url>http://www.orekit.org/</url>
<inceptionYear>2002</inceptionYear>
......@@ -13,21 +13,34 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<orekit-tutorials.spotbugs-maven-plugin.version>3.1.12</orekit-tutorials.spotbugs-maven-plugin.version>
<orekit-tutorials.spotbugs-maven-plugin.version>4.0.4</orekit-tutorials.spotbugs-maven-plugin.version>
<orekit-tutorials.maven-changes-plugin.version>2.12.1</orekit-tutorials.maven-changes-plugin.version>
<orekit-tutorials.maven-checkstyle-plugin.version>3.1.0</orekit-tutorials.maven-checkstyle-plugin.version>
<orekit-tutorials.checkstyle.version>8.18</orekit-tutorials.checkstyle.version>
<orekit-tutorials.maven-checkstyle-plugin.version>3.1.1</orekit-tutorials.maven-checkstyle-plugin.version>
<orekit-tutorials.checkstyle.version>8.33</orekit-tutorials.checkstyle.version>
<orekit-tutorials.maven-compiler-plugin.version>3.8.1</orekit-tutorials.maven-compiler-plugin.version>
<orekit-tutorials.maven-project-info-reports-plugin.version>3.0.0</orekit-tutorials.maven-project-info-reports-plugin.version>
<orekit-tutorials.maven-javadoc-plugin.version>3.2.0</orekit-tutorials.maven-javadoc-plugin.version>
<orekit-tutorials.maven-project-info-reports-plugin.version>3.1.0</orekit-tutorials.maven-project-info-reports-plugin.version>
<orekit-tutorials.maven-resources-plugin.version>3.1.0</orekit-tutorials.maven-resources-plugin.version>
<orekit-tutorials.maven-site-plugin.version>3.7.1</orekit-tutorials.maven-site-plugin.version>
<orekit-tutorials.orekit.version>10.1-SNAPSHOT</orekit-tutorials.orekit.version>
<orekit-tutorials.hipparchus.version>1.6</orekit-tutorials.hipparchus.version>
<orekit-tutorials.maven-site-plugin.version>3.9.1</orekit-tutorials.maven-site-plugin.version>
<orekit-tutorials.maven-wagon-ssh-plugin.version>3.4.1</orekit-tutorials.maven-wagon-ssh-plugin.version>
<orekit-tutorials.maven-source-plugin.version>3.2.1</orekit-tutorials.maven-source-plugin.version>
<orekit-tutorials.build-helper-maven-plugin.version>3.2.0</orekit-tutorials.build-helper-maven-plugin.version>
<orekit-tutorials.maven-gpg-plugin.version>1.6</orekit-tutorials.maven-gpg-plugin.version>
<orekit-tutorials.maven-install-plugin.version>3.0.0-M1</orekit-tutorials.maven-install-plugin.version>
<orekit-tutorials.orekit.version>10.2</orekit-tutorials.orekit.version>
<orekit-tutorials.hipparchus.version>1.7</orekit-tutorials.hipparchus.version>
<orekit-tutorials.jackson.version>2.9.9</orekit-tutorials.jackson.version>
<orekit.compiler.source>1.8</orekit.compiler.source>
<orekit.compiler.target>1.8</orekit.compiler.target>
<orekit-tutorials.compiler.source>1.8</orekit-tutorials.compiler.source>
<orekit-tutorials.compiler.target>1.8</orekit-tutorials.compiler.target>
</properties>
<distributionManagement>
<site>
<id>website</id>
<url>scp://cochise@spoutnik.orekit.org/var/www/mvn-sites/site-orekit-tutorials-${project.version}</url>
</site>
</distributionManagement>
<developers>
<developer>
<name>Luc Maisonobe</name>
......@@ -37,6 +50,20 @@
<role>developer</role>
</roles>
</developer>
<developer>
<name>Andrea Antolino</name>
<id>andrea</id>
<roles>
<role>developer</role>
</roles>
</developer>
<developer>
<name>Laurene Beauvalet</name>
<id>laurene</id>
<roles>
<role>developer</role>
</roles>
</developer>
<developer>
<name>Bryan Cazabonne</name>
<id>bryan</id>
......@@ -44,6 +71,13 @@
<role>developer</role>
</roles>
</developer>
<developer>
<name>Romain Di Costanzo</name>
<id>romain</id>
<roles>
<role>developer</role>
</roles>
</developer>
<developer>
<name>Hank Grabowski</name>
<id>hankg</id>
......@@ -58,6 +92,27 @@
<role>developer</role>
</roles>
</developer>
<developer>
<name>Fabien Maussion</name>
<id>fabien</id>
<roles>
<role>developer</role>
</roles>
</developer>
<developer>
<name>Thomas Neidhart</name>
<id>thomas</id>
<roles>
<role>developer</role>
</roles>
</developer>
<developer>
<name>Guillaume Obrecht</name>
<id>guillaume</id>
<roles>
<role>developer</role>
</roles>
</developer>
<developer>
<name>Pascal Parraud</name>
<id>pascal</id>
......@@ -79,13 +134,6 @@
<role>developer</role>
</roles>
</developer>
<developer>
<name>Thomas Neidhart</name>
<id>thomas</id>
<roles>
<role>developer</role>
</roles>
</developer>
<developer>
<name>Evan Ward</name>
<id>evan</id>
......@@ -176,14 +224,12 @@
<artifactId>jackson-databind</artifactId>
<version>${orekit-tutorials.jackson.version}</version>
<type>jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<version>${orekit-tutorials.jackson.version}</version>
<type>jar</type>
<scope>test</scope>
</dependency>
</dependencies>
......@@ -194,8 +240,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${orekit-tutorials.maven-compiler-plugin.version}</version>
<configuration>
<source>${orekit.compiler.source}</source>
<target>${orekit.compiler.target}</target>
<source>${orekit-tutorials.compiler.source}</source>
<target>${orekit-tutorials.compiler.target}</target>
<compilerArgument>-Xlint:deprecation</compilerArgument>
</configuration>
</plugin>
......@@ -203,6 +249,13 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>${orekit-tutorials.maven-site-plugin.version}</version>
<dependencies>
<dependency><!-- add support for ssh/scp -->
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>${orekit-tutorials.maven-wagon-ssh-plugin.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
......@@ -307,6 +360,109 @@
</pluginManagement>
</build>
</profile>
<profile>
<id>release</id>
<!-- <distributionManagement>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
</repository>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement> -->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${orekit-tutorials.maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${orekit-tutorials.maven-javadoc-plugin.version}</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- <plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${orekit-tutorials.nexus-staging-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin> -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${orekit-tutorials.build-helper-maven-plugin.version}</version>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>verify</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${basedir}/target/orekit-tutorials-${project.version}-sources.jar</file>
<type>source-jar</type>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${orekit-tutorials.maven-gpg-plugin.version}</version>
<configuration>
<gpgArguments>
<arg>--digest-algo=SHA512</arg>
</gpgArguments>
<keyname>0802AB8C87B0B1AEC1C1C5871550FDBD6375C33B</keyname>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>${orekit-tutorials.maven-install-plugin.version}</version>
<configuration>
<createChecksum>true</createChecksum>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright 2002-2019 CS Systèmes d'Information
Licensed to CS Systèmes d'Information (CS) under one or more
<!-- Copyright 2002-2020 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.
CS licenses this file to You under the Apache License, Version 2.0
......@@ -20,9 +20,51 @@
<title>Orekit Tutorials Changes</title>
</properties>
<body>
<release version="10.1" date="TBD" description="TBD">
<release version="10.2" date="2020-07-16"
description="Version 10.2 is the second release of the Orekit Tutorials.
The version number is 10.2 to follow Orekit version number.
This version includes new tutorials for: CR3BP model, Rinex loading,
GNSS orbit determination, Kalman orbit determination and measurement generation.
This version also includes an important change in tutorials input files.
Indeed, YAML format is now used to initialize Orekit tutorials.
See the list below for a full description of the changes.">
<action dev="bryan" type="add" >
Added tutorial for measurement generation and Orekit performance analysis.
</action>
<action dev="bryan" type="add" issue="5">
Added tutorial for Kalman orbit determination.
</action>
<action dev="bryan" type="update" issue="4">
Improved initialization of orbit determination tutorials.
</action>
<action dev="bryan" type="add" issue="3">
Added tutorial for GNSS orbit determination.
</action>
<action dev="bryan" type="add" issue="2">
Added tutorial for Rinex observation file reading.
</action>
<action dev="bryan" type="add" >
Added CR3BP tutorials implemented by Vincent Mouraux.
</action>
</release>
<release version="10.1" date="2020-02-19"
description="Version 10.1 is the first official separate release of the Orekit Tutorials.
Before that the tutorials were embedded in the Orekit library.
The version number is 10.1 to follow Orekit version number.
This version includes two features. The first is a factorization of common code
from numerical and DSST orbit determination. The second is a new tutorial to handle the Data context
feature introduced in Orekit.
See the list below for a full description of the changes.">
<action dev="maxime" type="update" >
Updated Checkstyle configuration and plugin version.
Updated copyright years.
Fixed SpotBugs warnings.
</action>
<action dev="luc" type="add" >
Added tutorial for Data context loading.
</action>
<action dev="luc" type="update" >
Synched tutorials description and code.
Synchronized tutorials description and code.
</action>
<action dev="luc" type="update" >
Factored common code from numerical and DSST orbit determination.
......
/* Copyright 2002-2019 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
/* Copyright 2002-2020 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.
* CS licenses this file to You under the Apache License, Version 2.0
......@@ -90,7 +90,6 @@ public class KeyValueFileParser<Key extends Enum<Key>> {
* </pre>
* are perfectly right and correspond to key {@code Key#ORBIT_CIRCULAR_A} if
* such a constant exists in the enumerate.
* </p>
* <p>
* When the key[i] notation is used, all the values extracted from lines
* with the same key will be put in a general array that will be retrieved
......
/* Copyright 2002-2019 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
/* Copyright 2002-2020 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.
* CS licenses this file to You under the Apache License, Version 2.0
......@@ -32,6 +32,7 @@ import org.orekit.attitudes.AttitudesSequence;
import org.orekit.attitudes.LofOffset;
import org.orekit.bodies.CelestialBodyFactory;
import org.orekit.bodies.OneAxisEllipsoid;
import org.orekit.data.DataContext;
import org.orekit.data.DataProvidersManager;
import org.orekit.data.DirectoryCrawler;
import org.orekit.errors.OrekitException;
......@@ -81,7 +82,7 @@ public class EarthObservation {
home.getAbsolutePath());
System.exit(1);
}
final DataProvidersManager manager = DataProvidersManager.getInstance();
final DataProvidersManager manager = DataContext.getDefault().getDataProvidersManager();
manager.addProvider(new DirectoryCrawler(orekitData));
final SortedSet<String> output = new TreeSet<>();
......
/* Copyright 2002-2019 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
/* Copyright 2002-2020 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.
* CS licenses this file to You under the Apache License, Version 2.0
......@@ -33,6 +33,7 @@ import java.util.Locale;
import java.util.Map;
import org.hipparchus.util.FastMath;
import org.orekit.data.DataContext;
import org.orekit.data.DataProvidersManager;
import org.orekit.data.DirectoryCrawler;
import org.orekit.errors.OrekitException;
......@@ -168,7 +169,7 @@ public class DEFile {
home.getAbsolutePath());
System.exit(1);
}
final DataProvidersManager manager = DataProvidersManager.getInstance();
final DataProvidersManager manager = DataContext.getDefault().getDataProvidersManager();
manager.addProvider(new DirectoryCrawler(orekitData));
String inName = null;
......
/* Copyright 2002-2019 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
/* Copyright 2002-2020 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.
* CS licenses this file to You under the Apache License, Version 2.0
......@@ -18,7 +18,6 @@
package org.orekit.tutorials.bodies;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.net.URISyntaxException;
......@@ -26,6 +25,7 @@ import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.List;
import java.util.Locale;
import org.hipparchus.analysis.UnivariateFunction;
......@@ -42,6 +42,7 @@ import org.orekit.bodies.BodyShape;
import org.orekit.bodies.CelestialBodyFactory;
import org.orekit.bodies.GeodeticPoint;
import org.orekit.bodies.OneAxisEllipsoid;
import org.orekit.data.DataContext;
import org.orekit.data.DataProvidersManager;
import org.orekit.data.DirectoryCrawler;
import org.orekit.errors.OrekitException;
......@@ -59,15 +60,20 @@ import org.orekit.propagation.Propagator;
import org.orekit.propagation.SpacecraftState;
import org.orekit.propagation.numerical.NumericalPropagator;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.TimeComponents;
import org.orekit.time.TimeScalarFunction;
import org.orekit.time.TimeScale;
import org.orekit.time.TimeScalesFactory;
import org.orekit.tutorials.KeyValueFileParser;
import org.orekit.tutorials.yaml.TutorialForceModel.TutorialGravity;
import org.orekit.tutorials.yaml.TutorialOrbit;
import org.orekit.utils.Constants;
import org.orekit.utils.IERSConventions;
import org.orekit.utils.PVCoordinates;
import org.orekit.utils.SecularAndHarmonic;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
/** Orekit tutorial for setting up a Sun-synchronous Earth-phased Low Earth Orbit.
* @author Luc Maisonobe
*/
......@@ -115,7 +121,7 @@ public class Phasing {
home.getAbsolutePath());
System.exit(1);
}
final DataProvidersManager manager = DataProvidersManager.getInstance();
final DataProvidersManager manager = DataContext