Jump to content

[1.12.x] Engine Ignitor Re-ignited Release - NEW DEPENDENCY ADDED


linuxgurugamer

Recommended Posts

  • 2 weeks later...
  • 2 weeks later...
  • 4 weeks later...
On 11/15/2018 at 8:58 AM, Battou said:

Sad to hear that. Then there is no way to use this mod in early stages of the game I believe? (

You can!  Try hot staging!  You can just fire your next stage before the previous stage runs out so that your tanks are settled.  Early rockets used hot staging or solid upper stages (I think the Russians really loved hot staging), so in a way, having to hot stage or forego liquid upper stages before you unlock RCS or separatrons are a bit of realism.

Also, sorry for never getting those SXT modules created.  Real life hit me like a tsunami.  It's why own main project fell into neglect.

@Errol Maybe I could help model the simplistic physics of fuel and ox in zero-g if you want to create a better ullage sim?  I also don't know if any actual spacecraft spin their tanks to create ullage, but this is KSP, and spinning your craft is a very kerbal way of settling fuel.

I would think ullage time should be related to the impulse required to settle fuel (and ox) in a tank.  Impulse J = F * delta t = delta p, so a heavier mass of fuel would require either a stronger push or more time with a weaker push to properly settle the fuel for ignition.

Link to comment
Share on other sites

2 hours ago, Nittany Tiger said:

You can!  Try hot staging!  You can just fire your next stage before the previous stage runs out so that your tanks are settled.  Early rockets used hot staging or solid upper stages (I think the Russians really loved hot staging), so in a way, having to hot stage or forego liquid upper stages before you unlock RCS or separatrons are a bit of realism.

Also, sorry for never getting those SXT modules created.  Real life hit me like a tsunami.  It's why own main project fell into neglect.

@Errol Maybe I could help model the simplistic physics of fuel and ox in zero-g if you want to create a better ullage sim?  I also don't know if any actual spacecraft spin their tanks to create ullage, but this is KSP, and spinning your craft is a very kerbal way of settling fuel.

I would think ullage time should be related to the impulse required to settle fuel (and ox) in a tank.  Impulse J = F * delta t = delta p, so a heavier mass of fuel would require either a stronger push or more time with a weaker push to properly settle the fuel for ignition.

I think that @linuxgurugamer is a better person to ping for that.

Link to comment
Share on other sites

  • 2 months later...
  • 4 weeks later...

Hi! I'm excited about this mod, and have installed the stock configs for real fuels. I'm confused about this- in the PAW menu and in this highlight text, it mentions that my internal ignitor has 4 ignitions. However, no matter what I do, there is only 1 ignition. I am using 1.6.1, and 1.3.4.1 version of the mod. This is an issue with nearly every engine. https://imgur.com/wF0Gq01

Edited by LayoTheMayo
Link to comment
Share on other sites

  • 2 weeks later...

@linuxgurugamer

I think I found the culprit for why the fuel stability is acting a bit janky. On line 311 in EngineIgnitor.cs, you're doing 

Math.Cos(a)

but Math.Cos() takes in an angle as radians, and the variable a is in degrees.

The other thing is that, this angle works great when in atmosphere (it's 0 when your rocket is pointed straight up, 90 when pointed at the horizon), but when you're in orbit it doesn't really make sense. If you're in free fall, the direction in which you would feel a g-force would be along the direction of thrust, your orientation with respect to the planet shouldn't matter. The geeForceVector that you're calculating isn't actually in the direction of gees, it always points down because you're doing

 Vector3d geeForceVector = vessel.obt_velocity - vessel.lastVel - vessel.graviticAcceleration / TimeWarp.fixedDeltaTime;

Dividing graviticAcceleration (about 9.8m/s) by fixedDeltaTime (0.02s) gives you a huge value of ~490, and that vector is always pointing in the direction of gravity, i.e., toward the centre of the planet. 

I can make a pull request on this if you'd like. 

Edited by subyng
Link to comment
Share on other sites

Great, I'll do it tomorrow! I just did some quick testing and it seems to work brilliantly! In addition to it taking into account the direction of your engine vs the direction of your acceleration, the following cases also seem to work correctly:

If you are accelerating up then cut engines, once you beginning falling back down you will be experiencing negative G's, therefore your fuel will be unstable. 

However, if you are in an atmosphere, you will start feeling positive gees due to air resistance, and your fuel will be stable. 

If you have negative gees, but you point your engine point forward (i.e. you keep your ship facing prograde), your fuel will be stable.

When you are in freefall, as long as you thrust in any direction, your fuel will be stable. 

While I'm at it I might try to see if I can look at determining centrifugal acceleration so you can spin stabilize your fuel.

 

Edited by subyng
Link to comment
Share on other sites

On 8/13/2019 at 11:52 PM, subyng said:

Great, I'll do it tomorrow! I just did some quick testing and it seems to work brilliantly! In addition to it taking into account the direction of your engine vs the direction of your acceleration, the following cases also seem to work correctly:

If you are accelerating up then cut engines, once you beginning falling back down you will be experiencing negative G's, therefore your fuel will be unstable. 

However, if you are in an atmosphere, you will start feeling positive gees due to air resistance, and your fuel will be stable. 

If you have negative gees, but you point your engine point forward (i.e. you keep your ship facing prograde), your fuel will be stable.

When you are in freefall, as long as you thrust in any direction, your fuel will be stable. 

While I'm at it I might try to see if I can look at determining centrifugal acceleration so you can spin stabilize your fuel.

 

Since you haven't yet made a PR, I've made the following changes based on the discussion above:

 Vector3d geeForceVector = vessel.obt_velocity - vessel.lastVel - vessel.graviticAcceleration * TimeWarp.fixedDeltaTime;

and

if (a < 90 && Math.Cos(Mathf.Deg2Rad * a) * vessel.geeForce_immediate >= 0.01 || vessel.Landed)

 

If you get a PR in, I'll use it, but I will be releasing the above changes tomorrow night.  Spin stabilization would be interesting, if possible to determine

Link to comment
Share on other sites

@linuxgurugamer Sorry, I kept forgetting about it. I've made the PR. 

I have also added some lines for spin stabilization but have left it commented out for now. The basic logic is that it calculates the instantaneous centrifugal force based on the engine position between two frame updates. I also started to add a *very* simplified model where I assume all the fuel is located in the CoM of the vessel, then calculate the time it would take for the "point" of fuel to reach the engine, given it's velocity due to centrifugal acceleration, such that it would take more time than a single physics tick to spin stabilize your fuel. I'll try to get that part working sometime this week.

Edited by subyng
Link to comment
Share on other sites

5 minutes ago, CobaltWolf said:

I'm so glad that issue got sorted, we were looking forward to having proper / detailed EI configs for the next Bluedog release :)

I've also merged the PR which removes the BDB config from EI, according to it you will be including them in the BDB release.

Link to comment
Share on other sites

15 minutes ago, linuxgurugamer said:

I've also merged the PR which removes the BDB config from EI, according to it you will be including them in the BDB release.

Correct, there are some users who have an interest in maintaining them on our end which usually helps avoid the configs getting too "stale" what with the pace of BDB and all the revamps.

Link to comment
Share on other sites

New release, 1.3.5.1

  • Thanks to github user @Rockttman for this:
    • Bluedog Design Bureau configs for the mod are old, out of date, and inaccurate to real world ignition data. Configs are being revised and will be bundled with Bluedog compatibility patches from now on.
  • Added InstallChecker
  • Thanks to forum user @subyng for the following:
    • Fixed errors in Ululage calculations
       
Link to comment
Share on other sites

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