[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orekit Users] DSSTPropagator isOsculating



Le 22/03/2016 14:06, Elisabet a écrit :
> The code to calculate the osculating parameters is the following:
> final UnnormalizedSphericalHarmonicsProvider provider =
> GravityFieldFactory.getUnnormalizedProvider(MeanValuesWithHandler.EARTHDEGREE,
> 0);
> 		final org.orekit.frames.Frame earthFrame
> =FramesFactory.getITRF(IERSConventions.IERS_2010,true); // terrestrial frame
> 		final DSSTForceModel force = new
> DSSTCentralBody(earthFrame,Constants.WGS84_EARTH_ANGULAR_VELOCITY,provider,
> MeanValuesWithHandler.EARTHDEGREE, MeanValuesWithHandler.EARTHDEGREE,
> MeanValuesWithHandler.EARTHORDER, MeanValuesWithHandler.EARTHDEGREE,
> MeanValuesWithHandler.EARTHORDER);
> 		final Collection<DSSTForceModel> forces = new
> ArrayList<DSSTForceModel>();
>         forces.add(force);
> 		SpacecraftState
> oscuState=DSSTPropagator.computeOsculatingState(s0, forces);

I cannot reproduce your error.
Here is a test case I created from your snippet above. I put it in the
DSSTPropagatorTest.java unit test file and ran it directly from Eclipse.
I paste the output below the code:


@Test
public void testDegreesSetting() throws OrekitException {
    int earthDegree = 4;
    int earthOrder  = 4;
    final UnnormalizedSphericalHarmonicsProvider provider =

GravityFieldFactory.getUnnormalizedProvider(earthDegree,
                                                                    0);
    final org.orekit.frames.Frame earthFrame
        =FramesFactory.getITRF(IERSConventions.IERS_2010,true); //
terrestrial frame
    final DSSTForceModel force = new

DSSTCentralBody(earthFrame,Constants.WGS84_EARTH_ANGULAR_VELOCITY,provider,
                                        earthDegree, earthDegree,
earthOrder, earthDegree,
                                        earthOrder);
    final Collection<DSSTForceModel> forces = new
                    ArrayList<DSSTForceModel>();
    forces.add(force);
    TimeScale tai = TimeScalesFactory.getTAI();
    AbsoluteDate initialDate = new AbsoluteDate("2015-07-01", tai);
    AbsoluteDate startDate = new AbsoluteDate("2015-07-03",
tai).shiftedBy(-0.1);
    AbsoluteDate endDate = new AbsoluteDate("2015-07-04", tai);
    Frame eci = FramesFactory.getGCRF();
    KeplerianOrbit orbit = new KeplerianOrbit(
            7120000.0, 1.0e-3, FastMath.toRadians(60.0),
            FastMath.toRadians(120.0), FastMath.toRadians(47.0),
            FastMath.toRadians(12.0),
            PositionAngle.TRUE, eci, initialDate,
Constants.EIGEN5C_EARTH_MU);
    SpacecraftState
    oscuState=DSSTPropagator.computeOsculatingState(new
SpacecraftState(orbit), forces);
    System.out.println("mean:       " +
OrbitType.EQUINOCTIAL.convertType(orbit));
    System.out.println("osculating: " + oscuState.getOrbit());
    for (String loadedData :
DataProvidersManager.getInstance().getLoadedDataNames()) {
        System.out.println("loaded data: " + loadedData);
    }
}

mean:       equinoctial parameters: {a: 7120000.0; ex:
-9.743700647852352E-4; ey: 2.2495105434386478E-4; hx:
0.39375193676896686; hy: 0.4222472565026574; lv: 179.0;}
osculating: equinoctial parameters: {a: 7119255.635558891; ex:
-7.180376343313375E-4; ey: 5.455028220287878E-4; hx: 0.3938741145261942;
hy: 0.42210590703727724; lv: 178.98614568290904;}
loaded data:
/home/luc/sources/eclipse/orekit/bin/potential/shm-format/eigen_cg03c_coef
loaded data:
/home/luc/sources/eclipse/orekit/bin/regular-data/UTC-TAI.history
loaded data:
/home/luc/sources/eclipse/orekit/bin/regular-data/Earth-orientation-parameters/yearly/finals2000A.2002.xml
loaded data:
/home/luc/sources/eclipse/orekit/bin/regular-data/Earth-orientation-parameters/yearly/eopc04_08_IAU2000.03
loaded data:
/home/luc/sources/eclipse/orekit/bin/regular-data/Earth-orientation-parameters/yearly/eopc04_08_IAU2000.04
loaded data:
/home/luc/sources/eclipse/orekit/bin/regular-data/Earth-orientation-parameters/yearly/eopc04_08_IAU2000.05
loaded data:
/home/luc/sources/eclipse/orekit/bin/regular-data/Earth-orientation-parameters/monthly/bulletinb_IAU2000-216.txt
loaded data:
/home/luc/sources/eclipse/orekit/bin/regular-data/Earth-orientation-parameters/monthly/bulletinb_IAU2000-217.txt
loaded data:
/home/luc/sources/eclipse/orekit/bin/regular-data/Earth-orientation-parameters/monthly/bulletinb_IAU2000.218

The data loaded were set up automatically from the Junit (see
the setUp method in the same file), it corresponds to some
arbitrary set.

Could you provide a complete running program that show the behaviour,
including the degrees and order you used (I selected 4 arbitrarily
above) and showing the configuration data and orbit?

best regards,
Luc

> 
> It gives me an arithmetic error if I try to change the
> UnnormalizedSphericalHarmonicsProvider. If the order of
> getUnnormalizedProvider(MeanValuesWithHandler.EARTHDEGREE, 0) is different
> from 0 it does not work and it gives me the error posted previously. For me,
> these two terms are the earth degree and earth order of the Earth potential.
> Why it does not work? Are they the same degree/order  terms as in
> DSSTCentralBody(earthFrame,Constants.WGS84_EARTH_ANGULAR_VELOCITY,provider,
> MeanValuesWithHandler.EARTHDEGREE, MeanValuesWithHandler.EARTHDEGREE,
> MeanValuesWithHandler.EARTHORDER, MeanValuesWithHandler.EARTHDEGREE,
> MeanValuesWithHandler.EARTHORDER);?
> 
> Best regards,
> 
> Elisabet
>