Propagator problem

I have been using orekit propagator to calculate orbit with J2 gravity effects.I have tested seveal propagators but them all report an error below。Can anyone help me out?
Propagator I used:

 minStep = 0.001;
 maxstep = 1000.0;
 positionTolerance = 10.0;
tolerances =
	NumericalPropagator.tolerances(positionTolerance, initialOrbit, propagationType);
integrator =
	 new DormandPrince853Integrator(minStep, maxstep, tolerances[0], tolerances[1]);
	    		
 propagator= new NumericalPropagator(integrator); 
initialState = new SpacecraftState(initialOrbit);   
((NumericalPropagator) propagator).setInitialState(initialState); 
 provider = GravityFieldFactory.getNormalizedProvider(2, 2);                                                          
holmesFeatherstone =  new HolmesFeatherstoneAttractionModel(FramesFactory.getITRF(IERSConventions.IERS_2010,true),provider); // International Terrestrial Reference Frame, earth fixed
	        	                    
 ((NumericalPropagator) propagator).addForceModel(holmesFeatherstone);
minStep = 0.01;
 maxstep = 864000.0;
 positionTolerance = 500.0;
tolerances =NumericalPropagator.tolerances(positionTolerance, initialOrbit, initialOrbit.getType());
double[][] tol = NumericalPropagator.tolerances(1.0,  initialOrbit,OrbitType.EQUINOCTIAL);
	    		 
 integrator = new DormandPrince853Integrator(minStep, maxstep, tol[0], tol[1]);
 ((AdaptiveStepsizeIntegrator) integrator).setInitialStepSize(100. * minStep);	    		 
DSSTPropagator propagator= new DSSTPropagator(integrator);
propagator.setInitialState(new SpacecraftState(initialOrbit), PropagationType.MEAN);
	             
 // Central Body Force Model with un-normalized coefficients
unnormalized =	GravityFieldFactory.getConstantUnnormalizedProvider(2, 2);
propagator.addForceModel(new DSSTZonal(unnormalized));
propagator.addForceModel(new DSSTTesseral(FramesFactory.getITRF(IERSConventions.IERS_2010,true),  Constants.WGS84_EARTH_ANGULAR_VELOCITY, unnormalized));            
	

test code

double a = 42166258; // semi major axis in meters|
double e = 0; // eccentricity|
double i = FastMath.toRadians(0); // inclination|
double omega = FastMath.toRadians(127.68603402270246); // perigee argument|
double raan = FastMath.toRadians(0); // right ascension of ascending node|
double lM = 0; // mean anomaly|

AstroSatellite sat1=new AstroSatellite();|
sat1.initKelperPara(initialDate,mu, a, e, i, omega, raan, lM, Kepler);|
sat1.PropagateOrbit(startDate, endDate, outputStep, J2);|
ArrayList <EpherePara> ephList=sat1.getEphList();|
 the error:

image

I have tried to solve the problem as I found in the help doc that EcksteinHechlerPropagator is suited for near circular orbit propagation and support J2 effect.But it does not support equatorial orbit.
image

I am so confused,different propagator have so many differences.

Hi @AstroL

Here you have a double singularity. Both eccentricity and inclination are equals to 0.
What I recommend is to convert your initial orbit in Equinoctial orbit. Equinocal parameters are not singular. As a result, it will solve your singularity problems and let your program work for both numerical and DSST propagator.

    final Orbit keplerianOrbit = new KeplerianOrbit(a, e, i, omega, raan, lM, PositionAngle.MEAN, FramesFactory.getEME2000(), startDate, Constants.WGS84_EARTH_MU);
    final Orbit initialOrbit = OrbitType.EQUINOCTIAL.convertType(keplerianOrbit);

Another recommendation, when using the tolerances method, you should use the getType() method as followed:

tolerances =
	NumericalPropagator.tolerances(positionTolerance, initialOrbit, initialOrbit.getType());

For Eckstein-Hechler there is no magic solution. According to the reference paper of Eckstein and Hechler, the model cannot be used if the input orbit is equatorial (i.e., i = 0).

Best regards,
Bryan

Thank you so much! Your advice is really helpful!
I notice that orbit calculation may have different selection of
propagators concerning orbit type.Now I have this question.Can I encapsulate a class to provide a selectable orbit propagator?
As a collaboration work, I have to encapsulate a couple of classes on top of the orkit to provide a more
convenient orbit propagator for my coworkers specializing in electronic signal,who may not be familiar with orbit propagators.My goal is to do a preliminary analysis of coverage, revisit times, etc on a time-frame of up to 30 days. I am interested in ‘nominal’ orbits, design orbits such as repeating ground tracks, etc. Hence I thought a J2 model was ideal.KeplerianPropagator,DormandPrince8531ntegrator and EcksteinHechlerPropagator all have Propagator as their parent class.I prefer to use Factory Pattern,is there a recommended direction I can follow?

Hi,

I’m happy to see that it was helpful for you.

To answer your question, yes you can encapsulate a class to provide selectable orbit propagators.

A Factory is an interesting approach.
A recently made a tutorial in order to compare the accuracy and the computation time of the different orbit propagators in Orekit under orbit determination applications. In order to perform this job in a user-frendly way, I had to create a class to encapsulate different orbit propagators. I choose to do it with an enumerate, because I like the design of enumerate class. And I think that enumerate are easy to use for users. Please find below the enumerate:

It is very simple. It only has one method: getGravityField(). But you can improve it by adding a new method getPropagator() which will initialize the orbit propagator and configure the force models for the integrated ones (i.e., numerical and DSST).

public abstract Propagator getPropagator(SpacecraftState state,  SphericalHarmonicsProvider provider, Frame itrf);

Thanks to the enumerate and based on your above example, initializing the propagator can be done as followed

// Numerical propagator
PropagationMode mode = PropagationMode.NUMERICAL;
Propagator propagator = mode.getPropagator(new SpacecraftState(initialOrbit), mode.getGravityField(degree, order), FramesFactory.getITRF(IERSConventions.IERS_2010, true));

Best regards,
Bryan

Excellent work!I wil try that!
Also,I’m very interested in your work of comparing different propagators.Did you write something about it?Where can I read it?
Best wishes!

Currently I only wrote an abstract. I plan to present this work during the next International Astronautical Congress (IAC) in Paris. I keep my fingers crossed that the abstract will be accepted :crossed_fingers:.
I’ll send you the results once the study finished.

2 Likes

Good Luck!
I’ll be looking forward to that!

1 Like