oh that's good.
Im still clueless
Another Nasal issue
Re: Another Nasal issue
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc
R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?
R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?
Re: Another Nasal issue
Hi
Is there still an issue? If so, maybe I can help solve it.
Can you post your latest revision of the code, and the exact error?
Kind Regards,
Josh
Is there still an issue? If so, maybe I can help solve it.
Can you post your latest revision of the code, and the exact error?
Kind Regards,
Josh
- LesterBoffo
- Posts: 790
- Joined: Tue Sep 15, 2015 3:58 am
- Location: Beautiful sunny, KOTH
Re: Another Nasal issue
it0uchpods wrote:Hi
Is there still an issue? If so, maybe I can help solve it.
Can you post your latest revision of the code, and the exact error?
Kind Regards,
Josh
Hi Josh,
So far this is what I have. I have to add that the improvement in the toggling is still present, but it doesn't adjust the mixture with altitude yet. I've been remming out lines so it's a bit of a hash. I'm still getting a console complaint about the last line of code being a parse error, it always calls the last line. I'm not sure I should be using the " return 0;' on the altitude/mixture table functions.
Code: Select all
#### Set Diesel idle level/cutoff with throttle position and mixture with altitude.
var pos_throttle = props.globals.getNode("controls/engines/engine[0]/throttle");
var pos_mixture = props.globals.getNode("controls/engines/engine[0]/mixture");
var pos_gear = props.globals.getNode("gears/gears[1]/wow");
var pos_alt = props.globals.getNode("instrumentation/altimeter/pressure-alt-ft");
setlistener("/controls/engines/engine[0]/throttle", func {
var throttle = pos_throttle.getValue();
if (throttle >= 0.05) { pos_mixture.setValue(1.0); return 0; }
if (throttle > 0) { pos_mixture.setValue(0.068); return 0; }
pos_mixture.setValue(0);
});
#### Set mixture to alt level
setlistener("/gears/gears[1]/wow", func {
var gear = pos_gear.getValue();
if (gear = false) { pos_gear.setValue(1.0); return 0;
if (gear = true) { pos_mixture.setValue(1.0); return 0;
var alt = pos_alt.getValue();
var mixture = "controls/engines/engine[0]/mixture";
if (alt >= 15000) { pos_mixture.setValue(0.59); return 0;
## }
## if (getprop(alt) < 15000) {
## setprop (mixture, 0.59);
## }
if (alt >= 10000) { pos_mixture.setValue(0.71); return 0;
## }
## if (getprop(alt) < 10000) {
## setprop (mixture, 0.82);
## }
if (alt >= 5000) { pos_mixture.setValue(0.84); return 0;
## }
## if (getprop(alt) < 5000) {
## setprop (mixture, 0.94);
## }
if (alt > 3000) { pos_mixture.setValue(0.91); return 0;
## }
var MixtureInit = func {
var AltInit = func {
settimer(env_effects, 2);
settimer(mixture_loop, 3);
settimer(alt_loop, 3);
# Delay startup a bit to allow things to initialize
# }
Re: Another Nasal issue
Hi
Of the last line is giving a parse error, it usually means you forgot a " somewhere.
That wont work
try
Kind Regards,
Josh
Of the last line is giving a parse error, it usually means you forgot a " somewhere.
Code: Select all
var mixture = "controls/engines/engine[0]/mixture";
That wont work
try
Code: Select all
var mixture = getprop("controls/engines/engine[0]/mixture");
Kind Regards,
Josh
- LesterBoffo
- Posts: 790
- Joined: Tue Sep 15, 2015 3:58 am
- Location: Beautiful sunny, KOTH
Re: Another Nasal issue
I think I've got it solved thanks to Josh's hints. Thanks again
I just need to fine tune the optimum base mixture for altitude with this weird engine. Normally, most Diesels don't have a throttle plate or air restriction across their intake and they run purely on the metered amount of Diesel oil fuel injected into the cylinder. I think you can throttle an IC recip engine in either YAsim or JSB-sim by leaving the throttle wide open and cutting back on the mixture, and it won't overheat or go into pre-detonation like in real life gasoline engines would.
I just need to fine tune the optimum base mixture for altitude with this weird engine. Normally, most Diesels don't have a throttle plate or air restriction across their intake and they run purely on the metered amount of Diesel oil fuel injected into the cylinder. I think you can throttle an IC recip engine in either YAsim or JSB-sim by leaving the throttle wide open and cutting back on the mixture, and it won't overheat or go into pre-detonation like in real life gasoline engines would.
Re: Another Nasal issue
No problem.
Any further problems, feel free to ask.
In my JSB props, I use a FCS overwrite to control mixture.
Kind Regards,
Josh
Any further problems, feel free to ask.
In my JSB props, I use a FCS overwrite to control mixture.
Kind Regards,
Josh
Re: Another Nasal issue
No problem.
Any further problems, feel free to ask.
In my JSB props, I use a FCS overwrite to control mixture.
Kind Regards,
Josh
Any further problems, feel free to ask.
In my JSB props, I use a FCS overwrite to control mixture.
Kind Regards,
Josh
Re: Another Nasal issue
Repeated... Repeated
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc
R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?
R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?
Re: Another Nasal issue
lol WTF
Kind Regards,
Josh
Kind Regards,
Josh
- LesterBoffo
- Posts: 790
- Joined: Tue Sep 15, 2015 3:58 am
- Location: Beautiful sunny, KOTH
Re: Another Nasal issue
So after a week or so of tinkering with the Nasal file I've decided that the Nasal solution is kaput. I can reasonably make this idea work with some changing around of the YASim FDM parameters and keep this change entirely within the FDM's .xml file.
This is a great thing, I've also been able to do the same for a nasty helicopter FDM nasal, the less nasal calls within FG in my old Win XP OS the better.
And it all works great, there none of the Nasal's at-cross-purposes interference with each setting, and the engine runs like a true Diesel with pretty good power and fuel economy at altitude.
This is a great thing, I've also been able to do the same for a nasty helicopter FDM nasal, the less nasal calls within FG in my old Win XP OS the better.
And it all works great, there none of the Nasal's at-cross-purposes interference with each setting, and the engine runs like a true Diesel with pretty good power and fuel economy at altitude.
Return to “Aircraft Development”
Who is online
Users browsing this forum: No registered users and 11 guests