Jump to content

[1.0.5] Advanced Jet Engine v2.6.1 - Feb 1


camlost

Recommended Posts

Is it possible to make this mod compatible with Thermal Turbojet from KSP Interstellar? The problem is that thermal turbojet only uses air as its reaction mass, so it can be used in planets that have 'air' but no oxygen, like Jool and Eve. Does Advanced Jet Engine intakes account for that and allows air intake in those situations? And thermal turbojets can switch propellant like RAPIER

A nuclear turbojet would be an entirely different module, and it might require some low-level changes to work properly. Maybe a project for the future, but right now there are too many serious bugs around to consider adding features.

Link to comment
Share on other sites

Another set of questions !

I'm not sure about that but, is this mod taking into account rotor (the propeller) engines (I'm thinking about those in Firespitter mod) ?

If so, is there a difference with the one for chopper ?

The mod is called 'Advanced Jet Engine' so it is probably unlikely but well ... asking doesn't hurt !

And second question, is there a checklist accessible with the things working / not working / in dev / in debug etc ?

You were talking about some serious bug in your last answer and I was curious to know which they are ...

I'm in the mood to look into that and since it's the week-end ... I'll have some time to spare.

Link to comment
Share on other sites

The answer to your two main questions is really the same - AJE does model propellers, but there are problems with the propeller code right now. Our list of things that aren't working would be the issues page on Github :P

Link to comment
Share on other sites

Okay, then there are things I want to look at.

First, rpm should be directly link to the throttle and the thrust. Not that important, but disturbing enough for me.

But more than that, it's with chopper that it doesn't cut. Just after activating the engine, it goes waayyyy up into the sky like a big jump. It should take a while before there is enough power to lift it.

Anyway, thanks again for you answer. I'll look into that.

And issues ain't a checklist ! >.<

But fair enough, I'll start by looking into that ;)

Finally found out the issue !

Well ... I was sure it was something like this, but still took me a long long time >.<

So, the issue with the flameout and the no-fuel is due to the fact that ffFraction is only calculated if engineSolver.GetRunning() return true wich is the value of combusting from SolverJet (it was this part that took me a long time to figure out ...) and is to false if ffFraction is to 0D wich come frome the flameout and ... stay like this since it won't calculate it again ...

Well right, so all we have to do is to update the value even if we're in flameout. I've made those change in EngineModule.cs and work fine for me (but I can have forget something) :

virtualpublicvoidUpdateFlightCondition(EngineThermodynamicsambientTherm,doublealtitude,Vector3dvel,doublemach,booloxygen)

{

//Inflight,thesearethesameandthiswilljust return

this.ambientTherm.CopyFrom(ambientTherm);

// Adding the update of lastPropellantFraction

updateLastPropellantFraction();

engineSolver.SetEngineState(EngineIgnited,lastPropellantFraction);

engineSolver.SetFreestreamAndInlet(ambientTherm,inletTherm,altitude,mach,vel,oxygen);

engineSolver.CalculatePerformance(areaRatio,currentThrottle,flowMult,ispMult);

}

// Just a copy of what it is doing in CalculateEngineParams

virtualpublicvoidupdateLastPropellantFraction()

{

doublefuelFlow=engineSolver.GetFuelFlow();

doublemassFlow=fuelFlow*0.001d*TimeWarp.fixedDeltaTime;

if(CheatOptions.InfiniteFuel==true)

{

lastPropellantFraction=1d;

UnFlameout();

}

else

{

if(massFlow>0d)

{

lastPropellantFraction=RequestPropellant(massFlow);

}

else

{

lastPropellantFraction=1d;

for(inti=0;i<propellants.Count;i++)

{

if(propellants[i].totalResourceAvailable<=0d)

{

lastPropellantFraction=0d;

break;

}

}

}

}

}

Ps : since it is updated in updateLastPropellantFraction, it can be remove from CalculateEngineParams for better performance.

Edited by nimaroth
Link to comment
Share on other sites

Okay, so first of all, updating the propellant fraction should be done in CalculateEngineParams() regardless, because UpdateFlightCondition() has to be able to run before there's even a vessel (it's used to determine thrust in GetInfo() when the part prefabs are being assembled). That being said, I'll see if updating the propellant fraction regardless of whether the engine is running produces the desired result.

Link to comment
Share on other sites

Hey.

How does this mod work now in 1.0.4? In CKAN it says its 1.0.4 compatible but the the start of this forum thread it still says 0.90.

Also wondering if there are an known problems with B9 dev or Interstellar extended?

Tnx

Espen

Link to comment
Share on other sites

Hey.

How does this mod work now in 1.0.4? In CKAN it says its 1.0.4 compatible but the the start of this forum thread it still says 0.90.

Also wondering if there are an known problems with B9 dev or Interstellar extended?

Tnx

Espen

camlost has been absent lately so the thread hasn't been updated. Look on Github, however, and you will see releases beyond 2.0.4 ... presumably CKAN has been updating automatically as well. As for mod compatibility - I know B9 is working. No idea about Interstellar, but to my knowledge AJE doesn't modify anything in Interstellar anyway.

Link to comment
Share on other sites

camlost has been absent lately so the thread hasn't been updated. Look on Github, however, and you will see releases beyond 2.0.4 ... presumably CKAN has been updating automatically as well. As for mod compatibility - I know B9 is working. No idea about Interstellar, but to my knowledge AJE doesn't modify anything in Interstellar anyway.

Tnx Blowfish :-)

Link to comment
Share on other sites

Okay, so first of all, updating the propellant fraction should be done in CalculateEngineParams() regardless, because UpdateFlightCondition() has to be able to run before there's even a vessel (it's used to determine thrust in GetInfo() when the part prefabs are being assembled). That being said, I'll see if updating the propellant fraction regardless of whether the engine is running produces the desired result.

Ah right, didn't seen that one coming. So th update of the lastPropellantFraction must be done elsewhere, like before calling CalculateEngineParams or simply at the beggining of it.

But the actual test (cf : (double.IsNaN(thrustIn) || !engineSolver.GetRunning())) must stay like this or ... yeah, it'll restart after the end of the flameout but the engine will not cooldown.

That was my first attempt and that's why I changed it like this but didn't saw that it was called elsewhere.

Hum, maybe you can help me ... I'm using monodevelop (well, the new xamarin in fact ...) and I would like to know how I could fuse or at least see two project at the same time ? Without opening two process of it of course :P

It would help me there since I must constantly switch between AJE and SolverEngine >.<

Link to comment
Share on other sites

I've never used monodevelop, sorry. I usually have both projects open at the same time, but I use Visual Studio, so it's just two separate windows.

So your fix works, good job :) (or at least the central idea - I had to shuffle some things around a bit), but it raises a couple of questions and increases the visibility of a couple of existing issues:

1) Is it actually correct for engines to auto-restart after a flameout?

2) A "Magnetos off" flameout occurs on the non-electric props every time they are throttled down to zero, and restart is impossible. They were previously un-restartable after a fuel loss too though, and some weren't able to start to begin with, so I think this is an unrelated issue.

3) When propellant is only available at a very small rate, engines can quickly alternate between flameout and non-flameout. e.g. an electric prop fed by only one solar panel at high throttle settings. This is definitely the case without AJE too though, so maybe it's unavoidable.

EDIT: You can see the final version of what went in here.

Edited by blowfish
Link to comment
Share on other sites

1) Is it actually correct for engines to auto-restart after a flameout?

Depends to some degree on the engine. Piston engines will restart after fuel flow is interrupted so long as they still have sufficient RPM and any required electrical systems are still working (e.g. ignition on Otto cycle engines, electronic injectors on more modern Otto cycle engines and common rail Diesels).

Jet engines won't: they require manual re-ignition. In the MiG-21bis (which I know about thanks to the excellent DCS module) this is achieved by setting the throttle to the starting position, throwing the 'in air restart' switch to power up the ignitor and putting the plane into a dive so that the engine will windmill up to starting RPM. Once the engine spins up to idle RPM you just turn the ignitor off and you're good to go. In the MiG the ignitor requires an auxilliary oxygen supply which is drawn from a bottle of compressed Oxygen when you're in the air and therefore has a limited number of uses per flight, but I suspect that this little 'feature' is an idiosyncrasy of the Tumunsky R-25 rather than a universal feature of jet engines.

Edited by Nerd1000
fixed typo
Link to comment
Share on other sites

You're asking good questions there, but I'm afraid to be the bearer of bad news ...

1) You're right, after a flameout, it would be more logical that you need to restart your engine ... If I'm using the example of my bike, if I'm careless and need to change to supply after having used my main fuel, I need to restart the engine.

Buuut ... when I tried the ship with a suborbital, staying in closedmode and switching after coming back, I had the problem (not tested it though after your last change so ... I won't assure it was still the case). And there, you shouldn't have to restart the engine.

Oh yeah, I did made a test ... it was even more funny ... I was able to activate the engine at more than 70kms ... and had a flameout after descending under the 70kms ... I'll do more tests about that though since I only made one.

2) I've looked into this magneto's problem today and ... it's a real mess. I don't even know where to start but the main problem is that message (endlessly ...) :

[EXC 01:02:33.756] NullReferenceException: Object reference not set to an instance of an object

Firespitter.engine.FSplanePropellerSpinner.OnUpdate ()

Part.ModulesOnUpdate ()

Part.Update ()

At first, I was thinking it was firespitter the problem but without AJE, the engine turn fine ... so there is an incompabilty problem.

And now my question is, since AJE should manage the engine, do we need to have firespitter installed ?

Too late to make a test tonight so I'll do that tomorrow.

Continuing on the same issue, I have another problem with rotary engine (for chopper). I'm send into space when using them ... and same with the AJE e50 Electric Propellant. The messages I get are those :

Look rotation viewing vector is zero (endlessly)

and after that :

[EXC 00:38:59.767] NullReferenceException

SpriteMesh.CreateMesh ()

SpriteMesh.get_mesh ()

SpriteRoot.Delete ()

SpriteBase.Delete ()

UIListItemContainer.Delete ()

UIScrollList.RemoveItem (Int32 index, Boolean destroy, Boolean doEasing)

UIScrollList.RemoveItem (IUIListObject item, Boolean destroy, Boolean doEasing)

UIScrollList.RemoveItem (IUIListObject item, Boolean destroy)

ApplicationLauncher.RemoveApplication (.ApplicationLauncherButton button)

UIApp.OnDestroy ()

[EXC 00:38:59.771] NullReferenceException

UnityEngine.Component.get_gameObject ()

GenericAppFrame.OnDestroy ()

I've also made the same tests without AJE and ... I think you know the answer, no issue at all ...

3) Nothing we can do about that ... unless staying on the idea to leave the engine in flameout like you suggested. There, it's to the ... engineer to think about that matter while making his craft.

Honestly, I don't know if it's best to shutdown completely or not the engine ... but it'll probably feel more realistic to shut it down ...

But in all cases, we still have to make sure that the engine will restart if it's a switch in good conditions.

To be as efficient as possible, tell wich issue you prefer that I look at ?

Link to comment
Share on other sites

I suspect that Firespitter's NRE is because it's looking for ModuleEngines or ModuleEnginesFX and isn't finding it. Probably best to replace the spinner module with something that actually matches the RPM of the engine, but that'll have to wait for now.

The "Look rotation viewing vector is null" (and associated black screen) is an issue with FAR. Get the latest dev version of FAR and it's fixed.

Link to comment
Share on other sites

I suspect that Firespitter's NRE is because it's looking for ModuleEngines or ModuleEnginesFX and isn't finding it. Probably best to replace the spinner module with something that actually matches the RPM of the engine, but that'll have to wait for now.

Okay but then what do you want to resolve first ?

The "Look rotation viewing vector is null" (and associated black screen) is an issue with FAR. Get the latest dev version of FAR and it's fixed.

Good to know ... I'll download the latest dev version then and make new tests run.

But there is something I don't understand then, why isn't there the issue without AJE ? I mean, AJE don't call any method and doesn't seem dependant of it, or did I missed something ?

And it make me think I should do the debug without it ...

Link to comment
Share on other sites

The issue occurs if a part has a ModuleResourceIntake but no IntakeAir resource (FAR had it hard coded that intakes need IntakeAir even though they can actually produce any resource). AJE messes with resources on the propellers and that's what was causing this (I don't remember the precise cause at this particular moment but I think you get the idea).

Link to comment
Share on other sites

Okay, I understand now. Thanks for the explanation.

Edit : I've just done more test and there is the result :

- For all the tests, updated FAR with the last dev version.

- Test with the Bell UH-1 Huey Engine&Rotor :

- Activating SAS

- Activating the engine

- Cutting the engine with [X]

=> Sent to space (same message as before : Look rotation viewing vector is zero)

(Tests done with AJE dev version 3 days prior and last dev version, same result)

- Test with the Bell UH-1 Huey Engine&Rotor :

- Activating the engine

- Cutting the engine with [X]

=> No trouble (Tests only done with AJE last dev version)

So the SAS is the problem. I should report this to FAR.

Now, the tests with AJE P&W R-2800-21 double wasp. It was with this engine I had the messages that I posted last time and the Magneto's flameout.

- Tests done with AJE dev version 3 days prior :

- Activating engine : All good (quite the improvement ^^)

- Cutting fuel : flameout (All clear !)

- Re-activating fuel : Nothing (well ... no surprise)

- Shutting down and reactivating the engine : Nothing (Too bad !)

- Tests done with AJE last dev version :

- Activating engine : All good

- Cutting fuel : flameout

- Re-activating fuel : Engine reactivate itself, YES !

I still can't reproduce the magneto's flameout ... so I don't know if there is still a problem but it seems quite promising !

Edited by nimaroth
Link to comment
Share on other sites

Thanks for the good work.

Just for information, after updating FAR to the last dev version, some of the propellers issues where corrected for me :

- Engines were starting again

- They were also restarting after a burnout.

Hope it'll help you.

Link to comment
Share on other sites

Hey guys, is there a way to get the B9-dependent engines?

Perhaps (if permission can be gotten) it would make sense to include the B9 engine models in AJE until the actual B9 mod comes out.

Link to comment
Share on other sites

Hey guys, is there a way to get the B9-dependent engines?

Perhaps (if permission can be gotten) it would make sense to include the B9 engine models in AJE until the actual B9 mod comes out.

The maintenance port linked in my sig is mostly working in 1.0.4. Mostly just balance tweaks left at this point.

Link to comment
Share on other sites

blowfish, Viewing changelog for 2.3.0 I see many tasty things but... have read for five times and still cannot understand the "Use turbojet model for F100 and F404 if VenStockRevamp is present - it's a more correct model"... Where has the F404 turbofan engine gone? All of my aircrafts are not loadable as they "Contain invalid parts" now. I'm not using Vens Revamp.

Link to comment
Share on other sites

blowfish, Viewing changelog for 2.3.0 I see many tasty things but... have read for five times and still cannot understand the "Use turbojet model for F100 and F404 if VenStockRevamp is present - it's a more correct model"... Where has the F404 turbofan engine gone? All of my aircrafts are not loadable as they "Contain invalid parts" now. I'm not using Vens Revamp.

Yeah, I think I messed up the MM patches. It should be fixed in the latest from Github.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...