c172p
c172p copied to clipboard
Improve primer
Improve primer and its procedure, model a reservoir tank (as suggested by tigert in the forum thread), take into consideration external temperatures and if the engine is cold / warm, better procedures for flooded engine, etc.
see: http://s27.postimg.org/4qsd41pkj/Screenshot_from_2015_03_13_17_14_25.png
Possibly related to https://github.com/Juanvvc/c172p-detailed/issues/45
I think the reservoir tank has already been implemented by @dany93. What else needs to be done?
I also think this is done, but let's just wait for Dany's confirmation.
But are external temperatures, engine temperature taken into consideration?
I don't think so, and that would be a great idea. Currently if we start the engine, then kill it and try to start again, it needs to be primed once again -- which is not the case in RL as far as I know.
Can this be fixed before 17th of June?
the reservoir tank in in place, yes... i see it in the equipment menu where we can set the fuel quantity and the passenger and baggage weight... that was yesterday... i don't recall looking today but that also makes me ask if this item should appear in there at all? i don't recall seeing it in other craft that use a reservoir like this...
OH! and the primer... can we make it go out and in with just one click instead of having to click it out and click again to push it in to put fuel in the reservoir???
Yes, this tank is in place. Number 2.
Killing the engine or preventing it to (re)start can be done by
/fdm/jsbsim/propulsion/tank[2]/priority = 0
or
setprop("/fdm/jsbsim/propulsion/tank[2]/priority", 0)
whatever the condition(s) to fill.
I think the primer should never be necessary in the Autostart procedure (as it is if we fail to start by increasing the throttle too soon). IMO, Autostart = "S" only. For beginners or lazybones.
The primer is indeed not necessary if you do autostart. But do we want to add all this temperature stuff for 3.6 (feature freeze on 17th of June) or postpone it for 3.8?
The primer is not necessary, normally. The engine starts well after a few seconds of starter. Right. But if you push the throttle too soon after starting the engine, the engine stops and you have the message "Use the primer!". And you have to set the throttle and to activate the primer to start again. Not a big issue, it depends on if it can be easily fixed. For us, that's only bothering, but beginners will not know what to do.
[EDIT] I don't know if something has been changed, but I see that a second "Autostart" works. Like this, that's right.
I think because the "external temperatures, engine temperature taken into consideration" part is not implemented, we should move this issue to 3.8 feature freeze.
From #45 (closed as duplicate, but copying the description here):
primer procedure with flooded engine: if the engine is flooded and turned off (lean mix, no throttle, mags off) and then on again, it automatically resets the situation and requires more primer, while in real life it would have a different procedure (it would stay flooded)
Ludomotico: I think an (initially) flooded engine will probably start if the starter runs long enough because the movement of the piston will extract the fuel from the cylinders. Beware I never tested this in real life and I'm not completely sure! In any case, I think giving a second chance to the pilot to start the engine by reseting the state of the primer is fair :) Which are the options? Calling thee engineer by reseting the simulator? Gilberto: I believe the normal procedure to start a 172 with flooded engine is as follows: mixture fully lean, throttle fully opened, crank the start keys several times. As soon as the engine starts, mixture fully rich and throttle back to 1000-1200 RPM. I would say that at the moment the engine restarts is the moment where the excess fuel in the tank should be reset. Does this make sense?
Apparently the https://github.com/Harald67/c150/ has a better priming implementation than ours, though I haven't had the time to check it myself. Just posting this here so I or someone else can check it in the future.
Did you know that many pilots use the acceleration fuel pump linked to the throttle as primer? It's much easier to push and pull the throttle knob three times than unlocking the primer, and pull and push that three times, and lock it again. The original intention of the small pump is to provide the engine with enough fuel when the throttle is opened and manifold pressure difference gets smaller. Is this implemented?
Did you know that many pilots use the acceleration fuel pump linked to the throttle as primer?
I actually came across this relatively recently but I didn't know it applied to the model P as well. If that is the case, then I think it should be implemented, even though the checklist and tutorials should remain as they are (respecting the POH instructions)
Ah, the joy of starting a carbureted engine! Our C172N is sometimes a bitch to get started, especially if the engine is luke warm. And as you try and try again, you drain the battery, and eventually the starter won't be able to turn the prop. Sigh. Anyway, my procedures:
- If the engine is warm (as in, it's been flying recently, not just taxied around for a minute), there's no need to prime at all.
- If the engine is semi-warm, it's best to try once without priming (just a rev or two), and then only prime if needed. Try with 3 first, then 5.
- If the engine is cold, put in 3 strokes first and add more if it doesn't start.
... In general it's much harder to get it started if you flood it than if start with a little bit of priming and add more as needed. I might try the accelerator pump technique next time!
@algefaen great info! I am unfortunately extremely busy with RL and will be so for the next month at least, but nobody picks this up I might try to do it myself.
Given the idea by @wlbragg of improving the autostart function to animate the start up procedure, I think we could try to tackle this issue here as well as https://github.com/c172p-team/c172p/issues/1227.
The issue with our aircraft is that you always need to prime 3x to start the aircraft. In RL, this is done only with a cold engine. As @algefaen put it in the other issue https://github.com/c172p-team/c172p/issues/1227#issuecomment-439928418:
I don't, I just know that it's not that long since the engine was shut down so I try to start it without priming. Trying to start with too little priming is generally better than flooding the engine.
@dany93 is there a property that tells us the temperature of the engine even when it's shut down? And does it show realistic values?
Otherwise we could simply implement this with a timer: starting the engine within say 30 minutes or so since it was last on will require priming; Every time the engine turns on the timer is reset, every time it turns off the timer starts (as well as when the sim launches). Not the most realistic approach, but definitely better than our current one.
Also: flooding needs to be done more realistically I think. I think that if you flood the engine, you need to click the repair button to 'fix' it. Maybe we can display a message to the user telling them what to do in this case.
@gilbertohasnofb wrote
is there a property that tells us the temperature of the engine even when it's shut down? And does it show realistic values?
At least /engines/active-engine/oil-temperature-degf /engines/active-engine/oil-final-temperature-degf /engines/active-engine/oil-compensated-temperature-degf
/fdm/jsbsim/propulsion/engine/oil-temperature-degF /fdm/jsbsim/propulsion/engine[1]/oil-temperature-degF
The temperature (Internal properties) rises after the engine startup, when running (as expected). It slowly decreases as soon as the engine is stopped, even if the Mains master is cutoff. Waiting for the next startup, when it rises again from its current value. This behavior is realistic in principle, at last plausible. I can't say more about the real one. All that I can say in FG is that (POHs 160 and 180 hp p. 2-5) the max oil temperature is 245°F. By climbing at full thrust with the 160 hp, ground air at 20°C, the oil temperature stabilized around 215°F. Which is in accordance with the POHs. Also, it goes beyond 245°F at full thrust at rest on the ground. Which is clearly realistic. The values kept in the Internal Properties do not seem affected by engine or Master stopping. In the same simulator session, of course.
Great, many thanks. I think we should do a test and let the engine run for some good amount of time, then turn it off and see how these properties change over time. With that we could find a good threshold for requiring priming.
I think that if you flood the engine, you need to click the repair button to 'fix' it.
Yeah, the only other real life way is to wait for it to drain. Or if like an auto engine you can open the throttle full and crank to remove the fuel. I don't know if you can do that with an aircraft engine, I don't see why not though. Although in an aircraft engine you also have the mixture. That would be logical then to open throttle full and also lean the mixture to max, crank to clear, then start again as normal. We need to verify if this works in real life and is an excepted procedure. If so it would be really cool to add that to the system.
Does anyone with RL experience know the procedure? Does the POH describe the procedure of how to handle a flooded engine?
POH C172P, O-320 engine (160 hp):
That's great, @dany93, thanks a lot! Do you remember what property did you use for modelling the reservoir tank? Also, how does the flooding work, is it a simple conditional if fuel in reservoir > threshold: flooded
? If so, we can burn this reservoir fuel by a factor multiplied by the throttle position; we also would need to model the mixture lever: lean would burn the fuel, while rich would end up adding more fuel to it (correct?).
@dany93 would you have any interest in modelling this given that you had worked on this issue before?
Also important: flooding should be automatically disabled when the realistic option (or whatever we call it) is disabled in the aircraft menu.
That would be logical then to open throttle full and also lean the mixture to max, crank to clear, then start again as normal.
Wow, I guess logic is logic! :)
I like this idea/feature a lot.
I had written the first code by starting from the one I did for he DC3 JSBSim http://wiki.flightgear.org/Howto:Write_a_fuel_system_in_JSBSim#Douglas_DC3_.282_engines.2C_4_tanks.29 (done with the assistance of Bomber (Simon), jam007, Jon S. Berndt, I ignored these methods).
The important thing was the addition of a collector tank, which I used in our C172p.
@gilbertohasnofb wrote
Do you remember what property did you use for modelling the reservoir tank?
I don't understand your question well. The principle of the collector (reservoir) tank is a very small one, automatically constant-level, fed by the main tanks. This collector tank feeds the active engine with the common main tanks. Its functioning is very similar to the float chamber of a carburetor. If I remember well, it has been implemented for the primer / mixer functionning (although I don't understand or can't trackdown how or if this was used for the primer). https://github.com/c172p-team/c172p/issues/132#issuecomment-98101061 (Issue #132)
Since that, @onox has improved, added, rewritten parts of this file (Systems/fuel.xml). He did it without the use of nasal, which is obviously a very good thing.
Also, how does the flooding work, is it a simple conditional if fuel in reservoir > threshold: flooded?
No. see engine.nas, main loop, lines 326-
elsif (primer > 6) {
print("Flooded engine!");
gui.popupTip("Flooded engine!");
would you have any interest in modelling this given that you had worked on this issue before?
No, sorry. I've not worked on this primer issue, only implemented the float chamber. Firstly, I'm not good at nasal, I don't understand well all this nasal code. But also, what I'm worried is, as we have no rational tools, this needs a lot of twisted nasal instructions and artificial solutions for circumventing this lack. All this to obtain a fragile and limited solution. But of course, I can think on it with you and, if possible, contribute with my general knowledge. Only partly or weakly for the code.
At least, I have observed that, after a few seconds, the flooded state cancels by itself. Then, the engine can start if the correct procedure is applied.
What I've seen that can be useful:
Properties
controls/engines/engine/...
primer
(number of times the primer is activated, must be 3 to 6)
primer-lever
use-primer
(must be false for the engine to start)
(from the FDM c172p.xml lines 1005-...)
fdm/jsbsim/....
fcs/mixture-primer-cmd
(must be =1 for the engine to start, for primer = 3 to 6 and throttle = 0.1 to 0.5)
fcs/mixture-primer
fcs/mixture-primer[1]
Files c172p.xml (lines 1005 - ) fuel.xml c172p.nas engine.nas
I thought the flooding was a pseudo system in as much as if you over prime it, it floods. It should happen also if too much fuel is introduced without the air mixture being correct, so a function of primer setting VS altitude and throttle setting. I don't know the exact formula or combinations that should cause trouble. Now we know what the procedure is to clear it. Basically it is the same controls we used to flood it only with different settings.
Do you understand where the code is which prevents the engine from starting if the conditions (throttle, mixture, primer,...) are not fulfilled?
engine.nas around lines 338
@dany93 I mistook the reservoir for the place where the fuel goes to when you prime, but it actually goes directly to the combustion chamber, right? Regardless, just ignore what I said.
No, sorry. I've not worked on this primer issue, only implemented the float chamber. Firstly, I'm not good at nasal, I don't understand well all this nasal code. But also, what I'm worried is, as we have no rational tools, this needs a lot of twisted nasal instructions and artificial solutions for circumventing this lack. All this to obtain a fragile and limited solution.
No worries, I totally understand it.
As for the solution being a bit fragile, I agree that the route I propose might not perhaps be the best solution. But the issue is that currently our primer is very unrealistic, always being required to turn on the engine, and the flooding procedure is basically non-existent. I think that, perhaps, these conditionals I propose to handle flooding and priming requirements (engine colder than x) would be an improvement over what we have right now.