Board index FlightGear Development Aircraft

Russian Helicopter Mil Mi-6

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Re: Russian Helicopter Mil Mi-6 - downloadlink in the first post

Postby Blender3D » Sat May 01, 2010 6:50 pm

But be aware of: many .xml's can have a serious impact on fps!


Yes, but it's no fun to try to animate more than 200 switches in one single file. You'd soon loose the orientation. And then there still are the instruments, lights and all the mechanic stuff from the fuselage.
I'll at least split the rotor-animations, gear-animations, materials and cockpit-animations.

--Blender3D
Fly one of the biggest rotary wing aircraft the world has seen so far! --> Get the newest version now! (http://gitorious.org/mil-mi-6/mi6dev/archive-tarball/master or "git clone git://gitorious.org/mil-mi-6/mi6dev.git")
User avatar
Blender3D
 
Posts: 272
Joined: Sat Jun 13, 2009 9:15 pm

Re: Russian Helicopter Mil Mi-6 - downloadlink in the first post

Postby HHS » Sat May 01, 2010 6:55 pm

Blender3D wrote:
But be aware of: many .xml's can have a serious impact on fps!


Yes, but it's no fun to try to animate more than 200 switches in one single file. You'd soon loose the orientation. And then there still are the instruments, lights and all the mechanic stuff from the fuselage.
I'll at least split the rotor-animations, gear-animations, materials and cockpit-animations.

--Blender3D


Every panel one file or maybe better every system one file.
Up, up and away
User avatar
HHS
 
Posts: 3625
Joined: Thu Jul 19, 2007 9:09 am
Version: GIT

Re: Russian Helicopter Mil Mi-6 - downloadlink in the first post

Postby Blender3D » Sun May 02, 2010 9:37 pm

As I was adjusting the capacity and location of the tanks today, I was wondering if it was possible to take a common yasim-jet-engine and map it's rpm onto a rotor. It would be used to simulate the engines responses to inputs, engine failures and the engine propertys. and would have a maximum thrust of 0 lbs. That should even make multi engine support possible. What do you think of this idea?

--Blender3D
Fly one of the biggest rotary wing aircraft the world has seen so far! --> Get the newest version now! (http://gitorious.org/mil-mi-6/mi6dev/archive-tarball/master or "git clone git://gitorious.org/mil-mi-6/mi6dev.git")
User avatar
Blender3D
 
Posts: 272
Joined: Sat Jun 13, 2009 9:15 pm

Re: Russian Helicopter Mil Mi-6 - downloadlink in the first post

Postby HHS » Sun May 02, 2010 9:49 pm

Blender3D wrote:As I was adjusting the capacity and location of the tanks today, I was wondering if it was possible to take a common yasim-jet-engine and map it's rpm onto a rotor. It would be used to simulate the engines responses to inputs, engine failures and the engine propertys. and would have a maximum thrust of 0 lbs. That should even make multi engine support possible. What do you think of this idea?

--Blender3D


Had the idea already, but it won't work. I tried it. It isn't possible to map the engine rpm to the rotor rpm. The rotor ignores the engine rpm - means you will see a rpm, but though there is no production of lift of the rotors.

If that would be possible, we would already have engine-support for YASim-rotors.

Sorry
Up, up and away
User avatar
HHS
 
Posts: 3625
Joined: Thu Jul 19, 2007 9:09 am
Version: GIT

Re: Russian Helicopter Mil Mi-6 - downloadlink in the first post

Postby Blender3D » Sun May 02, 2010 9:57 pm

But how does the "pseudo-engine-code" current helicopter are using then work? If I understand it right, it just sets the rpm of the rotors.

--Blender3D
Fly one of the biggest rotary wing aircraft the world has seen so far! --> Get the newest version now! (http://gitorious.org/mil-mi-6/mi6dev/archive-tarball/master or "git clone git://gitorious.org/mil-mi-6/mi6dev.git")
User avatar
Blender3D
 
Posts: 272
Joined: Sat Jun 13, 2009 9:15 pm

Re: Russian Helicopter Mil Mi-6 - downloadlink in the first post

Postby HHS » Sun May 02, 2010 10:28 pm

Blender3D wrote:But how does the "pseudo-engine-code" current helicopter are using then work? If I understand it right, it just sets the rpm of the rotors.

--Blender3D



No, not really.

With defining the rotorgear (enginepower, enginepropfactor..etc) you define a very simple engine for the rotors. But not comparable with real engines. Without any nasal-used starting this engine you will have immediately 100% engine-power. No spool up!
But there is also a "ROTORENGINEMAXRELTORQUE"- with this you can control a bit this simple engine and use it for individual startup-sequences. It defines the torque relative to the engine power and with that the rpm of the rotor. Nethertheless it is just a trick.
Look at the S58, ec130, Alouette II for a example of use.

The Bo105, AS332 and Ec135 uses a more sophisticated engine simulation mostly done by nasal. It uses the named things from above and imitates more or less all other values produced by a real engine.
But even this is more or less a trick:
You don't have any torque split with it, and even with one engine full maximum you have full power of two engines.

We need a support of engines for it, there is now way around!
Up, up and away
User avatar
HHS
 
Posts: 3625
Joined: Thu Jul 19, 2007 9:09 am
Version: GIT

Re: Russian Helicopter Mil Mi-6 - downloadlink in the first post

Postby Blender3D » Mon May 03, 2010 7:53 am

But there is also a "ROTORENGINEMAXRELTORQUE"- with this you can control a bit this simple engine and use it for individual startup-sequences


And couldn't you use this control then to map the power of two "other" engines onto the rotor? Like this:

Code: Select all

Jet Engine 1
  |                                                                +--------------+
  +------- combined power (e.g. engine1.power + engine2.power) --> | mapping code |
  |                                                                +--------------+
Jet Engine 2                                                                |
                                                                            |
"ROTORENGINEMAXRELTORQUE" <-------------------------------------------------+


?

Then you would have a real twin engine simulation that controls the behavior of the rotorgear.

--Blender3D
Fly one of the biggest rotary wing aircraft the world has seen so far! --> Get the newest version now! (http://gitorious.org/mil-mi-6/mi6dev/archive-tarball/master or "git clone git://gitorious.org/mil-mi-6/mi6dev.git")
User avatar
Blender3D
 
Posts: 272
Joined: Sat Jun 13, 2009 9:15 pm

Re: Russian Helicopter Mil Mi-6 - downloadlink in the first post

Postby HHS » Mon May 03, 2010 8:52 pm

Blender3D wrote:
But there is also a "ROTORENGINEMAXRELTORQUE"- with this you can control a bit this simple engine and use it for individual startup-sequences


And couldn't you use this control then to map the power of two "other" engines onto the rotor? Like this:

Code: Select all

Jet Engine 1
  |                                                                +--------------+
  +------- combined power (e.g. engine1.power + engine2.power) --> | mapping code |
  |                                                                +--------------+
Jet Engine 2                                                                |
                                                                            |
"ROTORENGINEMAXRELTORQUE" <-------------------------------------------------+


?

Then you would have a real twin engine simulation that controls the behavior of the rotorgear.

--Blender3D


Something similar I had in mind, but is more complex. That would maybe fix the engine problem, but I'm not sure if you then will have Torque split. But this goes beyond my abilities- maybe you could ask Melchior or ask on the devel-list. I still prefer a fix in the yasim-code so we have engine-support....
Up, up and away
User avatar
HHS
 
Posts: 3625
Joined: Thu Jul 19, 2007 9:09 am
Version: GIT

Re: Russian Helicopter Mil Mi-6 - downloadlink in the first post

Postby Blender3D » Sun May 16, 2010 8:55 pm

Hi, everyone,

I just wanted to say that I got the thing with the jet engines with low thrust that are used to simulate the helicopter engines working. The only problem now is to have an error-free nasal-code (I get a lot of nil's in numeric expressions). One attempt do do so would be to map the rpm onto the ROTORENGINEMAXRELTORQUE. But that would require to make sure that the rpm is always greater that 0. Another Problem is that I currently have an infinite increasing of rotor rpm because my code is still very much like "prove of concept" and not a very fine thing. (What can you expect of 20 lines of code anyway?).

--Blender3D
Fly one of the biggest rotary wing aircraft the world has seen so far! --> Get the newest version now! (http://gitorious.org/mil-mi-6/mi6dev/archive-tarball/master or "git clone git://gitorious.org/mil-mi-6/mi6dev.git")
User avatar
Blender3D
 
Posts: 272
Joined: Sat Jun 13, 2009 9:15 pm

Re: Russian Helicopter Mil Mi-6 - downloadlink in the first post

Postby HHS » Sun May 16, 2010 9:39 pm

Blender3D wrote:Hi, everyone,

I just wanted to say that I got the thing with the jet engines with low thrust that are used to simulate the helicopter engines working. The only problem now is to have an error-free nasal-code (I get a lot of nil's in numeric expressions). One attempt do do so would be to map the rpm onto the ROTORENGINEMAXRELTORQUE. But that would require to make sure that the rpm is always greater that 0. Another Problem is that I currently have an infinite increasing of rotor rpm because my code is still very much like "prove of concept" and not a very fine thing. (What can you expect of 20 lines of code anyway?).

--Blender3D


I'm sure that's not the only problem...
The engine influence the rotor- and the rotor influences the Engines! Depending on the flight state the engines have to be regulate to keep the rotor rpm. Modern helicopters uses a governor. If you increase collective the engine needs more power- without governor the rpm will decrease and the rotor rpm would not be constant.
I'm not sure if the principle of mapping the turbine engine to the rotor rpm can manage this.

Can you include the nasal code here in this thread?
Up, up and away
User avatar
HHS
 
Posts: 3625
Joined: Thu Jul 19, 2007 9:09 am
Version: GIT

Re: Russian Helicopter Mil Mi-6 - downloadlink in the first post

Postby Blender3D » Mon May 17, 2010 7:29 am

Sure, I can.

This is the current code, where I try to get rid of the nil's:
Code: Select all
var engine0_rpm = 0; #props.globals.getNode("engines/engine[0]/n1", 1).getValue();
var engine1_rpm = 0; #props.globals.getNode("engines/engine[1]/n1", 1).getValue();

var target_rel_rpm = props.globals.getNode("controls/rotor/reltarget", 1);
var max_rel_torque = props.globals.getNode("controls/rotor/maxreltorque", 1);

var mixed_rpm = 0;
#var mixed_rpm = engine0_rpm; #+ engine1_rpm;

var main_loop = func {
   settimer(main_loop, 0);

   engine0_rpm = props.globals.getNode("engines/engine[0]/n1", 1).getValue();
   engine1_rpm = props.globals.getNode("engines/engine[1]/n1", 1).getValue();

   mixed_rpm = engine0_rpm + engine1_rpm;

   max_rel_torque.setValue(1 + (mixed_rpm - 100));
   target_rel_rpm.setValue(1 + (mixed_rpm - 100));

#   max_rel_torque.setValue(mixed_rpm / 200);
#   target_rel_rpm.setValue(mixed_rpm / 200);

#   print(mixed_rpm.getValue());

}

main_loop();


And this is the code I started with:
Code: Select all
var engine0_rpm = props.globals.getNode("engines/engine[0]/n1", 1).getValue();
var engine1_rpm = props.globals.getNode("engines/engine[1]/n1", 1).getValue();

var target_rel_rpm = props.globals.getNode("controls/rotor/reltarget", 1);
var max_rel_torque = props.globals.getNode("controls/rotor/maxreltorque", 1);

var mixed_rpm = engine0_rpm + engine1_rpm;

var main_loop = func {
   settimer(main_loop, 0);

   max_rel_torque.setValue(1 + (mixed_rpm / 100));
   target_rel_rpm.setValue(1 + (mixed_rpm / 100));
}

main_loop();


--Blender3D
Fly one of the biggest rotary wing aircraft the world has seen so far! --> Get the newest version now! (http://gitorious.org/mil-mi-6/mi6dev/archive-tarball/master or "git clone git://gitorious.org/mil-mi-6/mi6dev.git")
User avatar
Blender3D
 
Posts: 272
Joined: Sat Jun 13, 2009 9:15 pm

Re: Russian Helicopter Mil Mi-6 - downloadlink in the first post

Postby HHS » Mon May 17, 2010 6:00 pm

That's beyond my knowledge :( I can't help.

I just found out, that my goal to make the most realistic EC135 failed... X-Plane has now soon a quite good simulation of all systems- including the engine staurtup.... :(

As the YASim heli fdm still lacks some of the important things, I will write to the developers-list and mention also your try to solve this problem.

Maybe we get some help.... :|
Up, up and away
User avatar
HHS
 
Posts: 3625
Joined: Thu Jul 19, 2007 9:09 am
Version: GIT

Re: Russian Helicopter Mil Mi-6 - downloadlink in the first post

Postby glazmax » Tue May 18, 2010 8:49 am

Here my sample code:
Code: Select all
#engine to rotor mapping
var target_rel_rpm = props.globals.getNode("controls/rotor/reltarget", 1);
var max_rel_torque = props.globals.getNode("controls/rotor/maxreltorque", 1);

var engine_loop = func {
  var engine0_rpm = props.globals.getNode("engines/engine[0]/n1").getValue() or 0;
  var engine1_rpm = props.globals.getNode("engines/engine[1]/n1").getValue() or 0;
  #debug.dump(engine0_rpm);
  var mixed_rpm = engine0_rpm + engine1_rpm;
  max_rel_torque.setValue(1 + (mixed_rpm - 100));
  target_rel_rpm.setValue(1 + (mixed_rpm - 100));

  print(mixed_rpm);
  settimer(engine_loop, 3);
}
engine_loop();

As you can see, the major difference is the or 0 after getValue(), as it is nil at the first call(not initialized yet).
The settimer is used with 3 sec delay just for testing here, you can use 0 or replace the timer with engine_loop(); instead.
(And I replaced main_loop with engine_loop as it appeared more meaningful to me). Note the debug.dump();, it is very useful for debugging.

see you,
glazmax
XXX pilot of the caribbean - bones and porters XXX
User avatar
glazmax
 
Posts: 453
Joined: Sat Jan 27, 2007 11:38 am
Location: Austria
Callsign: jettoo/OE-JTO
Version: cvs

Re: Russian Helicopter Mil Mi-6 - downloadlink in the first post

Postby Blender3D » Tue May 18, 2010 4:00 pm

Many thanks, glazmax, your code works perfectly. I'll now just have to find out how to control the two jet engines (start-up-procedures etc). :)

--Blender3D
Fly one of the biggest rotary wing aircraft the world has seen so far! --> Get the newest version now! (http://gitorious.org/mil-mi-6/mi6dev/archive-tarball/master or "git clone git://gitorious.org/mil-mi-6/mi6dev.git")
User avatar
Blender3D
 
Posts: 272
Joined: Sat Jun 13, 2009 9:15 pm

Re: Russian Helicopter Mil Mi-6 - downloadlink in the first post

Postby HHS » Wed May 19, 2010 2:35 pm

Yes, it is working. I tried in the Bo105 and nice to see that the power is halved. Nethertheless it is still impossible to fly with just one engine- not enough power and rpm - no idea how to solve this.
( the real should even able to fly withone engine)

Well, I'm excited how your work on it will go on- the Mil Mi-6 is a fantastic heli I would like to see in FGFS!
Up, up and away
User avatar
HHS
 
Posts: 3625
Joined: Thu Jul 19, 2007 9:09 am
Version: GIT

PreviousNext

Return to Aircraft

Who is online

Users browsing this forum: No registered users and 8 guests