Board index FlightGear Development Aircraft Flight dynamics model

Strange engine behavior

Good sims require good FDMs (the "thing" that makes an aircraft behave like an aircraft).

Strange engine behavior

Postby fmg » Fri Jun 07, 2019 5:48 pm

Hello,

I made an Yasim-FDM for a piston-engine plane, like many before. Worked well so far. The plane is flying with reasonable characteristics. But there is one strange and annoying thing different to the others. If I switch of the engine via the magnetos the rpm is 0 immediately and the plane gets out of control when in the air. Normally the prop is spinning down for quite a while. Tried several things. But even when I stetting the moment up it stays that way. Checked the piston-engine tag several times, but couldn't find something wrong or unusual.
Any ideas?
Here is the engine tag:
Code: Select all
  <propeller x="3.844" y="0" z="-0.11341"
             radius="1.425"
             mass="780"
             moment="18"
             cruise-speed="87"
             cruise-rpm="1400"
             cruise-alt="5000"
             cruise-power="174"
             takeoff-power="204"
             takeoff-rpm="1600">
             <actionpt x="4.78532" y="0" z="-0.11341" />
             <piston-engine eng-power="204"
                            eng-rpm="1600"
                            displacement="903.15"
                            alt="5000">
                            compression="4.6">
                            <control-input control="THROTTLE" axis="/controls/engines/engine[0]/throttle"/>
                            <control-input control="STARTER" axis="/controls/engines/engine[0]/starter"/>
                            <control-input control="MAGNETOS" axis="/controls/engines/engine[0]/magnetos"/>
                            <control-input control="MIXTURE" axis="/controls/engines/engine[0]/mixture"/>
             </piston-engine>
  </propeller>

f-(
User avatar
fmg
 
Posts: 565
Joined: Tue Jun 29, 2010 6:13 pm
Location: EDDI
Callsign: fotomas
Version: 2
OS: Mac OS X 10.6.8

Re: Strange engine behavior

Postby wkitty42 » Sat Jun 08, 2019 3:16 am

this looks malformed... especially with the closing ">" after alt= and compression=... and is all of that supposed to be within the propeller tag group? the alignment is certainly off and makes it hard to read... you can load an xml file in your browser and it'll show where the problems are with wrongly placed tags...

i've loaded the block into "kate" (my editor) and selected XML format... if i'm reading it correctly, the trailing ">" after alt= is your problem but i don't have any way of checking further...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9165
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 22.04

Re: Strange engine behavior

Postby fmg » Sat Jun 08, 2019 11:08 am

Thanks,

yes - was malformed. During testing I rearanged it several times. Might be therefrom.
The tip with the browser helped a lot, but the problem stays the same, even after it is correct formed.

f-(
User avatar
fmg
 
Posts: 565
Joined: Tue Jun 29, 2010 6:13 pm
Location: EDDI
Callsign: fotomas
Version: 2
OS: Mac OS X 10.6.8

Re: Strange engine behavior

Postby wkitty42 » Sat Jun 08, 2019 11:47 am

is the piston-engine section really supposed to be inside the propeller section? could you have something else embedded incorrectly?
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9165
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 22.04

Re: Strange engine behavior

Postby WoodSTokk » Sat Jun 08, 2019 4:06 pm

Yes, thats correct. In YAsim you define a propeller and inside this definition is the engine that drive the propeller.
See: http://www.buckarooshangar.com/flightgear/yasimtut_propeller.html
WoodSTokk
 
Posts: 1077
Joined: Tue Oct 17, 2017 3:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: SX-W57
IRC name: WoodSTokk
Version: 2020.4.0
OS: Debian Bullseye

Re: Strange engine behavior

Postby wkitty42 » Sat Jun 08, 2019 5:26 pm

weird but ok :)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9165
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 22.04

Re: Strange engine behavior

Postby fmg » Sat Jun 08, 2019 5:39 pm

wkitty42 wrote in Sat Jun 08, 2019 11:47 am:is the piston-engine section really supposed to be inside the propeller section?
Yes - it is.
See here:
Code: Select all
  <propeller x="3.844" y="0" z="-0.11341"
             radius="1.425"
             mass="780"
             moment="25"
             cruise-speed="87"
             cruise-rpm="1400"
             cruise-alt="5000"
             cruise-power="174"
             takeoff-power="204"
             takeoff-rpm="1600">
             <actionpt x="4.78532" y="0" z="-0.11341" />
             <piston-engine eng-power="204"
                            eng-rpm="1600"
                            displacement="903.15"
                            alt="5000"
                            compression="4.6">
                            <control-input control="THROTTLE" axis="/controls/engines/engine[0]/throttle"/>
                            <control-input control="STARTER" axis="/controls/engines/engine[0]/starter"/>
                            <control-input control="MAGNETOS" axis="/controls/engines/engine[0]/magnetos"/>
                            <control-input control="MIXTURE" axis="/controls/engines/engine[0]/mixture"/>
             </piston-engine>
  </propeller>

wkitty42 wrote in Sat Jun 08, 2019 11:47 am:could you have something else embedded incorrectly?

So what could this be then?
The plane behaves well as long you didn't cut of the engine. The FDM looked well formed in the browser and I compared it with other FDMs without this problem. Apart from the values the structure is the same.
User avatar
fmg
 
Posts: 565
Joined: Tue Jun 29, 2010 6:13 pm
Location: EDDI
Callsign: fotomas
Version: 2
OS: Mac OS X 10.6.8

Re: Strange engine behavior

Postby WoodSTokk » Sat Jun 08, 2019 7:18 pm

This propeller and engine works as expected.
If you go to the property browser while the engine is running and set 'rpm' to 0, the engine is immediately off.
This means, you have a nasal script or a filter that set the rpm to 0 if '/engines/engine/running' is 'false'.
WoodSTokk
 
Posts: 1077
Joined: Tue Oct 17, 2017 3:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: SX-W57
IRC name: WoodSTokk
Version: 2020.4.0
OS: Debian Bullseye

Re: Strange engine behavior

Postby fmg » Sat Jun 08, 2019 9:18 pm

Thanks a lot.
It was indeed a nasal-script. Used some files from another plane. SoI wasn't aware of it.
Problem solved. :D
User avatar
fmg
 
Posts: 565
Joined: Tue Jun 29, 2010 6:13 pm
Location: EDDI
Callsign: fotomas
Version: 2
OS: Mac OS X 10.6.8


Return to Flight dynamics model

Who is online

Users browsing this forum: No registered users and 1 guest