Commit a3f4bcb0 authored by Bryan Cazabonne's avatar Bryan Cazabonne

Merge branch 'release-10.3'

parents b0a55561 d84dbbd1
......@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.orekit</groupId>
<artifactId>orekit-tutorials</artifactId>
<version>10.2</version>
<version>10.3</version>
<name>Orekit Tutorials</name>
<url>http://www.orekit.org/</url>
<inceptionYear>2002</inceptionYear>
......@@ -13,22 +13,22 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<orekit-tutorials.spotbugs-maven-plugin.version>4.0.4</orekit-tutorials.spotbugs-maven-plugin.version>
<orekit-tutorials.spotbugs-maven-plugin.version>4.1.4</orekit-tutorials.spotbugs-maven-plugin.version>
<orekit-tutorials.maven-changes-plugin.version>2.12.1</orekit-tutorials.maven-changes-plugin.version>
<orekit-tutorials.maven-checkstyle-plugin.version>3.1.1</orekit-tutorials.maven-checkstyle-plugin.version>
<orekit-tutorials.checkstyle.version>8.33</orekit-tutorials.checkstyle.version>
<orekit-tutorials.checkstyle.version>8.38</orekit-tutorials.checkstyle.version>
<orekit-tutorials.maven-compiler-plugin.version>3.8.1</orekit-tutorials.maven-compiler-plugin.version>
<orekit-tutorials.maven-javadoc-plugin.version>3.2.0</orekit-tutorials.maven-javadoc-plugin.version>
<orekit-tutorials.maven-project-info-reports-plugin.version>3.1.0</orekit-tutorials.maven-project-info-reports-plugin.version>
<orekit-tutorials.maven-resources-plugin.version>3.1.0</orekit-tutorials.maven-resources-plugin.version>
<orekit-tutorials.maven-project-info-reports-plugin.version>3.1.1</orekit-tutorials.maven-project-info-reports-plugin.version>
<orekit-tutorials.maven-resources-plugin.version>3.2.0</orekit-tutorials.maven-resources-plugin.version>
<orekit-tutorials.maven-site-plugin.version>3.9.1</orekit-tutorials.maven-site-plugin.version>
<orekit-tutorials.maven-wagon-ssh-plugin.version>3.4.1</orekit-tutorials.maven-wagon-ssh-plugin.version>
<orekit-tutorials.maven-source-plugin.version>3.2.1</orekit-tutorials.maven-source-plugin.version>
<orekit-tutorials.build-helper-maven-plugin.version>3.2.0</orekit-tutorials.build-helper-maven-plugin.version>
<orekit-tutorials.maven-gpg-plugin.version>1.6</orekit-tutorials.maven-gpg-plugin.version>
<orekit-tutorials.maven-install-plugin.version>3.0.0-M1</orekit-tutorials.maven-install-plugin.version>
<orekit-tutorials.orekit.version>10.2</orekit-tutorials.orekit.version>
<orekit-tutorials.hipparchus.version>1.7</orekit-tutorials.hipparchus.version>
<orekit-tutorials.orekit.version>10.3</orekit-tutorials.orekit.version>
<orekit-tutorials.hipparchus.version>1.8</orekit-tutorials.hipparchus.version>
<orekit-tutorials.jackson.version>2.9.9</orekit-tutorials.jackson.version>
<orekit-tutorials.compiler.source>1.8</orekit-tutorials.compiler.source>
<orekit-tutorials.compiler.target>1.8</orekit-tutorials.compiler.target>
......
......@@ -20,6 +20,19 @@
<title>Orekit Tutorials Changes</title>
</properties>
<body>
<release version="10.3" date="2020-12-21"
description="Version 10.3 is a minor release of Orekit tutorials.
It includes both new features and bug fixes. New features introduced
in 10.3 are: a new tutorial for constant thrust maneuvers and a
new tutorial for impulsive maneuvers.
See the list below for a full description of the changes.">
<action dev="luc" type="add" issue="7">
Added tutorial for constant thrust maneuvers.
</action>
<action dev="luc" type="add" issue="7">
Added tutorial for impulsive maneuvers.
</action>
</release>
<release version="10.2" date="2020-07-16"
description="Version 10.2 is the second release of the Orekit Tutorials.
The version number is 10.2 to follow Orekit version number.
......
......@@ -81,7 +81,7 @@ public class KeyValueFileParser<Key extends Enum<Key>> {
* {@code key[i]=value} lines. Blank lines and lines starting with '#'
* (after whitespace trimming) are silently ignored. The equal sign may
* be surrounded by space characters. Keys must correspond to the
* {@link Key} enumerate constants, given that matching is not case
* <code>Key</code> enumerate constants, given that matching is not case
* sensitive and that '_' characters may appear as '.' characters in
* the file. This means that the lines:
* <pre>
......
......@@ -111,7 +111,7 @@ public class DSSTOrbitDetermination extends AbstractOrbitDetermination<DSSTPropa
final double positionScale) {
final EquinoctialOrbit equiOrbit = (EquinoctialOrbit) OrbitType.EQUINOCTIAL.convertType(referenceOrbit);
return new DSSTPropagatorBuilder(equiOrbit, builder, positionScale,
PropagationType.MEAN, PropagationType.MEAN);
PropagationType.OSCULATING, PropagationType.OSCULATING);
}
/** {@inheritDoc} */
......@@ -128,14 +128,11 @@ public class DSSTOrbitDetermination extends AbstractOrbitDetermination<DSSTPropa
// tesseral terms
final DSSTForceModel tesseral = new DSSTTesseral(body.getBodyFrame(),
Constants.WGS84_EARTH_ANGULAR_VELOCITY, gravityField,
gravityField.getMaxDegree(), gravityField.getMaxOrder(), 4, 12,
gravityField.getMaxDegree(), gravityField.getMaxOrder(), 4);
Constants.WGS84_EARTH_ANGULAR_VELOCITY, gravityField);
propagatorBuilder.addForceModel(tesseral);
// zonal terms
final DSSTForceModel zonal = new DSSTZonal(gravityField, gravityField.getMaxDegree(), 4,
2 * gravityField.getMaxDegree() + 1);
final DSSTForceModel zonal = new DSSTZonal(gravityField);
propagatorBuilder.addForceModel(zonal);
// gather all drivers
......
......@@ -28,9 +28,11 @@ import org.orekit.bodies.CelestialBody;
import org.orekit.bodies.OneAxisEllipsoid;
import org.orekit.errors.OrekitException;
import org.orekit.forces.ForceModel;
import org.orekit.forces.PolynomialParametricAcceleration;
import org.orekit.forces.drag.DragForce;
import org.orekit.forces.drag.DragSensitive;
import org.orekit.forces.empirical.AccelerationModel;
import org.orekit.forces.empirical.ParametricAcceleration;
import org.orekit.forces.empirical.PolynomialAccelerationModel;
import org.orekit.forces.gravity.HolmesFeatherstoneAttractionModel;
import org.orekit.forces.gravity.OceanTides;
import org.orekit.forces.gravity.Relativity;
......@@ -191,8 +193,8 @@ public class KalmanNumericalOrbitDetermination extends AbstractOrbitDeterminatio
@Override
protected ParameterDriver[] setPolynomialAcceleration(final NumericalPropagatorBuilder propagatorBuilder,
final String name, final Vector3D direction, final int degree) {
final ForceModel polynomialModel = new PolynomialParametricAcceleration(direction, true, name, null, degree);
propagatorBuilder.addForceModel(polynomialModel);
final AccelerationModel accModel = new PolynomialAccelerationModel(name, null, degree);
final ForceModel polynomialModel = new ParametricAcceleration(direction, true, accModel); propagatorBuilder.addForceModel(polynomialModel);
return polynomialModel.getParametersDrivers();
}
......
/* Copyright 2002-2020 CS GROUP
* Licensed to CS GROUP (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (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.tutorials.estimation;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.NoSuchElementException;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.FastMath;
import org.orekit.attitudes.AttitudeProvider;
import org.orekit.bodies.CelestialBody;
import org.orekit.bodies.OneAxisEllipsoid;
import org.orekit.data.DataContext;
import org.orekit.errors.OrekitException;
import org.orekit.forces.ForceModel;
import org.orekit.forces.drag.DragForce;
import org.orekit.forces.drag.DragSensitive;
import org.orekit.forces.empirical.AccelerationModel;
import org.orekit.forces.empirical.ParametricAcceleration;
import org.orekit.forces.empirical.PolynomialAccelerationModel;
import org.orekit.forces.gravity.HolmesFeatherstoneAttractionModel;
import org.orekit.forces.gravity.OceanTides;
import org.orekit.forces.gravity.Relativity;
import org.orekit.forces.gravity.SolidTides;
import org.orekit.forces.gravity.ThirdBodyAttraction;
import org.orekit.forces.gravity.potential.GravityFieldFactory;
import org.orekit.forces.gravity.potential.NormalizedSphericalHarmonicsProvider;
import org.orekit.forces.radiation.RadiationSensitive;
import org.orekit.forces.radiation.SolarRadiationPressure;
import org.orekit.models.earth.atmosphere.Atmosphere;
import org.orekit.models.earth.atmosphere.NRLMSISE00;
import org.orekit.models.earth.atmosphere.data.CssiSpaceWeatherData;
import org.orekit.orbits.Orbit;
import org.orekit.orbits.PositionAngle;
import org.orekit.propagation.conversion.NumericalPropagatorBuilder;
import org.orekit.propagation.conversion.ODEIntegratorBuilder;
import org.orekit.time.TimeScalesFactory;
import org.orekit.tutorials.estimation.common.AbstractOrbitDetermination;
import org.orekit.tutorials.estimation.common.TutorialOrbitDetermination;
import org.orekit.tutorials.yaml.TutorialForceModel.TutorialGravity;
import org.orekit.utils.IERSConventions;
import org.orekit.utils.ParameterDriver;
/** Orekit tutorial for orbit determination based on laser ranging data.
* @author Bryan Cazabonne
*/
public class LaserRangingOrbitDetermination extends AbstractOrbitDetermination<NumericalPropagatorBuilder> {
/** Gravity field. */
private NormalizedSphericalHarmonicsProvider gravityField;
/** Earth body. */
private OneAxisEllipsoid earth;
/** Program entry point.
* @param args program arguments (unused here)
*/
public static void main(final String[] args) {
try {
// input in tutorial resources directory
final String inputPath = NumericalOrbitDetermination.class.getClassLoader().
getResource("slr-od/slr-orbit-determination.yaml").toURI().getPath();
new LaserRangingOrbitDetermination().run(new File(inputPath));
} catch (URISyntaxException | IOException | OrekitException e) {
System.err.println(e.getLocalizedMessage());
System.exit(1);
}
}
/** {@inheritDoc} */
@Override
protected void createGravityField(final TutorialOrbitDetermination inputData)
throws NoSuchElementException {
final TutorialGravity gravity = inputData.getPropagator().getForceModels().getGravity();
final int degree = gravity.getDegree();
final int order = FastMath.min(degree, gravity.getOrder());
gravityField = GravityFieldFactory.getNormalizedProvider(degree, order);
}
/** {@inheritDoc} */
@Override
protected double getMu() {
return gravityField.getMu();
}
/** {@inheritDoc} */
@Override
protected NumericalPropagatorBuilder createPropagatorBuilder(final Orbit referenceOrbit,
final ODEIntegratorBuilder builder,
final double positionScale) {
return new NumericalPropagatorBuilder(referenceOrbit, builder, PositionAngle.MEAN,
positionScale);
}
/** {@inheritDoc} */
@Override
protected void setMass(final NumericalPropagatorBuilder propagatorBuilder,
final double mass) {
propagatorBuilder.setMass(mass);
}
/** {@inheritDoc} */
@Override
protected ParameterDriver[] setGravity(final NumericalPropagatorBuilder propagatorBuilder,
final OneAxisEllipsoid body) {
earth = body;
final ForceModel gravityModel = new HolmesFeatherstoneAttractionModel(body.getBodyFrame(), gravityField);
propagatorBuilder.addForceModel(gravityModel);
return gravityModel.getParametersDrivers();
}
/** {@inheritDoc} */
@Override
protected ParameterDriver[] setOceanTides(final NumericalPropagatorBuilder propagatorBuilder,
final IERSConventions conventions,
final OneAxisEllipsoid body,
final int degree, final int order) {
final ForceModel tidesModel = new OceanTides(body.getBodyFrame(),
gravityField.getAe(), gravityField.getMu(),
degree, order, conventions,
TimeScalesFactory.getUT1(conventions, true));
propagatorBuilder.addForceModel(tidesModel);
return tidesModel.getParametersDrivers();
}
/** {@inheritDoc} */
@Override
protected ParameterDriver[] setSolidTides(final NumericalPropagatorBuilder propagatorBuilder,
final IERSConventions conventions,
final OneAxisEllipsoid body,
final CelestialBody[] solidTidesBodies) {
final ForceModel tidesModel = new SolidTides(body.getBodyFrame(),
gravityField.getAe(), gravityField.getMu(),
gravityField.getTideSystem(), conventions,
TimeScalesFactory.getUT1(conventions, true),
solidTidesBodies);
propagatorBuilder.addForceModel(tidesModel);
return tidesModel.getParametersDrivers();
}
/** {@inheritDoc} */
@Override
protected ParameterDriver[] setThirdBody(final NumericalPropagatorBuilder propagatorBuilder,
final CelestialBody thirdBody) {
final ForceModel thirdBodyModel = new ThirdBodyAttraction(thirdBody);
propagatorBuilder.addForceModel(thirdBodyModel);
return thirdBodyModel.getParametersDrivers();
}
/** {@inheritDoc} */
@Override
protected ParameterDriver[] setDrag(final NumericalPropagatorBuilder propagatorBuilder,
final Atmosphere atmosphere, final DragSensitive spacecraft) {
final Atmosphere atm = new NRLMSISE00(new CssiSpaceWeatherData("SpaceWeather-All-v1.2.txt"), DataContext.getDefault().getCelestialBodies().getSun(), earth);
final ForceModel dragModel = new DragForce(atm, spacecraft);
propagatorBuilder.addForceModel(dragModel);
return dragModel.getParametersDrivers();
}
/** {@inheritDoc} */
@Override
protected ParameterDriver[] setSolarRadiationPressure(final NumericalPropagatorBuilder propagatorBuilder, final CelestialBody sun,
final double equatorialRadius, final RadiationSensitive spacecraft) {
final ForceModel srpModel = new SolarRadiationPressure(sun, equatorialRadius, spacecraft);
propagatorBuilder.addForceModel(srpModel);
return srpModel.getParametersDrivers();
}
/** {@inheritDoc} */
@Override
protected ParameterDriver[] setRelativity(final NumericalPropagatorBuilder propagatorBuilder) {
final ForceModel relativityModel = new Relativity(gravityField.getMu());
propagatorBuilder.addForceModel(relativityModel);
return relativityModel.getParametersDrivers();
}
/** {@inheritDoc} */
@Override
protected ParameterDriver[] setPolynomialAcceleration(final NumericalPropagatorBuilder propagatorBuilder,
final String name, final Vector3D direction, final int degree) {
final AccelerationModel accModel = new PolynomialAccelerationModel(name, null, degree);
final ForceModel polynomialModel = new ParametricAcceleration(direction, true, accModel); propagatorBuilder.addForceModel(polynomialModel);
return polynomialModel.getParametersDrivers();
}
/** {@inheritDoc} */
@Override
protected void setAttitudeProvider(final NumericalPropagatorBuilder propagatorBuilder,
final AttitudeProvider attitudeProvider) {
propagatorBuilder.setAttitudeProvider(attitudeProvider);
}
/** {@inheritDoc} */
@Override
protected void compareWithReference(final Orbit estimatedOrbit) {
// Reference results
final Vector3D refPos = new Vector3D(7526994.072, -9646309.832, 1464110.239);
final Vector3D refVel = new Vector3D(3033.794, 1715.265, -4447.659);
// Print results
System.out.println("Comparison with reference orbit: ");
System.out.println("ΔP(m) = " + Vector3D.distance(refPos, estimatedOrbit.getPVCoordinates().getPosition()));
System.out.println("ΔV(m/s) = " + Vector3D.distance(refVel, estimatedOrbit.getPVCoordinates().getVelocity()));
}
}
......@@ -29,9 +29,11 @@ import org.orekit.bodies.CelestialBody;
import org.orekit.bodies.OneAxisEllipsoid;
import org.orekit.errors.OrekitException;
import org.orekit.forces.ForceModel;
import org.orekit.forces.PolynomialParametricAcceleration;
import org.orekit.forces.drag.DragForce;
import org.orekit.forces.drag.DragSensitive;
import org.orekit.forces.empirical.AccelerationModel;
import org.orekit.forces.empirical.ParametricAcceleration;
import org.orekit.forces.empirical.PolynomialAccelerationModel;
import org.orekit.forces.gravity.HolmesFeatherstoneAttractionModel;
import org.orekit.forces.gravity.OceanTides;
import org.orekit.forces.gravity.Relativity;
......@@ -187,8 +189,8 @@ public class NumericalOrbitDetermination extends AbstractOrbitDetermination<Nume
@Override
protected ParameterDriver[] setPolynomialAcceleration(final NumericalPropagatorBuilder propagatorBuilder,
final String name, final Vector3D direction, final int degree) {
final ForceModel polynomialModel = new PolynomialParametricAcceleration(direction, true, name, null, degree);
propagatorBuilder.addForceModel(polynomialModel);
final AccelerationModel accModel = new PolynomialAccelerationModel(name, null, degree);
final ForceModel polynomialModel = new ParametricAcceleration(direction, true, accModel); propagatorBuilder.addForceModel(polynomialModel);
return polynomialModel.getParametersDrivers();
}
......
......@@ -678,21 +678,19 @@ public abstract class AbstractOrbitDeterminationEngine<T extends IntegratedPropa
// These covariances are derived from the deltas between initial and reference orbits
// Initial cartesian covariance matrix and process noise matrix
final RealMatrix cartesianOrbitalP = (kalmanData.getCartesianOrbitalP()) != null ?
MatrixUtils.createRealDiagonalMatrix(kalmanData.getCartesianOrbitalP()) : null;
final RealMatrix cartesianOrbitalQ = (kalmanData.getCartesianOrbitalQ()) != null ?
MatrixUtils.createRealDiagonalMatrix(kalmanData.getCartesianOrbitalQ()) : null;
final RealMatrix cartesianOrbitalP = MatrixUtils.createRealDiagonalMatrix(kalmanData.getCartesianOrbitalP());
final RealMatrix cartesianOrbitalQ = MatrixUtils.createRealDiagonalMatrix(kalmanData.getCartesianOrbitalQ());
// Initial propagation covariance matrix and process noise matrix
final RealMatrix propagationP = (kalmanData.getPropagationP()) != null ?
final RealMatrix propagationP = (kalmanData.getPropagationP().length) != 0 ?
MatrixUtils.createRealDiagonalMatrix(kalmanData.getPropagationP()) : null;
final RealMatrix propagationQ = (kalmanData.getPropagationQ()) != null ?
final RealMatrix propagationQ = (kalmanData.getPropagationQ().length) != 0 ?
MatrixUtils.createRealDiagonalMatrix(kalmanData.getPropagationQ()) : null;
// Initial measurement covariance matrix and process noise matrix
final RealMatrix measurementP = (kalmanData.getMeasurementP()) != null ?
final RealMatrix measurementP = (kalmanData.getMeasurementP().length) != 0 ?
MatrixUtils.createRealDiagonalMatrix(kalmanData.getMeasurementP()) : null;
final RealMatrix measurementQ = (kalmanData.getMeasurementQ()) != null ?
final RealMatrix measurementQ = (kalmanData.getMeasurementQ().length) != 0 ?
MatrixUtils.createRealDiagonalMatrix(kalmanData.getMeasurementQ()) : null;
// Orbital covariance matrix initialization
......@@ -707,11 +705,14 @@ public abstract class AbstractOrbitDeterminationEngine<T extends IntegratedPropa
// Build the full covariance matrix and process noise matrix
final int nbPropag = (propagationP != null) ? propagationP.getRowDimension() : 0;
final int nbMeas = (measurementP != null) ? measurementP.getRowDimension() : 0;
final RealMatrix initialP = MatrixUtils.createRealMatrix(6 + nbPropag + nbMeas,
6 + nbPropag + nbMeas);
final RealMatrix Q = MatrixUtils.createRealMatrix(6 + nbPropag + nbMeas,
6 + nbPropag + nbMeas);
final RealMatrix initialP = MatrixUtils.createRealMatrix(6 + nbPropag,
6 + nbPropag);
final RealMatrix Q = MatrixUtils.createRealMatrix(6 + nbPropag,
6 + nbPropag);
// Orbital part
initialP.setSubMatrix(orbitalP.getData(), 0, 0);
Q.setSubMatrix(orbitalQ.getData(), 0, 0);
// Orbital part
initialP.setSubMatrix(orbitalP.getData(), 0, 0);
Q.setSubMatrix(orbitalQ.getData(), 0, 0);
......@@ -722,17 +723,14 @@ public abstract class AbstractOrbitDeterminationEngine<T extends IntegratedPropa
Q.setSubMatrix(propagationQ.getData(), 6, 6);
}
// Measurement part
// Build the Kalman
final KalmanEstimatorBuilder kalmanBuilder = new KalmanEstimatorBuilder().
addPropagationConfiguration(propagatorBuilder, new ConstantProcessNoise(initialP, Q));
if (measurementP != null) {
initialP.setSubMatrix(measurementP.getData(), 6 + nbPropag, 6 + nbPropag);
Q.setSubMatrix(measurementQ.getData(), 6 + nbPropag, 6 + nbPropag);
// Measurement part
kalmanBuilder.estimatedMeasurementsParameters(estimatedMeasurementsParameters, new ConstantProcessNoise(measurementP, measurementQ));
}
// Build the Kalman
final KalmanEstimator kalman = new KalmanEstimatorBuilder().
addPropagationConfiguration(propagatorBuilder, new ConstantProcessNoise(initialP, Q)).
estimatedMeasurementsParameters(estimatedMeasurementsParameters).
build();
final KalmanEstimator kalman = kalmanBuilder.build();
kalman.setObserver(new KalmanOrbitDeterminationObserver(logStream, rangeLog, rangeRateLog,
azimuthLog, elevationLog, positionLog,
velocityLog));
......@@ -1264,7 +1262,7 @@ public abstract class AbstractOrbitDeterminationEngine<T extends IntegratedPropa
// spacecraft data
final TutorialSpacecraft spacecraft = inputData.getSpacecraft();
final Vector3D offset;
if (spacecraft.getAntennaOffset() != null) {
if (spacecraft.getAntennaOffset().length != 0) {
final double[] antennaOffset = spacecraft.getAntennaOffset();
offset = new Vector3D(antennaOffset);
} else {
......
......@@ -177,38 +177,40 @@ public class KalmanOrbitDeterminationObserver implements KalmanObserver {
final double DPcorr = Vector3D.distance(predictedP, estimatedP);
final double DVcorr = Vector3D.distance(predictedV, estimatedV);
final StringBuffer buffer = new StringBuffer();
line = String.format(Locale.US, lineFormat,
currentNumber, currentDate.toString(),
currentDate.durationFrom(t0), currentStatus.toString(),
measType, stationName,
DPcorr, DVcorr);
buffer.append(line);
// Handle parameters printing (value and error)
int jPar = 0;
final RealMatrix Pest = estimation.getPhysicalEstimatedCovarianceMatrix();
// Orbital drivers
for (DelegatingDriver driver : estimation.getEstimatedOrbitalParameters().getDrivers()) {
line += String.format(Locale.US, PAR_VAL, driver.getValue());
line += String.format(Locale.US, PAR_COV, FastMath.sqrt(Pest.getEntry(jPar, jPar)));
buffer.append(String.format(Locale.US, PAR_VAL, driver.getValue()));
buffer.append(String.format(Locale.US, PAR_COV, FastMath.sqrt(Pest.getEntry(jPar, jPar))));
jPar++;
}
// Propagation drivers
for (DelegatingDriver driver : estimation.getEstimatedPropagationParameters().getDrivers()) {
line += String.format(Locale.US, PAR_VAL, driver.getValue());
line += String.format(Locale.US, PAR_COV, FastMath.sqrt(Pest.getEntry(jPar, jPar)));
buffer.append(line += String.format(Locale.US, PAR_VAL, driver.getValue()));
buffer.append(line += String.format(Locale.US, PAR_COV, FastMath.sqrt(Pest.getEntry(jPar, jPar))));
jPar++;
}
// Measurements drivers
for (DelegatingDriver driver : estimation.getEstimatedMeasurementsParameters().getDrivers()) {
line += String.format(Locale.US, PAR_VAL, driver.getValue());
line += String.format(Locale.US, PAR_COV, FastMath.sqrt(Pest.getEntry(jPar, jPar)));
buffer.append(line += String.format(Locale.US, PAR_VAL, driver.getValue()));
buffer.append(line += String.format(Locale.US, PAR_COV, FastMath.sqrt(Pest.getEntry(jPar, jPar))));
jPar++;
}
// Print the line
System.out.println(line);
System.out.println(buffer.toString());
if (logStream != null) {
logStream.format(line);
logStream.format(buffer.toString());
}
}
......
/* Copyright 2002-2020 CS GROUP
* Licensed to CS GROUP (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (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.tutorials.maneuvers;
import java.io.File;
import java.util.Locale;
import org.hipparchus.geometry.euclidean.threed.Rotation;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.ode.nonstiff.AdaptiveStepsizeIntegrator;
import org.hipparchus.ode.nonstiff.DormandPrince853Integrator;
import org.hipparchus.util.FastMath;
import org.orekit.attitudes.AttitudeProvider;
import org.orekit.attitudes.InertialProvider;
import org.orekit.attitudes.LofOffset;
import org.orekit.data.DataContext;
import org.orekit.data.DataProvidersManager;
import org.orekit.data.DirectoryCrawler;
import org.orekit.errors.OrekitException;
import org.orekit.forces.maneuvers.Maneuver;
import org.orekit.forces.maneuvers.propulsion.BasicConstantThrustPropulsionModel;
import org.orekit.forces.maneuvers.propulsion.PropulsionModel;
import org.orekit.forces.maneuvers.trigger.DateBasedManeuverTriggers;
import org.orekit.forces.maneuvers.trigger.ManeuverTriggers;
import org.orekit.frames.Frame;
import org.orekit.frames.FramesFactory;
import org.orekit.frames.LOFType;
import org.orekit.orbits.KeplerianOrbit;
import org.orekit.orbits.Orbit;
import org.orekit.orbits.OrbitType;
import org.orekit.orbits.PositionAngle;
import org.orekit.propagation.SpacecraftState;
import org.orekit.propagation.numerical.NumericalPropagator;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.DateComponents;
import org.orekit.time.TimeComponents;
import org.orekit.time.TimeScalesFactory;