Board index FlightGear Development Aircraft Cockpit development

HUD rotor torque and intercept built in keys

Discussion about creating 2d and 3d cockpits.

HUD rotor torque and intercept built in keys

Postby GlynD02 » Mon Jul 10, 2017 11:55 am

Hi all

As you can see from my post number I am new to the sim :D . I would like to build a custom HUD for the Apache and I am struggling with getting the rotor torque as a percentage value.

The code in the existing XML is:

Code: Select all
<label>
  <name>Torque</name>
  <width>28</width>
  <height>10</height>
  <x>-125</x>
  <y>65</y>
  <halign>right</halign>
  <format>%.0f</format>
  <box>false</box>
  <option>center</option>
  <input>
    <property>/rotors/main/torque</property>
    <factor>0.0058</factor>
    <damp>1.5</damp>
  </input>
</label>


This is not a percentage value and I cannot seem to find what I need to do to change it to one. I would like the range to go from 0% to 110% and I will work out how to put a box around it when the value goes over 100%.

Can I just check that torque is measurement of how hard you are pulling on the collective? So if you have zero collective you should have zero torque and if the collective is all the way to the top you will have the maximum percentage - am I correct in my assumption?

Also I would like to change the default key for the gear up as the Apache does not have retractable wheels and I want to stop the gear retracting/extending behaviour if the g/G button is pressed. I did add the following

Code: Select all
  <key n="7">
    <name>g</name>
    <desc>Catch gear - g</desc>
    <binding>
      <command>nasal</command>
      <script>
        print("g key pressed");
      </script>
    </binding>
  </key>

  <key n="8">
    <name>G</name>
    <desc>Catch gear - G</desc>
    <binding>
      <command>nasal</command>
      <script>
        print("G key pressed");
      </script>
    </binding>
  </key>


to the XML that controls the key binding, however that did not stop the function of the g/G keys.

Many thanks in advance
Glyn
GlynD02
 
Posts: 6
Joined: Sun Jun 25, 2017 1:33 am
Location: Shropshire, UK
Version: 2017.2.1
OS: Windows

Return to Cockpit development

Who is online

Users browsing this forum: No registered users and 0 guests