Hi, like in the title, is there a parser for a file like this:
S3A_SR___ROE_AX_20230822T190118_20230822T204318_20230822T210013___________________POD_O_NR____.EOF (298.8 KB)
And if not is there a way to create bounded propagator (like from SP3 ephemeris) based on ephemeris this file contains?
There are no parsers for this yet, but it does not seem really difficult to add, and to have the parser generate a bounded propagator from this.
Do you have a publicly available specification for the format?
You can also contribute such a parser, of course
Hey, I’m afraid I’m not versed enough in java to contribute yet but I’ll think about it ;). In the meantime I’ve managed to write a “parser” in python. I’ve got pandas dataframe with my data (datetime, X, Y, Z, VX, VY, VZ), I can easily convert it to java’s list of absolutePVCoordinates or SpacecraftStates, but I’m not sure what next. Most of the time I work with SP3 files so I would like to have ephemeris that works similarly. Would copying SP3Ephemeris class work, but instead SP3Coordinates I would have my own coordinates class?
Hi @jlipinski,
Once you have the list of SpacecraftStates you can instantiate an Ephemeris object which implements the BoundedPropagator interface.
Is that what you’re looking for?
Yes, kinda.
First there is a problem that EOF gives coordinates in ITRF so I need to change frame to EME for example, otherwise I get this error:
Java stacktrace:
org.orekit.errors.OrekitException: non pseudo-inertial frame "CIO/2010-based ITRF simple EOP"
at org.orekit.attitudes.LofOffset.(LofOffset.java:110)
at org.orekit.attitudes.LofOffset.(LofOffset.java:66)
at org.orekit.propagation.SpacecraftState.(SpacecraftState.java:305)
So I have my DataFrame eof_df
in which I have AbsolutePVCoordinates
in ITRF frame, I change them to EME2000 and I build list of spacecraft states:
eme = FramesFactory.getEME2000()
states = ArrayList().of_(SpacecraftState)
for i in eof_df["AbsPV"]:
timestamped = i.getPVCoordinates(eme)
state = SpacecraftState(AbsolutePVCoordinates(eme, timestamped.getDate(), timestamped.getPosition(), timestamped.getVelocity()))
Next I’ve tried to instantiate Ephemeris and use it like I would use BoundedPropagator:
eph = Ephemeris(states, len(eof_df))
eph.getPVCoordinates(AbsoluteDate(2023,8,22,18,22,45.,TimeScalesFactory.getUTC()), itrf)
but for dates that are not in the original file it results in NaN, for example:
2023-08-22 18:22:44 (this date is in original file):
<TimeStampedPVCoordinates: {2023-08-22T18:22:44.000, P(2502431.1836890006, 1811624.8780950003, 6474349.140417), V(-3455.508078, -5984.095810000002, 3003.599313000001), A(-0.8594268176616594, 0.5135932201750665, 2.1896576856306276E-6)}>
2023-08-22 18:22:45 (this date is NOT in original file):
<TimeStampedPVCoordinates: {2023-08-22T18:22:45.000, P(NaN, NaN, NaN), V(NaN, NaN, NaN), A(NaN, NaN, NaN)}>
Is there something about constructing and propagating ephemeris that I don’t understand?
Hi again,
I think you should reduce the number of interpolation points.
Change this:
eph = Ephemeris(states, len(eof_df))
With this:
eph = Ephemeris(states, 8)
I’ve chosen 8 because it’s a typical value. SP3Parser
in Orekit uses 7 so you could also choose that number.