Open brandon-rhodes opened 6 months ago
This is an interesting new case. Previously, all the PCK files that I had encountered had one segment per body, and so Skyfield was written with that simple case in mind. But now it looks like PCK files are being issued which have multiple segments for the same body. The commit that I've just made (which should appear right above this comment) lets us for the first time actually see what segments the object has been asked to load:
print(pc)
PlanetaryConstants
559 key-values in .variables dict
2 segments loaded
2287184.50..2607184.50 frame=1 Unknown Body (31008)
2607184.50..2688976.50 frame=1 Unknown Body (31008)
Since Skyfield stores the segments in a dictionary {object_id: segment}
, the second segment is tossing the first one out of the dictionary.
NumPy doesn't provide any way to transparently treat two arrays in memory as a single array, so it's not clear how to move forward here. I will draw up some possible approaches so they can be compared.
Discussed in https://github.com/skyfielders/python-skyfield/discussions/950