GPOrbit
Aller à la navigation
Aller à la recherche
How to call it
For using the GPOrbit class, the developer has only to create such an object with these two possibilities:
- With no orbit initialization:
gpOrbit = new GPOrbit("Orbit");
- Or, if we want to initialize the widget with a predefined orbit:
final Frame CIRF = FramesFactory.getCIRF();
final TimeScale TUC = TimeScalesFactory.getUTC();
final AbsoluteDate date0 = new AbsoluteDate(2010, 1, 1, 12, 0, 0., TUC);
final double ae = Constants.WGS84_EARTH_EQUATORIAL_RADIUS;
final double mu = Constants.WGS84_EARTH_MU;
ApsisOrbit orbit =
new ApsisOrbit(ae+200.e+3, ae+300.e+3, FastMath.toRadians(51.6), 0., 0., 0.,
PositionAngle.MEAN, CIRF, date0, mu);
gpOrbit = new GPOrbit("Orbit", orbit);
We have also the possibility to customize the list of frames and/or types of parameters. In the example below, we will be able only to propose GCRF, CIRF and EME2000 for frames when only Keplerian, Cartesian, ApsisRadius and Reentry will be available for type of parameters:
GPRefFrame[] tabFrames = gpOrbit.getAvailableFrames();
GPRefFrame[] tabFramesSimplified = new GPRefFrame[3];
tabFramesSimplified[0] = tabFrames[0];
tabFramesSimplified[1] = tabFrames[1];
tabFramesSimplified[2] = tabFrames[6];
gpOrbit.setAvailableFrames(tabFramesSimplified);
GPParamsType[] tabParams = gpOrbit.getAvailableParamsTypes();
GPParamsType[] tabParamsSimplified = new GPParamsType[4];
tabParamsSimplified[0] = tabParams[0];
tabParamsSimplified[1] = tabParams[1];
tabParamsSimplified[2] = tabParams[5];
tabParamsSimplified[3] = tabParams[7];
gpOrbit.setAvailableParamsTypes(tabParamsSimplified);