Jump to content

[0.90] SolarPanelFixer


jamespicone

Recommended Posts

This is a quick little hack to make solar panel output vary with distance-from-kerbol-squared, instead of a four-segment piecewise linear approximation of r**2.

It works by using ModuleManager to add a special module to every part with a ModuleDeployableSolarPanel. That special module varies chargeRate on the ModuleDeployableSolarPanel dynamically to get the right numbers into the flowrate. It's not pretty, but it seems to maybe work?

This is not very well tested. Consider this a beta release for people who might be interested.

Mod on KerbalStuff: SolarPanelFixer

Source code: https://code.google.com/p/solar-panel-fixer/

Edited by Snark
Link to defunct website removed by moderator
Link to comment
Share on other sites

How do you do it?

You take 1Au at kerbin-kerbol distance and then you apply E = 1366w/m2 • (1/Distance)^2 to calculate the radiation incidence, then you take the ~35% of that for PVcells and apply another equation to mimic efficiency losses due heat?

Link to comment
Share on other sites

How do you do it?

You take 1Au at kerbin-kerbol distance and then you apply E = 1366w/m2 • (1/Distance)^2 to calculate the radiation incidence, then you take the ~35% of that for PVcells and apply another equation to mimic efficiency losses due heat?

Much simpler.

At the moment, stock solar panels have a charge rate, a piecewise linear curve giving falloff with distance, and the sun's AOA. Output is chargeRate * curve.evaluate(distance) * cos (sunAOA).

I just replace the piecewise linear curve with 1/r**2, by changing charge rate every tick to r**2 / curve.evaluate®.

It's setup so that solar panels output the same amount of charge at Kerbin as they would in the stock model.

Link to comment
Share on other sites

sure.... we'll go with that answer. Total gibberish to me, but it sounds geeky enough to work.

LOL im with you on that Gaalidas. :P total gibberish.

But on topic : Thanks! If it works like the OP reads, then im assuming it adjusts power output based on distance from Kerbol. Which is awesome for my current realism playthrough.

Link to comment
Share on other sites

Cool mod. I did notice however that if the solar power becomes low enough it displays as NaN, aka Not a Number. NaNs can cause issues farther down the line, since the rest of the game can no longer interact mathematically with the NaN. So maybe just set it to zero after a certain cut off point. If it's just a text thing and there's actually a number behind the NaN text, I still recommend switching it to 0. Some people just don't know what NaN means, but 0 is always clear.

Link to comment
Share on other sites

Hey CaptRobau I expected you to show up here eventually but surprised you didn't mention your own solar panel curve tweak. So how does this compare? Because I'm using yours now.

I can't find the source for Science Revisited so I can't comment on technical differences, but I would strongly recommend *not* using this mod right now if you're happy with whatever other mod that alters solar panel curves. This thing is still very beta, and I wouldn't be surprised if there are potentially game-breaking bugs (like the NaN bug mentioned above, that's potentially very serious) or serious incompatibilities with other mods.

Link to comment
Share on other sites

Hey CaptRobau I expected you to show up here eventually but surprised you didn't mention your own solar panel curve tweak. So how does this compare? Because I'm using yours now.

The basics of this mod work very well from what I've been able to spot. Mine is a good placeholder, but once this mod has every issue worked out it'll be a far better implementation of a realistic power curve.

Link to comment
Share on other sites

This has no association with RSS.

EDIT: Okay and I just realised why you might think that. Consider it a poor name choice. I'll have a chat with NathanKell at some point about whether he minds before either changing the name or adding a disclaimer.

Link to comment
Share on other sites

I can't find the source for Science Revisited so I can't comment on technical differences, but I would strongly recommend *not* using this mod right now if you're happy with whatever other mod that alters solar panel curves. This thing is still very beta, and I wouldn't be surprised if there are potentially game-breaking bugs (like the NaN bug mentioned above, that's potentially very serious) or serious incompatibilities with other mods.

Indeed, I beleive KSPI also does something similar (distance-from-kerbol-squared) and therefore might conflict

Link to comment
Share on other sites

Much simpler.

At the moment, stock solar panels have a charge rate, a piecewise linear curve giving falloff with distance, and the sun's AOA. Output is chargeRate * curve.evaluate(distance) * cos (sunAOA).

I just replace the piecewise linear curve with 1/r**2, by changing charge rate every tick to r**2 / curve.evaluate®.

It's setup so that solar panels output the same amount of charge at Kerbin as they would in the stock model.

Ok I see.

So you can change dll with module manager?

One question, what unit use squad for this?

I would love to have kw/h, also is the only way to balance how much energy you get from a X area of PV.

About the decreasing efficiency due heat, I guess this is only noticeable at distances closer than mojo, beyond that the power collected stop increase to the square, and starts to increase more linear until certain point were it will start to decrease again.

But I guess is a bit pointless to include this effect. In fact, there are PV cells that are made for higher concentrated flux working at +500c

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