Commit 8b143130 authored by Luc Maisonobe's avatar Luc Maisonobe

Improved tuning of short period terms in DSST tesseral.

parent f3200d7d
......@@ -122,13 +122,22 @@ public class DSSTCentralBody implements DSSTForceModel {
2 * maxDegreeZonalShortPeriodics + 1);
// Tesseral harmonics contribution (only if order > 0)
final int maxDegreeTesseralShortPeriodics = FastMath.min(provider.getMaxDegree(), maxDegreeTesseralSP);
final int maxOrderTesseralShortPeriodics = FastMath.min(provider.getMaxOrder(), maxOrderTesseralSP);
final int maxEccPowTesseralShortPeriodics = FastMath.min(maxDegreeTesseralShortPeriodics - 1, 4);
final int maxDegreeMdailyTesseralShortPeriodics = FastMath.min(provider.getMaxDegree(), maxDegreeMdailyTesseralSP);
final int maxOrderMdailyTesseralShortPeriodics = FastMath.min(provider.getMaxOrder(), maxOrderMdailyTesseralSP);
final int maxEccPowMdailyTesseralShortPeriodics = FastMath.min(maxDegreeMdailyTesseralShortPeriodics - 2, 4);
this.tesseral = (provider.getMaxOrder() == 0) ?
null : new DSSTTesseral(centralBodyFrame,
centralBodyRotationRate,
provider,
maxDegreeTesseralSP, maxOrderTesseralSP,
maxDegreeMdailyTesseralSP,
maxOrderMdailyTesseralSP);
maxDegreeTesseralShortPeriodics, maxOrderTesseralShortPeriodics,
maxEccPowTesseralShortPeriodics,
maxDegreeTesseralShortPeriodics + maxEccPowTesseralShortPeriodics,
maxDegreeMdailyTesseralShortPeriodics,
maxOrderMdailyTesseralShortPeriodics,
maxEccPowMdailyTesseralShortPeriodics);
} catch (OrekitException oe) {
// this should never happen
throw new OrekitInternalError(oe);
......
......@@ -213,13 +213,13 @@ public class IntegratedEphemerisTest {
@Test
public void testSerializationDSSTMean()
throws PropagationException, OrekitException, IOException, ClassNotFoundException {
doTestSerializationDSST(true, 52000, 53000);
doTestSerializationDSST(true, 35000, 36000);
}
@Test
public void testSerializationDSSTOsculating()
throws PropagationException, OrekitException, IOException, ClassNotFoundException {
doTestSerializationDSST(false, 1051500, 1052500);
doTestSerializationDSST(false, 616000, 617000);
}
private void doTestSerializationDSST(boolean meanOnly, int minSize, int maxSize)
......@@ -240,7 +240,7 @@ public class IntegratedEphemerisTest {
final RadiationSensitive spacecraft = new IsotropicRadiationSingleCoefficient(20.0, 2.0);
dsstProp.addForceModel(new DSSTZonal(gravity, 8, 7, 17));
dsstProp.addForceModel(new DSSTTesseral(itrf, Constants.WGS84_EARTH_ANGULAR_VELOCITY,
gravity, 8, 8, 8, 8));
gravity, 8, 8, 4, 12, 8, 8, 4));
dsstProp.addForceModel(new DSSTThirdBody(sun));
dsstProp.addForceModel(new DSSTThirdBody(moon));
dsstProp.addForceModel(new DSSTSolarRadiationPressure(sun, Constants.WGS84_EARTH_EQUATORIAL_RADIUS, spacecraft));
......
......@@ -95,6 +95,7 @@ public class DSSTPropagatorTest {
GravityFieldFactory.addPotentialCoefficientsReader(new GRGSFormatReader("grim4s4_gr", true));
int earthDegree = 36;
int earthOrder = 36;
int eccPower = 4;
final UnnormalizedSphericalHarmonicsProvider provider =
GravityFieldFactory.getUnnormalizedProvider(earthDegree,
earthOrder);
......@@ -102,7 +103,8 @@ public class DSSTPropagatorTest {
=FramesFactory.getITRF(IERSConventions.IERS_2010,true); // terrestrial frame
final DSSTForceModel force = new
DSSTTesseral(earthFrame,Constants.WGS84_EARTH_ANGULAR_VELOCITY, provider,
earthDegree, earthOrder, earthDegree, earthOrder);
earthDegree, earthOrder, eccPower, earthDegree + eccPower,
earthDegree, earthOrder, eccPower);
final Collection<DSSTForceModel> forces = new ArrayList<DSSTForceModel>();
forces.add(force);
TimeScale tai = TimeScalesFactory.getTAI();
......@@ -377,7 +379,7 @@ public class DSSTPropagatorTest {
dsstProp.addForceModel(new DSSTZonal(provider, 4, 3, 9));
dsstProp.addForceModel(new DSSTTesseral(earthFrame,
Constants.WGS84_EARTH_ANGULAR_VELOCITY, provider,
4, 4, 4, 4));
4, 4, 4, 8, 4, 4, 2));
// 5 days propagation
final SpacecraftState state = dsstProp.propagate(initDate.shiftedBy(5. * 86400.));
......@@ -409,7 +411,7 @@ public class DSSTPropagatorTest {
DSSTForceModel zonal = new DSSTZonal(provider, 2, 1, 5);
DSSTForceModel tesseral = new DSSTTesseral(earthFrame,
Constants.WGS84_EARTH_ANGULAR_VELOCITY,
provider, 2, 0, 2, 0);
provider, 2, 0, 0, 2, 2, 0, 0);
// Third Bodies Force Model (Moon + Sun) */
DSSTForceModel moon = new DSSTThirdBody(CelestialBodyFactory.getMoon());
......@@ -481,7 +483,7 @@ public class DSSTPropagatorTest {
DSSTForceModel zonal = new DSSTZonal(provider, 2, 0, 5);
DSSTForceModel tesseral = new DSSTTesseral(earthFrame,
Constants.WGS84_EARTH_ANGULAR_VELOCITY,
provider, 2, 0, 2, 0);
provider, 2, 0, 0, 2, 2, 0, 0);
// Drag Force Model
final OneAxisEllipsoid earth = new OneAxisEllipsoid(provider.getAe(),
......@@ -547,7 +549,7 @@ public class DSSTPropagatorTest {
DSSTForceModel zonal = new DSSTZonal(provider, 2, 1, 5);
DSSTForceModel tesseral = new DSSTTesseral(CelestialBodyFactory.getEarth().getBodyOrientedFrame(),
Constants.WGS84_EARTH_ANGULAR_VELOCITY,
provider, 2, 0, 2, 0);
provider, 2, 0, 0, 2, 2, 0, 0);
// SRP Force Model
DSSTForceModel srp = new DSSTSolarRadiationPressure(1.2, 100., CelestialBodyFactory.getSun(),
......@@ -652,7 +654,7 @@ public class DSSTPropagatorTest {
propagator.addForceModel(new DSSTZonal(nshp, 8, 7, 17));
propagator.addForceModel(new DSSTTesseral(earth.getBodyFrame(),
Constants.WGS84_EARTH_ANGULAR_VELOCITY,
nshp, 8, 8, 8, 8));
nshp, 8, 8, 4, 12, 8, 8, 4));
propagator.addForceModel(new DSSTThirdBody(sun));
propagator.addForceModel(new DSSTThirdBody(moon));
propagator.addForceModel(new DSSTAtmosphericDrag(new HarrisPriester(sun, earth), 2.1, 180));
......@@ -698,7 +700,7 @@ public class DSSTPropagatorTest {
propagator.addForceModel(new DSSTZonal(nshp, 8, 7, 17));
propagator.addForceModel(new DSSTTesseral(earth.getBodyFrame(),
Constants.WGS84_EARTH_ANGULAR_VELOCITY,
nshp, 8, 8, 8, 8));
nshp, 8, 8, 4, 12, 8, 8, 4));
propagator.addForceModel(new DSSTThirdBody(sun));
propagator.addForceModel(new DSSTThirdBody(moon));
propagator.addForceModel(new DSSTAtmosphericDrag(new HarrisPriester(sun, earth), 2.1, 180));
......@@ -756,7 +758,7 @@ public class DSSTPropagatorTest {
DSSTForceModel zonal = new DSSTZonal(provider, 4, 3, 9);
DSSTForceModel tesseral = new DSSTTesseral(earthFrame,
Constants.WGS84_EARTH_ANGULAR_VELOCITY,
provider, 4, 4, 4, 4);
provider, 4, 0, 4, 8, 4, 0, 2);
prop.addForceModel(zonal);
prop.addForceModel(tesseral);
......@@ -775,7 +777,7 @@ public class DSSTPropagatorTest {
DSSTForceModel zonal = new DSSTZonal(provider, 2, 1, 5);
DSSTForceModel tesseral = new DSSTTesseral(earthFrame,
Constants.WGS84_EARTH_ANGULAR_VELOCITY,
provider, 2, 0, 2, 0);
provider, 2, 0, 0, 2, 2, 0, 0);
final Collection<DSSTForceModel> forces = new ArrayList<DSSTForceModel>();
forces.add(zonal);
......@@ -795,7 +797,7 @@ public class DSSTPropagatorTest {
DSSTForceModel zonal = new DSSTZonal(provider, 2, 1, 5);
DSSTForceModel tesseral = new DSSTTesseral(earthFrame,
Constants.WGS84_EARTH_ANGULAR_VELOCITY,
provider, 2, 0, 2, 0);
provider, 2, 0, 0, 2, 2, 0, 0);
final Collection<DSSTForceModel> forces = new ArrayList<DSSTForceModel>();
forces.add(zonal);
......@@ -837,7 +839,7 @@ public class DSSTPropagatorTest {
propagator.addForceModel(new DSSTZonal(nshp, 4, 3, 9));
propagator.addForceModel(new DSSTTesseral(earth.getBodyFrame(),
Constants.WGS84_EARTH_ANGULAR_VELOCITY,
nshp, 4, 4, 4, 4));
nshp, 4, 4, 4, 8, 4, 4, 2));
propagator.addForceModel(new DSSTThirdBody(sun));
propagator.addForceModel(new DSSTThirdBody(moon));
propagator.addForceModel(new DSSTAtmosphericDrag(new HarrisPriester(sun, earth), 2.1, 180));
......@@ -851,7 +853,7 @@ public class DSSTPropagatorTest {
propagator.setSelectedCoefficients(new HashSet<String>());
propagator.resetInitialState(new SpacecraftState(orbit, 45.0));
final SpacecraftState stateConfigEmpty = propagator.propagate(finalDate);
Assert.assertEquals(282, stateConfigEmpty.getAdditionalStates().size());
Assert.assertEquals(234, stateConfigEmpty.getAdditionalStates().size());
final Set<String> selected = new HashSet<String>();
selected.add("DSST-3rd-body-Moon-s[7]");
......@@ -890,7 +892,7 @@ public class DSSTPropagatorTest {
DSSTForceModel zonal = new DSSTZonal(provider, 2, 1, 5);
DSSTForceModel tesseral = new DSSTTesseral(earthFrame,
Constants.WGS84_EARTH_ANGULAR_VELOCITY,
provider, 2, 0, 2, 0);
provider, 2, 0, 0, 2, 2, 0, 0);
final Collection<DSSTForceModel> forces = new ArrayList<DSSTForceModel>();
forces.add(zonal);
forces.add(tesseral);
......
......@@ -180,8 +180,11 @@ public class DSSTPropagation {
MAX_FREQUENCY_TRUE_LONGITUDE_ZONAL_SHORT_PERIODS,
MAX_DEGREE_TESSERAL_SHORT_PERIODS,
MAX_ORDER_TESSERAL_SHORT_PERIODS,
MAX_ECCENTRICITY_POWER_TESSERAL_SHORT_PERIODS,
MAX_FREQUENCY_MEAN_LONGITUDE_TESSERAL_SHORT_PERIODS,
MAX_DEGREE_TESSERAL_M_DAILIES_SHORT_PERIODS,
MAX_ORDER_TESSERAL_M_DAILIES_SHORT_PERIODS,
MAX_ECCENTRICITY_POWER_TESSERAL_M_DAILIES_SHORT_PERIODS,
THIRD_BODY_MOON,
THIRD_BODY_SUN,
MASS,
......@@ -568,8 +571,11 @@ public class DSSTPropagation {
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_ECCENTRICITY_POWER_TESSERAL_SHORT_PERIODS),
parser.getInt(ParameterKey.MAX_FREQUENCY_MEAN_LONGITUDE_TESSERAL_SHORT_PERIODS),
parser.getInt(ParameterKey.MAX_DEGREE_TESSERAL_M_DAILIES_SHORT_PERIODS),
parser.getInt(ParameterKey.MAX_ORDER_TESSERAL_M_DAILIES_SHORT_PERIODS)));
parser.getInt(ParameterKey.MAX_ORDER_TESSERAL_M_DAILIES_SHORT_PERIODS),
parser.getInt(ParameterKey.MAX_ECCENTRICITY_POWER_TESSERAL_M_DAILIES_SHORT_PERIODS)));
// 3rd body (SUN)
if (parser.containsKey(ParameterKey.THIRD_BODY_SUN) && parser.getBoolean(ParameterKey.THIRD_BODY_SUN)) {
......
......@@ -153,13 +153,16 @@ central.body.degree = 36
## Central body gravity potential order
central.body.order = 0
## short period limits
max.degree.zonal.short.periods = 12
max.eccentricity.power.zonal.short.periods = 11
max.frequency.true.longitude.zonal.short.periods = 25
max.degree.tesseral.short.periods = 8
max.order.tesseral.short.periods = 8
max.degree.tesseral.m.dailies.short.periods = 12
max.order.tesseral.m.dailies.short.periods = 12
max.degree.zonal.short.periods = 12
max.eccentricity.power.zonal.short.periods = 11
max.frequency.true.longitude.zonal.short.periods = 25
max.degree.tesseral.short.periods = 8
max.order.tesseral.short.periods = 8
max.eccentricity.power.tesseral.short.periods = 4
max.frequency.mean.longitude.tesseral.short.periods = 12
max.degree.tesseral.m.dailies.short.periods = 12
max.order.tesseral.m.dailies.short.periods = 12
max.eccentricity.power.tesseral.m.dailies.short.periods = 4
## 3rd body Moon (true/false) [false]
third.body.moon = false
......
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