Comment by krisoft
14 hours ago
To calculate the orbital positions i used the skyfield python library. https://rhodesmill.org/skyfield/
They have a very handy example right on the landing page how one can calculate the positions and angles of a planet from a date.
The inverse was a bit trickier. But I also implemented a script which could “solve” a given picture backwards and give us a date. I believe i used binary search to narrow the date down first for the planet with the slowest period, and then refined the date around that timestamp using the position of the planet one faster. That way the estimate got more and more accurate and i didn’t need to brute force search a large time interval. (I applied the assumption that the date to be found is within half a saturn year from our current date, but if that assumption were incorrect it would have resulted in a solver failure during the refinement and thus detected.)
No comments yet
Contribute on Hacker News ↗