Commit 3601eb92 authored by Luc Maisonobe's avatar Luc Maisonobe

completely revamped partial derivatives computation in numerical propagation

added a way to perform numerical propagation in either cartesian parameters or equinoctial parameters
parent 6cf7d4e4
.classpath
.project
bin
......@@ -11,16 +11,15 @@
<module name="FallThrough"/>
<module name="FinalLocalVariable"/>
<module name="FinalParameters"/>
<module name="GenericIllegalRegexp">
<property name="format" value="\s$"/>
<property name="message" value="spurious spaces at end of line"/>
<module name="Regexp">
<property name="format" value="[ \t]+$"/>
<property name="illegalPattern" value="true"/>
<property name="message" value="Trailing whitespace"/>
</module>
<module name="GenericIllegalRegexp">
<module name="Regexp">
<property name="format" value="System\.out\.println"/>
<property name="message" value="forbidden print to standard output"/>
</module>
<module name="RegexpHeader">
<property name="headerFile" value="license-header.txt" />
<property name="illegalPattern" value="true"/>
<property name="ignoreComments" value="true"/>
</module>
<module name="HiddenField">
<property name="ignoreConstructorParameter" value="true"/>
......@@ -55,7 +54,6 @@
</module>
<module name="RedundantModifier"/>
<module name="StringLiteralEquality"/>
<module name="TabCharacter"/>
<module name="TodoComment"/>
<module name="UnnecessaryParentheses"/>
<module name="UnusedImports"/>
......@@ -74,6 +72,10 @@
</module>
<module name="FileContentsHolder"/>
</module>
<module name="RegexpHeader">
<property name="headerFile" value="license-header.txt" />
</module>
<module name="FileTabCharacter"/>
<module name="NewlineAtEndOfFile"/>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop JavadocVariable check"/>
......
......@@ -63,11 +63,40 @@
<Bug pattern="DLS_DEAD_LOCAL_STORE" />
</Match>
<!-- The following equality test is intentional and needed for semantic purposes -->
<!-- The following equality tests are intentional and needed for semantic purposes -->
<Match>
<Class name="org.orekit.time.TimeComponents" />
<Method name="equals" params="java.lang.Object" returns="boolean" />
<Bug pattern="FE_FLOATING_POINT_EQUALITY" />
</Match>
<Match>
<Class name="org.orekit.orbits.KeplerianOrbit"/>
<Method name ="eMeSinE" params="double" returns="double" />
<Bug pattern="FE_FLOATING_POINT_EQUALITY" />
</Match>
<!-- The following internal representation exposure are intentional,
They are used to pass data back and forth between classes
-->
<Match>
<Class name="org.orekit.propagation.numerical.AdditionalStateAndEquations"/>
<Method name ="getAdditionalState" params="" returns="double[]" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.orekit.propagation.numerical.AdditionalStateAndEquations"/>
<Method name ="getAdditionalStateDot" params="" returns="double[]" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.orekit.propagation.numerical.TimeDerivativesEquationsCartesian"/>
<Method name ="initDerivatives" params="double[],org.orekit.orbits.Orbit" returns="void" />
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
<Match>
<Class name="org.orekit.propagation.numerical.TimeDerivativesEquationsEquinoctial"/>
<Method name ="initDerivatives" params="double[],org.orekit.orbits.Orbit" returns="void" />
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
</FindBugsFilter>
......@@ -133,7 +133,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<version>4.8.1</version>
<type>jar</type>
<scope>test</scope>
<optional>false</optional>
......@@ -144,7 +144,7 @@
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-4</version>
<version>2.2-beta-5</version>
<configuration>
<descriptors>
<descriptor>src/main/assembly/source-assembly.xml</descriptor>
......@@ -155,7 +155,7 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.0.1</version>
<version>2.1.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
......@@ -181,7 +181,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<version>2.3.1</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
......@@ -190,7 +190,7 @@
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>2.0.1</version>
<version>2.1.1</version>
<configuration>
<inputEncoding>UTF-8</inputEncoding>
<outputEncoding>UTF-8</outputEncoding>
......@@ -199,12 +199,12 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.3</version>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.1</version>
<version>2.3.1</version>
<configuration>
<threshold>Normal</threshold>
<effort>Default</effort>
......@@ -214,22 +214,22 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.3</version>
<version>2.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.3</version>
<version>2.5</version>
<configuration>
<encoding>UTF-8</encoding>
<configLocation>checkstyle.xml</configLocation>
<configLocation>${basedir}/checkstyle.xml</configLocation>
<enableRulesSummary>false</enableRulesSummary>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId>
<version>2.1</version>
<version>2.3</version>
<configuration>
<xmlPath>${basedir}/src/site/xdoc/changes.xml</xmlPath>
</configuration>
......@@ -244,7 +244,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.1</version>
<version>2.2</version>
<configuration>
<outputEncoding>UTF-8</outputEncoding>
<linkJavadoc>false</linkJavadoc>
......@@ -253,7 +253,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.6</version>
<version>2.7</version>
<configuration>
<overview>${basedir}/src/main/java/org/orekit/overview.html</overview>
<links>
......@@ -283,7 +283,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.1</version>
<version>2.1.2</version>
<executions>
<execution>
<id>create-source-jar</id>
......
......@@ -75,9 +75,9 @@ public class LofOffset implements AttitudeLaw {
* // note the call to revert in the following statement
* double[] angles = offsetProper.revert().getAngles(order);
*
* System.out.println(alpha1 + " == " + angles[0]);
* System.out.println(alpha2 + " == " + angles[1]);
* System.out.println(alpha3 + " == " + angles[2]);
* System.out.println(alpha1 + " == " + angles[0]);
* System.out.println(alpha2 + " == " + angles[1]);
* System.out.println(alpha3 + " == " + angles[2]);
* </pre>
* @param order order of rotations to use for (alpha1, alpha2, alpha3) composition
* @param alpha1 angle of the first elementary rotation
......
......@@ -44,6 +44,9 @@ public abstract class AbstractCelestialBody implements CelestialBody {
/** Serializable UID. */
private static final long serialVersionUID = 6769512376971866660L;
/** Name of the body. */
private final String name;
/** Attraction coefficient of the body (m<sup>3</sup>/s<sup>2</sup>). */
private final double gm;
......@@ -60,15 +63,17 @@ public abstract class AbstractCelestialBody implements CelestialBody {
private final Frame bodyFrame;
/** Build an instance and the underlying frame.
* @param name name of the body
* @param gm attraction coefficient (in m<sup>3</sup>/s<sup>2</sup>)
* @param iauPole IAU pole implementation
* @param definingFrame frame in which celestial body coordinates are defined
* @param inertialFrameName name to use for inertially oriented body centered frame
* @param bodyFrameName name to use for body oriented body centered frame
*/
protected AbstractCelestialBody(final double gm, final IAUPole iauPole,
final Frame definingFrame,
protected AbstractCelestialBody(final String name, final double gm,
final IAUPole iauPole, final Frame definingFrame,
final String inertialFrameName, String bodyFrameName) {
this.name = name;
this.gm = gm;
this.iauPole = iauPole;
this.definingFrame = definingFrame;
......@@ -76,6 +81,11 @@ public abstract class AbstractCelestialBody implements CelestialBody {
this.bodyFrame = new BodyOrientedFrame(bodyFrameName);
}
/** {@inheritDoc} */
public String getName() {
return name;
}
/** {@inheritDoc} */
public double getGM() {
return gm;
......
......@@ -57,6 +57,11 @@ public interface CelestialBody extends Serializable, PVCoordinatesProvider {
*/
Frame getBodyOrientedFrame() throws OrekitException;
/** Get the name of the body.
* @return name of the body
*/
String getName();
/** Get the attraction coefficient of the body.
* @return attraction coefficient of the body (m<sup>3</sup>/s<sup>2</sup>)
*/
......
......@@ -207,7 +207,7 @@ public class JPLEphemeridesLoader implements CelestialBodyLoader {
switch (generateType) {
case SOLAR_SYSTEM_BARYCENTER :
return new JPLCelestialBody(supportedNames, gm, IAUPoleFactory.getIAUPole(generateType),
return new JPLCelestialBody(supportedNames, name, gm, IAUPoleFactory.getIAUPole(generateType),
CelestialBodyFactory.getEarthMoonBarycenter().getInertiallyOrientedFrame(),
inertialFrameName, bodyFrameName) {
......@@ -226,7 +226,7 @@ public class JPLEphemeridesLoader implements CelestialBodyLoader {
};
case EARTH_MOON :
final double scale = 1.0 / (1.0 + getLoadedEarthMoonMassRatio());
return new JPLCelestialBody(supportedNames, gm, IAUPoleFactory.getIAUPole(generateType),
return new JPLCelestialBody(supportedNames, name, gm, IAUPoleFactory.getIAUPole(generateType),
FramesFactory.getEME2000(), inertialFrameName, bodyFrameName) {
/** Serializable UID. */
......@@ -272,6 +272,11 @@ public class JPLEphemeridesLoader implements CelestialBodyLoader {
return FramesFactory.getITRF2005();
}
/** {@inheritDoc} */
public String getName() {
return name;
}
/** {@inheritDoc} */
public double getGM() {
return gm;
......@@ -279,10 +284,10 @@ public class JPLEphemeridesLoader implements CelestialBodyLoader {
};
case MOON :
return new JPLCelestialBody(supportedNames, gm, IAUPoleFactory.getIAUPole(generateType),
return new JPLCelestialBody(supportedNames, name, gm, IAUPoleFactory.getIAUPole(generateType),
FramesFactory.getEME2000(), inertialFrameName, bodyFrameName);
default :
return new JPLCelestialBody(supportedNames, gm, IAUPoleFactory.getIAUPole(generateType),
return new JPLCelestialBody(supportedNames, name, gm, IAUPoleFactory.getIAUPole(generateType),
CelestialBodyFactory.getSolarSystemBarycenter().getInertiallyOrientedFrame(),
inertialFrameName, bodyFrameName);
}
......@@ -899,16 +904,17 @@ public class JPLEphemeridesLoader implements CelestialBodyLoader {
/** Private constructor for the singletons.
* @param supportedNames regular expression for supported files names (may be null)
* @param name name of the body
* @param gm attraction coefficient (in m<sup>3</sup>/s<sup>2</sup>)
* @param iauPole IAU pole implementation
* @param definingFrame frame in which ephemeris are defined
* @param inertialFrameName name to use for inertially oriented body centered frame
* @param bodyFrameName name to use for body oriented body centered frame
*/
private JPLCelestialBody(final String supportedNames, final double gm,
private JPLCelestialBody(final String supportedNames, final String name, final double gm,
final IAUPole iauPole, final Frame definingFrame,
final String inertialFrameName, String bodyFrameName) {
super(gm, iauPole, definingFrame, inertialFrameName, bodyFrameName);
super(name, gm, iauPole, definingFrame, inertialFrameName, bodyFrameName);
this.model = null;
this.definingFrame = definingFrame;
}
......
......@@ -77,7 +77,7 @@ public class OneAxisEllipsoid implements BodyShape {
/** Simple constructor.
* <p>The following table provides conventional parameters for global Earth models:</p>
* <table border="1" cellpadding="5">
* <tr bgcolor="#ccccff"><font size="+3"><th>model</th><th>a<sub>e</sub> (m)</th><th>f</th></font></tr>
* <tr bgcolor="#ccccff"><th>model</th><th>a<sub>e</sub> (m)</th><th>f</th></tr>
* <tr><td bgcolor="#eeeeff">GRS 80</td><td>6378137.0</td><td>1.0 / 298.257222101</td></tr>
* <tr><td bgcolor="#eeeeff">WGS84</td><td>6378137.0</td><td>1.0 / 298.257223563</td></tr>
* </table>
......
......@@ -54,7 +54,7 @@ public enum OrekitMessages implements Localizable {
FRAME_ANCESTOR_OF_BOTH_FRAMES("frame {0} is an ancestor of both frames {1} and {2}"),
FRAME_ANCESTOR_OF_NEITHER_FRAME("frame {0} is an ancestor of neither frame {1} nor {2}"),
UNSUPPORTED_LOCAL_ORBITAL_FRAME("unsupported local orbital frame, supported types: {0} and {1}"),
NON_QUASI_INERTIAL_FRAME_NOT_SUITABLE_FOR_DEFINING_ORBITS("non quasi-inertial frame \"{0}\" is not suitable for defining orbits"),
NON_PSEUDO_INERTIAL_FRAME_NOT_SUITABLE_FOR_DEFINING_ORBITS("non pseudo-inertial frame \"{0}\" is not suitable for defining orbits"),
DATA_ROOT_DIRECTORY_DOESN_NOT_EXISTS("data root directory {0} does not exist"),
NOT_A_DIRECTORY("{0} is not a directory"),
NEITHER_DIRECTORY_NOR_ZIP_OR_JAR("{0} is neither a directory nor a zip/jar archive file"),
......@@ -117,6 +117,14 @@ public enum OrekitMessages implements Localizable {
OUT_OF_RANGE_EPHEMERIDES_DATE("out of range date for ephemerides: {0}, [{1}, {2}]"),
UNEXPECTED_TWO_ELEVATION_VALUES_FOR_ONE_AZIMUTH("unexpected two elevation values: {0} and {1}, for one azimuth: {2}"),
UNKNOWN_PARAMETER("unknown parameter {0}"),
UNSUPPORTED_PARAMETER_1_2("unsupported parameter name {0}: supported names {1}, {2}"),
UNKNOWN_ADDITIONAL_EQUATION("unknown additional equation"),
PARTIAL_DERIVATIVES_ONLY_IN_CARTESIAN("partial derivatives can be propagated only in cartesian parameters type"),
STATE_JACOBIAN_NEITHER_6X6_NOR_7X7("state jacobian is a {0}x{1} matrix, it should be either a 6x6 or a 7x7 matrix"),
STATE_AND_PARAMETERS_JACOBIANS_ROWS_MISMATCH("state jacobian has {0} rows but parameters jacobian has {1} rows"),
INITIAL_MATRIX_AND_PARAMETERS_NUMBER_MISMATCH("initial jacobian matrix has {0} columns, but {1} parameters have been selected"),
ORBIT_A_E_MISMATCH_WITH_CONIC_TYPE("orbit should be either elliptic with a > 0 and e < 1 or hyperbolic with a < 0 and e > 1, a = {0}, e = {1}"),
HYPERBOLIC_ORBIT_NOT_HANDLED_AS("hyperbolic orbits cannot be handled as {0} instances"),
CCSDS_DATE_INVALID_PREAMBLE_FIELD("invalid preamble field in CCSDS date: {0}"),
CCSDS_DATE_INVALID_LENGTH_TIME_FIELD("invalid time field length in CCSDS date: {0}, expected {1}"),
CCSDS_DATE_MISSING_AGENCY_EPOCH("missing agency epoch in CCSDS date"),
......
/* Copyright 2010 Centre National d'Études Spatiales
* Licensed to CS Communication & Systèmes (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.forces;
import java.util.ArrayList;
import java.util.Collection;
import org.orekit.errors.OrekitException;
import org.orekit.errors.OrekitMessages;
/** Simple abstract class providing boilerplate parameters list.
*
* @author Luc Maisonobe
* @version $Revision$ $Date$
*/
public abstract class AbstractParameterizable implements Parameterizable {
/** Serializable UID. */
private static final long serialVersionUID = 3408804493769459294L;
/** List of the parameters names. */
private final Collection<String> parametersNames;
/** Simple constructor.
* @param names names of the supported parameters
*/
protected AbstractParameterizable(final String ... names) {
parametersNames = new ArrayList<String>();
for (final String name : names) {
parametersNames.add(name);
}
}
/** Simple constructor.
* @param names names of the supported parameters
*/
protected AbstractParameterizable(final Collection<String> names) {
parametersNames = new ArrayList<String>();
parametersNames.addAll(names);
}
/** {@inheritDoc} */
public Collection<String> getParametersNames() {
return parametersNames;
}
/** {@inheritDoc} */
public boolean isSupported(final String name) {
for (final String supportedName : parametersNames) {
if (supportedName.equals(name)) {
return true;
}
}
return false;
}
/** Check if a parameter is supported and throw an IllegalArgumentException if not.
* @param name name of the parameter to check
* @exception IllegalArgumentException if the parameter is not supported
* @see #isSupported(String)
*/
public void complainIfNotSupported(final String name) throws IllegalArgumentException {
if (!isSupported(name)) {
throw OrekitException.createIllegalArgumentException(OrekitMessages.UNKNOWN_PARAMETER, name);
}
}
/** {@inheritDoc} */
public abstract double getParameter(String name) throws IllegalArgumentException;
/** {@inheritDoc} */
public abstract void setParameter(String name, double value) throws IllegalArgumentException;
}
......@@ -490,4 +490,11 @@ public class BoxAndSolarArraySpacecraft implements RadiationSensitive, DragSensi
return dragCoeff;
}
/** {@inheritDoc} */
public void addDAccDParam(final Vector3D acceleration, final String paramName, final double[] dAccdParam)
throws OrekitException {
// TODO: not supported yet
throw OrekitException.createInternalError(null);
}
}
......@@ -16,8 +16,6 @@
*/
package org.orekit.forces;
import java.io.Serializable;
import org.orekit.errors.OrekitException;
import org.orekit.propagation.SpacecraftState;
import org.orekit.propagation.events.EventDetector;
......@@ -53,7 +51,7 @@ import org.orekit.propagation.numerical.TimeDerivativesEquations;
* @author V&eacute;ronique Pommier-Maurussane
* @version $Revision$ $Date$
*/
public interface ForceModel extends Serializable {
public interface ForceModel extends Parameterizable {
/** Compute the contribution of the force model to the perturbing
* acceleration.
......
......@@ -16,6 +16,7 @@
*/
package org.orekit.forces;
import java.io.Serializable;
import java.util.Collection;
/** This interface enables to process partial derivatives
......@@ -25,13 +26,24 @@ import java.util.Collection;
* @version $Revision$ $Date$
*/
public interface Parameterizable {
public interface Parameterizable extends Serializable {
/** Get the names of the supported parameters for partial derivatives processing.
* @return parameters names
* @see #isSupported(String)
*/
Collection<String> getParametersNames();
/** Check if a parameter is supported.
* <p>
* Supported parameters are the ones that are listed in {@link #getParametersNames()}
* </p>
* @param name parameter name to check
* @return true if the parameter is supported
* @see #getParametersNames()
*/
boolean isSupported(String name);
/** Get parameter value from its name.
* @param name parameter name
* @return parameter value
......
......@@ -17,8 +17,11 @@
package org.orekit.forces;
import org.apache.commons.math.geometry.Vector3D;
import org.orekit.errors.OrekitException;
import org.orekit.errors.OrekitMessages;
import org.orekit.forces.drag.DragSensitive;
import org.orekit.forces.radiation.RadiationSensitive;
import org.orekit.forces.radiation.SolarRadiationPressure;
import org.orekit.propagation.SpacecraftState;
/** This class represents the features of a simplified spacecraft.
......@@ -129,7 +132,41 @@ public class SphericalSpacecraft implements RadiationSensitive, DragSensitive {
/** Set kP value. */
private void setKP() {
kP = crossSection * (1 + 4 * (1.0 - absorptionCoeff) * (1.0 - specularReflectionCoeff) / 9);
kP = crossSection * (1 + 4 * (1.0 - absorptionCoeff) * (1.0 - specularReflectionCoeff) / 9.0);
}
/** Computes kP derivative with respect to absorption coefficient.
* @return kP derivative with respect to absorption coefficient*/
private double computeDKPDCa() {
return -4 * crossSection * (1.0 - specularReflectionCoeff) / 9;
}
/** Computes kP derivative with respect to reflection coefficient.
* @return kP derivative with respect to reflection coefficient*/
private double computeDKPDCr() {
return -4 * crossSection * (1.0 - absorptionCoeff) / 9;
}
/** {@inheritDoc} */
public void addDAccDParam(final Vector3D acceleration, final String paramName, final double[] dAccdParam)
throws OrekitException {
final double coefficient;
if (paramName.equals(SolarRadiationPressure.ABSORPTION_COEFFICIENT)) {
coefficient = computeDKPDCa() / kP;
} else if (paramName.equals(SolarRadiationPressure.REFLECTION_COEFFICIENT)) {
coefficient = computeDKPDCr() / kP;
} else {
throw OrekitException.createIllegalArgumentException(OrekitMessages.UNSUPPORTED_PARAMETER_1_2,
paramName,
SolarRadiationPressure.ABSORPTION_COEFFICIENT,
SolarRadiationPressure.REFLECTION_COEFFICIENT);
}
dAccdParam[0] += coefficient * acceleration.getX();
dAccdParam[1] += coefficient * acceleration.getY();
dAccdParam[2] += coefficient * acceleration.getZ();
}
}
......@@ -22,12 +22,11 @@ import java.util.Collection;
import org.apache.commons.math.geometry.Vector3D;
import org.orekit.errors.OrekitException;
import org.orekit.errors.OrekitMessages;
import org.orekit.forces.ForceModelWithJacobians;
import org.orekit.forces.Parameterizable;
import org.orekit.frames.Frame;
import org.orekit.propagation.SpacecraftState;
import org.orekit.propagation.events.EventDetector;
import org.orekit.propagation.numerical.TimeDerivativesEquations;
import org.orekit.propagation.numerical.TimeDerivativesEquationsWithJacobians;
import org.orekit.time.AbsoluteDate;
......@@ -47,13 +46,20 @@ import org.orekit.time.AbsoluteDate;
* @version $Revision:1665 $ $Date:2008-06-11 12:12:59 +0200 (mer., 11 juin 2008) $
*/
public class DragForce implements ForceModelWithJacobians {
public class DragForce implements Parameterizable {
/** Parameter name for drag coefficient enabling jacobian processing. */
public static final String DRAG_COEFFICIENT = "DRAG COEFFICIENT";
/** List of the parameters names. */
private static final ArrayList<String> PARAMETERS_NAMES;
static {
PARAMETERS_NAMES = new ArrayList<String>();
PARAMETERS_NAMES.add(DRAG_COEFFICIENT);
}
/** Serializable UID. */
private static final long serialVersionUID = 2574653656986559955L;
private static final long serialVersionUID = 5386256916056674950L;
/** Atmospheric model. */
private final Atmosphere atmosphere;
......@@ -61,9 +67,6 @@ public class DragForce implements ForceModelWithJacobians {
/** Spacecraft. */
private final DragSensitive spacecraft;
/** List of the parameters names. */
private final ArrayList<String> parametersNames = new ArrayList<String>();
/** Simple constructor.
* @param atmosphere atmospheric model
* @param spacecraft the object physical and geometrical information
......@@ -71,7 +74,6 @@ public class DragForce implements ForceModelWithJacobians {
public DragForce(final Atmosphere atmosphere, final DragSensitive spacecraft) {
this.atmosphere = atmosphere;
this.spacecraft = spacecraft;
this.parametersNames.add(DRAG_COEFFICIENT);
}
/** Compute the contribution of the drag to the perturbing acceleration.
......@@ -104,14 +106,13 @@ public class DragForce implements ForceModelWithJacobians {
}
/** {@inheritDoc} */
public void addContributionWithJacobians(final SpacecraftState s,
final TimeDerivativesEquationsWithJacobians adder)
throws OrekitException {
public Collection<String> getParametersNames() {
return PARAMETERS_NAMES;
}
/** {@inheritDoc} */
public Collection<String> getParametersNames() {
return parametersNames;
public boolean isSupported(final String name) {
return name.equals(DRAG_COEFFICIENT);
}
/** {@inheritDoc} */
......
......@@ -21,6 +21,7 @@ import org.apache.commons.math.geometry.Vector3D;
import org.apache.commons.math.util.FastMath;
import org.orekit.errors.OrekitException;
import org.orekit.errors.OrekitMessages;
import org.orekit.forces.AbstractParameterizable;
import org.orekit.forces.ForceModel;
import org.orekit.frames.Frame;
import org.orekit.frames.Transform;
......@@ -42,10 +43,10 @@ import org.orekit.propagation.numerical.TimeDerivativesEquations;
* @version $Revision:1665 $ $Date:2008-06-11 12:12:59 +0200 (mer., 11 juin 2008) $