Establishing EarthFrame error

    IERSConventions conventions = IERSConventions.IERS_2010;
    boolean simpleEOP = true;                                              
    Frame earthFrame = FramesFactory.getITRF(conventions, simpleEOP);
    final BodyShape earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS,Constants.WGS84_EARTH_FLATTENING,FramesFactory.getITRF(conventions, simpleEOP));    

Above is my program, but it keeps giving an error on the line with Frame earthFrame.:
Exception in thread “main” org.orekit.errors.OrekitException: unable to find file {0}
at test/org.orekit.data.FundamentalNutationArguments.parseCoefficients(FundamentalNutationArguments.java:232)
at test/org.orekit.data.FundamentalNutationArguments.(FundamentalNutationArguments.java:166)
at test/org.orekit.utils.IERSConventions$3.lambda$0(IERSConventions.java:1561)
at test/org.orekit.utils.IERSConventions.load(IERSConventions.java:3012)
at test/org.orekit.utils.IERSConventions$3.getNutationArguments(IERSConventions.java:1561)
at test/org.orekit.utils.IERSConventions.getNutationArguments(IERSConventions.java:2310)
at test/org.orekit.utils.IERSConventions$3.getXYSpXY2Function(IERSConventions.java:1603)
at test/org.orekit.frames.CIRFProvider.(CIRFProvider.java:65)
at test/org.orekit.frames.AbstractFrames.getCIRF(AbstractFrames.java:403)
at test/org.orekit.frames.AbstractFrames.getTIRF(AbstractFrames.java:354)
at test/org.orekit.frames.AbstractFrames.getITRF(AbstractFrames.java:279)
at test/org.orekit.frames.FramesFactory.getITRF(FramesFactory.java:415)

It seems like a file might be missing, but I’ve already loaded the orekit-data file. This issue has been troubling me for several days. Does anyone have any ideas or can help me out as a beginner?

Did you add something to your code to tell it where to find the orekit-data file? If you go through some of the tutorials, there should be something like this in most of them:

    private void configureOrekit() {

        // configure Orekit
        final File home       = new File(System.getProperty("user.home"));
        final File orekitData = new File(home, "orekit-data");
        if (!orekitData.exists()) {
            System.err.format(Locale.US, "Failed to find %s folder%n",
                                orekitData.getAbsolutePath());
            System.err.format(Locale.US, "You need to download %s from %s, unzip it in %s and rename it 'orekit-data' for this tutorial to work%n",
                                "orekit-data-master.zip", "https://gitlab.orekit.org/orekit/orekit-data/-/archive/master/orekit-data-master.zip",
                                home.getAbsolutePath());
            System.exit(1);
        }
        final DataProvidersManager manager = DataContext.getDefault().getDataProvidersManager();
        manager.addProvider(new DirectoryCrawler(orekitData));
    };
1 Like