Skip to content

Reader for .sof orbit files#1120

Open
Vincent-FA wants to merge 2 commits intoskyfielders:masterfrom
Vincent-FA:feature/pluto-sof
Open

Reader for .sof orbit files#1120
Vincent-FA wants to merge 2 commits intoskyfielders:masterfrom
Vincent-FA:feature/pluto-sof

Conversation

@Vincent-FA
Copy link

@Vincent-FA Vincent-FA commented Feb 14, 2026

Following the discussion in this ticket: #650
I have made a reader for the Project Pluto standard orbit file (.sof).

I have only tried it with a single file, so with a single type of object (asteroid). I am not sure the file format will stay the same with other objects or object types, perhaps it's a good idea to implement a parser based on the file header instead, but I'm not sure how to do that.

Anyway in the test I took data from an image to compare it with the simulated position after integrat epoch change and this looks very good!

@brandon-rhodes
Copy link
Member

Thanks for contributing code with a test! It will probably be early next week before I take a look in detail — I'm thinking of making a new XEphem release for the first time in quite a while — but this will be on my list too.

In the meantime, do you know where and how this format is normally used? If we add this to the documentation, I'll want to point folks to where they can find .sof-formatted databases of objects, and give them an idea of how many they are likely to find. Thanks!

@Vincent-FA
Copy link
Author

Vincent-FA commented Feb 15, 2026

No hurry at all, it's working for me, I'm happy :)

I'm not sure .sof files are used anywhere outside Project Pluto. I will have a look to give you an answer, I'm rather new to this domain.

As mentioned in the related discussion, integrat is very useful to recompute orbital parameters for a different epoch with perturbations, where the osculating orbit is not accurate enough, and integrat only works with .sof files.

@brandon-rhodes
Copy link
Member

Oh — I see, this is to directly read the output of integrat into Skyfield, without having to convert it to another more common format like mpcorb?

(And, hah, have you ever done a web search for Project Pluto, trying to remember what it is? I'd forgotten it was the project that produced integrat, so I did a search, and, turns out there's another project by that name 🙂)

It's interesting that he provides an mpc2sof tool that can convert orbits in one direction.

https://github.com/Bill-Gray/lunar/blob/adeae7a88959af9564ff057fc5787c954774a008/mpc2sof.cpp

But I don't see a sof2mpc tool to go the other way — as though the Pluto Project is a black hole of orbits, where data can pass in to the ecosystem, but can never come back out 🙂

@Vincent-FA
Copy link
Author

Vincent-FA commented Feb 15, 2026

Yes that's it, and Yes I looked in the lunar (project pluto) code didn't find a way to convert the sof back to mpcorb or another format so I just had to write the .sof reader in skyfield to avoid manual operations of converting back to mpc or another format... It's actually more like a comet orbit format, based on periapsis epoch (Te and q), so computation is required to go back to M and a (not needed in skyfield).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants