[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orekit Users] Configuration Error "no IERS UTC-TAI data loaded"
Le 06/02/2018 à 04:54, noah.fehrenbacher@lmco.com a écrit :
> Iâve recently installed orekit 9.1 and received the following error:
>
> âno IERS UTC-TAI data loadedâ
>
> I downloaded the orekit-data.zip, unzipped and placed orekit-data
> folder in my projects src folder. I found the FAQ on the error and
> added the following to my code:
>
> File orekitData = new File("/my projects src folder/orekit-data");
> DataProvidersManager manager = DataProvidersManager.getInstance();
> manager.addProvider(new DirectoryCrawler(orekitData));
>
> I still get the same âno IERS UTC-TAI data loadedâ when trying to
> use âTimeScale utc = TimeScalesFactory.getUTC();â. Iâve made sure
> orekit found the orekit-data directory (tested misspelling the path
> and got an error saying orekit couldnât find the orekit-data
> folder). It appears orekit doesnât understand its own .zip file
> directory structure and the lines of code above are incorrect in
> setting the default config.
>
> The directory structure is irrelevant to Orekit. The library explores
> the folder and its sub-folders and opens the files it needs based
> on name patterns. When it is looking for UTC-TAI data, it looks for
> either a file named utc-tai.dat, UTC-TAI.history (or the same names
> with .gz appended for compressed files).
>
> Could you check the following points:
>
> - is there a file utc-tai.dat or UTC-TAI.history (beware of the
> case) in the unzipped orekit-data folder?
>
> Yes is checked and there is a tai-utc.dat, not utc-tai.dat
>
> - does this file looks like a normal text file?
>
> Yes, it's ascii/UTF-8
>
> - so you have read permission for this file and all the directories
> above it?
>
> Yes
>
> - if you are in windows, does some of the intermediate folders have
> a space in them (normally it work even with spaces or weird characters,
> but some times we had problems)
>
> On Apple
>
> - when you get the OrekitException with the missing data, could you
> catch it and attempt to print what was already loaded as follows:
> try {
> ... your calling code here ...
> } catch (OrekitException oe) {
> for (String loaded :
> DataProvidersManager.getInstance().getLoadedDataNames()) {
> System.out.println(loaded);
> }
> oe.printStackTrace(System.err);
> }
Were you able to catch the exception?
Here is another suggestion, but it requires that you patch Orekit
itself. In the DiectoryCrawler.java file, add some trace in the method
feed(supported, visitor, directory).
You can for example add this before line 97:
System.out.println("supported = " + supported +
", directory = " + directory);
and this before line 136:
System.out.println("attempting to load:" + list[i].getPath());
This should display, for all types of data loaded, how Orekit will
explore your directories hierarchy. Maybe this will help locate
the problem.
Best regards,
Luc
>
> If there is a configuration problem, I guess nothing will be loaded so the
> loop will not print anything, we may get some information from the
> exception stack trace, though.
>
> best regards,
> Luc
>