Commit 5bc07933 authored by Bryan Cazabonne's avatar Bryan Cazabonne
Browse files

Allowed using Albedo/IR force model in orbit determination test.

parent 3d37e3f2
......@@ -265,6 +265,18 @@ public abstract class AbstractOrbitDetermination<T extends IntegratedPropagatorB
protected abstract ParameterDriver[] setSolarRadiationPressure(T propagatorBuilder, CelestialBody sun,
double equatorialRadius, RadiationSensitive spacecraft);
/** Set Earth's albedo and infrared force model.
* @param propagatorBuilder propagator builder
* @param sun Sun model
* @param equatorialRadius central body equatorial radius (for shadow computation)
* @param angularResolution angular resolution in radians
* @param spacecraft spacecraft model
* @return drivers for the force model
*/
protected abstract ParameterDriver[] setAlbedoInfrared(T propagatorBuilder, CelestialBody sun,
double equatorialRadius, double angularResolution,
RadiationSensitive spacecraft);
/** Set relativity force model.
* @param propagatorBuilder propagator builder
* @return drivers for the force model
......@@ -1009,6 +1021,24 @@ public abstract class AbstractOrbitDetermination<T extends IntegratedPropagatorB
}
}
// Earth's albedo and infrared
if (parser.containsKey(ParameterKey.EARTH_ALBEDO_INFRARED) && parser.getBoolean(ParameterKey.EARTH_ALBEDO_INFRARED)) {
final double cr = parser.getDouble(ParameterKey.SOLAR_RADIATION_PRESSURE_CR);
final double area = parser.getDouble(ParameterKey.SOLAR_RADIATION_PRESSURE_AREA);
final boolean cREstimated = parser.getBoolean(ParameterKey.SOLAR_RADIATION_PRESSURE_CR_ESTIMATED);
final double angularResolution = parser.getAngle(ParameterKey.ALBEDO_INFRARED_ANGULAR_RESOLUTION);
final ParameterDriver[] drivers = setAlbedoInfrared(propagatorBuilder, CelestialBodyFactory.getSun(),
body.getEquatorialRadius(), angularResolution,
new IsotropicRadiationSingleCoefficient(area, cr));
if (cREstimated) {
for (final ParameterDriver driver : drivers) {
if (driver.getName().equals(RadiationSensitive.REFLECTION_COEFFICIENT)) {
driver.setSelected(true);
}
}
}
}
// post-Newtonian correction force due to general relativity
if (parser.containsKey(ParameterKey.GENERAL_RELATIVITY) && parser.getBoolean(ParameterKey.GENERAL_RELATIVITY)) {
setRelativity(propagatorBuilder);
......
......@@ -75,6 +75,8 @@ public enum ParameterKey {
SOLAR_RADIATION_PRESSURE_CR,
SOLAR_RADIATION_PRESSURE_CR_ESTIMATED,
SOLAR_RADIATION_PRESSURE_AREA,
EARTH_ALBEDO_INFRARED,
ALBEDO_INFRARED_ANGULAR_RESOLUTION,
GENERAL_RELATIVITY,
ATTITUDE_MODE,
POLYNOMIAL_ACCELERATION_NAME,
......
......@@ -177,6 +177,16 @@ public class DSSTOrbitDeterminationTest extends AbstractOrbitDetermination<DSSTP
return srpModel.getParametersDrivers();
}
/** {@inheritDoc} */
@Override
protected ParameterDriver[] setAlbedoInfrared(final DSSTPropagatorBuilder propagatorBuilder,
final CelestialBody sun, final double equatorialRadius,
final double angularResolution,
final RadiationSensitive spacecraft) {
throw new OrekitException(LocalizedCoreFormats.SIMPLE_MESSAGE,
"Relativity not implemented in DSST");
}
/** {@inheritDoc} */
@Override
protected ParameterDriver[] setRelativity(final DSSTPropagatorBuilder propagatorBuilder) {
......
......@@ -52,6 +52,7 @@ import org.orekit.forces.gravity.ThirdBodyAttraction;
import org.orekit.forces.gravity.potential.GravityFieldFactory;
import org.orekit.forces.gravity.potential.ICGEMFormatReader;
import org.orekit.forces.gravity.potential.NormalizedSphericalHarmonicsProvider;
import org.orekit.forces.radiation.KnockeRediffusedForceModel;
import org.orekit.forces.radiation.RadiationSensitive;
import org.orekit.forces.radiation.SolarRadiationPressure;
import org.orekit.models.earth.atmosphere.Atmosphere;
......@@ -168,6 +169,17 @@ public class NumericalOrbitDeterminationTest extends AbstractOrbitDetermination<
return srpModel.getParametersDrivers();
}
/** {@inheritDoc} */
@Override
protected ParameterDriver[] setAlbedoInfrared(final NumericalPropagatorBuilder propagatorBuilder,
final CelestialBody sun, final double equatorialRadius,
final double angularResolution,
final RadiationSensitive spacecraft) {
final ForceModel albedoIR = new KnockeRediffusedForceModel(sun, spacecraft, equatorialRadius, angularResolution);
propagatorBuilder.addForceModel(albedoIR);
return albedoIR.getParametersDrivers();
}
/** {@inheritDoc} */
@Override
protected ParameterDriver[] setRelativity(final NumericalPropagatorBuilder propagatorBuilder) {
......
......@@ -52,6 +52,7 @@ import org.orekit.forces.gravity.ThirdBodyAttraction;
import org.orekit.forces.gravity.potential.GravityFieldFactory;
import org.orekit.forces.gravity.potential.ICGEMFormatReader;
import org.orekit.forces.gravity.potential.NormalizedSphericalHarmonicsProvider;
import org.orekit.forces.radiation.KnockeRediffusedForceModel;
import org.orekit.forces.radiation.RadiationSensitive;
import org.orekit.forces.radiation.SolarRadiationPressure;
import org.orekit.models.earth.atmosphere.Atmosphere;
......@@ -169,6 +170,17 @@ public class KalmanNumericalOrbitDeterminationTest extends AbstractOrbitDetermin
return srpModel.getParametersDrivers();
}
/** {@inheritDoc} */
@Override
protected ParameterDriver[] setAlbedoInfrared(final NumericalPropagatorBuilder propagatorBuilder,
final CelestialBody sun, final double equatorialRadius,
final double angularResolution,
final RadiationSensitive spacecraft) {
final ForceModel albedoIR = new KnockeRediffusedForceModel(sun, spacecraft, equatorialRadius, angularResolution);
propagatorBuilder.addForceModel(albedoIR);
return albedoIR.getParametersDrivers();
}
/** {@inheritDoc} */
@Override
protected ParameterDriver[] setRelativity(final NumericalPropagatorBuilder propagatorBuilder) {
......
......@@ -85,6 +85,12 @@ solar.radiation.pressure.cr.estimated = false
## SRP area (m^2)
solar.radiation.pressure.area = 50
## Earth's Albedo and Infrared (true/false) [false]
## It reuses the configuration of the solar radiation pressure for the reflection coefficient
earth.albedo.infrared = false
## Angular resolution
albedo.infrared.angular.resolution = 15.0
# Post-Newtonian correction force due to general relativity (true/false) [false]
general.relativity = false
......
......@@ -85,6 +85,12 @@ solar.radiation.pressure.cr.estimated = true
## SRP area (m^2)
solar.radiation.pressure.area = 50
## Earth's Albedo and Infrared (true/false) [true]
## It reuses the configuration of the solar radiation pressure for the reflection coefficient
earth.albedo.infrared = true
## Angular resolution
albedo.infrared.angular.resolution = 15.0
# Post-Newtonian correction force due to general relativity (true/false) [false]
general.relativity = true
......
......@@ -104,6 +104,12 @@ solar.radiation.pressure.cr.estimated = true
## SRP area (m^2)
solar.radiation.pressure.area = 0.28270
## Earth's Albedo and Infrared (true/false) [false]
## It reuses the configuration of the solar radiation pressure for the reflection coefficient
earth.albedo.infrared = false
## Angular resolution
albedo.infrared.angular.resolution = 15.0
# Post-Newtonian correction force due to general relativity (true/false) [false]
general.relativity = false
......
......@@ -92,6 +92,12 @@ solar.radiation.pressure.cr.estimated = true
## SRP area (m^2)
solar.radiation.pressure.area = 0.28270
## Earth's Albedo and Infrared (true/false) [false]
## It reuses the configuration of the solar radiation pressure for the reflection coefficient
earth.albedo.infrared = false
## Angular resolution
albedo.infrared.angular.resolution = 15.0
# Post-Newtonian correction force due to general relativity (true/false) [false]
general.relativity = true
......
......@@ -138,6 +138,12 @@ solar.radiation.pressure.cr.estimated = false
## SRP area (m^2)
solar.radiation.pressure.area = 13.12
## Earth's Albedo and Infrared (true/false) [false]
## It reuses the configuration of the solar radiation pressure for the reflection coefficient
earth.albedo.infrared = false
## Angular resolution
albedo.infrared.angular.resolution = 15.0
# Post-Newtonian correction force due to general relativity (true/false) [false]
general.relativity = 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