Jump to content

[0.25] Engine Ignitor (Workaround for some bugs V3.4.1: Aug.31)


HoneyFox

Recommended Posts

Hi all.

As we know the liquid engines in KSP can ignite for infinite times at any moment as you want, which seems a bit making life too easy.

And then I came to an idea, what if we only have limited times of ignitions for an engine, thus we will have to plan & execute our maneuvers more precisely and carefully. Moreover, under zero-g environment, fuel stability will give some challenge to ignition as well.

Yes this will make game much harder but hey that' a good challenge and that's kind of realistic too, especially because we also have quite good autopilot plugin :P, like MechJeb. Well MechJeb might not handle that very well, at least currently.

So here goes the plugin.

EngineIgnitor.png

Screenshots (some may not be up-to-date):

EngineIgnitedByLaunchClamp.png

A rocket sending oxygen resource tanks to Minmus base... The first stage engine has no self-ignite capability and thus relies on the external ignitor I installed in the launch clamp. And that also means I need to use a shallow ascend path so that there's no need to coast to Ap followed by the circularization burn.

EngineIgnitionLimitedByHypergolicPropellants.png

This upper stage engine's ignitor uses a resource named "BiPropellant" to emulate hypergolic propellant pair like N2O4+UDMH, etc. You can see it has already used some portion of the ignitor resource to initiate its current burn.

ReloadIgnitor1.png

One of Novapunch pack's engine, just for testing it has ignition count: 25 (plus, each ignition will now consume a small amount of LiquidFuel + Oxidizer too). The context menu shows its ignitor type (type0) and the remaining count (0/25). In order to reload this, you need to carry same type of ignitor unit or the "universal" type. (the ignitor reload toolbox requires KAS mod)

0AJqma5T2zh5.png

The RasterPropMonitor MFD for EI, you can view & control engines via this, should be useful for full IVA mission. (I admit it's a bit difficult to identify which engine is which, but well...)

Current version: V3.4.1

Requires:

Module Manager (essential)

KAS (if you want to use ignitor toolbox)

RasterPropMonitor (if you want to use the EIMFD of course)

Changelogs:

3.4.1:

Add KSPAVC support.

3.4.0:

Add a temporary workaround for the wasting ignition issue.

EI state display when used on SRBs is fixed.

UnitTest removed (though this won't actually change anything of gameplay)

3.3.0:

Fix resource flow mode issue. (thanks NathanKell & swamp_ig)

Add factor of resource ratio to ullage simulation, now it will be harder to "ullage" when the tank is nearly empty.

Some other minor tweaking of coeffiecents & configs

3.2.0:

Add pressurized fuel tank & pressure-fed engine logic, pressurized fuel tank can eliminate the need of ullage (eggrobin told me that this is not actually real, so it will be separated into pressurized & bladder fuel tanks in future release), and pressure-fed engines need pressurized fuel tanks to work normally.

Add cryogenic-fuel-boil-off micro acceleration feature, it can maintain the stability (if it was stable) of the fuel during time-warp if the acceleration is enough (still very small though).

Implemented an RPM MFD for this plugin, you can choose engines and check ignitor status and activate/deactivate them.

It should now support ModuleEnginesFX well.

More information displayed in VAB/SPH when mouse hovering the engines.

3.1.0:

Add a config file containing several options for ullage simulation. You can switch on/off, adjust some coefficients of simulation, etc.

Rework of IGNITOR_RESOURCE node loading to be compatible with Modular Fuel System.

Add ignitor resource display in VAB/SPH so that users are clear what additional resources are needed.

Fixed some tiny issue with EngineIgnitorUnit, plus the package now provides you with a toolbox allowing you to replenish ignitor count.

Fixed launch clamp's ignitor range from 0.1 to 5.0. Fixed some other engine's configs.

Several bugs got fixed in V3.0.0:

Fixed a bug (probably due to KSP's own issue), that the game won't deactivate FX groups when the engine is required to shutdown by the plugin.

A bug-fix when the ignitor resources are depleted, the engine won't shutdown correctly and will waste all ignitor-count rapidly.

A bug will cause an engine with no self-ignite capability automatically shutdown when activating it even if there's external ignitor nearby.

A bug will cause ignitor malfunction when player revert launch. The records of external ignitors in the last launch are not cleared.

Download link:

http://beta.kerbalstuff.com/mod/84/Engine_Ignitor

RasterPropMonitor EIMFD:

NOTE: The new version is based on RasterPropMonitor directly instead of Hyomoto's MFD mod.

Link:

http://beta.kerbalstuff.com/mod/60/Engine_Ignitor_MFD

NOTE: This MFD uses the button next to the VesselViewer button.

Module Manager Configs for Engine Ignitor is included in the pack:

Contains most of engines of stock game, NP, KW, AIES, KOSMOS, RLA.

The stock-parts' config in this pack is credited to CoriW, though I modified a little bit. You can access his original config here.

Ullage engine pack:

Credit to CoriW. Thanks a lot for this sophisticated part pack. :)

UllagePack.png

It's a small surf-attached mono-propellant engine (not using "MonoPropellant" but "UllageFuel" unique for this engine) specially made as a ullage motor, usually for restart-able stage with no pressurized fuel tank.

Original thread of this part pack:

http://forum.kerbalspaceprogram.com/threads/55039-0-22-Rocket-Power-Industries-v6-0-0-%28New-Ullage-Engine-Tank-and-Nosecone%29

Download link:

https://dl.dropboxusercontent.com/u/74725194/KSP%20Mods/RocketPowerInd_Ullage_Pack.zip

History version(s):

V3.3.0:

http://beta.kerbalstuff.com/mod/84/Engine%20Ignitor/download/3.3

V3.2.0:

https://www.dropbox.com/s/yousr4nxflld9ra/EngineIgnitor%20V3.2.zip

V3.1.0:

Dropbox link:

https://www.dropbox.com/s/735b53vy1m7j0py/EngineIgnitor%20V3.1.zip

V3.0.1:

Dropbox link:

https://www.dropbox.com/s/4104x90oi56dss4/EngineIgnitor%20V3.zip

V2:

Dropbox link:

https://www.dropbox.com/s/0a1kguivsthj42e/EngineIgnitor%20V2.zip

V1:

Dropbox link:

https://www.dropbox.com/s/yibcym7icdrbxz3/EngineIgnitor.zip

Sourcecode (under MIT license)

https://github.com/HoneyFox/EngineIgnitor/

Features

ModuleEngineIgnitor implemented:

Ignitions can be limited or unlimited (set to -1).

Auto-Ignition mechanism allows engines with enough high temperature ignite without the need to consume ignitors.

IGNITOR_RESOURCE node allows ignitor to also consume some resources when it tries to ignite. If any of these resources is insufficient, the possibility of ignition will drop, if any of them is absent, the ignition will fail. The original ignitor count logic still exists so you can have complex combination of this, or set it to -1 so that only resource limitation is simulated.

ModuleExternalIgnitor implemented:

Usually can be integrated into the launch clamp. Can setup whether it provides external ignitor resources or not (thus the vessel's resources will be used). Has same limitation as ModuleEngineIgnitor, i.e. ignition count and resource requirement(s), see README.txt for details. This module can be used with some engines that have ignitionsAvailable = 0 to have some interesting combinations. though it's usually not a problem for the first stage...

EngineIgnitorUnit implemented:

Use KAS grabbing mechanism, the kerbalnaut can grab a part with ignitor unit module inside, then float around the engine and use context menu to reload the ignitor magazine.

ignitorType feature implemented:

Ignitor has its type and you need to match the type when you try to use external ignitor / ignitor unit. To relief a bit, you can set the external ignitor / ignitor unit to type:
universal
, which won't have trouble with different types of engines.

Simple ullage simulation implemented:

It will be affected by translation/rotation of the rocket. Including gravity, engine thrust and RCS thrusters... If the fuel flow is not stable, the engine ignition may fail, or be shutdown to simulate flame-out,
or even explode (though really low possibility
:)
)
Explode feature is disabled right now...
. The fuel flow stability will be displayed on the engine's context menu, so you can check that before you try to activate the engine.

Tweak the logic of external ignitor's range check:

Allow external ignitors directly surf-attached/node-attached to the engine to ignite even if it's out of the "ignitorRange". NOTE: you may need to manually change some engines' cfg files to make them surf-attachable.

WIP features / features that may appear in the next version

Known issues

Future plans

Add tweakable capability to ignitor count with ignitor mass calculation. If you bring more ignitors the mass of the engine will increase too.

Note:

See README.txt in the package for detailed info.

Edited by HoneyFox
Tested in KSP v0.25.0
Link to comment
Share on other sites

Neat idea. ^-^

Perhaps expand it into different kinds of ignition systems, such as launchpad ignition, something that's on the inside of the engine bell that causes the chemicals to react, etc.

Also, just curious.. Does fuel still vent even if the engine fails to ignite? Because that could be used as a mechanic for delayed ignition (Waiting for the right fuel/oxidizer mix).

Link to comment
Share on other sites

Could you elaborate on how it works in real life :) I am all for realism enhancing mods, but I have to admit I do not really have a clue how this works. I guess that for the Apollo-missions they would have to have some kind of in space ignition system.

Edited by Camacha
Link to comment
Share on other sites

This is a really great idea!!

Have to admit its a little to hardcore for my main game, but will have it on my other installs for sure.

Really like the idea of attachable ignitors, like the magnezium flares they use to light the SSMEs on the pad! Will go perfect to the little KAS driven repair shuttle I am making!

If it turns out that most engines are not surface attachable you could always make a little baseplate that would mount behind the engine that the ignitors would then mount to. Wouldnt kill the realism goal either...on the pad those flares are mounted a couple meters from the shuttle main engines.

edit: tbh I am not sure if its magnezium...but its either that, thermite, or white phosphorus...but i have watched ALOT of vids from NASA channel and they sure look like Magnezium flare rods.

Edited by KhaosCorp
Link to comment
Share on other sites

License?

Also, this is a great little mod. E: Something that would be really nice is the abilty for Kerbals on EVA to refill the ignitor magazine. One more reason to bring Kerbals along.

Edited by regex
Link to comment
Share on other sites

Could you elaborate on how it works in real life :) I am all for realism enhancing mods, but I have to admit I do not really have a clue how this works. I guess that for the Apollo-missions they would have to have some kind of in space ignition system.

Usually if an engine needs to stop and reignite hypergolic fuels are used. That way there is less to go wrong. In short hypergolic fuels burn when mixed, no need for an igniter.

http://en.wikipedia.org/wiki/Hypergolic_propellant

Link to comment
Share on other sites

This is a really great idea!!

Have to admit its a little to hardcore for my main game, but will have it on my other installs for sure.

Really like the idea of attachable ignitors, like the magnezium flares they use to light the SSMEs on the pad! Will go perfect to the little KAS driven repair shuttle I am making!

If it turns out that most engines are not surface attachable you could always make a little baseplate that would mount behind the engine that the ignitors would then mount to. Wouldnt kill the realism goal either...on the pad those flares are mounted a couple meters from the shuttle main engines.

edit: tbh I am not sure if its magnezium...but its either that, thermite, or white phosphorus...but i have watched ALOT of vids from NASA channel and they sure look like Magnezium flare rods.

Actually those aren't used to ignite the engines, they're used to burn off excess hydrogen so there isn't an explosion when the engines do ignite. It's still unclear to me as to weather they use magnesium or not though.

Link to comment
Share on other sites

Honeyfox, might you be at all willing to modify this to use actual resources, rather than variables?

(I ask because then I could just plop in my existing hypergolics). That would be especially awesome because engines configured to use hypergolics would automatically be restartable.

Link to comment
Share on other sites

Also, just curious.. Does fuel still vent even if the engine fails to ignite?

A great idea. For extra realism you could go one step further. If an engine has failed to ignite and continues to vent propellant until ignition is achieved, why not still have a small propulsive force. I could be wrong but didn't NASA maneuver jettisoned S-IVB stages around by venting remaining propellant?

If you felt adventurous you could change the flame effect of the engine to something that looked more like fuel/oxidiser dispersing into vacuum (whatever that looks like).

You'd have to look up a realistic value for the thrust provided by simply venting propellant however; I had a quick look out of interest and turned up nothing.

Link to comment
Share on other sites

Is that realistic?

I can't find source that states that liquid engines have limited ignitions.

IMHO is it a electric spark that is doing the job.

Like in any good old gasoline engine.

And that is having a few thousand ignitions ... per second. (rpm/cylinder)

So is it based on the real world or just for challenge?

--------Edit below:-------

From the German and English wikipedia I know now that are two kinds of liquid engines.

Ignition can be achieved by a number of different methods;

  • One can not ignite itself and once it is turned off its over. >wikipedia=> "a pyrotechnic charge can be used, a plasma torch can be used"
  • The other however can be ignited (almost) unlimited
    subtypes:
    • wikipedia=> "or electric spark plugs may be employed. "
    • wikipedia=> "Some fuel/oxidizer combinations ignite on contact (hypergolic),"

wikipedia=> "and non-hypergolic fuels can be "chemically ignited" by priming the fuel lines with hypergolic propellants (popular in Russian engines)."

I've just (while writing) realized that might be the one and only that is limited cause the amount of hypergolic propellants is also fairly limited. But I am not sure if its a one time ignition method.

Edited by Bizz Keryear
Link to comment
Share on other sites

Is that realistic?

I can't find source that states that liquid engines have limited ignitions.

IMHO is it a electric spark that is doing the job.

Like in any good old gasoline engine.

And that is having a few thousand ignitions ... per second. (rpm/cylinder)

So is it based on the real world or just for challenge?

It's real: source

Link to comment
Share on other sites

Is that realistic?

I can't find source that states that liquid engines have limited ignitions.

IMHO is it a electric spark that is doing the job.

Like in any good old gasoline engine.

And that is having a few thousand ignitions ... per second. (rpm/cylinder)

So is it based on the real world or just for challenge?

No its not particularly realistic. Usually rocket engines fall into three broad categories.

1) engines that are designed to ignite only once, with a specific single use igniter. These are usually first and second stage engines.

2) non-hypergolic engines designed for multiple restarts. These have different igniters and do have a design life, but aren't like shotgun shells: you don't have a specific set number of uses. Exmaple of such an engine is the new Merlin-1D vacuum engine (with dual igniters for redundancy) or the Centaur. This is not the most reliable of methods, it can fail, which leads to #3

3) hypergolic engines. Put oxidizer in contact with fuel and it spontaneously ignites. Example would be the AJ-10 from the Apollo CSM. Suffers from generally a relatively poor ISP, but if you need it to start every time, on time, this is the most reliable method.

The link PrivateFlip posted above mine doesn't say what he thinks it does. Basically, it describes single shot igniters (SRBs, and first stage engines (e.g. pyrotechnic charge) and it describes multiple start systems (e.g. plasma igniter/spark plugs)

Edited by Seyvern
Link to comment
Share on other sites

No its not particularly realistic. Usually rocket engines fall into three broad categories.

1) engines that are designed to ignite only once, with a specific single use igniter. These are usually first and second stage engines.

2) non-hypergolic engines designed for multiple restarts. These have different igniters and do have a design life, but aren't like shotgun shells: you don't have a specific set number of uses. Exmaple of such an engine is the new Merlin-1D vacuum engine (with dual igniters for redundancy) or the Centaur. This is not the most reliable of methods, it can fail, which leads to #3

3) hypergolic engines. Put oxidizer in contact with fuel and it spontaneously ignites. Example would be the AJ-10 from the Apollo CSM. Suffers from generally a relatively poor ISP, but if you need it to start every time, on time, this is the most reliable method.

The link PrivateFlip posted above mine doesn't say what he thinks it does. Basically, it describes single shot igniters (SRBs, and first stage engines (e.g. pyrotechnic charge) and it describes multiple start systems (e.g. plasma igniter/spark plugs)

So it might realistic to have that in the big engines. Like mainsail, or skipper. But that would generally not add a challenge.

Well beside from that I am sure that a real rocket would have in that case a method to reduce the fuel consumption to a minimum without turning it off completely.

It's real: source

We read the same article, yet we came to different conclusions.

--------

Well at least it seems to add some new interesting aspects to the game while not really realistic.

But on other hand its not my cup of coffee.

Link to comment
Share on other sites

So it might realistic to have that in the big engines. Like mainsail, or skipper. But that would generally not add a challenge.

Well beside from that I am sure that a real rocket would have in that case a method to reduce the fuel consumption to a minimum without turning it off completely.

We read the same article, yet we came to different conclusions.

--------

Well at least it seems to add some new interesting aspects to the game while not really realistic.

But on other hand its not my cup of coffee.

Actually, I know about rocket engines. I included the comment about the link above because I saw he posted something that did not support his point. And yes, it might be more realistic for engines like mainsail. The problem with hardcoding it, tho, is that its artificially limiting. For example, the Saturn IVB engine was designed for multiple restarts, except that first it was designed for only one start (when it was part of the Saturn I). Generally, speaking, if you were using mainsail's for first stage boosters, they would be designed for single ignition. THen, down the road, you might build some spacecraft that you hypothetically wanted to use a mainsail in as a booster (unlikely, given the ISP and thrust output, but lets say you did). What you would do in real life is make a small change to the engine to add multiple ignite capability, and designate that a variant of the mainsail. THere are hundreds of examples like that where engines are slightly redesigned for various uses (e.g. Merlin D vs Merlin D vacuum). You could model that in KSP by making 3 variants of each engine, or you could just make one generic engine thats sufficient to capture what you are really trying to do, which is essentially what the game does now.

Link to comment
Share on other sites

Neat idea. ^-^

Perhaps expand it into different kinds of ignition systems, such as launchpad ignition, something that's on the inside of the engine bell that causes the chemicals to react, etc.

Also, just curious.. Does fuel still vent even if the engine fails to ignite? Because that could be used as a mechanic for delayed ignition (Waiting for the right fuel/oxidizer mix).

Launchpad igniting device? Sounds quite interesting, and is actually one kind of external ignitor. Perhaps i can implement that by checking if there's any ignitor near the engine nozzle? I'm not very clear about that though.

Fuel doesn't vent fuel if it fails to ignite, instead, the engine automatically shuts down itself when ignition is failed. (Well, the real reason is that i don't know how to forcibly disable an engine's thrust & FX :P)

I can probably emulate the venting by calculating the normal fuel flow rate and drain the resources as well as generate a smaller thrust with the position and direction of the thrustTransfom & thrustVectorTransform but I'm not sure if I can achieve that.

Link to comment
Share on other sites

This is a really great idea!!

Have to admit its a little to hardcore for my main game, but will have it on my other installs for sure.

Really like the idea of attachable ignitors, like the magnezium flares they use to light the SSMEs on the pad! Will go perfect to the little KAS driven repair shuttle I am making!

If it turns out that most engines are not surface attachable you could always make a little baseplate that would mount behind the engine that the ignitors would then mount to. Wouldnt kill the realism goal either...on the pad those flares are mounted a couple meters from the shuttle main engines.

edit: tbh I am not sure if its magnezium...but its either that, thermite, or white phosphorus...but i have watched ALOT of vids from NASA channel and they sure look like Magnezium flare rods.

One of my ideas is: EVA will be able to grab a ignitor magazine pack (with several sets of ignitor inside) on his back. And when he get close to the engine he can right click the engine and use the context menu to reload the magazine.

That way EVA still gets a new job while the surf-attaching issue can be avoided.

Edit: Ah this idea got ninja-d by regex. Good advice regex, I will consider implement this later :D

Link to comment
Share on other sites

Honeyfox, might you be at all willing to modify this to use actual resources, rather than variables?

(I ask because then I could just plop in my existing hypergolics). That would be especially awesome because engines configured to use hypergolics would automatically be restartable.

That shouldn't be hard to change to real resources instead of subtracting a variable. And that has been taken into consideration before.

I chose the current one because the variable method is easier to implement so I can get a rapid prototype.

Do you mean using a new resource type for that? or use the same type of resources as those used in normal burning state?

Link to comment
Share on other sites

Yep, as Regex pointed out, you're going to need a license here, both in your download and in this thread. It can be as simple as "all rights reserved", really depends on what you want.

Ah, forgot to do that. Will add license notes into GitHub and update package later, once i got access to my computer at home.

Link to comment
Share on other sites

No its not particularly realistic. Usually rocket engines fall into three broad categories.

1) engines that are designed to ignite only once, with a specific single use igniter. These are usually first and second stage engines.

2) non-hypergolic engines designed for multiple restarts. These have different igniters and do have a design life, but aren't like shotgun shells: you don't have a specific set number of uses. Exmaple of such an engine is the new Merlin-1D vacuum engine (with dual igniters for redundancy) or the Centaur. This is not the most reliable of methods, it can fail, which leads to #3

3) hypergolic engines. Put oxidizer in contact with fuel and it spontaneously ignites. Example would be the AJ-10 from the Apollo CSM. Suffers from generally a relatively poor ISP, but if you need it to start every time, on time, this is the most reliable method.

The link PrivateFlip posted above mine doesn't say what he thinks it does. Basically, it describes single shot igniters (SRBs, and first stage engines (e.g. pyrotechnic charge) and it describes multiple start systems (e.g. plasma igniter/spark plugs)

I'm curious about the 2) type and want to know more.

You said it's not like shotgun shells i.e. can ignite for specific set of times. And that statement leads me to think that whether the engine can re-ignite is random? Or what other factors will affect the possibility of a successful re-ignition?

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