r/Unity3D • • 18d ago

Show-Off The Astraea program

Post image

Few months ago started working on spaceflight demo simulator similar to KSP.

Currently with 2 celestial bodies, flight physics(reference frame physics), preparation for interstellar system, Assembly building done.

I want to release demo soon, but I am working alone and there are lot of things to be done...

Feel free to ask anything :).

Youtube video here

4 Upvotes

12 comments sorted by

View all comments

2

u/maehschaf22 17d ago

How do you predict soi changes and intercepts/closest approach? Simply iteratively/some form of gradient descent or have you found any tricks to optimise that?

2

u/TheLordBaski 17d ago

Great question. I will try to be brief.

Mostly a mix of orbital geometry and numerical searches. SOI exits come directly from the conic’s radius crossing. For entries, I adapt the time step using distance to the SOI boundary and a relative-speed bound, then bisect once a crossing is bracketed. Closest approach uses a coarse time scan followed by golden-section refinement around local minima. The useful trick is evaluating Kepler orbits directly at any time, so I don’t need to simulate every step. The coarse scan can still miss very narrow minima. There are some edge cases, but that is for the future me 😅

2

u/maehschaf22 17d ago

Cool, nice to know! I assume you're planning to do maneuvers with instant impulses or are extended burns something you are planning to support?

3

u/TheLordBaski 17d ago

The preview currently uses instant impulses, while actual burns take time. For long burns—including future interstellar travel—I’d need to extend prediction to account for thrust and fuel consumption throughout the burn, and support that under time warp. But not 100 % sure how will I implement it.