Board index FlightGear Development Aircraft Systems

Developing Brake Temperature and PSI...

Modeling aircraft systems, like electrical stuff, hydraulics, pneumatics? Feel free to ask support.

Developing Brake Temperature and PSI...

Postby legoboyvdlp » Wed Nov 25, 2015 7:57 pm

Hi guys.
Now, you'll be on the ground in tears when I ask this.
But, how do I make a new property?
This is the most basic question, but this is my first serious effort in developing an aircraft.
I'm trying to model brake temperature and tire pressure for the Airbus A330.
Please be patient; it's my first time ;)
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Developing Brake Temperature and PSI...

Postby Thorsten » Wed Nov 25, 2015 8:26 pm

If it's supposed to be a static property, you just add it to the aircraft-set.xml file

Code: Select all
<controls>
<my-aircraft>
<dummy type="double"> 1.0</dummy>
</my-aircraft>
</controls>


will create /controls/my-aircraft/dummy and initialize it to 1.0.

Otherwise, creating a JSBSim function of a given name will automatically create the property, for instance

Code: Select all
      <switch name="systems/apu/apu/apu-fuel-available">
         <default value="0.0"/>
         <test logic="AND" value="1.0">
            propulsion/tank[14]/contents-lbs GT 0
            systems/apu/apu/fuel-valve-status == 1
         </test>
      </switch>


will create /fdm/jsbsim/systems/apu/apu/apu-fuel-available

and give it a value according to the test.

Finally, doing a Nasal

Code: Select all
setprop("/controls/my-aircraft/dummy", 1.0);


will create and initialize the property to 1.0.

So there's more than one way to skin the cat (there's also autopilot tags, property rules, ...)

Most likely you'll want to write a JSBSim system.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Developing Brake Temperature and PSI...

Postby legoboyvdlp » Wed Nov 25, 2015 8:34 pm

Thank you very much!
What I'm looking for is a property which sits at 1.0 until a tire bursts, when it goes to 0.0 and friction is increased on that wheel.
I'll see what I can do. Thank you very much for taking the time to help me out.
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Developing Brake Temperature and PSI...

Postby Thorsten » Wed Nov 25, 2015 8:38 pm

What I'm looking for is a property which sits at 1.0 until a tire bursts, when it goes to 0.0 and friction is increased on that wheel.


SpaceShuttle/Systems/failures.xml

Code: Select all
<channel name="Gear and tire damage simulation">

   <!-- rolling friction adjustments for blown tires -->

      <switch name="systems/failures/tire-nose-friction">
         <default value="0.02"/>
         <test value="0.1">
            systems/failures/tire-nose-condition == 0.0
         </test>
         <output> gear/unit[0]/rolling_friction_coeff </output>
      </switch>

      <switch name="systems/failures/tire-left-friction">
         <default value="0.02"/>
         <test value="0.1">
            systems/failures/tire-left-condition == 0.0
         </test>
         <output> gear/unit[1]/rolling_friction_coeff </output>
      </switch>

      <switch name="systems/failures/tire-right-friction">
         <default value="0.02"/>
         <test value="0.1">
            systems/failures/tire-right-condition == 0.0
         </test>
         <output> gear/unit[2]/rolling_friction_coeff </output>
      </switch>

   <!-- contact point position adjustment for damaged gear struts and blown tire-->

      <switch name="systems/failures/gearstrut-nose-position">
         <default value="gear/unit[0]/z-position"/>
            <test value="-265">
               systems/failures/tire-nose-condition == 0.0
               systems/failures/gearstrut-nose-condition > 0.0
            </test>
            <test value="-242.0">
               systems/failures/gearstrut-nose-condition == 0.0
            </test>
         <output> gear/unit[0]/z-position </output>
      </switch>

      <switch name="systems/failures/gearstrut-left-position">
         <default value="gear/unit[1]/z-position"/>
            <test value="-309">
               systems/failures/tire-left-condition == 0.0
               systems/failures/gearstrut-left-condition > 0.0
            </test>
            <test value="-250">
               systems/failures/gearstrut-left-condition == 0.0
            </test>   
         <output> gear/unit[1]/z-position </output>
      </switch>

      <switch name="systems/failures/gearstrut-right-position">
         <default value="gear/unit[2]/z-position"/>
            <test value="-309">
               systems/failures/tire-right-condition == 0.0
               systems/failures/gearstrut-right-condition > 0.0
            </test>
            <test value="-250">
               systems/failures/gearstrut-right-condition == 0.0
            </test>
         <output> gear/unit[2]/z-position </output>
      </switch>      
   
   <!-- friction adjustment for damaged gear struts -->

      <switch name="systems/failures/gearstrut-nose-friction">
         <default value="gear/unit[0]/rolling_friction_coeff"/>
         <test value="0.4">
            systems/failures/gearstrut-nose-condition == 0.0
         </test>
         <output> gear/unit[0]/rolling_friction_coeff </output>
      </switch>

      <switch name="systems/failures/gearstrut-left-friction">
         <default value="gear/unit[1]/rolling_friction_coeff"/>
         <test value="0.4">
            systems/failures/gearstrut-left-condition == 0.0
         </test>
         <output> gear/unit[1]/rolling_friction_coeff </output>
      </switch>

      <switch name="systems/failures/gearstrut-right-friction">
         <default value="gear/unit[2]/rolling_friction_coeff"/>
         <test value="0.4">
            systems/failures/gearstrut-right-condition == 0.0
         </test>
         <output> gear/unit[2]/rolling_friction_coeff </output>
      </switch>

   </channel>


All /fdm/jsbsim/systems/failures/<subsystem>-condition properties are created at startup in SpaceShuttle-set.xml and flicked from the Nasal limit monitoring routine (or from the instructor station).
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Developing Brake Temperature and PSI...

Postby legoboyvdlp » Wed Nov 25, 2015 8:41 pm

I see. Thanks again.
I'll see what I can do with your code.
Shouldn't be that hard ;)
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Developing Brake Temperature and PSI...

Postby legoboyvdlp » Fri Nov 27, 2015 7:48 pm

For your information, I have completed my system, and now can burst a tire and repair at will :)
Just need to increase the friction, test, and I'm done.

But I got this....
Code: Select all
aircraft:3:..\..\..\flightgear\src\Model\modelmgr.cxx:70:Adding model [unnamed]

What's that supposed to mean?
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Developing Brake Temperature and PSI...

Postby wkitty42 » Sat Nov 28, 2015 5:25 pm

i see quite many of this in 3.7 while testing... my WAG is that there are models defined in XML that do not have a "<name>blah</name>" or "<model-name>blah</model-name>" property... it is a WAG, though, as i don't know if such a property even exists for models...
"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: 9161
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 22.04

Re: Developing Brake Temperature and PSI...

Postby Johan G » Sun Nov 29, 2015 1:24 am

Is it not usually a file name though, like <something>.ac (or possibly <something>.xml)?
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6634
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Developing Brake Temperature and PSI...

Postby wkitty42 » Sun Nov 29, 2015 2:02 am

no, i don't think so... not a/the filename but the model(s) defined inside the XML file(s)... remember that there can easily be more than one model of something inside a XML file... again, though, it is just a WAG... maybe slightly educated but a WAG instead of an eWAG ;)
"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: 9161
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 22.04


Return to Systems

Who is online

Users browsing this forum: No registered users and 1 guest