« API Propagation » : différence entre les versions
| Ligne 11 : | Ligne 11 : | ||
Then, we will set all the information needed for the propagation ... | Then, we will set all the information needed for the propagation ... | ||
=== Initial orbit === | === Initial orbit initialization === | ||
We may use the [{{PathCurrentJavaDoc}}/fr/cnes/dynvol/gentleman/calc/data/orbit/GtmLeoSimpleOrbit.html GtmLeoSimpleOrbit] object which allows to enter simplified data as defined below and [[Orbit#Simple_Orbit|here]] or a full [http://patrius.cnes.fr PATRIUS] [{{PathCurrentPatriusJavaDoc}}/fr/cnes/sirius/patrius/orbits/Orbit.html Orbit] object | We may use the [{{PathCurrentJavaDoc}}/fr/cnes/dynvol/gentleman/calc/data/orbit/GtmLeoSimpleOrbit.html GtmLeoSimpleOrbit] object which allows to enter simplified data as defined below and [[Orbit#Simple_Orbit|here]] or a full [http://patrius.cnes.fr PATRIUS] [{{PathCurrentPatriusJavaDoc}}/fr/cnes/sirius/patrius/orbits/Orbit.html Orbit] object | ||
| Ligne 25 : | Ligne 25 : | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Vehicle === | === Vehicle initialization === | ||
As for the initial orbit, we may use a [{{PathCurrentJavaDoc}}/fr/cnes/dynvol/gentleman/calc/data/vehicle/GtmSimpleVehicle.html GtmSimpleVehicle] object for simpler data or a full [http://patrius.cnes.fr PATRIUS] [{{PathCurrentPatriusJavaDoc}}/fr/cnes/sirius/patrius/assembly/Vehicle.html Vehicle] object. | As for the initial orbit, we may use a [{{PathCurrentJavaDoc}}/fr/cnes/dynvol/gentleman/calc/data/vehicle/GtmSimpleVehicle.html GtmSimpleVehicle] object for simpler data or a full [http://patrius.cnes.fr PATRIUS] [{{PathCurrentPatriusJavaDoc}}/fr/cnes/sirius/patrius/assembly/Vehicle.html Vehicle] object. | ||
| Ligne 39 : | Ligne 39 : | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Forces === | === Forces initialization === | ||
Here again, we can use a [{{PathCurrentJavaDoc}}/fr/cnes/dynvol/gentleman/calc/data/forces/GtmSimpleForces.html GtmSimpleForces] object or define a full [http://patrius.cnes.fr PATRIUS] [{{PathCurrentPatriusJavaDoc}}/fr/cnes/sirius/patrius/forces/ForceModelsData.html ForceModelsData] object. | Here again, we can use a [{{PathCurrentJavaDoc}}/fr/cnes/dynvol/gentleman/calc/data/forces/GtmSimpleForces.html GtmSimpleForces] object or define a full [http://patrius.cnes.fr PATRIUS] [{{PathCurrentPatriusJavaDoc}}/fr/cnes/sirius/patrius/forces/ForceModelsData.html ForceModelsData] object. | ||
| Ligne 49 : | Ligne 49 : | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Propagation data === | === Propagation data initialization === | ||
The siplest 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. | The siplest 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. | ||
| Ligne 63 : | Ligne 63 : | ||
final GtmPropagationData propData = new GtmPropagationData(Constants.JULIAN_DAY, GtmConstants.HOUR, 1.0, 300., 7.e-6, 3.e-10, 0., 0.) | final GtmPropagationData propData = new GtmPropagationData(Constants.JULIAN_DAY, GtmConstants.HOUR, 1.0, 300., 7.e-6, 3.e-10, 0., 0.) | ||
leo.setPropagationData(propData); | leo.setPropagationData(propData); | ||
</syntaxhighlight> | |||
== Propagation === | |||
To propagate the trajectory, it is only needed to call the [[{{PathCurrentJavaDoc}}/fr/cnes/dynvol/gentleman/calc/propagation/AbstractGtmPropagator.html propagate()]] method: | |||
<syntaxhighlight lang="java"> | |||
leo.propagate(); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
== GEO progation == | == GEO progation == | ||
Version du 10 septembre 2021 à 10:56
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 siplest 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();