« API Propagation » : différence entre les versions
Aucun résumé des modifications |
|||
| Ligne 51 : | Ligne 51 : | ||
=== Propagation data initialization === | === Propagation data initialization === | ||
The | The simplest way is to use the setPropagationData() method passing only the duration of the propagation and the output step. All other data (for the numerical propagator) will be considered with default values. | ||
<syntaxhighlight lang="java"> | <syntaxhighlight lang="java"> | ||
Version du 10 septembre 2021 à 11:03
There are two possibilities to initialize an orbital propagation using a GtmLeoPropagator or a GtmLeoPropagator object.
LEO propagation
First, we will have to create a GtmLeoPropagator object:
final GtmLeoPropagator leo = new GtmLeoPropagator();
Then, we will set all the information needed for the propagation ...
Initial orbit initialization
We may use the GtmLeoSimpleOrbit object which allows to enter simplified data as defined below and here or a full PATRIUS Orbit object
// Orbit initialization
final AbsoluteDate date = new AbsoluteDate("2020-01-01T00:00:00.000", GtmConstants.UTC);
final double hp = 299.e+3;
final double ha = 300.e+3;
final double inc = FastMath.toRadians(51.6);
final GtmLeoSimpleOrbit simpleOrbit = new GtmLeoSimpleOrbit(date, hp, ha, inc);
leo.setIniOrbit(simpleOrbit.getOrbit());
Vehicle initialization
As for the initial orbit, we may use a GtmSimpleVehicle object for simpler data or a full PATRIUS Vehicle object.
// Vehicle characteristics
final double dryMass = 1000.;
final double mainArea = 1.;
final double spArea = 2.;
final double cd = 2.;
final GtmSimpleVehicle veh = new GtmSimpleVehicle(dryMass, mainArea, spArea, 0., 0., cd, 0., 0., 0.);
leo.setVehicle(veh.getVehicle());
Forces initialization
Here again, we can use a GtmSimpleForces object or define a full PATRIUS ForceModelsData object.
// Forces models
final GtmSimpleForces forces = new GtmSimpleForces(2, 0, true, false, false, false, false, leo.getAssembly(), leo.getEllipsoid());
leo.setForces(forces.getForces());
Propagation data initialization
The simplest way is to use the setPropagationData() method passing only the duration of the propagation and the output step. All other data (for the numerical propagator) will be considered with default values.
// Propagation data
leo.setPropagationData(Constants.JULIAN_DAY, GtmConstants.HOUR);
But it is also possible to use the same method with a GtmPropagationData GtmPropagationData object as argument. The example below is fully equivalent to the previous one:
final GtmPropagationData propData = new GtmPropagationData(Constants.JULIAN_DAY, GtmConstants.HOUR, 1.0, 300., 7.e-6, 3.e-10, 0., 0.)
leo.setPropagationData(propData);
Propagation
To propagate the trajectory, it is only needed to call the propagate() method:
leo.propagate();
GEO progation
For GEO orbits, the principle is exactly the same as for LEO ones except the fact that we will use a GtmLeoPropagator object.
final GtmGeoPropagator geo = new GtmGeoPropagator();
// Orbit initialization
final AbsoluteDate date = new AbsoluteDate("2020-01-01T00:00:00.000", GtmConstants.UTC);
final double lon = FastMath.toRadians(75.);
final GtmGeoSimpleOrbit simpleOrbit = new GtmGeoSimpleOrbit(date, 0., 0., 0., lon);
geo.setIniOrbit(simpleOrbit.getOrbit());
// Vehicle characteristics
final double dryMass = 3000.;
final double mainArea = 10.;
final double spArea = 90.;
final GtmSimpleVehicle veh = new GtmSimpleVehicle(dryMass, mainArea, spArea, 0., 0., 0., 0., 0.);
geo.setVehicle(veh.getVehicle());
// Forces models
final GtmSimpleForces forces = new GtmSimpleForces(0, 0, false, false, false, false, false, geo.getAssembly(), geo.getEllipsoid());
geo.setForces(forces.getForces());
// Propagation data
geo.setPropagationData(7*Constants.JULIAN_DAY, GtmConstants.HOUR);
// Propagation
geo.propagate();