Jump to content

Matching Rotation with Planet's Surface


Recommended Posts

Hey gang, long-time lurker first-time poster. I've been playing for over a year now on and off but only casually (no mods) and don't do all the sums like some of you guys (hey physics is my day job- I play with Jeb and co. to have fun :P)!

Anyway, it's good to have this community for modding and asking questions and here's something that's bugged me for a while. It's probably been answered before, but I can't find it on here so here goes.

If I have a craft in orbit over a body, is there a simple way to match the internal rotational period of the ship with its orbital period around the body, i.e. lock the vessel's nose to always be pointing prograde at the horizon, for example? I've often found when building space stations that it would be useful to be able to approach from behind the station and know where the docking ports are without having to switch to it and back to check what orientation it's at. If its spin were coupled to its orbit, then I'd be able to just come up from target retrograde and slot in, instead of having to dance around and find the port I want. Any thoughts?

Link to comment
Share on other sites

I don't know of a way of holding your heading like that when in orbit, however for ease of docking, I always align my space station north-south when its on an equitorial orbit. That way I always know when trying to dock with it, that I should approach from south to north, though I'll need to rotate my alignment when I get nearer. The space station will continue rotate the way you described, but around the north south axis, so you might as well keep it pointing that way for ease of docking.

Link to comment
Share on other sites

Not possible to do what you're asking. The only way is with an autopilot (like mechjeb) but even then it only works while you're flying that specific craft, as soon as you swap to another craft the previous craft gets put "on rails" and continues its orbit in the direction it was facing when you swapped.

Link to comment
Share on other sites

  • 3 months later...

This seems strange that there is no way to do this, even without Mechjeb. SAS should be able to lock on surface get your rotation matched and once matched it would stay that way forever. Obviously IRL most satellites have their rotation matched with their orbit. I'm sure it requires the occasional adjustment to keep it perfect, and so that a microscopic mismatch of rotation doesn't accumulate.

Link to comment
Share on other sites

Not possible to do what you're asking. The only way is with an autopilot (like mechjeb) but even then it only works while you're flying that specific craft, as soon as you swap to another craft the previous craft gets put "on rails" and continues its orbit in the direction it was facing when you swapped.

I have also found this to be the case.

And if you were to have a hundred ships in space (and 300 debris), you wouldn't want the program to be calculating all their headings. It would slow the game down, not something youd want while youre trying fly a ship.

Link to comment
Share on other sites

This seems strange that there is no way to do this, even without Mechjeb. SAS should be able to lock on surface get your rotation matched and once matched it would stay that way forever. Obviously IRL most satellites have their rotation matched with their orbit. I'm sure it requires the occasional adjustment to keep it perfect, and so that a microscopic mismatch of rotation doesn't accumulate.

No, it makes perfect sense. Rotation means physics calcuation. There is no physics calculation if you are not manually flying the craft. The alternative is to simulate EVERYTHING. Which would melt your CPU faster than Wackjob could

Link to comment
Share on other sites

The game wouldn't need to constantly do it for every object out there. It could be done on loading/unloading objects. On unloading, store the last time, current rotation, and rotational velocity/parameters, and you can calculate the position it should be at when next loaded. There would be rounding errors, and such, so a complete solution might include some way to record a setting such as "pointed toward/away from object, prograde/retrograde, norm +/-, rad +/-, etc". I.e. much the same way as the system currently "cheats" on the orbit calculations, by not really doing the same as when an object is actually loaded, just the minimum to keep track of it for when it's actually needed.

Link to comment
Share on other sites

No, it makes perfect sense. Rotation means physics calcuation. There is no physics calculation if you are not manually flying the craft. The alternative is to simulate EVERYTHING. Which would melt your CPU faster than Wackjob could

Conservation of angular momentum during on-rails phase should not be that much of a problem, the game could do that exactly the same way it is done with planets. The ship would just keep rotating at the same angular speed it rotated right before the warp started. Unless SAS is on which case must be handled separately - either stop any signs of rotation (if ship's rotation is small enough) or switch SAS off (if the ship is rotating more than certain threshold).

There is just slight problem with planet rotational spheres of influence because it would need some adjustments against planet rotation pulling the ships rotation along (which you might have noticed happens now in LKO and in many other places). But that still can be done in a "deterministic one-shot" way without need for iterating.

Turning the ship the same side towards the planet as a special mode can surprisingly come along all that because it's also deterministic.

Link to comment
Share on other sites

You can keep the nose pointed north, and have it rotate about its central "shaft" just rotate to the normal/antinormal position and, while the craft will still roll, at least the nose/engine will always point north/south depending on how you place it.

This assumes an equatorial orbit, though, else it won't be perfectly North or South.

Link to comment
Share on other sites

I don't think they would need to have all the overhead you speak of Dogface. First off Debris wouldn't change. What happens to debris now when it's left spinning? Whatever it is, there would be no reason to change anything with debris. Now for ships, stations etc, if the SAS had an option to match rotation to surface, for one, the game engine could just assume that it was very good at matching the rotation, so no corrections are required. A flag could be set indicating that the object has it's rotation matched to surface. Whenever an object is loaded or switched to and it has the 'locked to surface' flag set, then it would simply align the objets rotation with the surface before it's loaded. No need to continuously do calculations. In fact this could reduce calculations from what they are now.

Link to comment
Share on other sites

The reason why you can't maintain a fixed orientation with respect to a planet is that the game doesn't consider or store that information. Your orientation is only considered with respect to the entire Kerbal universe. If you look at the persistence file each vessel has an orientation line that defines which direction you are pointed.

With a few exceptions you probably wouldn't want the game to work otherwise. For instance, locking onto a maneuver node and following it during a long burn is much more important than being able to maintain the alignment of a space station. That wouldn't be possible if SAS locked you heading relative to a planet.

The only way to maintain a fixed orientation is to point directly north or south. That way your orientation is fixed in two dimensions while it simply rotates around the third dimension (i.e. a docking port will always point directly north or south, but the craft as whole will still rotate).

The only way to keep your orientation fixed with respect to a planet (which is not necessarily the same thing as what I described above) is to align along the normal vectors. You can do this by making a maneuver node, pull out one of the purple icons, and align yourself with the blue maneuver node on the navball. If you are in a equatorial orbit this means pointing north/south, but for other inclinations it will be different.

Edited by DMagic
Link to comment
Share on other sites

I've often found when building space stations that it would be useful to be able to approach from behind the station and know where the docking ports are without having to switch to it and back to check what orientation it's at.

Orientate space stations +normal or -normal (docking port pointing north or south if in equatorial orbit).

Link to comment
Share on other sites

So I don't recall where I read it, but it turns out tha to orient themselves astronauts would use a distant constellation that essentially is the same direction from everywhere in the solar system.

You can use the same method by aligning your ships with a distant star/constellation of the background. I usually point at the "Milky Way" of Kerbin which creates that illuminated ring. You can pick a blue or red star or spiral and use that as your designated align point.

This way regardless of where in the solar system you are, you have the same reference point for direction. The problem is that it isn't the most precise alignment since you aren't using a nav-ball marker to set it up. But it still helped me a few times. Other times I would tend to just point due north/south for equatorial orbits.

Link to comment
Share on other sites

As stated above, I don't think there's a way for a craft to maintain an orientation relative the body it's orbiting, at least not in the stock game, and there are the simulation issues discussed above.

There is a station design work around for this issue, though, that I've found works well. If you orient your station's primary axis to align with the planet's poles, and place a ring of docking ports (4-6) radially around the axis, the direction of your approach doesn't matter, since there should be a port facing you.

Again, doesn't fix the original question, but it may help avoid your immediate problem.

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...