Skip to content
Snippets Groups Projects
Commit 3833242b authored by Bryan Cazabonne's avatar Bryan Cazabonne
Browse files

Use observed solar flux instead of adjusted in DTM2000 model.

parent d8eceec1
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,9 @@
</properties>
<body>
<release version="11.0" date="TBD" description="TBD">
<action dev="bryan" type="fix" issue="818">
Use observed solar flux instead of adjusted in DTM2000 model.
</action>
<action dev="evan" type="remove" issue="586">
Remove InertialProvider.EME2000_ALIGNED, Propagator.DEFAULT_LAW. Use
InertialProvider.of(Frame).
......
......@@ -193,29 +193,17 @@ public class CssiSpaceWeatherData extends AbstractSelfFeedingLoader
return previousValue * previousWeight + nextValue * nextWeight;
}
/** {@inheritDoc}
* For the DTM2000 model, we are using the adjusted flux
*/
/** {@inheritDoc} */
public double getInstantFlux(final AbsoluteDate date) {
// Interpolating two neighboring daily fluxes
// get the neighboring dates
bracketDate(date);
return getLinearInterpolation(date, previousParam.getF107Adj(), nextParam.getF107Adj());
return getLinearInterpolation(date, previousParam.getF107Obs(), nextParam.getF107Obs());
}
/** {@inheritDoc}
* For the DTM2000 model, we are using the adjusted flux
*/
/** {@inheritDoc} */
public double getMeanFlux(final AbsoluteDate date) {
if (date.compareTo(lastDailyPredictedDate) <= 0) {
bracketDate(date);
return previousParam.getCtr81Adj();
} else {
// Only monthly data is available, better interpolate between two months
// get the neighboring dates
bracketDate(date);
return getLinearInterpolation(date, previousParam.getCtr81Adj(), nextParam.getCtr81Adj());
}
return getAverageFlux(date);
}
/** {@inheritDoc} */
......@@ -266,10 +254,9 @@ public class CssiSpaceWeatherData extends AbstractSelfFeedingLoader
/**
* Gets the daily flux on the current day.
* For the NRLMSISE00 model, we are using the observed flux
*
* @param date the current date
* @return the daily F10.7 flux (adjusted)
* @return the daily F10.7 flux (observed)
*/
private double getDailyFluxOnDay(final AbsoluteDate date) {
if (date.compareTo(lastDailyPredictedDate) <= 0) {
......@@ -284,9 +271,7 @@ public class CssiSpaceWeatherData extends AbstractSelfFeedingLoader
}
}
/** {@inheritDoc}
* For the NRLMSISE00 model, we are using the observed flux
*/
/** {@inheritDoc} */
public double getAverageFlux(final AbsoluteDate date) {
if (date.compareTo(lastDailyPredictedDate) <= 0) {
bracketDate(date);
......
......@@ -206,7 +206,7 @@ public class CssiSpaceWeatherLoaderTest {
CssiSpaceWeatherData cswl = loadCswl();
AbsoluteDate date = new AbsoluteDate(2000, 1, 1, 0, 0, 0.0, utc);
final double meanFlux = cswl.getMeanFlux(date);
assertThat(meanFlux, closeTo(158.6, 1e-10));
assertThat(meanFlux, closeTo(165.6, 1e-10));
}
@Test
......@@ -214,7 +214,7 @@ public class CssiSpaceWeatherLoaderTest {
CssiSpaceWeatherData cswl = loadCswl();
AbsoluteDate date = new AbsoluteDate(2034, 6, 16, 0, 0, 0.0, utc);
final double meanFlux = cswl.getMeanFlux(date);
assertThat(meanFlux, closeTo((134.8 + 138.8) / 2, 1e-3));
assertThat(meanFlux, closeTo((132.1 + 134.9) / 2, 1e-3));
}
@Test
......@@ -238,7 +238,7 @@ public class CssiSpaceWeatherLoaderTest {
CssiSpaceWeatherData cswl = loadCswl();
AbsoluteDate date = new AbsoluteDate(2000, 1, 1, 12, 0, 0.0, utc);
final double instantFlux = cswl.getInstantFlux(date);
assertThat(instantFlux, closeTo((125.6 + 128.5) / 2, 1e-10));
assertThat(instantFlux, closeTo((129.9 + 132.9) / 2, 1e-10));
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment