...
 
Commits (137)
Bruno Revelin <bruno.revelin@c-s.fr> Bruno Revelin <Bruno.Revelin@c-s.fr>
Evan Ward <evan.ward@nrl.navy.mil> Evan Ward <evan.ward@nrl.navy.mil>
Evan Ward <evan.ward@nrl.navy.mil> Evan Ward <nomail@nowhere.org>
Fabien Maussion <fabien@orekit.org> Fabien Maussion <fabien@orekit.org>
Francesco Rocca <francesco.rocca@telespazio.com> Francesco Rocca <>
Luc Maisonobe <luc@orekit.org> Luc Maisonobe <Luc.Maisonobe@free.fr>
Luc Maisonobe <luc@orekit.org> Luc Maisonobe <Luc.Maisonobe@orekit.org>
Luc Maisonobe <luc@orekit.org> Luc Maisonobe <luc@orekit.org>
Luc Maisonobe <luc@orekit.org> maisonobe <maisonobe@users.noreply.github.com>
Pascal Parraud <pascal@orekit.org> Pascal Parraud <pascal@orekit.org>
Romain di Costanzo <romain.di-costanzo@c-s.fr> rdicosta <romain.di-costanzo@c-s.fr>
Steven <sljkwsk@yahoo.com> Steven <sljkwsk@yahoo.com>
Thierry Ceolin <thierry.ceolin@c-s.fr> Thierry Ceolin <thierry@orekit.org>
Thierry Ceolin <thierry.ceolin@c-s.fr> thierry ceolin <thierry@orekit.org>
Thierry Ceolin <thierry.ceolin@c-s.fr> thierry ceolin <thierry.ceolin@c-s.fr>
Thomas Neidhart <thomas.neidhart@gmail.com> Thomas Neidhart <thomas.neidhart@gmail.com>
Véronique Pommier-Maurussane <vero@orekit.org> Véronique Pommier-Maurussane <vero@orekit.org>
Nicolas Bernard <nicolas.bernard@c-s.fr> Nicola Bernard <nicolas.bernard@c-s.fr>
Romain di Costanzo <romain.di-costanzo@c-s.fr> Romain Di Costanzo <romain.di-costanzo@c-s.fr>
Joris Olympio <joris.olympio@c-s.fr> jolympio <joris.olympio@c-s.fr>
Piotr Listkiewicz <piotr.listkiewicz@gmail.com> liscju <piotr.listkiewicz@gmail.com>
Albert Alcarraz García <albert.alcarraz-garcia@c-s.fr> Albert Alcarraz García <albert.alcarraz-garcia@c-s.fr>
Andrea Antolino <andrea.antolino@c-s.fr> Andrea Antolino <Andrea.Antolino@c-s.fr>
Andrea Antolino <andrea.antolino@c-s.fr> Andrea Antolino <andrea.antolino@c-s.fr>
Bruno Revelin <bruno.revelin@c-s.fr> Bruno Revelin <Bruno.Revelin@c-s.fr>
Bryan Cazabonne <bryan.cazabonne@c-s.fr> Bryan <bryan.cazabonne@c-s.com>
Bryan Cazabonne <bryan.cazabonne@c-s.fr> Bryan Cazabonne <bryan.cazabonne@c-s.fr>
Daniel De Sousa <dan.desousa@gmail.com> Daniel De Sousa <dan.desousa@gmail.com>
Evan Ward <evan.ward@nrl.navy.mil> Evan Ward <evan.ward@nrl.navy.mil>
Evan Ward <evan.ward@nrl.navy.mil> Evan Ward <nomail@nowhere.org>
Fabien Maussion <fabien@orekit.org> Fabien Maussion <fabien@orekit.org>
Francesco Rocca <francesco.rocca@telespazio.com> Francesco Rocca <>
Greg Carbott <gregory.carbott@nrl.navy.mil> Greg Carbott <gregory.carbott@nrl.navy.mil>
Guilhem Bonnefille <guilhem.bonnefille@c-s.fr> Guilhem Bonnefille <guilhem.bonnefille@c-s.fr>
Guylaine Prat <guylaine.prat@c-s.fr> Guylaine Prat <guylaine.prat@c-s.fr>
Hank Grabowski <hank@applieddefense.com> Hank Grabowski <hank@applieddefense.com>
Joris Olympio <joris.olympio@c-s.fr> Joris Olympio <joris.olympio@c-s.fr>
Joris Olympio <joris.olympio@c-s.fr> jolympio <joris.olympio@c-s.fr>
Luc Maisonobe <luc@orekit.org> Luc Maisonobe <Luc.Maisonobe@free.fr>
Luc Maisonobe <luc@orekit.org> Luc Maisonobe <Luc.Maisonobe@orekit.org>
Luc Maisonobe <luc@orekit.org> Luc Maisonobe <luc@orekit.org>
Luc Maisonobe <luc@orekit.org> maisonobe <maisonobe@users.noreply.github.com>
Lucian Barbulescu <lucian.barbulescu@c-s.ro> Lucian Barbulescu <lucian.barbulescu@c-s.ro>
Madalin Mamuleanu <mamuleanu.madalin@gmail.com> Madalin Mamuleanu <mamuleanu.madalin@gmail.com>
MaksimP <maksimp86@mail.ru> MaksimP <maksimp86@mail.ru>
Maxime Journot <maxime.journot@c-s.fr> Maxime Journot <Maxime.Journot@c-s.fr>
Maxime Journot <maxime.journot@c-s.fr> Maxime Journot <maxime.journot@c-s.fr>
Nicolas Bernard <nicolas.bernard@c-s.fr> Nicola Bernard <nicolas.bernard@c-s.fr>
Nicolas Bernard <nicolas.bernard@c-s.fr> Nicolas Bernard <nicolas.bernard@c-s.fr>
Pascal Parraud <pascal@orekit.org> Pascal Parraud <pascal@orekit.org>
Pavel Bludov <pbludov@gmail.com> Pavel Bludov <pbludov@gmail.com>
Piotr Listkiewicz <piotr.listkiewicz@gmail.com> Piotr Listkiewicz <piotr.listkiewicz@gmail.com>
Piotr Listkiewicz <piotr.listkiewicz@gmail.com> liscju <piotr.listkiewicz@gmail.com>
rnveach <rveach02@gmail.com> rnveach <rveach02@gmail.com>
Robert Painsi <robertpainsi@gmail.com> Robert Painsi <robertpainsi@gmail.com>
Romain di Costanzo <romain.di-costanzo@c-s.fr> Romain Di Costanzo <romain.di-costanzo@c-s.fr>
Romain di Costanzo <romain.di-costanzo@c-s.fr> rdicosta <romain.di-costanzo@c-s.fr>
Roman Ivanov <ivanov-jr@mail.ru> Roman Ivanov <ivanov-jr@mail.ru>
Sébastien Dinot <sebastien.dinot@c-s.fr> Sebastien Dinot <sebastien.dinot@c-s.fr>
Sébastien Dinot <sebastien.dinot@c-s.fr> Sebastien Dinot <sebastien@dinot.net>
Sébastien Dinot <sebastien.dinot@c-s.fr> Sébastien Dinot <Sebastien.Dinot@c-s.fr>
Sébastien Dinot <sebastien.dinot@c-s.fr> Sébastien Dinot <sebastien.dinot@c-s.fr>
Steven <sljkwsk@yahoo.com> Steven <sljkwsk@yahoo.com>
Steven Ports <steven.ports@c-s.fr> Steven Ports <steven.ports@c-s.fr>
Thierry Ceolin <thierry.ceolin@c-s.fr> Thierry Ceolin <thierry@orekit.org>
Thierry Ceolin <thierry.ceolin@c-s.fr> thierry ceolin <thierry.ceolin@c-s.fr>
Thierry Ceolin <thierry.ceolin@c-s.fr> thierry ceolin <thierry@orekit.org>
Thomas Neidhart <thomas.neidhart@gmail.com> Thomas Neidhart <thomas.neidhart@gmail.com>
Véronique Pommier-Maurussane <vero@orekit.org> Véronique Pommier-Maurussane <vero@orekit.org>
Yannick Jeandroz <yannick.jeandroz@airbus.com> Yannick Jeandroz <yannick.jeandroz@airbus.com>
# Contributing
This project is documented through a static site generated by Maven.
Contributing information is described in the
[contributing guidelines](src/site/markdown/contributing.md)
inside the Maven site.
![Orekit logo](https://www.orekit.org/img/orekit-logo.png)
# Orekit
> An accurate and efficient core layer for space flight dynamics applications
[Orekit](https://www.orekit.org) is a low level space dynamics library written
in Java. Orekit is designed to be easily used in very different contexts, from
quick studies up to critical operations. As a library, Orekit provides basic
elements (orbits, dates, attitude, frames, ...) and various algorithms to
handle them (conversions, propagations, pointing, ...).
## Download
### Official releases
[Official Orekit releases](https://gitlab.orekit.org/orekit/orekit/releases)
are available on our [Gitlab instance](https://gitlab.orekit.org/). They are
also available in the
[Maven repository](https://mvnrepository.com/artifact/org.orekit/orekit).
### Development version
To get the latest development version, please clone our official repository
and checkout the `develop` branch:
```bash
git clone -b develop https://gitlab.orekit.org/orekit/orekit.git
```
__Note:__ Our official repository is
[mirrored on Github](https://github.com/CS-SI/Orekit).
## Documentation
Project overview, architecture and development, detailed features list,
tutorials, Javadoc and a lot of other information is available on the
[Maven site](https://www.orekit.org/site-orekit-development/).
## Getting help
The main communication channel is our [forum](https://forum.orekit.org/). You
can report bugs and suggest new features in our
[issues tracking system](https://gitlab.orekit.org/orekit/orekit/issues). When
reporting security issues check the "This issue is confidential" box.
## Contributing
Orekit exists thanks to the contribution of
[many people](https://gitlab.orekit.org/orekit/orekit/graphs/develop).
Please take a look at our
[contributing guidelines](src/site/markdown/contributing.md) if you're
interested in helping!
## Building
Detailed information on how to build Orekit from source either using Maven or
Eclipse is provided in [building.md](src/site/markdown/building.md) file.
## Dependencies
Orekit relies on the following
[FOSS](https://en.wikipedia.org/wiki/Free_and_open-source_software) libraries,
all released under business friendly FOSS licenses.
### Compile-time/run-time dependencies
* [Hipparchus](https://hipparchus.org/), a mathematics library released under
the Apache License, version 2.0.
### Test-time dependencies
* [JUnit 4](http://www.junit.org/), a widely used unit test framework released
under the Eclipse Public License, version 1.0.
* [Mockito](https://site.mockito.org/), a mocking framework for unit tests,
released under MIT license.
More detailed information is available in the
[Maven site](https://www.orekit.org/site-orekit-development/dependencies.html).
## License
Orekit is licensed by [CS Systèmes d'Information](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.
Orekit (ORbit Extrapolation KIT) is a free java library
providing basic space dynamics objects and services.
It is licensed by CS Systèmes d'Information under the
Apache License Version 2.0. A copy of this license is
provided in the LICENSE.txt file.
The BUILDING.txt file explains how the library can be built from sources.
The src/main/java directory contains the library sources.
The src/main/resources directory contains the library data.
The src/test/java directory contains the tests sources.
The src/test/resources directory contains the tests data.
The src/tutorials/java directory contains sources for example use of the library.
The src/tutorials/resources directory contains example data.
The src/design directory contains pieces for a UML model of the library.
Orekit relies on the following free software, all released under
business friendly free licenses.
compile-time/run-time dependency:
- Hipparchus from the Hipparchus project
https://hipparchus.org/
released under the Apache Software License, version 2
test-time dependency:
- JUnit 4 from Erich Gamma and Kent Beck
http://www.junit.org/
released under the Common Public License Version 1.0
......@@ -46,7 +46,7 @@
<orekit.nexus-staging-maven-plugin.version>1.6.8</orekit.nexus-staging-maven-plugin.version>
<orekit.maven-gpg-plugin.version>1.6</orekit.maven-gpg-plugin.version>
<orekit.maven-install-plugin.version>3.0.0-M1</orekit.maven-install-plugin.version>
<orekit.hipparchus.version>1.5-SNAPSHOT</orekit.hipparchus.version>
<orekit.hipparchus.version>1.5</orekit.hipparchus.version>
<orekit.junit.version>4.12</orekit.junit.version>
<orekit.compiler.source>1.8</orekit.compiler.source>
<orekit.compiler.target>1.8</orekit.compiler.target>
......
......@@ -191,12 +191,20 @@
<Method name ="getAdditionalStateDot" params="" returns="double[]" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.orekit.estimation.measurements.gnss.AbstractLambdaReducer"/>
<Or>
<Method name ="getDiagReference" params="" returns="double[]" />
<Method name ="getLowReference" params="" returns="double[]" />
</Or>
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.orekit.forces.gravity.HolmesFeatherstoneAttractionModel$GradientHessian"/>
<Or>
<Method name="getGradient" params="" returns="double[]" />
<Method name="getHessian" params="" returns="double[][]" />
</Or>
</Or>
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
......
......@@ -21,6 +21,44 @@
</properties>
<body>
<release version="10.0" date="TBD" description="TBD">
<action dev="maxime" type="add" issue="549">
Deleted deprecated methods in EclipseDetector.
</action>
<action dev="petrus" type="add" issue="518">
Changing AbstractGNSSAttitudeProvider from public to package-private.
</action>
<action dev="romaric" type="fix" issue="551">
Fix the bug of attitude transition with analytical propagator
by refreshing the attitude after the events triggering
</action>
<action dev="romaric" type="fix" issue="552">
Fix the bug of attitude transition if a reset occurs during the transition
by adding margins to the reset of TimeSpanMap to keep the one corresponding to the "after" attitude law.
</action>
<action dev="bryan" type="add" issue="522">
Generalized the GPSPropagator class to handle all GNSS constellations using
the same algorithm.
</action>
<action dev="bryan" type="add" issue="519">
Added numerical and analytical GLONASS propagators.
</action>
<action dev="luc" type="add" >
Added ambiguity resolution for phase measurements.
This feature is not complete yet and is considered experimental.
</action>
<action dev="bryan" type="add" issue="548">
Reorganized models package by adding new sub-packages.
</action>
<action dev="maxime" type="add" issue="546">
Updated Hipparchus dependency to version 1.5 in pom.xml file.
</action>
<action dev="maxime" type="fix" issue="514">
Deleted unused DerivativeStructure acceleration computation methods.
In interfaces radiationPressureAcceleration and dragAcceleration, and all their implementations and their tests.
</action>
<action dev="bryan" type="fix" issue="544" due-to="Josef Probst">
Fixed endless loop on GPSPropagator and (Field)KeplerianOrbit.
</action>
<action dev="maxime" type="add" issue="403">
Added tests for class UnivariateProcessNoise.
Working tests for non-Cartesian orbit propagation are still needed.
......
......@@ -6,10 +6,11 @@
<fileSets>
<fileSet>
<includes>
<include>README.txt</include>
<include>README.md</include>
<include>LICENSE.txt</include>
<include>NOTICE.txt</include>
<include>BUILDING.txt</include>
<include>CONTRIBUTING.md</include>
<include>pom.xml</include>
<include>build.xml</include>
<include>checkstyle.xml</include>
......@@ -23,4 +24,4 @@
<useDefaultExcludes>true</useDefaultExcludes>
</fileSet>
</fileSets>
</assembly>
\ No newline at end of file
</assembly>
......@@ -387,9 +387,9 @@ public class AttitudesSequence implements AttitudeProvider {
if (activated.getTransitions().size() > 1) {
// remove transitions that will be overridden during upcoming propagation
if (forward) {
activated = activated.extractRange(AbsoluteDate.PAST_INFINITY, s0.getDate());
activated = activated.extractRange(AbsoluteDate.PAST_INFINITY, s0.getDate().shiftedBy(transitionTime));
} else {
activated = activated.extractRange(s0.getDate(), AbsoluteDate.FUTURE_INFINITY);
activated = activated.extractRange(s0.getDate().shiftedBy(-transitionTime), AbsoluteDate.FUTURE_INFINITY);
}
}
......
......@@ -229,7 +229,8 @@ public enum OrekitMessages implements Localizable {
VIENNA_ACOEF_OR_ZENITH_DELAY_NOT_LOADED("Vienna coefficients ah or aw or zh or zw could not be loaded from {0}"),
VIENNA_ACOEF_OR_ZENITH_DELAY_NOT_AVAILABLE_FOR_DATE("Vienna coefficients ah or aw or zh or zw not available for date {0}"),
NO_VIENNA_ACOEF_OR_ZENITH_DELAY_IN_FILE("file {0} does not contain Vienna coefficients ah, aw, zh or zw"),
IRREGULAR_OR_INCOMPLETE_GRID("irregular or incomplete grid in file {0}");
IRREGULAR_OR_INCOMPLETE_GRID("irregular or incomplete grid in file {0}"),
INVALID_SATELLITE_SYSTEM("invalid satellite system {0}");
// CHECKSTYLE: resume JavadocVariable check
......
/* Copyright 2002-2019 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.
*/
package org.orekit.estimation.measurements.gnss;
import org.hipparchus.util.FastMath;
/** Sampler for generating long integers between two limits in an alternating pattern.
* <p>
* Given a center a and a radius r, this class will generate integers kᵢ such
* that a - r ≤ kᵢ ≤ a + r. The generation order will start from the middle
* (i.e. k₀ is the long integer closest to a) and go towards the boundaries,
* alternating between values lesser than a and values greater than a.
* For example, with a = 17.3 and r = 5.2, it will generate: k₀ = 17, k₁ = 18,
* k₂ = 16, k₃ = 19, k₄ = 15, k₅ = 20, k₆ = 14, k₇ = 21, k₈ = 13, k₉ = 22.
* </p>
* <p>
* There are no hard limits to the generation, i.e. in the example above, the
* generator will happily generate k₁₀ = 12, k₁₁ = 23, k₁₂ = 11... In fact, if
* there are no integers at all between {@code a - r} and {@code a + r}, even
* the initial k₀ that is implicitly generated at construction will be out of
* range. The {@link #inRange()} method can be used to check if the last generator
* is still producing numbers within the initial range or if it has already
* started generating out of range numbers.
* </p>
* <p>
* If there are integers between {@code a - r} and {@code a + r}, it is guaranteed
* that they will all be generated once before {@link #inRange()} starts returning
* {@code false}.
* </p>
* <p>
* This allows to explore the range for one integer ambiguity starting
* with the most probable values (closest to a) and continuing with
* values less probable.
* </p>
* @see <a href="https://www.researchgate.net/publication/2790708_The_LAMBDA_method_for_integer_ambiguity_estimation_implementation_aspects">
* The LAMBDA method for integer ambiguity estimation: implementation aspects</a>
* @see <a href="https://oeis.org/A001057">
* A001057: Canonical enumeration of integers: interleaved positive and negative integers with zero prepended.</a>
* @author Luc Maisonobe
* @since 10.0
*/
class AlternatingSampler {
/** Range midpoint. */
private final double a;
/** Offset with respect to A001057. */
private final long offset;
/** Sign with respect to A001057. */
private final long sign;
/** Minimum number to generate. */
private long min;
/** Maximum number to generate. */
private long max;
/** Previous generated number in A001057. */
private long k1;
/** Current generated number in A001057. */
private long k0;
/** Current generated number. */
private long current;
/** Simple constructor.
* <p>
* A first initial integer is already generated as a side effect of
* construction, so {@link #getCurrent()} can be called even before
* calling {@link #generateNext()}. If there are no integers at
* all between {@code a - r} and {@code a + r}, then this initial
* integer will already be out of range.
* </p>
* @param a range midpoint
* @param r range radius
*/
AlternatingSampler(final double a, final double r) {
this.a = a;
this.offset = (long) FastMath.rint(a);
this.sign = offset <= a ? +1 : -1;
setRadius(r);
this.k1 = 0;
this.k0 = 0;
this.current = offset;
}
/** Reset the range radius.
* <p>
* Resetting radius is allowed during sampling, it simply changes
* the boundaries used when calling {@link #inRange()}. Resetting
* the radius does not change the sampling itself, neither the
* {@link #getCurrent() current} value nor the {@link #generateNext()
* next generated} ones.
* </p>
* <p>
* A typical use case for calling {@link #setRadius(double)} during
* sampling is to reduce sampling interval. It is used to shrink
* the search ellipsoid on the fly in LAMBDA-based methods in order
* to speed-up search.
* </p>
* @param r range radius
*/
public void setRadius(final double r) {
this.min = (long) FastMath.ceil(a - r);
this.max = (long) FastMath.floor(a + r);
}
/** Get the range midpoint.
* @return range midpoint
*/
public double getMidPoint() {
return a;
}
/** Get current value.
* @return current value
*/
public long getCurrent() {
return current;
}
/** Check if the current value is within range.
* @return true if current value is within range
*/
public boolean inRange() {
return (min <= current) && (current <= max);
}
/** Generate next value.
*/
public void generateNext() {
// apply A001057 recursion
final long k2 = k1;
k1 = k0;
k0 = 1 - (k1 << 1) - k2;
// take offset and sign into account
current = offset + sign * k0;
}
}
/* Copyright 2002-2019 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.
*/
package org.orekit.estimation.measurements.gnss;
/** Interface defining ambiguity acceptance tests.
* @see AmbiguitySolver
* @author Luc Maisonobe
* @since 10.0
*/
public interface AmbiguityAcceptance {
/** Get the number of candidate solutions to search for.
* @return number of candidate solutions to search for
*/
int numberOfCandidates();
/** Check if one of the candidate solutions can be accepted.
* @param candidates candidate solutions of the Integer Least Squares problem,
* in increasing squared distance order (the array contains at least
* {@link #numberOfCandidates()} candidates)
* @return the candidate solution to accept (normally the one at index 0), or
* null if we should still use the float solution
*/
IntegerLeastSquareSolution accept(IntegerLeastSquareSolution[] candidates);
}
/* Copyright 2002-2019 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.
*/
package org.orekit.estimation.measurements.gnss;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import org.hipparchus.linear.RealMatrix;
import org.hipparchus.util.FastMath;
import org.orekit.errors.OrekitIllegalArgumentException;
import org.orekit.errors.OrekitMessages;
import org.orekit.utils.ParameterDriver;
/** Class for solving integer ambiguity problems.
* @see LambdaMethod
* @author Luc Maisonobe
* @since 10.0
*/
public class AmbiguitySolver {
/** Drivers for ambiguity drivers. */
private final List<ParameterDriver> ambiguityDrivers;
/** Solver for the underlying Integer Least Square problem. */
private final IntegerLeastSquareSolver solver;
/** Acceptance test to use. */
private final AmbiguityAcceptance acceptance;
/** Simple constructor.
* @param ambiguityDrivers drivers for ambiguity parameters
* @param solver solver for the underlying Integer Least Square problem
* @param acceptance acceptance test to use
* @see LambdaMethod
*/
public AmbiguitySolver(final List<ParameterDriver> ambiguityDrivers,
final IntegerLeastSquareSolver solver,
final AmbiguityAcceptance acceptance) {
this.ambiguityDrivers = ambiguityDrivers;
this.solver = solver;
this.acceptance = acceptance;
}
/** Get all the ambiguity parameters drivers.
* @return all ambiguity parameters drivers
*/
public List<ParameterDriver> getAllAmbiguityDrivers() {
return Collections.unmodifiableList(ambiguityDrivers);
}
/** Get the ambiguity parameters drivers that have not been fixed yet.
* @return ambiguity parameters drivers that have not been fixed yet
*/
protected List<ParameterDriver> getFreeAmbiguityDrivers() {
return ambiguityDrivers.
stream().
filter(d -> {
if (d.isSelected()) {
final double near = FastMath.rint(d.getValue());
final double gapMin = near - d.getMinValue();
final double gapMax = d.getMaxValue() - near;
return FastMath.max(FastMath.abs(gapMin), FastMath.abs(gapMax)) > 1.0e-15;
} else {
return false;
}
}).
collect(Collectors.toList());
}
/** Get ambiguity indirection array for ambiguity parameters drivers that have not been fixed yet.
* @param startIndex start index for measurements parameters in global covariance matrix
* @param measurementsParametersDrivers measurements parameters drivers in global covariance matrix order
* @return indirection array between full covariance matrix and ambiguity covariance matrix
*/
protected int[] getFreeAmbiguityIndirection(final int startIndex,
final List<ParameterDriver> measurementsParametersDrivers) {
// set up indirection array
final List<ParameterDriver> freeDrivers = getFreeAmbiguityDrivers();
final int n = freeDrivers.size();
final int[] indirection = new int[n];
for (int i = 0; i < n; ++i) {
indirection[i] = -1;
final String name = freeDrivers.get(i).getName();
for (int k = 0; k < measurementsParametersDrivers.size(); ++k) {
if (name.equals(measurementsParametersDrivers.get(k).getName())) {
indirection[i] = startIndex + k;
break;
}
}
if (indirection[i] < 0) {
// the parameter was not found
final StringBuilder builder = new StringBuilder();
for (final ParameterDriver driver : measurementsParametersDrivers) {
if (builder.length() > 0) {
builder.append(", ");
}
builder.append(driver.getName());
}
throw new OrekitIllegalArgumentException(OrekitMessages.UNSUPPORTED_PARAMETER_NAME,
name, builder.toString());
}
}
return indirection;
}
/** Un-fix an integer ambiguity (typically after a phase cycle slip).
* @param ambiguityDriver driver for the ambiguity to un-fix
*/
public void unFixAmbiguity(final ParameterDriver ambiguityDriver) {
ambiguityDriver.setMinValue(Double.NEGATIVE_INFINITY);
ambiguityDriver.setMaxValue(Double.POSITIVE_INFINITY);
}
/** Fix integer ambiguities.
* @param startIndex start index for measurements parameters in global covariance matrix
* @param measurementsParametersDrivers measurements parameters drivers in global covariance matrix order
* @param covariance global covariance matrix
* @return list of newly fixed ambiguities (ambiguities already fixed before the call are not counted)
*/
public List<ParameterDriver> fixIntegerAmbiguities(final int startIndex,
final List<ParameterDriver> measurementsParametersDrivers,
final RealMatrix covariance) {
// set up Integer Least Square problem
final List<ParameterDriver> ambiguities = getAllAmbiguityDrivers();
final double[] floatAmbiguities = ambiguities.stream().mapToDouble(d -> d.getValue()).toArray();
final int[] indirection = getFreeAmbiguityIndirection(startIndex, measurementsParametersDrivers);
// solve the ILS problem
final IntegerLeastSquareSolution[] candidates =
solver.solveILS(acceptance.numberOfCandidates(), floatAmbiguities, indirection, covariance);
if (candidates.length < acceptance.numberOfCandidates()) {
return Collections.emptyList();
}
// check acceptance
final IntegerLeastSquareSolution bestCandidate = acceptance.accept(candidates);
if (bestCandidate == null) {
return Collections.emptyList();
}
// fix the ambiguities
final long[] fixedAmbiguities = bestCandidate.getSolution();
final List<ParameterDriver> fixedDrivers = new ArrayList<>(indirection.length);
for (int i = 0; i < indirection.length; ++i) {
final ParameterDriver driver = measurementsParametersDrivers.get(indirection[i] - startIndex);
driver.setMinValue(fixedAmbiguities[i]);
driver.setMaxValue(fixedAmbiguities[i]);
fixedDrivers.add(driver);
}
// TODO
// update the other float parameter drivers estimates
// using their correlations with the fixed ambiguities
return fixedDrivers;
}
}
/* Copyright 2002-2019 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.
*/
package org.orekit.estimation.measurements.gnss;
/** Class holding a solution to an Integer Least Square problem.
* @author Luc Maisonobe
* @since 10.0
*/
public class IntegerLeastSquareSolution implements Comparable<IntegerLeastSquareSolution> {
/** Solution array. */
private final long[] solution;
/** Squared distance to the corresponding float solution. */
private final double d2;
/** Simple constructor.
* @param solution solution array
* @param d2 squared distance to the corresponding float solution
*/
public IntegerLeastSquareSolution(final long[] solution, final double d2) {
this.solution = solution.clone();
this.d2 = d2;
}
/** Get the solution array.
* @return solution array
*/
public long[] getSolution() {
return solution.clone();
}
/** Get the squared distance to the corresponding float solution.
* @return squared distance to the corresponding float solution
*/
public double getSquaredDistance() {
return d2;
}
/** {@inheritDoc} */
@Override
public int compareTo(final IntegerLeastSquareSolution other) {
return Double.compare(getSquaredDistance(), other.getSquaredDistance());
}
}
/* Copyright 2002-2019 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.
*/
package org.orekit.estimation.measurements.gnss;
import org.hipparchus.linear.RealMatrix;
/** Interface for algorithms solving integer least square problems.
* @see IntegerLeastSquareSolution
* @author Luc Maisonobe
* @since 10.0
*/
public interface IntegerLeastSquareSolver {
/** Find the best solutions to an Integer Least Square problem.
* @param nbSol number of solutions to search for
* @param floatAmbiguities float estimates of ambiguities
* @param indirection indirection array to extract ambiguity covariances from global covariance matrix
* @param covariance global covariance matrix (includes ambiguities among other parameters)
* @return at most {@code nbSol} solutions a to the Integer Least Square problem, in increasing
* squared distance order
*/
IntegerLeastSquareSolution[] solveILS(int nbSol, double[] floatAmbiguities, int[] indirection,
RealMatrix covariance);
}
/* Copyright 2002-2019 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.
*/
package org.orekit.estimation.measurements.gnss;
/** Decorrelation/reduction engine for {@link LambdaSolver LAMBDA method}.
* <p>
* This class implements PJG Teunissen Least Square Ambiguity Decorrelation
* Adjustment (LAMBDA) method, as described in both the 1996 paper <a
* href="https://www.researchgate.net/publication/2790708_The_LAMBDA_method_for_integer_ambiguity_estimation_implementation_aspects">
* The LAMBDA method for integer ambiguity estimation: implementation aspects</a> by
* Paul de Jonge and Christian Tiberius and on the 2005 paper <a
* href="https://www.researchgate.net/publication/225518977_MLAMBDA_a_modified_LAMBDA_method_for_integer_least-squares_estimation">
* A modified LAMBDA method for integer least-squares estimation</a> by X.-W Chang, X. Yang
* and T. Zhou, Journal of Geodesy 79(9):552-565, DOI: 10.1007/s00190-005-0004-x
* </p>
* <p>
* It slightly departs on the original LAMBDA method as it does implement
* the following improvements proposed in the de Jonge and Tiberius 1996 paper
* that vastly speed up the search:
* </p>
* <ul>
* <li>alternate search starting from the middle and expanding outwards</li>
* <li>automatic shrinking of ellipsoid during the search</li>
* </ul>
* @see AmbiguitySolver
* @author Luc Maisonobe
* @since 10.0
*/
public class LambdaMethod extends AbstractLambdaMethod {
/** {@inheritDoc} */
@Override
protected void ltdlDecomposition() {
// get references to the diagonal and lower triangular parts
final double[] diag = getDiagReference();
final double[] low = getLowReference();
// perform Lᵀ.D.L decomposition
for (int k = diag.length - 1; k >= 0; --k) {
final double inv = 1.0 / diag[k];
for (int i = 0; i < k; ++i) {
final double lki = low[lIndex(k, i)];
for (int j = 0; j < i; ++j) {
low[lIndex(i, j)] -= lki * low[lIndex(k, j)] * inv;
}
diag[i] -= lki * lki * inv;
}
for (int j = 0; j < k; ++j) {
low[lIndex(k, j)] *= inv;
}
}
}
/** {@inheritDoc} */
@Override
protected void reduction() {
// get references to the diagonal and lower triangular parts
final double[] diag = getDiagReference();
final double[] low = getLowReference();
final int n = diag.length;
int kSaved = n - 2;
int k0 = kSaved;
while (k0 >= 0) {
final int k1 = k0 + 1;
if (k0 <= kSaved) {
for (int i = k0 + 1; i < n; ++i) {
integerGaussTransformation(i, k0);
}
}
final double lk1k0 = low[lIndex(k1, k0)];
final double delta = diag[k0] + lk1k0 * lk1k0 * diag[k1];
if (delta < diag[k1]) {
permutation(k0, delta);
kSaved = k0;
k0 = n - 2;
} else {
k0--;
}
}
}
}
......@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.orekit.estimation.measurements;
package org.orekit.estimation.measurements.gnss;
import java.util.Arrays;
import java.util.HashMap;
......@@ -24,6 +24,10 @@ import org.hipparchus.Field;
import org.hipparchus.analysis.differentiation.DSFactory;
import org.hipparchus.analysis.differentiation.DerivativeStructure;
import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
import org.orekit.estimation.measurements.AbstractMeasurement;
import org.orekit.estimation.measurements.EstimatedMeasurement;
import org.orekit.estimation.measurements.GroundStation;
import org.orekit.estimation.measurements.ObservableSatellite;
import org.orekit.frames.FieldTransform;
import org.orekit.propagation.SpacecraftState;
import org.orekit.time.AbsoluteDate;
......@@ -50,6 +54,12 @@ import org.orekit.utils.TimeStampedPVCoordinates;
*/
public class Phase extends AbstractMeasurement<Phase> {
/** Name for ambiguity driver. */
public static final String AMBIGUITY_NAME = "ambiguity";
/** Driver for ambiguity. */
private final ParameterDriver ambiguityDriver;
/** Ground station from which measurement is performed. */
private final GroundStation station;
......@@ -60,7 +70,7 @@ public class Phase extends AbstractMeasurement<Phase> {
* @param station ground station from which measurement is performed
* @param date date of the measurement
* @param phase observed value
* @param wavelength phase observed value wavelength
* @param wavelength phase observed value wavelength (m)
* @param sigma theoretical standard deviation
* @param baseWeight base weight
* @param satellite satellite related to this measurement
......@@ -70,6 +80,10 @@ public class Phase extends AbstractMeasurement<Phase> {
final double phase, final double wavelength, final double sigma,
final double baseWeight, final ObservableSatellite satellite) {
super(date, phase, sigma, baseWeight, Arrays.asList(satellite));
ambiguityDriver = new ParameterDriver(AMBIGUITY_NAME,
0.0, 1.0,
Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY);
addParameterDriver(ambiguityDriver);
addParameterDriver(station.getClockOffsetDriver());
addParameterDriver(station.getEastOffsetDriver());
addParameterDriver(station.getNorthOffsetDriver());
......@@ -91,6 +105,13 @@ public class Phase extends AbstractMeasurement<Phase> {
return station;
}
/** Get the wavelength.
* @return wavelength (m)
*/
public double getWavelength() {
return wavelength;
}
/** {@inheritDoc} */
@Override
protected EstimatedMeasurement<Phase> theoreticalEvaluation(final int iteration,
......@@ -107,7 +128,7 @@ public class Phase extends AbstractMeasurement<Phase> {
// Parameters:
// - 0..2 - Position of the spacecraft in inertial frame
// - 3..5 - Velocity of the spacecraft in inertial frame
// - 6..n - station parameters (clock offset, station offsets, pole, prime meridian...)
// - 6..n - station parameters (ambiguity, clock offset, station offsets, pole, prime meridian...)
int nbParams = 6;
final Map<String, Integer> indices = new HashMap<>();
for (ParameterDriver driver : getParametersDrivers()) {
......@@ -159,7 +180,8 @@ public class Phase extends AbstractMeasurement<Phase> {
// Phase value
final double cOverLambda = Constants.SPEED_OF_LIGHT / wavelength;
final DerivativeStructure phase = tauD.multiply(cOverLambda);
final DerivativeStructure ambiguity = ambiguityDriver.getValue(factory, indices);
final DerivativeStructure phase = tauD.multiply(cOverLambda).add(ambiguity);
estimated.setEstimatedValue(phase.getValue());
......
/* Copyright 2002-2019 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.
*/
package org.orekit.estimation.measurements.gnss;
/** Ambiguity acceptance test based on a ratio of the two best candidates.
* @see AmbiguitySolver
* @author Luc Maisonobe
* @since 10.0
*/
public class SimpleRatioAmbiguityAcceptance implements AmbiguityAcceptance {
/** Number of candidate solutions. */
private static final int NB_CANDIDATES = 2;
/** Acceptance ratio for {@code candidate[0]/candidate[1]}. */
private final double ratio;
/** Simple constructor.
* @param ratio acceptance ratio for {@code candidate[0]/candidate[1]},
* typically {@code 1.0/2.0} or {@code 1.0/3.0}
*/
public SimpleRatioAmbiguityAcceptance(final double ratio) {
this.ratio = ratio;
}
/** {@inheritDoc} */
@Override
public int numberOfCandidates() {
return NB_CANDIDATES;
}
/** {@inheritDoc}
* <p>
* If the ratio {@code candidate[0]/candidate[1]} is smaller or
* equal to the ratio given at construction, then {@code candidate[0]}
* will be accepted
* </p>
*/
@Override
public IntegerLeastSquareSolution accept(final IntegerLeastSquareSolution[] candidates) {
if (candidates[0].getSquaredDistance() / candidates[1].getSquaredDistance() <= ratio) {
return candidates[0];
} else {
return null;
}
}
}
......@@ -26,7 +26,7 @@ import org.orekit.estimation.measurements.EstimatedMeasurement;
import org.orekit.estimation.measurements.EstimationModifier;
import org.orekit.estimation.measurements.GroundStation;
import org.orekit.frames.Frame;
import org.orekit.models.earth.IonosphericModel;
import org.orekit.models.earth.ionosphere.IonosphericModel;
import org.orekit.propagation.SpacecraftState;
import org.orekit.time.AbsoluteDate;
import org.orekit.utils.Constants;
......
......@@ -25,7 +25,7 @@ import org.orekit.estimation.measurements.EstimatedMeasurement;
import org.orekit.estimation.measurements.EstimationModifier;
import org.orekit.estimation.measurements.GroundStation;
import org.orekit.frames.Frame;
import org.orekit.models.earth.DiscreteTroposphericModel;
import org.orekit.models.earth.troposphere.DiscreteTroposphericModel;
import org.orekit.propagation.SpacecraftState;
import org.orekit.time.AbsoluteDate;
import org.orekit.utils.Constants;
......
......@@ -22,7 +22,7 @@ import java.util.List;
import org.hipparchus.util.FastMath;
import org.orekit.estimation.measurements.EstimatedMeasurement;
import org.orekit.estimation.measurements.EstimationModifier;
import org.orekit.estimation.measurements.Phase;
import org.orekit.estimation.measurements.gnss.Phase;
import org.orekit.utils.ParameterDriver;
/** Class modifying theoretical phase measurement with ambiguity.
......
......@@ -25,7 +25,7 @@ import org.orekit.estimation.measurements.EstimatedMeasurement;
import org.orekit.estimation.measurements.EstimationModifier;
import org.orekit.estimation.measurements.GroundStation;
import org.orekit.estimation.measurements.Range;
import org.orekit.models.earth.IonosphericModel;
import org.orekit.models.earth.ionosphere.IonosphericModel;
import org.orekit.orbits.OrbitType;
import org.orekit.orbits.PositionAngle;
import org.orekit.propagation.Propagator;
......
......@@ -25,7 +25,7 @@ import org.orekit.estimation.measurements.EstimatedMeasurement;
import org.orekit.estimation.measurements.EstimationModifier;
import org.orekit.estimation.measurements.GroundStation;
import org.orekit.estimation.measurements.RangeRate;
import org.orekit.models.earth.IonosphericModel;
import org.orekit.models.earth.ionosphere.IonosphericModel;
import org.orekit.orbits.OrbitType;
import org.orekit.orbits.PositionAngle;
import org.orekit.propagation.Propagator;
......
......@@ -28,7 +28,7 @@ import org.orekit.estimation.measurements.EstimatedMeasurement;
import org.orekit.estimation.measurements.EstimationModifier;
import org.orekit.estimation.measurements.GroundStation;
import org.orekit.estimation.measurements.RangeRate;
import org.orekit.models.earth.DiscreteTroposphericModel;
import org.orekit.models.earth.troposphere.DiscreteTroposphericModel;
import org.orekit.propagation.FieldSpacecraftState;
import org.orekit.propagation.Propagator;
import org.orekit.propagation.SpacecraftState;
......
......@@ -28,7 +28,7 @@ import org.orekit.estimation.measurements.EstimatedMeasurement;
import org.orekit.estimation.measurements.EstimationModifier;
import org.orekit.estimation.measurements.GroundStation;
import org.orekit.estimation.measurements.Range;
import org.orekit.models.earth.DiscreteTroposphericModel;
import org.orekit.models.earth.troposphere.DiscreteTroposphericModel;
import org.orekit.propagation.FieldSpacecraftState;
import org.orekit.propagation.Propagator;
import org.orekit.propagation.SpacecraftState;
......
......@@ -26,7 +26,7 @@ import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.orekit.attitudes.AttitudeProvider;
import org.orekit.attitudes.FieldAttitude;
import org.orekit.models.earth.DiscreteTroposphericModel;
import org.orekit.models.earth.troposphere.DiscreteTroposphericModel;
import org.orekit.orbits.FieldCartesianOrbit;
import org.orekit.orbits.FieldOrbit;
import org.orekit.propagation.FieldSpacecraftState;
......
......@@ -25,7 +25,7 @@ import org.orekit.estimation.measurements.EstimatedMeasurement;
import org.orekit.estimation.measurements.EstimationModifier;
import org.orekit.estimation.measurements.GroundStation;
import org.orekit.estimation.measurements.TurnAroundRange;
import org.orekit.models.earth.IonosphericModel;
import org.orekit.models.earth.ionosphere.IonosphericModel;
import org.orekit.orbits.OrbitType;
import org.orekit.orbits.PositionAngle;
import org.orekit.propagation.Propagator;
......
......@@ -28,7 +28,7 @@ import org.orekit.estimation.measurements.EstimatedMeasurement;
import org.orekit.estimation.measurements.EstimationModifier;
import org.orekit.estimation.measurements.GroundStation;
import org.orekit.estimation.measurements.TurnAroundRange;
import org.orekit.models.earth.DiscreteTroposphericModel;
import org.orekit.models.earth.troposphere.DiscreteTroposphericModel;
import org.orekit.propagation.FieldSpacecraftState;
import org.orekit.propagation.Propagator;
import org.orekit.propagation.SpacecraftState;
......
......@@ -25,9 +25,9 @@ import org.hipparchus.analysis.differentiation.DerivativeStructure;
import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.orekit.forces.AbstractForceModel;
import org.orekit.forces.drag.atmosphere.Atmosphere;
import org.orekit.frames.Frame;
import org.orekit.frames.Transform;
import org.orekit.models.earth.atmosphere.Atmosphere;
import org.orekit.propagation.FieldSpacecraftState;
import org.orekit.propagation.SpacecraftState;
import org.orekit.propagation.events.EventDetector;
......
......@@ -17,7 +17,6 @@
package org.orekit.forces.drag;
import org.hipparchus.RealFieldElement;
import org.hipparchus.analysis.differentiation.DerivativeStructure;
import org.hipparchus.geometry.euclidean.threed.FieldRotation;
import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
import org.hipparchus.geometry.euclidean.threed.Rotation;
......@@ -100,25 +99,4 @@ public interface DragSensitive {
FieldRotation<T> rotation, T mass,
T density, FieldVector3D<T> relativeVelocity,
T[] parameters);
/** Compute acceleration due to drag, with parameters derivatives.
* @param date current date
* @param frame inertial reference frame for state (both orbit and attitude)
* @param position position of spacecraft in reference frame
* @param rotation orientation (attitude) of the spacecraft with respect to reference frame
* @param mass current mass
* @param density atmospheric density at spacecraft position
* @param relativeVelocity relative velocity of atmosphere with respect to spacecraft,
* in the same inertial frame as spacecraft orbit (m/s)
* @param parameters values of the force model parameters
* @param paramName name of the parameter with respect to which derivatives are required
* @return spacecraft acceleration in the same inertial frame as spacecraft orbit (m/s²)
* @deprecated Method not used anymore, should have been deleted in 9.0 but was left over. To be deleted in the next major version.
*/
@Deprecated
FieldVector3D<DerivativeStructure> dragAcceleration(AbsoluteDate date, Frame frame, Vector3D position,
Rotation rotation, double mass,
double density, Vector3D relativeVelocity,
double[] parameters, String paramName);
}
......@@ -17,8 +17,6 @@
package org.orekit.forces.drag;
import org.hipparchus.RealFieldElement;
import org.hipparchus.analysis.differentiation.DSFactory;
import org.hipparchus.analysis.differentiation.DerivativeStructure;
import org.hipparchus.geometry.euclidean.threed.FieldRotation;
import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
import org.hipparchus.geometry.euclidean.threed.Rotation;
......@@ -26,7 +24,6 @@ import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.FastMath;
import org.orekit.errors.OrekitException;
import org.orekit.errors.OrekitInternalError;
import org.orekit.errors.OrekitMessages;
import org.orekit.frames.Frame;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.FieldAbsoluteDate;
......@@ -58,9 +55,6 @@ public class IsotropicDrag implements DragSensitive {
/** Cross section (m²). */
private final double crossSection;
/** Factory for the DerivativeStructure instances. */
private final DSFactory factory;
/** Constructor with drag coefficient min/max set to ±∞.
* @param crossSection Surface (m²)
* @param dragCoeff drag coefficient
......@@ -89,7 +83,6 @@ public class IsotropicDrag implements DragSensitive {
throw new OrekitInternalError(oe);
}
this.crossSection = crossSection;
this.factory = new DSFactory(1, 1);
}
/** {@inheritDoc} */
......@@ -121,25 +114,4 @@ public class IsotropicDrag implements DragSensitive {
return new FieldVector3D<>(relativeVelocity.getNorm().multiply(density.multiply(dragCoeff).multiply(crossSection / 2)).divide(mass),
relativeVelocity);
}
/** {@inheritDoc} */
@Override
@Deprecated
public FieldVector3D<DerivativeStructure> dragAcceleration(final AbsoluteDate date, final Frame frame, final Vector3D position,
final Rotation rotation, final double mass,
final double density, final Vector3D relativeVelocity,
final double[] parameters,
final String paramName) {
if (!DRAG_COEFFICIENT.equals(paramName)) {
throw new OrekitException(OrekitMessages.UNSUPPORTED_PARAMETER_NAME, paramName, DRAG_COEFFICIENT);
}
final DerivativeStructure dragCoeffDS = factory.variable(0, parameters[0]);
return new FieldVector3D<>(dragCoeffDS.multiply(relativeVelocity.getNorm() * density * crossSection / (2 * mass)),
relativeVelocity);
}
}
......@@ -17,8 +17,6 @@
package org.orekit.forces.radiation;
import org.hipparchus.RealFieldElement;
import org.hipparchus.analysis.differentiation.DSFactory;
import org.hipparchus.analysis.differentiation.DerivativeStructure;
import org.hipparchus.geometry.euclidean.threed.FieldRotation;
import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
import org.hipparchus.geometry.euclidean.threed.Rotation;
......@@ -26,7 +24,6 @@ import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.FastMath;
import org.orekit.errors.OrekitException;
import org.orekit.errors.OrekitInternalError;
import org.orekit.errors.OrekitMessages;
import org.orekit.frames.Frame;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.FieldAbsoluteDate;
......@@ -80,9 +77,6 @@ public class IsotropicRadiationCNES95Convention implements RadiationSensitive {
/** Cross section (m²). */
private final double crossSection;
/** Factory for the DerivativeStructure instances. */
private final DSFactory factory;
/** Simple constructor.
* @param crossSection Surface (m²)
* @param alpha absorption coefficient α between 0.0 an 1.0
......@@ -94,7 +88,6 @@ public class IsotropicRadiationCNES95Convention implements RadiationSensitive {
alpha, SCALE, 0.0, 1.0);