Using different atmospheric densities


I’m trying to input a different atmosphere for use with the orbit propagator, but am struggling a bit with the Java as I have very little experience with the language (I’ve been running orekit with the python wrapper) and wondered if someone could help. I know I need to create a new class to interface with Atmosphere and have been using as a starting point. Within this class is the getDensity function which uses date, position and frame but I can’t see where these values are read in from. Are they the initial conditions of the satellite?


Hi @elzbth ,

The getDensity methods are mainly called in the DragForce#acceleration methods which are themselves called in the ForceModel#addContribution methods that are used during the integration process.

So no they are not the initial conditions of the satellite but the current date, position and frame of the spacecraft at a given point of the propagation.
Consider it an input given to you by Orekit; you don’t need to actually compute them, they are provided by the library.

If you write down your getDensity methods and the other required methods of the Atmosphere interface, then you just need to use your new Atmospheric model in a DragForce instance.


DragForce myDragForceInstance = new DragForce(myAtmosphericModel, myDragSensitiveModel);

And then add this drag force instance to a numerical propagator:


Orekit will handle computing the date, position and frame inputs needed during the propagation.

More generally your Java IDE can help you find out the classes’ hierarchy or where the methods are called in the code.
For example in Eclipse you can right-click on a method and choose “Open Call Hierarchy” to see where the method is called in all your projects.
Or you can right-click on a class and choose “Open Type Hierarchy” to see the actual classes’ hierarchy it belongs to.

Hope this helps,

Thank you, that helps.