Jump to content

Question on Krakensbane


Recommended Posts

I'm working on a mod, related with things like rendezvous and some orbit calculation.
I keep hearing about "Krakensbane", and I know it's for dealing with issues caused by high velocity, it's repositioning the whole universe.
I'm curious on some details, so I searched the forum and found a link: http://forum.kerbalspaceprogram.com/entries/12-Krakensbane
Unfortunately, it's not available anymore. Does anyone have a backup to that page?

These are the questions I'm curious about:

1, When player vessel is coasting along orbit (at high speed, no timewarp), is the whole universe repositioning itself along player vessel's orbit, in "on rails" mode?

2, As the orbit is not a straight line, orbit velocity is changing all the time(both direction and speed), is the velocity absorbed by Krakensbane actually changing all the time?

3, If player vessel is accelerating, how often is the extra velocity absorbed by Krakensbane? Every FixedUpdate?

4, If another vessel is now very close to player(say, 100m), how is the vessel's position determined? By "on rail" mode(Deterministic Physics) or "off rail" mode(Physics engine)?

Thanks!

Link to comment
Share on other sites

Krakensbane isn't about velocity, it's about making sure the world origin stays centered on the active vessel to avoid FP precision issues.
All that component does is to periodically reposition all objects in the world to ensure that.
But it's a "low level" component, and any higher level data you usually have to deal with (orbit, velocities, etc) usually abstract that effect away.
The only major consequence is that you can't compare positions between two points in time, but this is something that you shouldn't be doing anyway.

Link to comment
Share on other sites

On 3/4/2022 at 8:33 PM, Gotmachine said:

Krakensbane isn't about velocity, it's about making sure the world origin stays centered on the active vessel to avoid FP precision issues.
All that component does is to periodically reposition all objects in the world to ensure that.
But it's a "low level" component, and any higher level data you usually have to deal with (orbit, velocities, etc) usually abstract that effect away.
The only major consequence is that you can't compare positions between two points in time, but this is something that you shouldn't be doing anyway.

Thanks! A further question: what happens when target vessel is very close to player vessel

If target vessel's position is determined by SetPosition (or "on-rails"), when player vessel collides with target, the target vessel would behave like a kinematic object, and it's orbit wouldn't change, which is not correct.

But if target vessel is "off-rails" and throwed back to physics engine, I think it's not an easy thing to make target vessel to exactly move along it's orbit. When target vessel is far away and goes "on-rails" again, this inaccuracy will result in an orbit change, even if target vessel is not touched at all.

How does KSP deal with this situation?

Here is my thoughts:

1, When target vessel is near, target vessel goes "off-rails" and is throwed back to physics simulation.

2, If target vessel does not collide with any object, it finally moves far away enough and goes "on-rails", it's orbit would not change. The inaccuracy in physics simulation takes no effects to actual orbit.

3, If target vessel collides with something, from this moment on,  its current physics state would result in an orbit change accordingly, until it moves far away and goes "on-rails" again.

 

 

 

Link to comment
Share on other sites

Point 1 is correct, there is a "physics bubble" centered on the active vessel. Any other vessel entering that range (about ~2.5km in space, but depends on the situation) goes from the unloaded/packed (on-rails) state to the in-physics state.
Your points 2 and 3 are wrong.
When a vessel in "on rails" (unloaded or packed), its orbit is fixed and the vessel position is computed from the orbit parameters.
When a vessel is in physics (loaded and not packed), it's the other way around, the vessel position and velocity is determined by the physic engine, and the orbit is computed from those parameters.

So to answer your question, KSP doesn't "deal" with that situation. As long as a vessel is in physics, its orbit will be slightly unstable, as the physics simulation is it a result of is itself always slightly unstable.

On a side note, inter-vessel collisions aren't guaranteed to happen.
If the relative velocity between two in-physics vessels is too high, there is a decent chance the collision won't be detected at all.
Moreover, collisions are entirely ignored when (non-physics) timewarp is engaged, as all vessels are put in the packed state during timewarp.
And finally, collisions between unloaded vessels are ignored too.

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