Board index FlightGear Development Aircraft Flight dynamics model

Can I set any JSBsim FDM property with a FDM function ?

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

Re: Can I set any JSBsim FDM property with a FDM function ?

Postby benih » Fri Oct 15, 2021 3:01 pm

Did not work. There is no such property to set in run time, only in the engine definiton as <value>.
I need this at runtime.
User avatar
benih
 
Posts: 1711
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Can I set any JSBsim FDM property with a FDM function ?

Postby S&J » Fri Oct 15, 2021 5:30 pm

What can I say....

You can lead a horse to water....
"Stay away from negative people.They have a problem for every solution." - Albert Einstein
S&J
 
Posts: 797
Joined: Wed Aug 26, 2020 7:31 pm

Re: Can I set any JSBsim FDM property with a FDM function ?

Postby benih » Fri Oct 15, 2021 5:58 pm

That was not helpful.
User avatar
benih
 
Posts: 1711
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Can I set any JSBsim FDM property with a FDM function ?

Postby S&J » Fri Oct 15, 2021 6:11 pm

Ok how about this.

I can't look for you, only you can do that.

I've been adjusting it for years
"Stay away from negative people.They have a problem for every solution." - Albert Einstein
S&J
 
Posts: 797
Joined: Wed Aug 26, 2020 7:31 pm

Re: Can I set any JSBsim FDM property with a FDM function ?

Postby TheEagle » Fri Oct 15, 2021 6:39 pm

You need to change /fdm/jsbsim/propulsion/engine/bsfc-lbshp_hr. Works for me through the property browser. But it's counterintuitive - the lower you set it, the more power you get, so if you want less power, you need to increase it. Also you need to take care that it never becomes 0 - when I set it to 0, the FDM crashed immediately.
Last edited by TheEagle on Fri Oct 15, 2021 6:57 pm, edited 1 time in total.
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3433
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: Can I set any JSBsim FDM property with a FDM function ?

Postby S&J » Fri Oct 15, 2021 6:40 pm

thank you Eagle...

It's the 6th property down from the top.
"Stay away from negative people.They have a problem for every solution." - Albert Einstein
S&J
 
Posts: 797
Joined: Wed Aug 26, 2020 7:31 pm

Re: Can I set any JSBsim FDM property with a FDM function ?

Postby benih » Fri Oct 15, 2021 7:06 pm

Oh thanks!
That one i already checked, but had the side effect of adjusting the fuel flow too.
I already have this with my current solution (adding friction to slow the engine).
User avatar
benih
 
Posts: 1711
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Can I set any JSBsim FDM property with a FDM function ?

Postby S&J » Fri Oct 15, 2021 7:18 pm

That's because what you've got there is a bandaide on top of a bandaide on top of a bandaide written in either XML or Nasal.

Basically you've got a completely porked piston engine.

Adjusting bsfc does NOT effect the fuel flow

Probably done by someone who never designed a jet engine, right Thorsten ?
"Stay away from negative people.They have a problem for every solution." - Albert Einstein
S&J
 
Posts: 797
Joined: Wed Aug 26, 2020 7:31 pm

Re: Can I set any JSBsim FDM property with a FDM function ?

Postby benih » Fri Oct 15, 2021 7:42 pm

Are you referring to me or eagle?
I talk about the c182s which is piston driven.
User avatar
benih
 
Posts: 1711
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Can I set any JSBsim FDM property with a FDM function ?

Postby S&J » Fri Oct 15, 2021 8:11 pm

You
"Stay away from negative people.They have a problem for every solution." - Albert Einstein
S&J
 
Posts: 797
Joined: Wed Aug 26, 2020 7:31 pm

Re: Can I set any JSBsim FDM property with a FDM function ?

Postby benih » Fri Oct 15, 2021 9:37 pm

S&J wrote in Fri Oct 15, 2021 8:11 pm:You

Ok.

I reinvestigated and i think i had a bogus number in my function. I reimplemented it from scratch, and now i can adjust the power (and with that RPM) with an oscillator for rough engine running. And fuel flow does just oscillate minimally - the cause of this is clearly the implementation of the governor, because fuel flow here is also depending on the RPM setting (and RPM is oscillating in this scenario like i said).
I think i probably need to introduce some correction value here, to smooth this out. But first i need to tune the numbers.
User avatar
benih
 
Posts: 1711
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Can I set any JSBsim FDM property with a FDM function ?

Postby TheEagle » Sat Oct 16, 2021 3:04 pm

Great that it is working now, as at some time I will need a similar code on my Cessna 210 ! :)
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3433
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: Can I set any JSBsim FDM property with a FDM function ?

Postby S&J » Sat Oct 16, 2021 3:55 pm

The issue I have with plug fouling is the time it takes to occur and be resolved. Plus determining the power loss.
"Stay away from negative people.They have a problem for every solution." - Albert Einstein
S&J
 
Posts: 797
Joined: Wed Aug 26, 2020 7:31 pm

Re: Can I set any JSBsim FDM property with a FDM function ?

Postby benih » Sat Oct 16, 2021 6:08 pm

That is true S&J, but for the magnitude of the effect there is footage online.
The time and conditions for resolving are well known, too.
What I don’t yet have found is the time it takes to foul a plug given the right conditions. I tried to encode the vague reports from real aviation forums into something usable and decided for about 10 minutes (give or take).

If you have something valuable to add in those redirects, you are more than welcome to post it here: viewtopic.php?f=34&t=39770
User avatar
benih
 
Posts: 1711
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Can I set any JSBsim FDM property with a FDM function ?

Postby benih » Sun Oct 17, 2021 11:13 am

(Removed duplicate thread hint)
User avatar
benih
 
Posts: 1711
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Previous

Return to Flight dynamics model

Who is online

Users browsing this forum: No registered users and 1 guest