Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- For a while now, Kopernicus has allowed developers to input the celestial body's orbital period in seconds into the orbit node with the "period = " key. This is necessary to allow for planets to orbit "barycenter" bodies with the correct period. Even particularly massive moons and planets (such as Charon or Jupiter) will have a noticeably different orbital period compared to the massless particle KSP assumes for its orbit calculations. In fact, for cases like Jupiter or the Moon in RSS, finalizeOrbit has been in the plugin for a long time. If I recall correctly, finalizeOrbit changes the orbital period (and the SOI radius too I think) to accomodate for the masses of both planet and sun (or moon and planet) rather than just the parent body. I do not know if finalizeOrbit results in the same bug as I will be describing, but I believe the manual period key was based on it.
- However there is a problem. When you enter or exit the sphere of influence of a planet with a modified period, the velocity relative to that planet's parent body is the same as if the period were not changed.
- For example, say you have a planet orbiting the sun, and you've changed the period from 1 year to one billion billion bajillion years, so the planet is effectively stationary.
- EXPECTED: When you leave the SOI of the planet, you *should* fall into the Sun, since the planet isn't moving so you won't be moving fast.
- ACTUAL: Instead, you end up entering into orbit around the Sun as if you had done a normal escape burn.
- Similarly, if you edit a planet so its orbital year is changed from one year to one minute,
- EXPECTED: a ship starting in orbit of the sun should encounter the planet, and zip through its SOI in perhaps a second with a very high eccentricity orbit, then end up back in solar orbit, its orbit nearly unchanged by its brief encounter.
- ACTUAL: the ship would enter the speeding planet's SOI and start following the planet in its minute-long-orbit, slowly falling into the planet over the course of perhaps a month or so, then if it doesn't hit the planet, it would fly back out of the SOI. If it tried to leave from the same direction it came, i.e., the prograde direction of the planet, it wouldn't be able to leave, since the planet would catch back up to it as soon as it left the SOI.
- In a more realistic case, suppose you have two binary planets. Planet A is 1 earth mass; planet B is 0.5 earth masses. So you set up a barycenter with 1.5 earth masses.
- EXPECTED: to be honest i'm not sure what exactly to expect. No matter what, KSP is going to give incorrect results for binaries; it's just not set up for them.
- ACTUAL: but the results we get are game breaking--the spacecraft might leave the SOI, but be moving at too slow a speed, so the planet catches back up to it again. Or it might leave in the opposite direction, but with the wrong velocity, and gain or lose energy that it should not have been able to.
Advertisement
Add Comment
Please, Sign In to add comment