Jump to content

Question about orbit transfers


TheGadfly

Recommended Posts

I'm pretty new to the game and spaceflight sims in general, and have only completed Kerbin orbits with my own spacecraft. I decided to try the tutorials for any extra tips.

I was doing the Mun orbit transfer mission and I noticed that the two orbits intersect at a nearly perpendicular angle. It seems a strange path for a drifting spacecraft to take. Also, when I recaptured orbit with Kerbin, I noticed that my velocity figure above the Gimbal suddenly changed.

I would imagine that such sudden changes shouldn't be possible. So, does KSP simplify things to save on CPU cycles, or am I seeing things incorrectly?

transfer1.png

Edited by TheGadfly
Link to comment
Share on other sites

Your altitude, navball orientation, and speed are all relative to the SoI your in.

As far as orbit behaviour, that's how patched conics modelling works.. Only the one SoI is modelled at a time. At least I hope you don't expect a recreational space simulatior to have solve the N-body problem. heh.

Edited by Qumefox
Link to comment
Share on other sites

does KSP simplify things to save on CPU cycles
Yes, every world exists in its own little simulated universe, and you transition from one to another. However, the game actually maintains your course and heading in absolute terms, and it only appears funky as you change perspectives and coordinate origin points.
Link to comment
Share on other sites

I'll add the plot below to illustrate Vanamonde's point:

GqC2c.png

The plot compares a free-return trajectory calculated using the "KSP patched conic" model with a free-return trajectory calculated using a 3-body model given the same initial conditions as the KSP patched conic model. Both trajectories are shown in Kerbin centric coordinates. Even though Kerbin and the Mun wobble around their mutual barycentre in the 3-body model, there still isn't a huge difference in the results when I transpose the 3-body model results into Kerbin-centric coordinates.

In short, the KSP patched conics work just fine at simulating even complex orbits like a free-return trajectory.

Link to comment
Share on other sites

He might simply be referring to the disjointed way KSP projects orbits by default. Which is just how it's displayed, not how spacecraft actually move. the patched conic display mode can be changed in the config file.. changing the mode to 3 will give 'true' orbits but it can be buggy at times, and is slightly harder to see exactly what inclinations your on when trying to do more precise orbit injections.. (for instance, it's easier to see being off 5 degrees when the line is extended well past either side of the body, than it is when it's looped close in around the body.

Link to comment
Share on other sites

Sorry, but there are a lot of terms that I'm not quite familiar with in your post. Again, I'm really new to this. Could you elaborate on SoI and patched conics modeling, to start? I'm guessing with patched conics you're sticking ellipses and parabolas together?

Edited by TheGadfly
Link to comment
Share on other sites

This is correct. The SOI is the region where one body predominates; patched conics assumes that all other bodies do not affect the ship at this point.

Additionally, to save on calculations, the SOI is assumed to be spherical.

Since each region has only one gravitational body, you can use Kepler's law -- all bodies travel in conic sections. This means there is a closed form solution to your ship's trajectory, so you can compute the position of your ship a long time later, making time warp easy.

There are 5 implemented draw modes for the patched conics system in KSP. What you are seeing, Mode 1 (as well as 0 and 2 (Yes, SQUAD counts from 0)), shows all the trajectories relative to the object your spacecraft is orbiting at that time. Mode 0 has all the trajectories around the body that you will be orbiting at the position the bodies are now. Mode 1 (default) connects the trajectories at encounter points (entering). Mode 2 connects them at escape points (exiting). Mode 4 does something odd, and it's difficult to explain.

Mode 3 is called "relative" mode. Let's assume that you are going to Duna from the Mun, and you are taking a Minmus slingshot, and you have it set to show all the conics. (That is, you are going Mun->Kerbin->Minmus->Kerbin->Kerbol->Duna.)

The Mun orbit looks normal; the Kerbin orbits look normal. For Minmus, however, it shows the trajectory relative to Kerbin, because that is the "largest" SOI it goes through. Similarly, for the Duna orbit, it shows the trajectory relative to Kerbol.

The mode and number of patches can be set in the config file.

Link to comment
Share on other sites

Thanks everyone, this makes a lot more sense now (for one, SoI = sphere of influence, duh!). It's nice to know that my ship isn't experiencing sudden and rapid direction changes and G-forces as it transfers to orbiting new bodies. Tracking the 'absolute path' (is that the right term?) might be helpful to someone new like me visualize what's really happening.

As a layperson, this has given me a whole new appreciation for the difficulty of calculating precise orbits, moonshots, and dockings in the real world.

Link to comment
Share on other sites

SOI stands for "sphere of influence," which is the mini-universe you are currently in. When you are travelling from one to another, the game takes your course and speed and converts it to the coordinate system of the new SOI. The gravity of the previous world's SOI stops affecting you completely and the new one takes over. However, the smaller world is itself moving within the SOI of the larger world, which means the larger world's gravity IS affecting you, indirectly, through the motion it imparts to the entirety of your new frame of reference.

Say your ship and Mun are both orbiting Kerbin, in the same direction. Mun orbits at 542.5m/s, and your ships is coming up behind it at 543.5m/s, both of you following a curve around Kerbin. As soon as you enter Mun's SOI, your speed display will flip from 542.5m/s to 1m/s, and Mun will appear to be sitting still (relative to you) while you are moving in a straight line (relative to it). In both frames of reference, you were overtaking Mun at 1m/s in a linear way, and that hasn't changed. It's just being figured from Mun's perspective instead of Kerbin's.

Am I making things clearer, or confusing things further? :)

Link to comment
Share on other sites

SOI = Sphere of Influence. Basically, it means that in your screenshot, on the blue line you are in Kerbin's SoI, meaning that your speed and position are shown relative to Kerbin. The yellow line is when you are in the Mun's SoI, so your speed and position are shown relative to the Mun. The little blue circle is where the switch happens. The yellow sphere indicates where the Mun will be when you switch SoI.

Look at the diagram in your screenshot and try to mentally imagine that the blue line continues on the same trajectory. Now, remember, the Mun is moving around Kerbin. The yellow line is traced relative to that movement, so as the Mun moves along, so does your orbit. Relative to Kerbin, you do not change directions at all and your spacecraft remains on the same trajectory.

Link to comment
Share on other sites

You can change the mode in the settings.cfg file somewhere in the KSP directory. Set "CONIC_PATCH_DRAW_MODE" to "3" (relative mode, which is closest to the one you want-- when you are in Kerbin orbit you do not want to see your path relative to Kerbol), and set "CONIC_PATCH_LIMIT" to the maximum number of orbital lines you want on your screen at one time. (The default is 2)

Edited by Elmach
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...