Page 1 of 2

expression gains filter and such...

Posted: Mon Sep 26, 2016 5:09 pm
by bomber
https://forum.flightgear.org/viewtopic.php?f=4&t=30529


Code: Select all

 <filter>
        <name>Door L1</name>
        <type>gain</type>
        <gain>1</gain>
        <update-interval-secs type="double">0.05</update-interval-secs>
        <input>
            <expression>
                <table>
                    <property>/controls/doors/L1-i</property>
                    <entry><ind>0</ind><dep>-80</dep></entry>
                    <entry><ind>1</ind><dep> 80</dep></entry>
                </table>
            </expression>
        </input>
        <output>/controls/doors/L1-o</output>
    </filter>


I've not seen this done before, so can someone point me to any documentation (not holding my breath) or explain this and any more like this I don't know about ?

Maybe we could create a library of these little gems ?

regards

Simon

Re: expression gains filter and such...

Posted: Mon Sep 26, 2016 5:13 pm
by IAHM-COL

Re: expression gains filter and such...

Posted: Mon Sep 26, 2016 5:15 pm
by Octal450
I used them in this file in MD-80s, to make custom values.

https://github.com/it0uchpods/MD-88/blob/master/Systems/engine-timing.xml

They are basically gain filters with custom values.

Wiki not very helpful sadly.

I can help :D

Re: expression gains filter and such...

Posted: Mon Sep 26, 2016 5:52 pm
by bomber
Can I take it these are Flightgear XML 'extensions' for want of a better word and not native JSBsim XML ?

Re: expression gains filter and such...

Posted: Mon Sep 26, 2016 6:24 pm
by Octal450
It's autopilot/property rule xml

Re: expression gains filter and such...

Posted: Mon Sep 26, 2016 6:50 pm
by bomber
yes and that property is outside of the JSBsim property tree....

But what we have here are xml functions.. such as the filter

Code: Select all

    <filter>
    </filter>

and others

However these are not anywhere to be found in the JSBsim manual...

And as I do flight models in both flightgear and Outerra I can only use xml functions that are JSBsim if I want an easy transfer from one to the other.

Simon

Re: expression gains filter and such...

Posted: Mon Sep 26, 2016 7:39 pm
by OPFOR77
Yes, these are FG specific, not related to JSBSim.

You can do the same thing as the first bit you posted in JSBSim with a table and clamping the output.

Re: expression gains filter and such...

Posted: Mon Sep 26, 2016 7:39 pm
by Octal450
I don't understand why you are saying JSBsim.

This is a FlightGear XML based expression gain filter...

Re: expression gains filter and such...

Posted: Mon Sep 26, 2016 7:41 pm
by IAHM-COL
@Josh,
he would just love to be able to use the <filter> options within JSBsim. Which AFAIK, no way.

Re: expression gains filter and such...

Posted: Mon Sep 26, 2016 7:56 pm
by Octal450
Yeah.