Jump to content

CoMOffset, CoPOffset, CoLOffset & bouyancy


Recommended Posts

The wiki doesn't have any info on these, and while the KSP-API pages do, they don't have any description:

    CenterOfBuoyancy = 0.0, 0.8, 0.0
    CenterOfDisplacement = 0.0, -0.3, 0.0
    buoyancyUseSine = False
    buoyancy = 1.1

    CoMOffset = 0.0, -1.5, -0.313
    CoPOffset = 0.0, -1.5, -0.313
    CoLOffset = 0.0, -1.5, -0.313

While they somewhat make sense, I don't know what the CoPOffset is (of course it will be obvious, CenterOfPressure???).  Is there a good explanation of these config file settings anywhere?

The following two also needs some explanation, i see them in the Mk1-3 pod, but don't really know what they are for:

    bodyLiftOnlyUnattachedLift = True
    bodyLiftOnlyAttachName = bottom

 

Edited by linuxgurugamer
Link to comment
Share on other sites

Following up on this, I'm working on the old NovaPunch mod, and the Feyja Command Capsule has two problems:

  1. It doesn't reenter rear first, it tends to flip on reentry
  2. It floats too high in the water

So, by looking at some of Squad's parts, I added the following:

CoLOffset = 0.0, -0.45, 0.0

which seems to improve the reentry.  I'm not sure why, I thought I would have had to move the CoMoffset back.

But regarding the bouyancy, it's literally sitting on top of the water, what do I need to do to get it to float deeper in the water?

Link to comment
Share on other sites

4 hours ago, linuxgurugamer said:

But regarding the bouyancy, it's literally sitting on top of the water, what do I need to do to get it to float deeper in the water?

Increasing the mass will make it sink more.

Or... you can supply a custom drag-cube for the bouyancy calculations to use, but not sure how that might interact with any existing drag-cubes on the part (might need to provide both a 'standard' on and the bouyancy one) -- 'string buoyancyUseCubeNamed = "" ' is one of the fields in the Part class -- specify your custom bouyancy drag cube there.

Also in the Part class there is a straight-plain-and-simple ' float buoyancy = 1.0f ' field that can be set (maybe?) through config.  I'm assuming this is a multiplier, and if you want the part to sink you would set it to a value < 1.0.

(all of this API information was scraped from the public API docs -- https://kerbalspaceprogram.com/api/class_part.html )

Link to comment
Share on other sites

25 minutes ago, Shadowmage said:

Increasing the mass will make it sink more.

Not an option, it's already too heavy.

I'm trying to not make assumptions (ie:  assuming something is a multiplier, and how it works).  For now, I have it working by copying the values from the Mk1-3 pod, and then fiddling with the values to make it work:

	///////////////////////////////////////////////
	//
	// Following copied from the mk1-3 pod, and then adjusted until the pod floated properly
	//
	CoLOffset = 0.0, -0.45, 0.0
	bodyLiftOnlyUnattachedLift = True
	bodyLiftOnlyAttachName = bottom
	CenterOfBuoyancy = 0.0, 0.8, 0.0
	CenterOfDisplacement = 0.0, 0.3, 0.0
	buoyancyUseSine = False
	buoyancy = 1.1
	//
	///////////////////////////////////////////////

It seemed that dropping the CoL fixed the reentry problem, and then changing the the CenterOfDisplacement made it float a bit lower in the water.  But I'd like to understand the values a bit better.

Link to comment
Share on other sites

When not explicitly declared, the default is buoyancy = 1 which makes for maximum buoyancy. Decrease this value to make an object sink easily. 0.6 is a good maximum value in my experience, with which I've had returning probes and small spaceplanes sink all the time (against my will). Set buoyancy = 0 if you like pain and suffering. :D 

CoP means CenterOfPressure indeed, and is the anchor point of drag force.

 

5 hours ago, linuxgurugamer said:

So, by looking at some of Squad's parts, I added the following:

CoLOffset = 0.0, -0.45, 0.0

which seems to improve the reentry.  I'm not sure why, I thought I would have had to move the CoMoffset back.

But regarding the bouyancy, it's literally sitting on top of the water, what do I need to do to get it to float deeper in the water?

I would think giving the CoL a more positive Y offset would make it steer better while falling but okay. I don't know what the default for that is. Well, as long as it's still above the CoM that's what matters, I'd like to think.

Quote

CenterOfBuoyancy = 0.0, 0.8, 0.0
CenterOfDisplacement = 0.0, -0.3, 0.0

I'm very sure that one of these sets the point where more or less of the part sits below the ocean surface once splashed. Since it sits too high I'd recommend raising CenterOfBuoyancy some more, and then CenterOfDisplacement. I can't fathom CenterOfDisplacement, however. Just maybe this means the point where a part will tip over and sink first if it's poor at floating.

5 hours ago, linuxgurugamer said:

bodyLiftOnlyUnattachedLift = True

bodyLiftOnlyAttachName = bottom

The heatshields have unique lift surface parameters to them such that they produce the effect of lift surface when laying flat and coasting through the air like a frisbee. These seem like conditions for toggling the pod's own "lift surface" like a wing panel, and disabling default body lift depending on whether something is attached under it.

 

 

Edited by JadeOfMaar
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...