Commit 1d4dd370 authored by Bryan Cazabonne's avatar Bryan Cazabonne

Merge branch 'develop' into tropo

parents f981b262 fd01a3b0
......@@ -34,7 +34,7 @@ public class OrekitInternalError extends IllegalStateException implements Locali
/** Parts to insert in the format (no translation). */
private final String[] parts = new String[] {
"orekit-developers@orekit.org"
"https://gitlab.orekit.org/orekit/orekit/issues"
};
/** Create an exception with localized message.
......
......@@ -56,7 +56,6 @@ public class DynamicOutlierFilter<T extends ObservedMeasurement<T>> extends Outl
/** Set the current value of sigma.
* @param sigma The value of sigma to set
* @throws MathIllegalArgumentException if the size of sigma as input does not match the size of the measurement
*/
public void setSigma(final double[] sigma) {
this.sigma = sigma;
......
......@@ -53,7 +53,7 @@ public class EclipseDetector extends AbstractDetector<EclipseDetector> {
private final double occultedRadius;
/** Umbra, if true, or penumbra, if false, detection flag. */
private boolean totalEclipse;
private final boolean totalEclipse;
/** Build a new eclipse detector.
* <p>The new instance is a total eclipse (umbra) detector with default
......
# internal error, please notify development team by creating an issue at {0}
INTERNAL_ERROR = erreurs interne, merci de signaler le problème en ouvrant une fiche d''anomalie sur {0}
INTERNAL_ERROR = erreur interne, merci de signaler le problème en ouvrant une fiche d''anomalie sur {0}
# altitude ({0} m) is below the {1} m allowed threshold
ALTITUDE_BELOW_ALLOWED_THRESHOLD = altitude ({0} m) au dessous de la limite autorisée de {1} m
......
......@@ -14,23 +14,19 @@
# Contacts
## Mailing lists
## Forums
Most discussions should occur on the public mailing lists.
| topic | post address | subscribe URL | archive URL |
|---------------|------------------------------|--------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|
| announces | orekit-announces@orekit.org | [https://www.orekit.org/wws/subscribe/orekit-announces](https://www.orekit.org/wws/subscribe/orekit-announces) | [https://www.orekit.org/wws/arc/orekit-announces](https://www.orekit.org/wws/arc/orekit-announces) |
| users | orekit-users@orekit.org | [https://www.orekit.org/wws/subscribe/orekit-users](https://www.orekit.org/wws/subscribe/orekit-users) | [https://www.orekit.org/wws/arc/orekit-users](https://www.orekit.org/wws/arc/orekit-users) |
| developers | orekit-developers@orekit.org | [https://www.orekit.org/wws/subscribe/orekit-developers](https://www.orekit.org/wws/subscribe/orekit-developers) | [https://www.orekit.org/wws/arc/orekit-developers](https://www.orekit.org/wws/arc/orekit-developers) |
Please register to these mailing lists before attempting to post!
We're preventing unregistered members from posting in order to prevent spam. Thank you.
Most discussions should occur on the public forums [https://forum.orekit.org/](https://forum.orekit.org/).
The main categories are:
| category | URL |
|---------------|----------------------------------------------------------------------------------------------------|
| announces | [https://forum.orekit.org/c/orekit-announcements](https://forum.orekit.org/c/orekit-announcements) |
| users | [https://forum.orekit.org/c/orekit-usage](https://forum.orekit.org/c/orekit-usage) |
| developers | [https://forum.orekit.org/c/orekit-development](https://forum.orekit.org/c/orekit-development ) |
## Technical contact
If for some reason you cannot use the public lists, you can reach the CS
If for some reason you cannot use the public forums, you can reach the CS
Systèmes d'Information Orekit team for any question (either technically
oriented or administrative) at the following email address:
[orekit@c-s.fr](mailto:orekit@c-s.fr)
......
......@@ -27,7 +27,7 @@ be easily adapted if you are using one of the numerous Git graphical
user interface available or if Git is supported by you integrated
development environment:
git clone https://gitlab.orekit.org/orekit/orekit.git
git clone -b develop https://gitlab.orekit.org/orekit/orekit.git
## Released Library versions
......@@ -181,22 +181,22 @@ for download. Similar files can be custom made by users with updated data.
Configuring data loading is explained in the configuration page. For a start,
the simplest configuration is to download the
[orekit-data-master.zip](https://gitlab.orekit.org/orekit/orekit-data/-/archive/master/orekit-data-master.zip)
file from the forge, to unzip it anywhere you want, note the path of the
`orekit-data-master` folder that will be created and add the following lines
at the start of your program:
file from the forge, to unzip it anywhere you want, rename the `orekit-data-master` folder that will be created
into `orekit-data` and add the following lines at the start of your program:
File orekitData = new File("/path/to/the/folder/orekit-data-master");
File orekitData = new File("/path/to/the/folder/orekit-data");
DataProvidersManager manager = DataProvidersManager.getInstance();
manager.addProvider(new DirectoryCrawler(orekitData));
This file contents is:
This file contains the following data sets. Note that the data is updated only
from time to time, so users must check by themselves they cover the time range
needed for their computation.
* leap seconds data up to end 2017,
* leap seconds data,
* IERS Earth orientation parameters from 1973 to mid 2017
with predicted date to fall 2017 for some parameters (both IAU-1980 and IAU-2000),
* IERS Earth orientation parameters from 1973 (both IAU-1980 and IAU-2000),
* Marshall Solar Activity Future Estimation from 1999 to 2017,
* Marshall Solar Activity Future Estimation from 1999,
* DE 430 planetary ephemerides from 1990 to 2069,
......
......@@ -195,9 +195,9 @@ USNO tai-utc.dat file. If either file is found in the Orekit configuration, it w
and the message should not appear.
Configuring data loading is explained in the configuration page. For a start, the simplest configuration
is to download the orekit-data.zip file from the download page, to unzip it anywhere you want, note the
path of the orekit-data folder that will be created and add the following lines at the start of
your program:
is to download the [orekit-data-master.zip](https://gitlab.orekit.org/orekit/orekit-data/-/archive/master/orekit-data-master.zip)
file from the forge, to unzip it anywhere you want, rename the `orekit-data-master` folder that will be created
into `orekit-data` and add the following lines at the start of your program:
File orekitData = new File("/path/to/the/folder/orekit-data");
DataProvidersManager manager = DataProvidersManager.getInstance();
......
......@@ -134,8 +134,7 @@ release branches or bugfix branches branches to it.
For reading ease and consistency, the existing code style should be
preserved for all new developments. The rules are common ones, inherited
mainly from the Sun [Code Conventions for the Java
Programming Language](http://java.sun.com/docs/codeconv/) guide style and
mainly from the Sun Code Conventions for the Java Programming Language guide style and
from the default [checkstyle](http://checkstyle.sourceforge.net/) tool
configuration. A few of these rules are displayed below. The complete
definition is given by the checkstyle configuration file in the project
......
......@@ -18,7 +18,7 @@
In order to get the source for officially released versions, go to the
[Release notes](https://gitlab.orekit.org/orekit/orekit/tags) in Orekit
forge and select one of the orekit-x.y-src.zip files. The x.y part in the name
forge and select one of the orekit-x.y-sources.zip files. The x.y part in the name
specifies the version. If this is the first time you download the library and
you have not yet set up your own data set with UTC-TAI history, JPL ephemerides,
IERS Earth Orientation Parameters ... you may want to also download the
......@@ -37,13 +37,13 @@ latest developments are in the develop branch. This is the one you want to retri
if you need the latest feature before they are published in an official release.
See [guidelines](./guidelines.html) for the branching workflow used in Orekit.
* you can browse it using the [Repository](https://gitlab.orekit.org/orekit/orekit/tree/master)
* you can browse it using the [Repository](https://gitlab.orekit.org/orekit/orekit/tree/develop)
tab in Orekit forge
* you can clone it anonymously with the command:
git clone https://gitlab.orekit.org/orekit/orekit.git
git clone -b develop https://gitlab.orekit.org/orekit/orekit.git
* if you are a committer, you can clone it using your ssh credentials with the command:
git clone git@gitlab.orekit.org:orekit/orekit.git
git clone -b develop git@gitlab.orekit.org:orekit/orekit.git
<!--- Copyright 2002-2018 CS Systèmes d'Information
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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
# Integration in Jython
Jython is a Java-based implementation of the Python language, and interfaces well to
Java libraries. The number of Jython modules available for plotting is limited, but
Java libraries can be used.
It is important that the orekit jar file and Hipparchus jars are in the Java CLASSPATH.
This can be set manually at the command prompt, or by using an IDE such as Eclipse
with PyDev. The file `orekit-data.zip` should be in the current directory, the same
as your Jython files.
## Example SlaveMode
This example is a translation of the SlaveMode.java example to Jython, showing a stepped
Keplerian propagation.
/* Copyright 2002-2018 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (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
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
# orekit.jar,orekit-data.zip and Hipparchus jars in CLASSPATH through eclipse project
import java, os
from org.orekit.errors import OrekitException
from org.orekit.frames import Frame
from org.orekit.frames import FramesFactory
from org.orekit.orbits import KeplerianOrbit
from org.orekit.orbits import Orbit
from org.orekit.orbits import PositionAngle
from org.orekit.propagation import SpacecraftState
from org.orekit.propagation.analytical import KeplerianPropagator
from org.orekit.data import DataProvidersManager
from org.orekit.data import ZipJarCrawler
from org.orekit.time import AbsoluteDate
from org.orekit.time import TimeScalesFactory
from math import radians
# Configure Orekit. The file orekit-data.zip must be in current dir
DM = DataProvidersManager.getInstance()
crawler=ZipJarCrawler("orekit-data.zip")
DM.clearProviders()
DM.addProvider(crawler)
#Initial orbit parameters
a = 24396159 # semi major axis in meters
e = 0.72831215 # eccentricity
i = radians(7.0)# inclination
omega = radians(180) # perigee argument
raan = radians(261) #right ascension of ascending node
lM = 0.0 # mean anomaly
#Inertial frame
inertialFrame = FramesFactory.getEME2000()
#Initial date in UTC time scale
utc = TimeScalesFactory.getUTC();
initialDate = AbsoluteDate(2004, 01, 01, 23, 30, 00.000, utc)
#gravitation coefficient
mu = 3.986004415e+14
#Orbit construction as Keplerian
initialOrbit = KeplerianOrbit(a, e, i, omega, raan, lM,
PositionAngle.MEAN,
inertialFrame, initialDate, mu)
#Simple extrapolation with Keplerian motion
kepler = KeplerianPropagator(initialOrbit)
#Set the propagator to slave mode (could be omitted as it is the default mode)
kepler.setSlaveMode()
#Overall duration in seconds for extrapolation
duration = 90*60.0
#Stop date
finalDate = AbsoluteDate(initialDate, duration, utc)
#Step duration in seconds
stepT = 30.0
#Extrapolation loop
cpt = 1
extrapDate = initialDate
while extrapDate.compareTo(finalDate) <= 0:
currentState = kepler.propagate(extrapDate)
print "step %d: time %s %s" % (cpt, currentState.getDate(), currentState.getOrbit())
extrapDate = AbsoluteDate(extrapDate, stepT, utc)
cpt=cpt+1
## Example: VisibilityCheck
This example is based on the VisiblityCheck.java, translated into Jython. It includes an
example of subclassing of a Java object into a jython object.
/* Copyright 2002-2018 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (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
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
# Orekit and Hipparchus in CLASSPATH through eclipse project
import java, os
from org.orekit.data import DataProvidersManager
from org.orekit.data import ZipJarCrawler
from org.hipparchus.geometry import Vector3D
from org.orekit.bodies import BodyShape
from org.orekit.bodies import GeodeticPoint
from org.orekit.bodies import OneAxisEllipsoid
from org.orekit.errors import OrekitException;
from org.orekit.frames import Frame
from org.orekit.frames import FramesFactory
from org.orekit.frames import TopocentricFrame
from org.orekit.orbits import KeplerianOrbit
from org.orekit.orbits import Orbit
from org.orekit.propagation import Propagator
from org.orekit.propagation import SpacecraftState
from org.orekit.propagation.analytical import KeplerianPropagator
from org.orekit.propagation.events import ElevationDetector
from org.orekit.propagation.events import EventDetector
from org.orekit.time import AbsoluteDate
from org.orekit.time import TimeScalesFactory
from org.orekit.utils import PVCoordinates
from org.orekit.utils import IERSConventions
from math import degrees, radians, pi
# Configure Orekit
DM = DataProvidersManager.getInstance()
crawler=ZipJarCrawler("orekit-data.zip")
DM.clearProviders()
DM.addProvider(crawler)
# Initial state definition: date, orbit
initialDate = AbsoluteDate(2004, 01, 01, 23, 30, 00.000, TimeScalesFactory.getUTC())
mu = 3.986004415e+14
inertialFrame = FramesFactory.getEME2000() # inertial frame for orbit definition
position = Vector3D(-6142438.668, 3492467.560, -25767.25680)
velocity = Vector3D(505.8479685, 942.7809215, 7435.922231)
pvCoordinates = PVCoordinates(position, velocity)
initialOrbit = KeplerianOrbit(pvCoordinates, inertialFrame, initialDate, mu)
# Propagator : consider a simple Keplerian motion (could be more elaborate)
kepler = KeplerianPropagator(initialOrbit)
#Earth and frame
ae = 6378137.0 # // equatorial radius in meter
f = 1.0 / 298.257223563 #; // flattening
itrf = FramesFactory.getITRF(IERSConventions.IERS_2010, True) #; // terrestrial frame at an arbitrary date
earth = OneAxisEllipsoid(ae, f, itrf)
# Station
longitude = radians(45.0)
latitude = radians(25.0)
altitude = 0.0
station1 = GeodeticPoint(latitude, longitude, altitude)
sta1Frame = TopocentricFrame(earth, station1, "station1")
# Event definition
maxcheck = 1.0
elevation = radians(5.0)
class VisibilityDetector(ElevationDetector):
# Class for handling the eventOccured java. Example of subclassing
# a java class in jython
def __init__(self, maxCheck, elevation, topo):
ElevationDetector.__init__(self,maxCheck, elevation, topo)
def eventOccurred(self, s, increasing):
if (increasing):
print "Visibility on", self.topocentricFrame.getName(), "begins at" , s.getDate()
else:
print "Visibility on", self.topocentricFrame.getName(), "ends at" , s.getDate()
return self.CONTINUE
sta1Visi = VisibilityDetector(maxcheck, elevation, sta1Frame)
#Add event to be detected
kepler.addEventDetector(sta1Visi)
#Propagate from the initial date to the first raising or for the fixed duration
finalState = kepler.propagate(initialDate.shiftedBy(1500.0))
print "Final state : " , finalState.getDate().durationFrom(initialDate)
<!--- Copyright 2002-2018 CS Systèmes d'Information
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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
# Integration in Matlab
Matlab is a commercial tool for technical computation, with easy access to graphical
plot routines. It can access Java libraries and convert the results to Matlab objects.
It is important to get the orekit jar in the Matlab Java class path, which can be done
by issuing the javaaddpath command or modifying the classpath.txt file in matlabroot/toolbox/local.
Your current Java class path is displayed with the javaclasspath function. The example below uses
javaaddpath to set the paths. Note that as of Matlab version 7.5.0 this needs to be copy-pasted
from the script to the Matlab prompt.
%
% /* Copyright 2002-2018 CS Systèmes d'Information
% * Licensed to CS Systèmes d'Information (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
% * (the "License"); you may not use this file except in compliance with
% * the License. You may obtain a copy of the License at
% *
% * http://www.apache.org/licenses/LICENSE-2.0
% *
% * Unless required by applicable law or agreed to in writing, software
% * distributed under the License is distributed on an "AS IS" BASIS,
% * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
% * See the License for the specific language governing permissions and
% * limitations under the License.
% */
%
% Translated from SlaveMode.java to Matlab by Petrus Hyvönen 2011 as an
% example of how to access orekit from matlab
% the jars orekit-8.0.jar, hipparchus-core-1.0.jar, hipparchus-geometry-1.0.jar,
% hipparchus-ode-1.0.jar, hipparchus-fitting-1.0.jar, hipparchus-optim-1.0.jar
% and orekit-data.zip is in current matlab dir.
______
% These seems to work if pasted to prompt.
javaaddpath 'C:\ ... enter your path here ...\MATLAB'
javaaddpath 'C:\.. enter your path here ...\MATLAB\orekit-8.0.jar'
javaaddpath 'C:\.. enter your path here ...\\MATLAB\hipparchus-core-1.0.jar
javaaddpath 'C:\.. enter your path here ...\\MATLAB\hipparchus-geometry-1.0.jar
javaaddpath 'C:\.. enter your path here ...\\MATLAB\hipparchus-ode-1.0.jar
javaaddpath 'C:\.. enter your path here ...\\MATLAB\hipparchus-fitting-1.0.jar
javaaddpath 'C:\.. enter your path here ...\\MATLAB\hipparchus-optim-1.0.jar
%% do the imports
import org.orekit.errors.OrekitException
import org.orekit.frames.Frame
import org.orekit.frames.FramesFactory
import org.orekit.orbits.KeplerianOrbit
import org.orekit.orbits.Orbit
import org.orekit.orbits.PositionAngle
import org.orekit.propagation.SpacecraftState
import org.orekit.propagation.analytical.KeplerianPropagator
import org.orekit.data.DataProvidersManager
import org.orekit.data.ZipJarCrawler
import org.orekit.time.AbsoluteDate
import org.orekit.time.TimeScalesFactory
%% Configure Orekit. The file orekit-data.zip must be in current dir
DM=org.orekit.data.DataProvidersManager.getInstance()
crawler=org.orekit.data.ZipJarCrawler('orekit-data.zip')
DM.clearProviders()
DM.addProvider(crawler)
%% Initial orbit parameters
a = 24396159; % semi major axis in meters
e = 0.72831215; % eccentricity
i = (7.0)/180*pi; % inclination
omega = (180)/180*pi; % perigee argument
raan = (261)/180*pi; %right ascension of ascending node
lM = 0.0; % mean anomaly
%% Set inertial frame
inertialFrame = FramesFactory.getEME2000()
%% Initial date in UTC time scale
utc = TimeScalesFactory.getUTC();
initialDate = AbsoluteDate(2004, 01, 01, 23, 30, 00.000, utc)
%% Setup orbit propagator
%gravitation coefficient
mu = 3.986004415e+14
%Orbit construction as Keplerian
initialOrbit = KeplerianOrbit(a, e, i, omega, raan, lM, PositionAngle.MEAN, inertialFrame, initialDate, mu)
%Simple extrapolation with Keplerian motion
kepler = KeplerianPropagator(initialOrbit);
%Set the propagator to slave mode (could be omitted as it is the default mode)
kepler.setSlaveMode()
%% Setup propagation time
%Overall duration in seconds for extrapolation
duration = 180*60.0
%Stop date
finalDate = AbsoluteDate(initialDate, duration, utc)
%Step duration in seconds
stepT = 30.0
%% Perform propagation
%Extrapolation loop
cpt = 1;
extrapDate = initialDate
while extrapDate.compareTo(finalDate) <= 0
currentState = kepler.propagate(extrapDate);
fprintf('step %d: time %s %s\n', cpt, char(currentState.getDate()), char(currentState.getOrbit()))
coord=currentState.getPVCoordinates.getPosition;
P(:,cpt)=[coord.getX coord.getY coord.getZ]';
extrapDate = AbsoluteDate(extrapDate, stepT, utc);
cpt=cpt+1;
end
%%
figure;
plot3(P(1,:),P(2,:),P(3,:));
If you get errors from Matlab like this:
??? Error: File: orekit_test2.m Line: 12 Column: 8
Arguments to IMPORT must either end with ".*"
or else specify a fully qualified class name: "org.orekit.frames.Frame" fails this test.
you can change the line:
import org.orekit.frames.Frame
to
import org.orekit.frames.*
......@@ -29,10 +29,10 @@ public class OrekitInternalErrorTest {
OrekitInternalError e = new OrekitInternalError(null);
Assert.assertEquals(OrekitMessages.INTERNAL_ERROR, e.getSpecifier());
Assert.assertEquals(1, e.getParts().length);
Assert.assertEquals("orekit-developers@orekit.org", e.getParts()[0]);
Assert.assertTrue(e.getMessage().contains("orekit-developers@orekit.org"));
Assert.assertEquals("https://gitlab.orekit.org/orekit/orekit/issues", e.getParts()[0]);
Assert.assertTrue(e.getMessage().contains("https://gitlab.orekit.org/orekit/orekit/issues"));
Assert.assertEquals(e.getMessage(Locale.getDefault()), e.getLocalizedMessage());
Assert.assertEquals("erreur interne, contactez la maintenance à orekit-developers@orekit.org",
Assert.assertEquals("erreur interne, merci de signaler le problème en ouvrant une fiche d'anomalie sur https://gitlab.orekit.org/orekit/orekit/issues",
e.getMessage(Locale.FRENCH));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment