How to correctly set up force models?

hello everyone!
I am using orekit to calculate satellite ephemeris data. Without using the force models, the calculation results are basically consistent with STK. However, after adding the force models, the calculation results become increasingly different over time. How can I set these parameters in orekit?
Here is a screenshot of the parameters in STK:

Here is my code:

        final double MASS = 1000;  
        final double CR = 1;  
        final double AREA_MASS_RATIO = 0.02; 
        final double AREA = MASS*AREA_MASS_RATIO; 
        final double DRAG_CD = 2.2; 
        final Orbit initialOrbit = new KeplerianOrbit(a, e, getIR(), getArgumentOfPerigeeR(),  getRannR(), getMeanAnomalyR(), PositionAngleType.MEAN, frame, toAbsoluteDate(), Constants.WGS84_EARTH_MU);;
        final AbstractIntegrator integrator = new DormandPrince853Integrator(1,86400, 1e-13, 1e-13);
        final NumericalPropagator propagator = new NumericalPropagator(integrator);
        // Moon
        propagator.addForceModel(new ThirdBodyAttraction(CelestialBodyFactory.getMoon()));
        // Sun
        propagator.addForceModel(new ThirdBodyAttraction(CelestialBodyFactory.getSun()));
        // gravity
        var gravityField = GravityFieldFactory.getNormalizedProvider(21, 21);
        HolmesFeatherstoneAttractionModel egm2008Model = new HolmesFeatherstoneAttractionModel(OrekitUtil.ITRF, gravityField);
        propagator.addForceModel(egm2008Model);
        // SolidTide
        SolidTides solidTides = new SolidTides(OrekitUtil.ITRF, gravityField.getAe(), gravityField.getMu(), gravityField.getTideSystem(),false,
                SolidTides.DEFAULT_STEP, SolidTides.DEFAULT_POINTS, IERSConventions.IERS_2010, TimeScalesFactory.getUT1(IERSConventions.IERS_2010, true), OrekitUtil.SUN, OrekitUtil.MOON);
        propagator.addForceModel(solidTides);

        // SolarRadiationPressure
        SolarRadiationPressure forceModel =
                new SolarRadiationPressure(OrekitUtil.SUN,OrekitUtil.EARTH,
                        new IsotropicRadiationSingleCoefficient(AREA, CR));
        propagator.addForceModel(forceModel);

        //Add air damping model, there is no default Jacchia Roberts model for STK here, so use Harris Priest model instead
//        Atmosphere atm = new NRLMSISE00(new InputParams(), OrekitUtil.SUN, OrekitUtil.EARTH);   //The difference between the NRLMSISE00 model results and STK is greater
        Atmosphere atm = new HarrisPriester(OrekitUtil.SUN, OrekitUtil.EARTH);
        var dragForce = new DragForce(atm, new IsotropicDrag(AREA, DRAG_CD));
        propagator.addForceModel(dragForce);

        final SpacecraftState initialState = new SpacecraftState(initialOrbit, MASS); 
        propagator.setInitialState(initialState);

        final EphemerisGenerator generator = propagator.getEphemerisGenerator();

        propagator.propagate(OrekitUtil.toAbsoluteDate(endTime));
        final BoundedPropagator ephemeris = generator.getGeneratedEphemeris();

        while (startTime.isBefore(endTime) || startTime.equals(endTime)){
            SpacecraftState intermediateState = ephemeris.propagate(startTime);
            GeodeticPoint geo = OrekitUtil.EARTH.transform(intermediateState.getPVCoordinates().getPosition(), intermediateState.getFrame(), intermediateState.getDate());
			System.out.println(geo);
            startTime = startTime.shiftBy(step);
        }

You should probably start with fewer force models, add them one at a time and check the differences.
I guess drag is the most plausible cause for differences, so add this last.

1 Like

Hello @pig357,

Coming by to drop this other forum thread that could prove to be useful to you : When using Orekit for orbit prediction with an atmospheric drag model, the predicted orbit 10 days out shows a 6-second difference compared to STK - #14 by baubin

Cheers,
Vincent