Jump to content

[0.17] Electrical Energy Plugin | v1.5 (Oct 12)


Kreuzung

Ion engines...  

1 member has voted

  1. 1. Ion engines...

    • ...should stay infinite (only using energy)
      111
    • ...should use a bit of normal fuel too
      33
    • ...should use a bit of RCS fuel
      10
    • ...should have their own fuel type
      45
    • ... are for idiots (do not vote for this option!)
      8


Recommended Posts

It doesn't work with MuMech tanks, but it should work with part resources.

Try putting it in the part itself or the one above it, I dunno if having the resource below a gwnerator placed on top caused my problems while testing.

Hrmm... I've got the generator breaking down regular liquid fuel, but when I try to name a different fueltype in ModuleKrGenerator, it doesn't work seem to matter. It either always works with liquid fuel, or works completely without it.

I may just leave it without any sort of time limit or fuel tank for the time being -- these things can run for 50 years unattended.

Link to comment
Share on other sites

I actually tried to make a part module that simulates radioactivity, but I dropped it because I didn't know of anyone who ever got close to times where you'd notice power loss of the radiothermal generators and that it whould probably end in very large numbers (their half-lifes in seconds etc.) and very small numbers (between 2 physics frames) at the same time, which whould cause float rounding errrors.

Link to comment
Share on other sites

What about a timestamp? So that it just remembers a global time when it was launched and then scales its power based on that.

And some RTG have half-life of just several months (Lunokhod used such thing to survive the night), but have better power/mass ratio.

Link to comment
Share on other sites

That's a great idea, I'll keep that in mind.

I'm working on other things at the moment (1-part capsule and balancing new parts), and I thought of energy transfer as the next thing to add (short range with cables, high range as light, you know these solar farm satellites Planetary Resources and others are thinking of? Basically an orbital superweapon pointing at a power plant on earth:sticktongue:).

Link to comment
Share on other sites

What about a timestamp? So that it just remembers a global time when it was launched and then scales its power based on that.

And some RTG have half-life of just several months (Lunokhod used such thing to survive the night), but have better power/mass ratio.

IIRC, Lunokhod did not have an RTG, it used a Polonium heater to stop from freezing up at night but the heater did not generate power, Lunokhod used a solar panel for electricity. The solar panel closed over the top of the rover at night to help retain the heat from the Polonium heater.

Most RTGs have useful lifetimes measured in decades with a very slow reduction in power production (a couple of % per year) over their lifetime. I doubt any KSP mission is going to last long enough to need to calculate those timelines. Although some krazy Kerbalnauts might just try. :)

With the most common RTG being Plutonium-238 powered, which will generating about 500W/kg of radio-isotope fuel divided by the efficiency of the TEG (under 10%), a very useful RTG can be the size and weight of a person and generate heat and electrical energy for decades.

Link to comment
Share on other sites

IRL you would take an RTG with lifetime just for the mission length, so that you'll take the lightest possible to provide the necessary power. Of course it will work several times longer, but the power will be lower and the craft won't work as good as it worked before.

We could have a similar set there, too: multiple RTG's that have different power/mass ratio (there should be different sizes, too) and half-live (with KSP scale it could be from several days to several thousands of days).

Lunokhod didn't use it as power source (just because it's more efficient to use photovoltaics here, but for hibernation the batteries are OK), but that thing is an example of using isotope with just 4 months of half-life.

Link to comment
Share on other sites

Okay, so I have a crazy thought. I was looking at some Ion RCS systems. They use large amounts of power for a smallish amount of thrust. The upside is they use next to no RCS fuel. Would it be possible to make a item with your plugin that uses energy and fuel (or RCS in this case)?

Link to comment
Share on other sites

That idea came up earlier in 1.1 or so when it was possible using MuMechLib, but now it's not possible anymore without coding.

I've been asked by cBBp to make part module RCS (how???), if I ever get anything done with that I'll of course also add energy as an option.

Link to comment
Share on other sites

That would be pretty sweet. It could affect Ion engines as well, since technically they still use fuel (if I understand right), just a whole lot less. Fuel consumption of 0.1 or something. :)

Link to comment
Share on other sites

I've been having a lot of trouble altering the Solar Panels from the Kosmos Spacecraft Design Bureau to be compatible with the Electrical Energy Plugin.

I added the lines of code suggested in OP,


MODULE
{
name = ModuleKRSolarPanel
energyGain = [energy gain]
}

Which did work, however because the Kosmos Solar Panels are animated this code means that the panels gather energy even when they are not deployed. Then I changed the code to code suggested for Powertech including changing the code line


module = SolarPanels_PowerTech

to


module = SolarPanels_adv_PowerTech

This did not go well for some unknown reason the game is not telling me that these parts are out of stock so I can't test them as I can't attach them to the ship (every other part I have indicates that there is 999 in stock).

Does anyone have any solutions or can someone help me with the coding for these parts?

This is the code for one of the panels including the alterations that I made,


// --- general parameters ---
name = Kosmos_Almaz_Panel
module = SolarPanel_adv_PowerTech
author = Kosmos Team

// --- asset parameters ---
mesh = model.mu


// --- node definitions ---
// definition format is Position X, Position Y, Position Z, Up X, Up Y, Up Z
node_attach = -0.0433247631, 0, 0, -1.0, 0.0, 0.0
node_stack_panelmount = 0.0, 0, 0, 0.0, -1.0, 0.0

sound_servomotor.wav = extend, retract

// --- editor parameters ---
cost = 240
category = 3
subcategory = 0
title = Kosmos Almaz Solar Panel
manufacturer = Kosmos Spacecraft Design Bureau
description = These specially-made panels were designed for stations with limited power needs, but can be used to augment power supply if attached to expanded stations.

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,1,0,0,0

// --- standard part parameters ---
mass = 0.2
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 12
maxTemp = 2900

// --- landing leg parameters --------

// --- PoweTech panels --------

FoldAnimationName = Extend
FoldDefState = 0
rotRoot1 = Kosmos_Almaz_Panel/Almaz_Panel/Object35
doubleSidedPanels = false
panelInitRot = -180



//ejectionForce = 10
phase1 = 1
phase2 = 60
//panelRotateRate = 2
//maxTorque, Kp, Kd (float) - attitude control gyroscope parameters (equivalent to SAS module's)
NightGlide = true


// --- solar panel parameters ---


partResGenerator = true
power = 0.75

Link to comment
Share on other sites

I am relatively new to the world of mods and have already downloaded the MechJeb, DSMP and this plugin for KSP. I have gone through everything without a hitch until I came across CS files under the 'Source' folder for this plugin. Are they supposed to be moved into a specific KSP folder? edited for custom energy values? Any help would be greatly appreciated.

Link to comment
Share on other sites

So I built a medium sized space station and put four of your Ion drives on it. When I get to that stage (last stage) it makes the game slow to a crawl while the engines are firing. Same thing happens when I use the Deep Space pack's Ion engine as well. Any idea what might be causing that?

Link to comment
Share on other sites

Not really, what does the debug log show? (Alt-F2 ingame, KSP_Data\Output_log.txt)

If it's showing nullReferenceException, I'd first guess that it's the missing resource file.

Wish it as that simple... I have a couple null exceptions but they are for two other plugins and not yours. I do have the resource file. I doubled checked.. I haven't had problems before with the ion drive, but then I've never had 4 at once. I'll try a alt-f2 while in game.

Link to comment
Share on other sites

Hmm... I never experienced something like that and errorspam does even lag my mew gaming pc down to a few fps only, so it might be another part. Problems like that also occur if you have parts in the exhaust trail of multiple engines at the same time.

Link to comment
Share on other sites

So I built a medium sized space station and put four of your Ion drives on it. When I get to that stage (last stage) it makes the game slow to a crawl while the engines are firing. Same thing happens when I use the Deep Space pack's Ion engine as well. Any idea what might be causing that?

I had the same thing with the MMI ion engines. This happened after I updated the PowerTech_mumech plugin, and went to an already active craft to test if the depleting batteries bug was really fixed (it wasn't). When I depleted the batteries the game went down to minimum FPS and only recovered once I managed to switch away from the craft.

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