-
-
Notifications
You must be signed in to change notification settings - Fork 237
introduce MDASegment for SPK type 1 and 21 #973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
I also haven't had time yet to read through this pull request, but I'll try to find time this month or next, so that I can respond before summer is fully over. Before a feature like this could become part of Skyfield, I'd need a sample file that it could be shown to work successfully on, and also documentation and tests. Also, could you describe the audience who will be using this, so we can think about where in the docs it would be described? Thanks! |
|
There is already a chapter about Type 1 and Type 21 ephemeris formats in the documentation. It recommends to install Shushi Uetsuki's spktype01 resp, spktype21 and implement a helper class. For 'small bodies' like Chiron, Pholus and other not-so-popular asteroids there are no pre-built binary SPK files on the JPL- or NAIF-Server. Those Small-Body SPK files will most probably be
Example code from skyfield.api import load
ts = load.timescale()
t = ts.utc(2024, 7, 12)
chiron_kernel = load('20002060.bsp')
planets_kernel = load('de440.bsp')
earth = planets_kernel['earth']
sun = planets_kernel['sun']
# add the sun to make it barycentric
chiron = sun + chiron_kernel[20002060]
ra, dec, distance = earth.at(t).observe(chiron).radec()
print(ra)
print(dec) |
|
Depending on the time span you selected the ephemeris file will be multi-segmented. Instead of Admittedly, without a 'MultiKernel' (cf. #975) it's easier to use the spktype21 library mentioned above. It picks the time-segment automatically. |
|
@brandon-rhodes As said before, I think the proper place for the |
|
As for tests: |
Resolves #157
Injecting the
MDASegmentintoskyfield.jpllib.SpiceKernelis ... just a workaround. Might/should become a part ofjplephem.spk.SPK