How to find the last observed EOP date before predictions begin

Hello,

I am attempting to parse some EOP data to find out when observations end and predictions begin.

Here is my code so far:

 try (InputStream inputStream = new FileInputStream(eopFile)) {
    Collection<EOPEntry> eopEntryCollection = EopHistoryLoader.Parser.newFinalsColumnsParser(
            IERSConventions.IERS_2010,
            itrfVersionLoader,
            TimeScalesFactory.getTimeScales(),
            false
    ).parse(inputStream, "EOP Input Stream");

    // Find the date of the last observed data before predictions start
    AbsoluteDate lastObservedDate = null;
    for (EOPEntry entry : eopEntryCollection) {
        // unsure how to check if the entry is a predicted date or an observation date
        if(some EOPEntryCondition) { lastObservedDate = entry; }
    }
}

From my understanding, if I have a dataset that includes these entries:

24 2 9 60349.00 I  0.049993 0.000091  0.232997 0.000091  I 0.0035771 0.0000045                 P  -112.019    0.320    -7.256    0.159
24 210 60350.00 P  0.048673 0.000604  0.234994 0.000447  P 0.0032566 0.0001080                 P  -111.438    0.321    -7.077    0.160

then my last observed date would be 2024-02-09 because that date was not a prediction. But on the EOPEntry API I do not see a way to check this. Perhaps my approach is wrong. Please let me know, thank you in advance.


Also as a small follow on question, is there any other data loaders I need to configure with my DataProvidersManager to not use the default data for my task? Right now I am only adding my manager to my TimeScalesFactory and ITRFVersionLoader like so:

TimeScalesFactory.addUTCTAIOffsetsLoader(new TAIUTCDatFilesLoader(TAIUTCDatFilesLoader.DEFAULT_SUPPORTED_NAMES, manager));
ITRFVersionLoader itrfVersionLoader = new ITRFVersionLoader(ITRFVersionLoader.SUPPORTED_NAMES, manager);
            try (InputStream inputStream = new FileInputStream(eopFile)) {...}

But I’m not sure if I am missing any others.

Welcome @shanebenlolo
Prediction data is used when it is the only that is available. It is only overridden when you have several EOP files, some published before the other ones, and the prediction data from earlier files is replaced by finalized data from later files, but for the latest file you load, prediction is the only thing you can rely on, so Orekit uses it. It is important to have predicted data, it is needed for predicting operations on satellites, and even for real time as files will always be published with some delay anyway.

If you don’t want to use the default data, your best bet is to use data contexts.

Thanks for the response @luc

I am not trying to avoid using predicted data. I am only trying to parse the final date in the EOP file before predictions begin. Does Orekit offer any way for me to do this?

Thanks
Shane Benlolo

No, we just ignore the ‘I’ or ‘P’ indicator in the finals data EOP files.