[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orekit Users] Osculating
Le 11/07/2016 à 14:10, CID BOROBIA Elisabet a écrit :
> Hello,
Hi Elisabet,
>
> I am using:
> maxDegreeShortPeriodics=15
> maxEccPowShortPeridocs=13
> maxFrequencySortPeridics=28
Thanks. There really seem to be a problem in the boundary checks.
Could you try to apply the attached patch and see if things improve?
There may be some line shifts in the patch because I have created it
from the current development version based on Hipparchus, which is
different from the 7.x series.
best regards,
Luc
>
> Elisabet CID BOROBIA
> Thales Alenia Space
>
> -----Mensaje original-----
> De: orekit-users-request@orekit.org [mailto:orekit-users-request@orekit.org] En nombre de Luc Maisonobe
> Enviado el: lundi 11 juillet 2016 14:00
> Para: orekit-users@orekit.org
> Asunto: Re: [Orekit Users] Osculating
>
> Le 11/07/2016 à 13:43, Elisabet a écrit :
>> Hello,
>
> Hi Elisabet,
>
>>
>> Using the DSSTPropagator, I am having problems to transform from
>> osculating parameters to mean parameters through the method
>> DSSTPropagator.computeMeanState. Do you have any idea of why it does
>> not work properly?
>> It gives me the following thread:
>> Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 29
>> at org.orekit.propagation.semianalytical.dsst.forces.DSSTZonal
>> $FourierCjSjCoefficients.getCj(DSSTZonal.java:1896)
>> at
>> org.orekit.propagation.semianalytical.dsst.forces.DSSTZonal.computeCijSijCoefficients(DSSTZonal.java:762)
>> at
>> org.orekit.propagation.semianalytical.dsst.forces.DSSTZonal.updateShortPeriodTerms(DSSTZonal.java:662)
>> at
>> org.orekit.propagation.semianalytical.dsst.DSSTPropagator.computeMeanOrbit(DSSTPropagator.java:508)
>> at
>> org.orekit.propagation.semianalytical.dsst.DSSTPropagator.computeMeanS
>> tate(DSSTPropagator.java:369)
>
> It seems that there is a problem in the various max indices.
>
> I think you have maxFrequencyShortPeriodics = 28 and maxDegreeShortPeriodics > 15 and it seems one loop using these parameters fails. I am not sure yet if the javadoc is wrong about the relationship between these two parameters, or the interval check is wrong.
>
> Could you tell us what are the values you used for building DSSTZonal?
>
> best regards,
> Luc
>
>>
>> Best regards,
>>
>> Elisabet
>>
diff --git a/src/main/java/org/orekit/propagation/semianalytical/dsst/forces/DSSTZonal.java b/src/main/java/org/orekit/propagation/semianalytical/dsst/forces/DSSTZonal.java
index 2ab6dea..bf9b110 100644
--- a/src/main/java/org/orekit/propagation/semianalytical/dsst/forces/DSSTZonal.java
+++ b/src/main/java/org/orekit/propagation/semianalytical/dsst/forces/DSSTZonal.java
@@ -755,7 +755,7 @@ public class DSSTZonal implements DSSTForceModel {
}
// j between 1 and 2N-3
- if (isBetween(j, 1, 2 * nMax - 3)) {
+ if (isBetween(j, 1, 2 * nMax - 3) && j + 2 < cjsj.jMax) {
final double coef1 = ( j + 2 ) * (-hk * cjsj.getCj(j + 2) + k2mh2o2 * cjsj.getSj(j + 2));
final double coef2 = ( j + 2 ) * (k2mh2o2 * cjsj.getCj(j + 2) + hk * cjsj.getSj(j + 2));
final double coef3 = ( j + 2 ) * (k * cjsj.getCj(j + 2) + h * cjsj.getSj(j + 2)) / 4;
@@ -779,7 +779,7 @@ public class DSSTZonal implements DSSTForceModel {
}
// j between 1 and 2N-2
- if (isBetween(j, 1, 2 * nMax - 2)) {
+ if (isBetween(j, 1, 2 * nMax - 2) && j + 1 < cjsj.jMax) {
final double coef1 = 2 * ( j + 1 ) * (-h * cjsj.getCj(j + 1) + k * cjsj.getSj(j + 1));
final double coef2 = 2 * ( j + 1 ) * (k * cjsj.getCj(j + 1) + h * cjsj.getSj(j + 1));
final double coef3 = ( j + 1 ) * cjsj.getCj(j + 1);
@@ -803,7 +803,7 @@ public class DSSTZonal implements DSSTForceModel {
}
// j between 2 and 2N
- if (isBetween(j, 2, 2 * nMax)) {
+ if (isBetween(j, 2, 2 * nMax) && j - 1 < cjsj.jMax) {
final double coef1 = 2 * ( j - 1 ) * (h * cjsj.getCj(j - 1) + k * cjsj.getSj(j - 1));
final double coef2 = 2 * ( j - 1 ) * (k * cjsj.getCj(j - 1) - h * cjsj.getSj(j - 1));
final double coef3 = ( j - 1 ) * cjsj.getCj(j - 1);
@@ -827,7 +827,7 @@ public class DSSTZonal implements DSSTForceModel {
}
// j between 3 and 2N + 1
- if (isBetween(j, 3, 2 * nMax + 1)) {
+ if (isBetween(j, 3, 2 * nMax + 1) && j - 2 < cjsj.jMax) {
final double coef1 = ( j - 2 ) * (hk * cjsj.getCj(j - 2) + k2mh2o2 * cjsj.getSj(j - 2));
final double coef2 = ( j - 2 ) * (-k2mh2o2 * cjsj.getCj(j - 2) + hk * cjsj.getSj(j - 2));
final double coef3 = ( j - 2 ) * (k * cjsj.getCj(j - 2) - h * cjsj.getSj(j - 2)) / 4;
@@ -866,7 +866,7 @@ public class DSSTZonal implements DSSTForceModel {
currentSij[5] *= this.x2on2a2xp1;
// j is between 1 and 2 * N - 1
- if (isBetween(j, 1, 2 * nMax - 1)) {
+ if (isBetween(j, 1, 2 * nMax - 1) && j < cjsj.jMax) {
// Compute cross derivatives
// Cj(alpha,gamma) = alpha * dC/dgamma - gamma * dC/dalpha
final double CjAlphaGamma = alpha * cjsj.getdCjdGamma(j) - gamma * cjsj.getdCjdAlpha(j);