- #1
TheHarvesteR
- 14
- 0
Hi,
I've got a problem here, that I'd like to discuss before trying to implement any sort of solution.
Basically I've got a planetarium simulation, in which I'd like to plot a patched conic trajectory ahead of a spacecraft .
The planetarium only simulates two-body gravity, and switches gravity sources for spacecraft based on the SOI they are in. This was a decision made to make it possible to use deterministic propagation methods at all times, for both the spacecraft and any celestial body. This also means a patched conic trajectory isn't an approximation in this system, but the actual trajectory the ship will fly.
So, currently, all the orbit propagation is working properly, and spacecraft are able to move from one SOI to another, and have their orbits recalculated for the new reference frame, and that happens as expected.
What I want to add next is a patched conic 'renderer' system, that instead of drawing the spacecraft orbit as a simple conic section, would find if the orbit intersects any SOI (or leaves the current one), and draw a patched conic trajectory for the ship.
So this brings me to my original question. In order to render a patched conic trajectory, I need to somehow determine if and where along the orbit the ship would change SOIs. For the SOI escaping case, I believe this would be relatively straightforward, as it would require finding only the time at which the orbit radius equals the SOI radius.
For a SOI change like a lunar flyby, though, this would require calculating in advance the exact point in which the orbit enters the moon's SOI, to recalculate and go on from there, but keeping in mind that the moon itself is also orbiting, so by the time we reach the SOI distance, the moon will be further along its orbit.
So I'm hoping someone can enlighten me with some theory here... first, is it possible to calculate the point of SOI encounter like that? If not, what other options are there to plot a patched conic trajectory, having only the initial orbital parameters (and state vectors) as input?
Thanks in advance!
Cheers
I've got a problem here, that I'd like to discuss before trying to implement any sort of solution.
Basically I've got a planetarium simulation, in which I'd like to plot a patched conic trajectory ahead of a spacecraft .
The planetarium only simulates two-body gravity, and switches gravity sources for spacecraft based on the SOI they are in. This was a decision made to make it possible to use deterministic propagation methods at all times, for both the spacecraft and any celestial body. This also means a patched conic trajectory isn't an approximation in this system, but the actual trajectory the ship will fly.
So, currently, all the orbit propagation is working properly, and spacecraft are able to move from one SOI to another, and have their orbits recalculated for the new reference frame, and that happens as expected.
What I want to add next is a patched conic 'renderer' system, that instead of drawing the spacecraft orbit as a simple conic section, would find if the orbit intersects any SOI (or leaves the current one), and draw a patched conic trajectory for the ship.
So this brings me to my original question. In order to render a patched conic trajectory, I need to somehow determine if and where along the orbit the ship would change SOIs. For the SOI escaping case, I believe this would be relatively straightforward, as it would require finding only the time at which the orbit radius equals the SOI radius.
For a SOI change like a lunar flyby, though, this would require calculating in advance the exact point in which the orbit enters the moon's SOI, to recalculate and go on from there, but keeping in mind that the moon itself is also orbiting, so by the time we reach the SOI distance, the moon will be further along its orbit.
So I'm hoping someone can enlighten me with some theory here... first, is it possible to calculate the point of SOI encounter like that? If not, what other options are there to plot a patched conic trajectory, having only the initial orbital parameters (and state vectors) as input?
Thanks in advance!
Cheers