<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://patrius.cnes.fr/index.php?action=history&amp;feed=atom&amp;title=ConfigureFrames_4.4</id>
	<title>ConfigureFrames 4.4 - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://patrius.cnes.fr/index.php?action=history&amp;feed=atom&amp;title=ConfigureFrames_4.4"/>
	<link rel="alternate" type="text/html" href="https://patrius.cnes.fr/index.php?title=ConfigureFrames_4.4&amp;action=history"/>
	<updated>2026-04-08T08:36:14Z</updated>
	<subtitle>Historique des versions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://patrius.cnes.fr/index.php?title=ConfigureFrames_4.4&amp;diff=2478&amp;oldid=prev</id>
		<title>Admin : Page créée avec « &lt;syntaxhighlight lang=&quot;java&quot;&gt; public class ConfigureFrames {      public static void main(String[] args) throws PatriusException, IOException, URISyntaxException {... »</title>
		<link rel="alternate" type="text/html" href="https://patrius.cnes.fr/index.php?title=ConfigureFrames_4.4&amp;diff=2478&amp;oldid=prev"/>
		<updated>2019-10-03T12:09:14Z</updated>

		<summary type="html">&lt;p&gt;Page créée avec « &amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; public class ConfigureFrames {      public static void main(String[] args) throws PatriusException, IOException, URISyntaxException {... »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
public class ConfigureFrames {&lt;br /&gt;
&lt;br /&gt;
    public static void main(String[] args) throws PatriusException, IOException, URISyntaxException {&lt;br /&gt;
&lt;br /&gt;
        // Patrius Dataset initialization (needed for example to get the UTC time)&lt;br /&gt;
        PatriusDataset.addResourcesFromPatriusDataset();&lt;br /&gt;
        &lt;br /&gt;
        // Date of the orbit (given in UTC time scale)&lt;br /&gt;
        final TimeScale TUC = TimeScalesFactory.getUTC();&lt;br /&gt;
        final AbsoluteDate date = new AbsoluteDate(&amp;quot;2010-01-01T12:00:00.000&amp;quot;, TUC);&lt;br /&gt;
        &lt;br /&gt;
        // Storing by default configuration&lt;br /&gt;
        FramesConfiguration configDefault = FramesFactory.getConfiguration();&lt;br /&gt;
&lt;br /&gt;
        // First configuration as simple as possible ...&lt;br /&gt;
        FramesConfiguration config = getSimplifiedConfiguration(false);&lt;br /&gt;
        FramesFactory.setConfiguration(config);&lt;br /&gt;
        &lt;br /&gt;
        // Corresponding GCRF frame&lt;br /&gt;
        final Frame gcrfNoPN = FramesFactory.getGCRF();      &lt;br /&gt;
        // Corresponding GCRF frame&lt;br /&gt;
        final Frame icrfNoPN = FramesFactory.getCIRF();&lt;br /&gt;
        &lt;br /&gt;
        // Printing transform frame information&lt;br /&gt;
        print (gcrfNoPN, icrfNoPN, date);&lt;br /&gt;
        &lt;br /&gt;
        // Second configuration with precession and nutation ...&lt;br /&gt;
        config = getSimplifiedConfiguration(true);&lt;br /&gt;
        FramesFactory.setConfiguration(config);&lt;br /&gt;
        &lt;br /&gt;
        // GCRF frame&lt;br /&gt;
        final Frame gcrfPN = FramesFactory.getGCRF();        &lt;br /&gt;
        // GCRF frame&lt;br /&gt;
        final Frame icrfPN = FramesFactory.getCIRF();&lt;br /&gt;
&lt;br /&gt;
        // Printing frame information&lt;br /&gt;
        print (gcrfPN, icrfPN, date);&lt;br /&gt;
        &lt;br /&gt;
        //Setting by default configuration&lt;br /&gt;
        FramesFactory.setConfiguration(configDefault);&lt;br /&gt;
&lt;br /&gt;
        // GCRF frame&lt;br /&gt;
        final Frame gcrfDef = FramesFactory.getGCRF();        &lt;br /&gt;
        // GCRF frame&lt;br /&gt;
        final Frame icrfDef = FramesFactory.getCIRF();&lt;br /&gt;
&lt;br /&gt;
        // Printing frame information&lt;br /&gt;
        print (gcrfDef, icrfDef, date);&lt;br /&gt;
               &lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Method to print results (transformation from frame1 to frame2).&lt;br /&gt;
     * @param frame1        First frame&lt;br /&gt;
     * @param frame2        Second frame&lt;br /&gt;
     * @param date          Date when we want to compare&lt;br /&gt;
     * @throws OrekitException&lt;br /&gt;
     */&lt;br /&gt;
    private static void print ( Frame frame1, final Frame frame2, final AbsoluteDate date ) throws PatriusException {&lt;br /&gt;
        final Transform transform = frame1.getTransformTo(frame2, date);&lt;br /&gt;
        System.out.println();&lt;br /&gt;
        System.out.println(&amp;quot;Psi: &amp;quot;+transform.getRotation().getAngles(RotationOrder.ZYX)[0]);&lt;br /&gt;
        System.out.println(&amp;quot;Teta: &amp;quot;+transform.getRotation().getAngles(RotationOrder.ZYX)[1]);&lt;br /&gt;
        System.out.println(&amp;quot;Phi: &amp;quot;+transform.getRotation().getAngles(RotationOrder.ZYX)[2]);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     * Method to configure frames configuration.&lt;br /&gt;
     * @param isPrecNut  if true =&amp;gt; precession &amp;amp; nutation&lt;br /&gt;
     * @return frame configuration object&lt;br /&gt;
     */&lt;br /&gt;
    private static FramesConfiguration getSimplifiedConfiguration( final boolean isPrecNut ) {&lt;br /&gt;
&lt;br /&gt;
        // Configurations builder&lt;br /&gt;
        final FramesConfigurationBuilder builder = new FramesConfigurationBuilder();&lt;br /&gt;
&lt;br /&gt;
        // Tides and libration&lt;br /&gt;
        final TidalCorrectionModel tides = TidalCorrectionModelFactory.NO_TIDE;&lt;br /&gt;
        final LibrationCorrectionModel lib = LibrationCorrectionModelFactory.NO_LIBRATION;&lt;br /&gt;
&lt;br /&gt;
        // Polar Motion&lt;br /&gt;
        final PolarMotion defaultPolarMotion = new PolarMotion(false, tides, lib, SPrimeModelFactory.NO_SP);&lt;br /&gt;
&lt;br /&gt;
        // Diurnal rotation&lt;br /&gt;
        final DiurnalRotation defaultDiurnalRotation = new DiurnalRotation(tides, lib);&lt;br /&gt;
&lt;br /&gt;
        // Precession Nutation&lt;br /&gt;
        PrecessionNutation precNut = null;&lt;br /&gt;
        if ( isPrecNut ) {&lt;br /&gt;
            precNut = new PrecessionNutation(false,&lt;br /&gt;
                    PrecessionNutationModelFactory.PN_IERS2010_INTERPOLATED_NON_CONSTANT);&lt;br /&gt;
        } else {&lt;br /&gt;
            precNut = new PrecessionNutation(false,&lt;br /&gt;
                    PrecessionNutationModelFactory.NO_PN);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        builder.setDiurnalRotation(defaultDiurnalRotation);&lt;br /&gt;
        builder.setPolarMotion(defaultPolarMotion);&lt;br /&gt;
        builder.setPrecessionNutation(precNut);&lt;br /&gt;
        builder.setEOPHistory(new NoEOP2000History());&lt;br /&gt;
&lt;br /&gt;
        return builder.getConfiguration();&lt;br /&gt;
        &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>