Nasal creation and trouble shooting..?

Everything in connection with developing aircraft for FlightGear
User avatar
LesterBoffo
Posts: 790
Joined: Tue Sep 15, 2015 3:58 am
Location: Beautiful sunny, KOTH

Nasal creation and trouble shooting..?

Postby LesterBoffo » Thu Nov 19, 2015 5:00 pm

I've got this FDM conundrum, I'm trying to make a new variable property control for an added small jet engine and it's compressor pressure property off of the /engines/engine[0] tree. What I need to have done is allow this to be a control and be controlled by the base variables of the Melchior's helicopter Nasal that about 80% of FG helicopters use.

What I think I need is a nasal coding input that turns on and off the relative torque of the rotor(s) with the '{' + '}' keys, (which is normally done anyways in the nasal..) but it should also link to an input of the pressure in atmospheres in the jet engine's compressor epr property tree to an output of the percentage of input power torque applied to the rotor(s).

The epr variable is a known value set in the FDM just want to get it to play nicely with the output in power to the main rotor

What I'm seeing is a big mess of having to rewrite the whole nasal because there's some control inputs that need eliminating or restructuring so there aren't conflicts with which one gets to run the output, which would be the power levels to the rotor itself. Most helicopters using Melchior's script have a hidden engine not normally listed in the Engines/ property tree, and I see this may be a bugger to get around

User avatar
jwocky
Site Admin
Posts: 1833
Joined: Sat Sep 12, 2015 12:04 pm
Contact:

Re: Nasal creation and trouble shooting..?

Postby jwocky » Thu Nov 19, 2015 6:05 pm

Sorry, I have not the faintest idea what you are trying to do ... do you need some notification if a property changes? Do you need code to change a property by key-press? Do you need some equations worded in Nasal? Can you give me an idea what you need?
Free speech can never be achieved by dictatorial measures!

User avatar
LesterBoffo
Posts: 790
Joined: Tue Sep 15, 2015 3:58 am
Location: Beautiful sunny, KOTH

Re: Nasal creation and trouble shooting..?

Postby LesterBoffo » Thu Nov 19, 2015 11:10 pm

Your gonna make me draw you a picture aren't you? :P

User avatar
jwocky
Site Admin
Posts: 1833
Joined: Sat Sep 12, 2015 12:04 pm
Contact:

Re: Nasal creation and trouble shooting..?

Postby jwocky » Fri Nov 20, 2015 5:14 pm

Yes, please
Free speech can never be achieved by dictatorial measures!

User avatar
LesterBoffo
Posts: 790
Joined: Tue Sep 15, 2015 3:58 am
Location: Beautiful sunny, KOTH

Re: Nasal creation and trouble shooting..?

Postby LesterBoffo » Fri Nov 20, 2015 5:28 pm

I figured as much, you think the drawing will help? I thought I described the situation as clearly as I could.

Let me reiterate,

You start with a Melchior nasal equipped YAsim heli, I'm adding an jet engine entry to provide fuel consumption, a source of bleed air pressure and provide an accessible property tree for the prime mover, ( remember that YAsim helis have a 'phantom' engine..) find a way to integrate this jet engine entry, ( expose it's property tree, specifically the EPR, to the nasal ) into the power out to the rotor . In other words I'm trying to interpolate the pressure differential into a variable that runs the torque/power to the rotor.
Last edited by LesterBoffo on Fri Nov 20, 2015 6:30 pm, edited 1 time in total.

User avatar
jwocky
Site Admin
Posts: 1833
Joined: Sat Sep 12, 2015 12:04 pm
Contact:

Re: Nasal creation and trouble shooting..?

Postby jwocky » Fri Nov 20, 2015 6:18 pm

Okay, so if you have already the properties from the jet engine, you could always hang a listener on any of them. With the lsiterner, you trigger at every change a nasal the does the interpolation and writes back the pressure difference into another property. I don't know whether Yasim can work with FDM exapansions like the System Files in JSB, but if you, can use the prop to calculate your result in the fdm.
Free speech can never be achieved by dictatorial measures!

User avatar
LesterBoffo
Posts: 790
Joined: Tue Sep 15, 2015 3:58 am
Location: Beautiful sunny, KOTH

Re: Nasal creation and trouble shooting..?

Postby LesterBoffo » Fri Nov 20, 2015 6:29 pm

Well assuming that I need to expose the FDM entry for the engine's epr variable, like adding it to the var section of the Nasal?

( i.e. Nasal snippet..)

Code: Select all

var rotor = props.globals.getNode("controls/engines/engine/magnetos");
var rotor_rpm = props.globals.getNode("rotors/main/rpm");
var torque = props.globals.getNode("rotors/gear/total-torque", 1);
var collective = props.globals.getNode("controls/engines/engine[0]/throttle");


I don't do coding language well and I'd need some ideas on how this could be set up.

User avatar
jwocky
Site Admin
Posts: 1833
Joined: Sat Sep 12, 2015 12:04 pm
Contact:

Re: Nasal creation and trouble shooting..?

Postby jwocky » Fri Nov 20, 2015 6:37 pm

Since you only need the epr as I understand

Code: Select all

   var epr0 = getprop("/controls/engines/engine[0]");
   ... # do some calculations with ...


The problem occurs if your engine model from Yasim doesn't expose the epr to the property tree. You can check in FG with "Debug/Browse internal properties". If you see it there, you can at least read the epr.
Free speech can never be achieved by dictatorial measures!

User avatar
LesterBoffo
Posts: 790
Joined: Tue Sep 15, 2015 3:58 am
Location: Beautiful sunny, KOTH

Re: Nasal creation and trouble shooting..?

Postby LesterBoffo » Fri Nov 20, 2015 7:11 pm

Been there, done that. It's present, you don't think I've already checked on this?

Trust me, when you add a jet engine entry to a YAsim FDM and give it a source of fuel, it ends up working fine.

You of all people should know that I know my way around a YAsim FDM, lest you forget the DH Comet, or the Airbus 340-313x.

User avatar
jwocky
Site Admin
Posts: 1833
Joined: Sat Sep 12, 2015 12:04 pm
Contact:

Re: Nasal creation and trouble shooting..?

Postby jwocky » Sat Nov 21, 2015 2:09 pm

Lester, calm down! I still try to figure out what your problem is. Since you say, you have the property, next thing is to do something with it and I haven't figured yet what you want to do with it.
Free speech can never be achieved by dictatorial measures!


Return to “Aircraft Development”

Who is online

Users browsing this forum: No registered users and 21 guests