Commit d8db552b authored by Luc Maisonobe's avatar Luc Maisonobe

Allow users direct access to zonal and tesseral terms in DSST.

The global DSSTCentralBody force model, which was only a container
for one zonal model and one tesseral model, has been deprecated.

This will allow in a later step finer tuning of both zonal and tesseral
terms. If we had kept DSSTCentralBody, the construction parameters would
have been a huge mess of maxIndices (indeed, even separating zonal from
tesseral will induce constructors with numerous parameters ...)
parent e6974cc1
......@@ -37,14 +37,16 @@ import org.orekit.propagation.semianalytical.dsst.utilities.AuxiliaryElements;
* </p>
*
* @author Pascal Parraud
* @deprecated as of 7.2, replaced by {@link DSSTZonal} and {@link DSSTTesseral}
*/
@Deprecated
public class DSSTCentralBody implements DSSTForceModel {
/** Zonal harmonics contribution. */
private final ZonalContribution zonal;
private final DSSTZonal zonal;
/** Tesseral harmonics contribution. */
private final TesseralContribution tesseral;
private final DSSTTesseral tesseral;
/** DSST Central body constructor.
* <p>
......@@ -109,16 +111,16 @@ public class DSSTCentralBody implements DSSTForceModel {
final int maxDegreeMdailyTesseralSP, final int maxOrderMdailyTesseralSP) {
// Zonal harmonics contribution
this.zonal = new ZonalContribution(provider, maxDegreeZonalSP);
this.zonal = new DSSTZonal(provider, maxDegreeZonalSP);
// Tesseral harmonics contribution (only if order > 0)
this.tesseral = (provider.getMaxOrder() == 0) ?
null : new TesseralContribution(centralBodyFrame,
centralBodyRotationRate,
provider,
maxDegreeTesseralSP, maxOrderTesseralSP,
maxDegreeMdailyTesseralSP,
maxOrderMdailyTesseralSP);
null : new DSSTTesseral(centralBodyFrame,
centralBodyRotationRate,
provider,
maxDegreeTesseralSP, maxOrderTesseralSP,
maxDegreeMdailyTesseralSP,
maxOrderMdailyTesseralSP);
}
......
......@@ -60,7 +60,7 @@ import org.orekit.utils.TimeSpanMap;
* @author Romain Di Costanzo
* @author Pascal Parraud
*/
class TesseralContribution implements DSSTForceModel {
public class DSSTTesseral implements DSSTForceModel {
/** Minimum period for analytically averaged high-order resonant
* central body spherical harmonics in seconds.
......@@ -256,11 +256,11 @@ class TesseralContribution implements DSSTForceModel {
* (the real order used may be smaller if the provider does not provide enough terms)
* @since 7.1
*/
TesseralContribution(final Frame centralBodyFrame,
final double centralBodyRotationRate,
final UnnormalizedSphericalHarmonicsProvider provider,
final int maxDegreeTesseralSP, final int maxOrderTesseralSP,
final int maxDegreeMdailyTesseralSP, final int maxOrderMdailyTesseralSP) {
public DSSTTesseral(final Frame centralBodyFrame,
final double centralBodyRotationRate,
final UnnormalizedSphericalHarmonicsProvider provider,
final int maxDegreeTesseralSP, final int maxOrderTesseralSP,
final int maxDegreeMdailyTesseralSP, final int maxOrderMdailyTesseralSP) {
// Central body rotating frame
this.bodyFrame = centralBodyFrame;
......
......@@ -51,7 +51,7 @@ import org.orekit.utils.TimeSpanMap;
* @author Romain Di Costanzo
* @author Pascal Parraud
*/
class ZonalContribution implements DSSTForceModel {
public class DSSTZonal implements DSSTForceModel {
/** Truncation tolerance. */
private static final double TRUNCATION_TOLERANCE = 1e-4;
......@@ -81,7 +81,7 @@ class ZonalContribution implements DSSTForceModel {
private final int maxDegree;
/** Maximal degree to consider for harmonics potential. */
private int maxDegreeShortPeriodics;
private final int maxDegreeShortPeriodics;
/** Maximal degree to consider for harmonics potential in short periodic computations. */
private final int maxOrder;
......@@ -190,8 +190,8 @@ class ZonalContribution implements DSSTForceModel {
* (the real degree used may be smaller if the provider does not provide enough terms)
* @since 7.1
*/
ZonalContribution(final UnnormalizedSphericalHarmonicsProvider provider,
final int maxDegreeZonalSP) {
public DSSTZonal(final UnnormalizedSphericalHarmonicsProvider provider,
final int maxDegreeZonalSP) {
this.provider = provider;
this.maxDegree = provider.getMaxDegree();
......
......@@ -28,7 +28,7 @@ import org.apache.commons.math3.analysis.polynomials.PolynomialsUtils;
/** Provider of the Jacobi polynomials P<sub>l</sub><sup>v,w</sup>.
* <p>
* This class is used for {@link
* org.orekit.propagation.semianalytical.dsst.forces.TesseralContribution
* org.orekit.propagation.semianalytical.dsst.forces.DSSTTesseral
* tesseral contribution} computation.
* </p>
*
......
......@@ -59,9 +59,10 @@ import org.orekit.propagation.numerical.PartialDerivativesEquations;
import org.orekit.propagation.sampling.OrekitStepHandler;
import org.orekit.propagation.sampling.OrekitStepInterpolator;
import org.orekit.propagation.semianalytical.dsst.DSSTPropagator;
import org.orekit.propagation.semianalytical.dsst.forces.DSSTCentralBody;
import org.orekit.propagation.semianalytical.dsst.forces.DSSTSolarRadiationPressure;
import org.orekit.propagation.semianalytical.dsst.forces.DSSTTesseral;
import org.orekit.propagation.semianalytical.dsst.forces.DSSTThirdBody;
import org.orekit.propagation.semianalytical.dsst.forces.DSSTZonal;
import org.orekit.time.AbsoluteDate;
import org.orekit.utils.Constants;
import org.orekit.utils.IERSConventions;
......@@ -237,8 +238,9 @@ public class IntegratedEphemerisTest {
final CelestialBody sun = CelestialBodyFactory.getSun();
final CelestialBody moon = CelestialBodyFactory.getMoon();
final RadiationSensitive spacecraft = new IsotropicRadiationSingleCoefficient(20.0, 2.0);
dsstProp.addForceModel(new DSSTCentralBody(itrf, Constants.WGS84_EARTH_ANGULAR_VELOCITY,
gravity, 8, 8, 8, 8, 8));
dsstProp.addForceModel(new DSSTZonal(gravity, 8));
dsstProp.addForceModel(new DSSTTesseral(itrf, Constants.WGS84_EARTH_ANGULAR_VELOCITY,
gravity, 8, 8, 8, 8));
dsstProp.addForceModel(new DSSTThirdBody(sun));
dsstProp.addForceModel(new DSSTThirdBody(moon));
dsstProp.addForceModel(new DSSTSolarRadiationPressure(sun, Constants.WGS84_EARTH_EQUATORIAL_RADIUS, spacecraft));
......
......@@ -70,9 +70,10 @@ import org.orekit.propagation.numerical.NumericalPropagator;
import org.orekit.propagation.sampling.OrekitFixedStepHandler;
import org.orekit.propagation.semianalytical.dsst.DSSTPropagator;
import org.orekit.propagation.semianalytical.dsst.forces.DSSTAtmosphericDrag;
import org.orekit.propagation.semianalytical.dsst.forces.DSSTCentralBody;
import org.orekit.propagation.semianalytical.dsst.forces.DSSTSolarRadiationPressure;
import org.orekit.propagation.semianalytical.dsst.forces.DSSTThirdBody;
import org.orekit.propagation.semianalytical.dsst.forces.DSSTTesseral;
import org.orekit.propagation.semianalytical.dsst.forces.DSSTZonal;
import org.orekit.time.AbsoluteDate;
import org.orekit.time.TimeScale;
import org.orekit.time.TimeScalesFactory;
......@@ -558,13 +559,14 @@ public class DSSTPropagation {
}
// Central Body Force Model with un-normalized coefficients
dsstProp.addForceModel(new DSSTCentralBody(earthFrame, rotationRate,
unnormalized,
parser.getInt(ParameterKey.MAX_DEGREE_ZONAL_SHORT_PERIODS),
parser.getInt(ParameterKey.MAX_DEGREE_TESSERAL_SHORT_PERIODS),
parser.getInt(ParameterKey.MAX_ORDER_TESSERAL_SHORT_PERIODS),
parser.getInt(ParameterKey.MAX_DEGREE_TESSERAL_M_DAILIES_SHORT_PERIODS),
parser.getInt(ParameterKey.MAX_ORDER_TESSERAL_M_DAILIES_SHORT_PERIODS)));
dsstProp.addForceModel(new DSSTZonal(unnormalized,
parser.getInt(ParameterKey.MAX_DEGREE_ZONAL_SHORT_PERIODS)));
dsstProp.addForceModel(new DSSTTesseral(earthFrame, rotationRate,
unnormalized,
parser.getInt(ParameterKey.MAX_DEGREE_TESSERAL_SHORT_PERIODS),
parser.getInt(ParameterKey.MAX_ORDER_TESSERAL_SHORT_PERIODS),
parser.getInt(ParameterKey.MAX_DEGREE_TESSERAL_M_DAILIES_SHORT_PERIODS),
parser.getInt(ParameterKey.MAX_ORDER_TESSERAL_M_DAILIES_SHORT_PERIODS)));
// 3rd body (SUN)
if (parser.containsKey(ParameterKey.THIRD_BODY_SUN) && parser.getBoolean(ParameterKey.THIRD_BODY_SUN)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment