Commit 1b243902 authored by Bryan Cazabonne's avatar Bryan Cazabonne
Browse files

Merge branch 'develop' into Issue-666

parents ec9875d8 e1ebee2b
......@@ -49,6 +49,8 @@ src/*/resources/*/unx*.405 -text
src/*/resources/*/*/unx*.405 -text
src/*/resources/*/unx*.406 -text
src/*/resources/*/*/unx*.406 -text
src/*/resources/*/lnx*.431 -text
src/*/resources/*/*/lnx*.431 -text
src/*/resources/inpop/*.dat -text
src/*/resources/gnss/ntrip/*.dat -text
......@@ -60,7 +60,7 @@ verify:warning:
# Cf. https://docs.gitlab.com/ee/user/project/merge_requests/test_coverage_visualization.html
coverage-import:
stage: visualize
image: haynes/jacoco2cobertura:1.0.4
image: haynes/jacoco2cobertura:1.0.8
script:
# Display total coverage
- "grep -o '<tfoot.*tfoot>' target/site/jacoco/index.html | sed 's:<[^>]*>: :g'"
......@@ -75,7 +75,9 @@ coverage-import:
- verify
artifacts:
reports:
cobertura: target/site/cobertura.xml
coverage_report:
coverage_format: cobertura
path: target/site/cobertura.xml
coverage: '/Total.*?([0-9]{1,3})%/'
changelog:
......
......@@ -11,8 +11,8 @@ elements (orbits, dates, attitude, frames, ...) and various algorithms to
handle them (conversions, propagations, pointing, events detection, orbit determination ...).
[![](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
[![](https://sonar.orekit.org/api/project_badges/measure?project=orekit%3Aorekit&metric=alert_status)](https://sonar.orekit.org/dashboard?id=org.orekit%3Aorekit)
[![](https://sonar.orekit.org/api/project_badges/measure?project=orekit%3Aorekit&metric=coverage)](https://sonar.orekit.org/dashboard?id=org.orekit%3Aorekit)
[![](https://sonar.orekit.org/api/project_badges/measure?project=orekit%3Aorekit&metric=alert_status)](https://sonar.orekit.org/dashboard?id=orekit%3Aorekit)
[![](https://sonar.orekit.org/api/project_badges/measure?project=orekit%3Aorekit&metric=coverage)](https://sonar.orekit.org/dashboard?id=orekit%3Aorekit)
## Download
......
......@@ -18,7 +18,7 @@
<property name="lib.dir" location="lib" />
<property name="hipparchus.version" value="2.0" />
<property name="hipparchus.version" value="2.1" />
<property name="hipparchus.core.jar" value="hipparchus-core-${hipparchus.version}.jar" />
<property name="hipparchus.geometry.jar" value="hipparchus-geometry-${hipparchus.version}.jar" />
<property name="hipparchus.ode.jar" value="hipparchus-ode-${hipparchus.version}.jar" />
......
......@@ -33,7 +33,7 @@
<orekit.maven-jxr-plugin.version>3.1.1</orekit.maven-jxr-plugin.version>
<orekit.plantuml-maven-plugin.version>1.2</orekit.plantuml-maven-plugin.version>
<orekit.plantuml.version>1.2021.10</orekit.plantuml.version>
<orekit.maven-project-info-reports-plugin.version>3.1.2</orekit.maven-project-info-reports-plugin.version>
<orekit.maven-project-info-reports-plugin.version>3.2.1</orekit.maven-project-info-reports-plugin.version>
<orekit.maven-resources-plugin.version>3.2.0</orekit.maven-resources-plugin.version>
<orekit.maven-site-plugin.version>3.9.1</orekit.maven-site-plugin.version>
<orekit.maven-wagon-ssh-plugin.version>3.4.1</orekit.maven-wagon-ssh-plugin.version>
......@@ -50,7 +50,7 @@
<orekit.maven-install-plugin.version>3.0.0-M1</orekit.maven-install-plugin.version>
<orekit.mathjax.config>&lt;script type=&quot;text/x-mathjax-config&quot;&gt;MathJax.Hub.Config({ TeX: { extensions: [&quot;autoload.js&quot;]}});&lt;/script&gt;</orekit.mathjax.config>
<orekit.mathjax.enable>&lt;script type=&quot;text/javascript&quot; src=&quot;https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS_CHTML&quot;&gt;&lt;/script&gt;</orekit.mathjax.enable>
<orekit.hipparchus.version>2.0</orekit.hipparchus.version>
<orekit.hipparchus.version>2.1</orekit.hipparchus.version>
<orekit.junit.version>4.13.2</orekit.junit.version>
<orekit.compiler.source>1.8</orekit.compiler.source>
<orekit.compiler.target>1.8</orekit.compiler.target>
......@@ -200,6 +200,9 @@
<contributor>
<name>Daniel Aguilar Taboada</name>
</contributor>
<contributor>
<name>Louis Aucouturier</name>
</contributor>
<contributor>
<name>Lucian B&#259;rbulescu</name>
</contributor>
......@@ -324,7 +327,7 @@
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
......@@ -583,6 +586,11 @@
<artifactId>maven-jxr-plugin</artifactId>
<version>${orekit.maven-jxr-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>${orekit.maven-project-info-reports-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
......
......@@ -21,6 +21,151 @@
</properties>
<body>
<release version="11.2" date="TBD" description="TBD">
<action dev="bryan" type="update" issue="895">
Allowed parsing of SP3 files without EOF key.
</action>
<action dev="gc" type="add" issue="790">
Added writing of velocity record in CPF file writers.
</action>
<action dev="bryan" type="update" issue="804">
Added support for loading EOP from Sinex files.
</action>
<action dev="luc" type="fix" issue="936">
Raised a too stringent convergence threshold in Eackstein-Hechler model.
</action>
<action dev="bryan" type="add" issue="932">
Added a way to compute mean parameters in Brouwer-Lyddane model.
</action>
<action dev="markrutten" type="add" issue="922">
Added bistatic range measurement.
</action>
<action dev="luc" type="add" issue="933">
Added a way to compute mean parameters in Eckstein-Hechler model.
</action>
<action dev="luc" type="update" issue="934">
Updated CCSDS ODM to latest draft version (pink book).
</action>
<action dev="luc" type="fix" issue="930">
Prevents zero max check intervals in maneuvers triggers detectors.
</action>
<action dev="luc" type="add">
Added detection of non-positive max check interval and threshold.
</action>
<action dev="luc" type="add" issue="929">
Allow additional derivatives providers to update main state derivatives.
</action>
<action dev="luc" type="fix" issue="928">
Fixed indexing error when estimating a subset of orbital parameters.
</action>
<action dev="luc" type="update" issue="925">
Don't loose additional derivatives when generating ephemeris.
</action>
<action dev="gc" type="fix" issue="889">
Fixed unexpected behavior of two tests in OrekitMessagesTest.
</action>
<action dev="mvanel" type="add" issue="777">
Added support for parsing and writing CDM files in both KVN and XML formats.
</action>
<action dev="luc" type="add" issue="918">
Added support for ITRF-2020.
</action>
<action dev="pascal" type="add" issue="911">
Added TDOA and bistatic range rate measurements.
</action>
<action dev="bryan" type="add" issue="900">
Added init method in {Field}AdditionalStateProvider.
</action>
<action dev="louis" type="add" issue="888">
Added J2-contribution for relativistic clock correction.
</action>
<action dev="evan" type="update">
Allow creating Geoid without default data context.
</action>
<action dev="louis" type="add" issue="759">
Added data loaders for Space Environment's JB2008 data.
</action>
<action dev="bryan" type="add" issue="898">
Added static method to create a BodyFacade from a CenterName.
</action>
<action dev="evan" type="update" issue="903">
Added Frame.getStaticTransformTo(...) and supporting methods to improve
performance.
</action>
</release>
<release version="11.1.2" date="2022-04-27"
description="Version 11.1.2 is a patch release of Orekit.
It fixes issues related to the parsing and writing of CCSDS and ILRS files.
It also fixes issues in ECOM2 solar radiation pressure model, event bracketing,
ephemeris generation, and NTW local orbital frame.
Finally it includes some improvements in the class documentation">
<action dev="luc" type="fix" issue="917">
Fixed missing tags in XML generation by EphemerisWriter.
</action>
<action dev="louis" type="fix" issue="886">
Fixed rollover in CRD parser.
</action>
<action dev="louis" type="fix" issue="786">
Fixed NaNs when constructing Keplerian orbit from PV
computed from KeplerianOrbit.
</action>
<action dev="louis" type="fix" issue="826">
Fixed ephemeris generation using PropagatorParallelizer.
</action>
<action dev="luc" type="fix" issue="921">
Fixed event bracketing problem induced by numerical noise at end of search interval.
</action>
<action dev="luc" type="fix" issue="919">
Fixed ephemeris generation with several derivatives providers.
</action>
<action dev="maxime" type="fix" issue="909">
Fixed wrong implementation of NTW LOF frame.
</action>
<action dev="bryan" type="fix" issue="910">
Fixed eD and eY equation in ECOM2 model.
</action>
<action dev="pascal" type="fix" issue="908">
Fixed unmanaged comment in OMM.
</action>
<action dev="pascal" type="fix" issue="906">
Fixed unmanaged units in OMM.
</action>
<action dev="evan" type="fix" issue="882">
Fix StreamingOemWriter in ITRF and without optional fields.
</action>
<action dev="evan" type="fix" issue="912">
Fix StreamingOemWriter without acceleration.
</action>
<action dev="luc" type="fix" issue="184">
Fixed non-bracketing issue when RESET_STATE slightly moves an event at the start
of a step and another regular event happens in the first half of the same step
</action>
</release>
<release version="11.1.1" date="2022-03-17"
description="Version 11.1.1 is a patch release of Orekit.
It fixes issues related to the parsing of SP3 and Rinex files. It also takes
additional derivatives into account in {Field}SpacecraftState.shiftedBy method.
Finally it includes some improvements in the class documentation">
<action dev="lars" type="add" issue="896">
Added Git configuration instructions in contributing guide.
</action>
<action dev="lars" type="fix" issue="897">
Corrected wrong path in release guide.
</action>
<action dev="bryan" type="fix" issue="894">
Fixed dead link in contributing guidelines.
</action>
<action dev="bryan" type="fix" issue="698">
Added missing BDS-3 signal for Rinex 3.04.
</action>
<action dev="bryan" type="fixed" issue="892">
Removed check of not supported keys in RinexLoader.
</action>
<action dev="lirw1984" type="update" issue="895">
Enhanced parsing of SP3 files.
</action>
<action dev="luc" type="add" issue="902">
Take additional derivatives into account in {Field}SpacecraftState.shiftedBy.
</action>
</release>
<release version="11.1" date="2022-02-14"
description="Version 11.1 is a minor release of Orekit.
......
......@@ -31,6 +31,7 @@ import org.orekit.errors.OrekitException;
import org.orekit.errors.OrekitMessages;
import org.orekit.frames.FieldTransform;
import org.orekit.frames.Frame;
import org.orekit.frames.StaticTransform;
import org.orekit.frames.Transform;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.FieldAbsoluteDate;
......@@ -104,18 +105,24 @@ public class LofOffsetPointing extends GroundPointing {
final AbsoluteDate shifted = date.shiftedBy(i * h);
// transform from specified reference frame to spacecraft frame
final Transform refToSc =
new Transform(shifted,
new Transform(shifted, pvProv.getPVCoordinates(shifted, frame).negate()),
new Transform(shifted, attitudeLaw.getAttitude(pvProv, shifted, frame).getOrientation()));
final StaticTransform refToSc = StaticTransform.compose(
shifted,
StaticTransform.of(
shifted,
pvProv.getPVCoordinates(shifted, frame).getPosition().negate()),
StaticTransform.of(
shifted,
attitudeLaw.getAttitude(pvProv, shifted, frame).getRotation()));
// transform from specified reference frame to body frame
final Transform refToBody = frame.getTransformTo(shape.getBodyFrame(), shifted);
final StaticTransform refToBody;
if (i == 0) {
centralRefToBody = refToBody;
refToBody = centralRefToBody = frame.getTransformTo(shape.getBodyFrame(), shifted);
} else {
refToBody = frame.getStaticTransformTo(shape.getBodyFrame(), shifted);
}
sample.add(losIntersectionWithBody(new Transform(shifted, refToSc.getInverse(), refToBody)));
sample.add(losIntersectionWithBody(StaticTransform.compose(shifted, refToSc.getInverse(), refToBody)));
}
......@@ -170,7 +177,7 @@ public class LofOffsetPointing extends GroundPointing {
* @param scToBody transform from spacecraft frame to body frame
* @return intersection point in body frame (only the position is set!)
*/
private TimeStampedPVCoordinates losIntersectionWithBody(final Transform scToBody) {
private TimeStampedPVCoordinates losIntersectionWithBody(final StaticTransform scToBody) {
// compute satellite pointing axis and position/velocity in body frame
final Vector3D pointingBodyFrame = scToBody.transformVector(satPointingVector);
......
......@@ -27,6 +27,7 @@ import org.orekit.bodies.FieldGeodeticPoint;
import org.orekit.bodies.GeodeticPoint;
import org.orekit.frames.FieldTransform;
import org.orekit.frames.Frame;
import org.orekit.frames.StaticTransform;
import org.orekit.frames.Transform;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.FieldAbsoluteDate;
......@@ -74,11 +75,11 @@ public class NadirPointing extends GroundPointing {
// sample intersection points in current date neighborhood
final double h = 0.01;
final List<TimeStampedPVCoordinates> sample = new ArrayList<>();
sample.add(nadirRef(pvProv.getPVCoordinates(date.shiftedBy(-2 * h), frame), refToBody.shiftedBy(-2 * h)));
sample.add(nadirRef(pvProv.getPVCoordinates(date.shiftedBy(-h), frame), refToBody.shiftedBy(-h)));
sample.add(nadirRef(pvProv.getPVCoordinates(date.shiftedBy(-2 * h), frame), refToBody.staticShiftedBy(-2 * h)));
sample.add(nadirRef(pvProv.getPVCoordinates(date.shiftedBy(-h), frame), refToBody.staticShiftedBy(-h)));
sample.add(nadirRef(pvProv.getPVCoordinates(date, frame), refToBody));
sample.add(nadirRef(pvProv.getPVCoordinates(date.shiftedBy(+h), frame), refToBody.shiftedBy(+h)));
sample.add(nadirRef(pvProv.getPVCoordinates(date.shiftedBy(+2 * h), frame), refToBody.shiftedBy(+2 * h)));
sample.add(nadirRef(pvProv.getPVCoordinates(date.shiftedBy(+h), frame), refToBody.staticShiftedBy(+h)));
sample.add(nadirRef(pvProv.getPVCoordinates(date.shiftedBy(+2 * h), frame), refToBody.staticShiftedBy(+2 * h)));
// use interpolation to compute properly the time-derivatives
return TimeStampedPVCoordinates.interpolate(date, CartesianDerivativesFilter.USE_P, sample);
......@@ -112,7 +113,8 @@ public class NadirPointing extends GroundPointing {
* @param refToBody transform from reference frame to body frame
* @return intersection point in body frame (only the position is set!)
*/
private TimeStampedPVCoordinates nadirRef(final TimeStampedPVCoordinates scRef, final Transform refToBody) {
private TimeStampedPVCoordinates nadirRef(final TimeStampedPVCoordinates scRef,
final StaticTransform refToBody) {
final Vector3D satInBodyFrame = refToBody.transformPosition(scRef.getPosition());
......
......@@ -32,6 +32,7 @@ import org.orekit.errors.OrekitException;
import org.orekit.errors.OrekitInternalError;
import org.orekit.frames.FieldTransform;
import org.orekit.frames.Frame;
import org.orekit.frames.StaticTransform;
import org.orekit.frames.Transform;
import org.orekit.frames.TransformProvider;
import org.orekit.time.AbsoluteDate;
......@@ -219,6 +220,29 @@ class JPLCelestialBody implements CelestialBody {
}
@Override
public StaticTransform getStaticTransform(final AbsoluteDate date) {
// compute translation from parent frame to self
final PVCoordinates pv = getPVCoordinates(date, definingFrame);
// compute rotation from ICRF frame to self,
// as per the "Report of the IAU/IAG Working Group on Cartographic
// Coordinates and Rotational Elements of the Planets and Satellites"
// These definitions are common for all recent versions of this report
// published every three years, the precise values of pole direction
// and W angle coefficients may vary from publication year as models are
// adjusted. These coefficients are not in this class, they are in the
// specialized classes that do implement the getPole and getPrimeMeridianAngle
// methods
final Vector3D pole = iauPole.getPole(date);
final Vector3D qNode = iauPole.getNode(date);
final Rotation rotation =
new Rotation(pole, qNode, Vector3D.PLUS_K, Vector3D.PLUS_I);
// update transform from parent to self
return StaticTransform.of(date, pv.getPosition().negate(), rotation);
}
/** {@inheritDoc} */
public <T extends CalculusFieldElement<T>> FieldTransform<T> getTransform(final FieldAbsoluteDate<T> date) {
......
......@@ -31,6 +31,7 @@ import org.hipparchus.util.MathArrays;
import org.hipparchus.util.SinCos;
import org.orekit.frames.FieldTransform;
import org.orekit.frames.Frame;
import org.orekit.frames.StaticTransform;
import org.orekit.frames.Transform;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.FieldAbsoluteDate;
......@@ -169,7 +170,8 @@ public class OneAxisEllipsoid extends Ellipsoid implements BodyShape {
final Frame frame, final AbsoluteDate date) {
// transform line and close to body frame
final Transform frameToBodyFrame = frame.getTransformTo(bodyFrame, date);
final StaticTransform frameToBodyFrame =
frame.getStaticTransformTo(bodyFrame, date);
final Line lineInBodyFrame = frameToBodyFrame.transformLine(line);
// compute some miscellaneous variables
......@@ -344,7 +346,7 @@ public class OneAxisEllipsoid extends Ellipsoid implements BodyShape {
public Vector3D projectToGround(final Vector3D point, final AbsoluteDate date, final Frame frame) {
// transform point to body frame
final Transform toBody = frame.getTransformTo(bodyFrame, date);
final StaticTransform toBody = frame.getStaticTransformTo(bodyFrame, date);
final Vector3D p = toBody.transformPosition(point);
final double z = p.getZ();
final double r = FastMath.hypot(p.getX(), p.getY());
......@@ -423,7 +425,8 @@ public class OneAxisEllipsoid extends Ellipsoid implements BodyShape {
public GeodeticPoint transform(final Vector3D point, final Frame frame, final AbsoluteDate date) {
// transform point to body frame
final Vector3D pointInBodyFrame = frame.getTransformTo(bodyFrame, date).transformPosition(point);
final Vector3D pointInBodyFrame = frame.getStaticTransformTo(bodyFrame, date)
.transformPosition(point);
final double r2 = pointInBodyFrame.getX() * pointInBodyFrame.getX() +
pointInBodyFrame.getY() * pointInBodyFrame.getY();
final double r = FastMath.sqrt(r2);
......
......@@ -333,7 +333,8 @@ public enum OrekitMessages implements Localizable {
FIND_ROOT("{0} failed to find root between {1} (g={2,number,0.0##############E0}) and {3} (g={4,number,0.0##############E0})\nLast iteration at {5} (g={6,number,0.0##############E0})"),
BACKWARD_PROPAGATION_NOT_ALLOWED("backward propagation not allowed here"),
NO_STATION_ECCENTRICITY_FOR_EPOCH("no station eccentricity values for the given epoch {0}, validity interval is between {1} and {2}"),
INCONSISTENT_SELECTION("inconsistent parameters selection between pairs {0}/{1} and {2}/{3}");
INCONSISTENT_SELECTION("inconsistent parameters selection between pairs {0}/{1} and {2}/{3}"),
NOT_STRICTLY_POSITIVE("value is not strictly positive: {0}");
// CHECKSTYLE: resume JavadocVariable check
......
......@@ -61,7 +61,8 @@ public class IodGibbs {
* @param p1 First position measurement
* @param p2 Second position measurement
* @param p3 Third position measurement
* @return an initial orbit estimation
* @return an initial orbit estimation at the central date
* (i.e., date of the second position measurement)
* @since 11.0
*/
public KeplerianOrbit estimate(final Frame frame, final Position p1, final Position p2, final Position p3) {
......@@ -78,7 +79,8 @@ public class IodGibbs {
* @param pv1 PV measure 1 taken in frame
* @param pv2 PV measure 2 taken in frame
* @param pv3 PV measure 3 taken in frame
* @return an initial orbit estimation
* @return an initial orbit estimation at the central date
* (i.e., date of the second PV measurement)
*/
public KeplerianOrbit estimate(final Frame frame, final PV pv1, final PV pv2, final PV pv3) {
return estimate(frame,
......@@ -97,7 +99,8 @@ public class IodGibbs {
* @param date2 date of measure 2
* @param r3 position 3 measured in frame
* @param date3 date of measure 3
* @return an initial orbit estimation
* @return an initial orbit estimation at the central date
* (i.e., date of the second position measurement)
*/
public KeplerianOrbit estimate(final Frame frame,
final Vector3D r1, final AbsoluteDate date1,
......
......@@ -131,7 +131,8 @@ public class IodGooding {
* @param rho3init initial guess of the range problem. range 3, in meters
* @param nRev number of complete revolutions between observation 1 and 3
* @param direction true if posigrade (short way)
* @return an estimate of the Keplerian orbit
* @return an estimate of the Keplerian orbit at the central date
* (i.e., date of the second angular observation)
* @since 11.0
*/
public KeplerianOrbit estimate(final Frame frame, final AngularRaDec raDec1,
......@@ -155,7 +156,8 @@ public class IodGooding {
* @param raDec3 third angular observation
* @param rho1init initial guess of the range problem. range 1, in meters
* @param rho3init initial guess of the range problem. range 3, in meters
* @return an estimate of the Keplerian orbit
* @return an estimate of the Keplerian orbit at the central date
* (i.e., date of the second angular observation)
* @since 11.0
*/
public KeplerianOrbit estimate(final Frame frame, final AngularRaDec raDec1,
......@@ -179,7 +181,8 @@ public class IodGooding {
* @param rho3init initial guess of the range problem. range 3, in meters
* @param nRev number of complete revolutions between observation1 and 3
* @param direction true if posigrade (short way)
* @return an estimate of the Keplerian orbit
* @return an estimate of the Keplerian orbit at the central date
* (i.e., date of the second angular observation)
*/
public KeplerianOrbit estimate(final Frame frame, final Vector3D O1, final Vector3D O2, final Vector3D O3,
final Vector3D lineOfSight1, final AbsoluteDate dateObs1,
......@@ -235,7 +238,8 @@ public class IodGooding {
* @param dateObs3 date of observation 1
* @param rho1init initial guess of the range problem. range 1, in meters
* @param rho3init initial guess of the range problem. range 3, in meters
* @return an estimate of the Keplerian orbit
* @return an estimate of the Keplerian orbit at the central date
* (i.e., date of the second angular observation)
*/
public KeplerianOrbit estimate(final Frame frame, final Vector3D O1, final Vector3D O2, final Vector3D O3,
final Vector3D lineOfSight1, final AbsoluteDate dateObs1,
......
......@@ -78,7 +78,7 @@ public class IodLambert {
* @param nRev number of revolutions
* @param p1 first position measurement
* @param p2 second position measurement
* @return an initial orbit estimation
* @return an initial Keplerian orbit estimation at the first observation date t1
* @since 11.0
*/
public KeplerianOrbit estimate(final Frame frame, final boolean posigrade,
......@@ -117,7 +117,7 @@ public class IodLambert {
* @param t1 date of observation 1
* @param p2 position vector 2
* @param t2 date of observation 2
* @return an initial Keplerian orbit estimate
* @return an initial Keplerian orbit estimate at the first observation date t1
*/
public KeplerianOrbit estimate(final Frame frame, final boolean posigrade,
final int nRev,
......
......@@ -60,7 +60,7 @@ public class IodLaplace {
* @param raDec1 first angular observation
* @param raDec2 second angular observation
* @param raDec3 third angular observation
* @return estimate of the orbit at the central date or null if
* @return estimate of the orbit at the central date obsDate2 or null if
* no estimate is possible with the given data
* @since 11.0
*/
......@@ -83,7 +83,7 @@ public class IodLaplace {
* @param los2 line of sight unit vector 2
* @param obsDate3 date of observation 3
* @param los3 line of sight unit vector 3
* @return estimate of the orbit at the central date dateObs2 or null if
* @return estimate of the orbit at the central date obsDate2 or null if
* no estimate is possible with the given data
*/
public CartesianOrbit estimate(final Frame frame, final PVCoordinates obsPva,
......
......@@ -82,6 +82,11 @@ public abstract class AbstractBatchLSModel implements MultivariateJacobianFuncti
/** End columns for each estimated orbit. */
private final int[] orbitsEndColumns;
/** Indirection array in measurements jacobians.
* @since 11.2
*/
private final int[] orbitsJacobianColumns;
/** Map for propagation parameters columns. */
private final Map<String, Integer> propagationParameterColumns;
......@@ -167,13 +172,18 @@ public abstract class AbstractBatchLSModel implements MultivariateJacobianFuncti
rows += measurement.getDimension();
}
this.orbitsStartColumns = new int[builders.length];
this.orbitsEndColumns = new int[builders.length];
this.orbitsStartColumns = new int[builders.length];
this.orbitsEndColumns = new int[builders.length];
this.orbitsJacobianColumns = new int[builders.length * 6];
Arrays.fill(orbitsJacobianColumns, -1);
int columns = 0;
for (int i = 0; i < builders.length; ++i) {
this.orbitsStartColumns[i] = columns;
for (final ParameterDriver driver : builders[i].getOrbitalParametersDrivers().getDrivers()) {
if (driver.isSelected()) {
final List<ParameterDriversList.DelegatingDriver> orbitalParametersDrivers =
builders[i].getOrbitalParametersDrivers().getDrivers();
for (int j = 0; j < orbitalParametersDrivers.size(); ++j) {
if (orbitalParametersDrivers.get(j).isSelected()) {
orbitsJacobianColumns[columns] = j;
++columns;
}
}
......@@ -193,6 +203,7 @@ public abstract class AbstractBatchLSModel implements MultivariateJacobianFuncti
}
}
}
// Populate the map of propagation drivers' columns and update the total number of columns
propagationParameterColumns = new HashMap<>(estimatedPropagationParametersNames.size());
for (final String driverName : estimatedPropagationParametersNames) {
......@@ -457,11 +468,12 @@ public abstract class AbstractBatchLSModel implements MultivariateJacobianFuncti
final RealMatrix dYdY0 = harvesters[p].getStateTransitionMatrix(evaluationStates[k]);
final RealMatrix dMdY0 = dMdY.multiply(dYdY0);
for (int i = 0; i < dMdY0.getRowDimension(); ++i) {
int jOrb = orbitsStartColumns[p];
for (int j = 0; j < dMdY0.getColumnDimension(); ++j) {
final ParameterDriver driver = selectedOrbitalDrivers.getDrivers().get(j);
jacobian.setEntry(index + i, jOrb++,
weight[i] * dMdY0.getEntry(i, j) / sigma[i] * driver.getScale());
for (int j = orbitsStartColumns[p]; j < orbitsEndColumns[p]; ++j) {
final ParameterDriver driver =
selectedOrbitalDrivers.getDrivers().get(j - orbitsStartColumns[p]);
final double partial = dMdY0.getEntry(i, orbitsJacobianColumns[j]);
jacobian.setEntry(index + i, j,
weight[i] * partial / sigma[i] * driver.getScale());
}
}
}
......
/* Copyright 2002-2022 Mark Rutten
* 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.
* Mark Rutten 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
*