[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orekit Users] Configuration Error "no IERS UTC-TAI data loaded"



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);
       }

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