Jump to content

Science Revisited - New and improved ways to do science [1.3.1]


CaptRobau

Recommended Posts

I wanted to make an adjustment to the powerCurve for solar panels based on the concept in this mod. But I'm not sure exactly how Unity calculates the curve to interpolate between the points, and I don't want to break anything. Here's the values listed in this mod's config:

powerCurve{

key = 0 10 0 0

key = 13599840256 1 0 0

key = 27199680512 0.25 0 0

key = 40799520768 0.1111 0 0

key = 54399361024 0.0625 0 0

key = 67999201280 0.04 0 0

key = 81599041536 0.0278 0 0

key = 95198881792 0 0 0

}

The second data point is simply Kerbin's distance from the center of the Sun, and all of the other points are multiples of this. So it goes from 0 Kerbin AUs to 7 Kerbin AUs (somewhere shy of Eeloo). It mostly follows the inverse square law, with Y=1 defined at Kerbin. X is distance from the Sun, and Y is the solar panel's efficiency (a percentage of its stated power generation). Great.

Except I'm bothered by the first and last points. The function blows up to infinity at X=0, and it shouldn't ever cross Y=0 at that last X value (nor is zero a relatively good approximation). So here's what I'm thinking about using:

powerCurve{

key = 135998402.56 10000 0 0

key = 6799920128 4 0 0

key = 13599840256 1 0 0

key = 27199680512 0.25 0 0

key = 40799520768 0.1111 0 0

key = 54399361024 0.0625 0 0

key = 67999201280 0.04 0 0

key = 81599041536 0.0278 0 0

key = 95198881792 0.0204 0 0

key = 108798722048 0.0156 0 0

key = 122398562304 0.0123 0 0

}

I replaced the first point with two. The first is inside the Sun's radius (0.01 KAU), so I assume that will keep things accurate as far as close in as they need to be. The other (0.5 KAU) seems necessary to get better values at Moho and Eve. After the last point, I added two more, bringing the curve out to 9 KAU, beyond Eeloo. I also gave it accurate values at these, rather than ending at Y=0.

Does anyone know if my changes to the beginning or end of the curve will cause problems? Does it NEED an X=0 and a Y=0 to work properly? Is there a limit on the number of points it can take? Thanks!

Link to comment
Share on other sites

A 0 at the end isn't necessary I think, but it will mean there will be electrical production light years from the Sun. My mod (and Stock Rebalance which lends this curve) starts dropping it to 0 beyond 6 KAU because that's the point where the electricity production is essentially becoming negligible (only the Gigantor will still be producing usable levels power, 1/3 of an OX-STAT at Kerbin). There's probably also no problem with not starting with a 0.

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

Hey, this mod sounds great and all, but has it been taken down? I can't find it anywhere and the link on the OP leads to the curse homepage. I'd love to try this mod if still possible, thanks!

NEVERMIND! I'm a dunce! I didn't bother to search the whole thread.... there's a DL link on page 7 (I think) sorry to bother you all.

Edited by MarcRan17
Link to comment
Share on other sites

Hey CaptRobau, do you think you could update your download link? The mod still works for the current version (.90), but your download link is to a non-existant site, and is redirected to the curse.forge page. If you could re-upload it to Kerbal Stuff or to Curse Forge, then I'm sure it would help with the confusion, and I'm sure that someone has a link to it (ObsessedWithKSP apparently has a link on page 7)

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 6 months later...
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...