Board index FlightGear Development New features

hPa/mb input in instrument options

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

hPa/mb input in instrument options

Postby Omega » Mon May 27, 2013 6:10 am

Experienced pilots around here should know that in an ICAO METAR or ATIS the "altimeter" is displayed in millibars or hectopascals often known as QNH.
So I hope that I'm not the only one who has noticed this:
Image
The problem is that there is only one field for inHg which is most commonly used in North America.

It would be a very nice feature if there were two fields for inHg and hPa/mb. Plus, I would also assume that this would make multiplayer ATC sessions in Europe much more realistic since a real QNH value can be given to the pilot :) .
The engine is the heart of an aeroplane, but the pilot is its soul.
User avatar
Omega
 
Posts: 594
Joined: Sun Oct 10, 2010 1:46 pm
Callsign: Star,EHAA_CT,MIA0176
IRC name: Omega
Version: GIT
OS: Vista,7,Ubuntu 10.04

Re: hPa/mb input in instrument options

Postby Johan G » Mon May 27, 2013 10:09 pm

To get the developers attention to it you could add it as a feature request to the FlightGear bug tracker. That way it will be where they look.

I wonder why I have not seen this mentioned before. It's a great idea! :D
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)
Johan G
Moderator
 
Posts: 5546
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: hPa/mb input in instrument options

Postby Omega » Mon May 27, 2013 10:42 pm

https://code.google.com/p/flightgear-bu ... il?id=1130

Thanks for mentioning the bug tracker because I did forget about that :| .
I actually did notice this issue quite a while back, but lately it has really been bugging me especially when I ATC in Europe...

Saying:
"Descend to 3000 ft altimeter 2998"

Instead of:
"Descend to 3000 ft QNH 1015"
The engine is the heart of an aeroplane, but the pilot is its soul.
User avatar
Omega
 
Posts: 594
Joined: Sun Oct 10, 2010 1:46 pm
Callsign: Star,EHAA_CT,MIA0176
IRC name: Omega
Version: GIT
OS: Vista,7,Ubuntu 10.04

Re: hPa/mb input in instrument options

Postby Michat » Tue May 28, 2013 2:49 am

Totally agree with you, a direct inches to hectopascal conversion is needed. I missed this function since the first fg released I tested. I did that question on IRC years ago, I have no good memory some one told me that it's a Code C Core function?.. can't tell you with accuracy. Is so, I hope that using canvas could be easier to add enhancements out of the core.
User avatar
Michat
 
Posts: 983
Joined: Mon Jan 25, 2010 6:24 pm
Location: Spain
Version: 191b
OS: GNewSense

Re: hPa/mb input in instrument options

Postby jam007 » Tue May 28, 2013 9:07 am

Something like this?
Image

Changed gui/dialogs/instruments.xml to:
Code: Select all
<?xml version="1.0"?>

<PropertyList>
<nasal>
    <open><![CDATA[
      setprop("/instrumentation/altimeter/setting-hPa", getprop("/instrumentation/altimeter/setting-inhg")*33.86389);
    ]]></open>

    <close><![CDATA[
    ]]></close>
  </nasal>
 
 <name>instruments</name>
 <modal>false</modal>
 <layout>vbox</layout>

  <group>
    <layout>hbox</layout>
    <empty><stretch>1</stretch></empty>

    <text>
      <label>Instrument Settings</label>
    </text>

    <empty><stretch>1</stretch></empty>

    <button>
      <pref-width>16</pref-width>
      <pref-height>16</pref-height>
      <legend></legend>
      <keynum>27</keynum>
      <border>2</border>
      <binding>
        <command>dialog-close</command>
      </binding>
    </button>
  </group>

  <hrule/>

  <group>
    <layout>table</layout>
    <default-padding>5</default-padding>

    <text>
      <row>0</row>
      <col>0</col>
      <halign>right</halign>
      <label>ALT setting:</label>
    </text>

    <group>
      <row>0</row>
      <col>1</col>
      <layout>hbox</layout>
      <default-padding>0</default-padding>

      <button>
      <width>35</width>
      <height>26</height>
      <border>1</border>
      <legend>&lt;</legend>
      <binding>
        <command>property-adjust</command>
        <property>/instrumentation/altimeter/setting-inhg</property>
        <step type="double">-0.01</step>
      </binding>
      <binding>
        <command>nasal</command>
        <script>setprop("/instrumentation/altimeter/setting-hPa", getprop("/instrumentation/altimeter/setting-inhg")*33.86389);</script>
      </binding>
      <binding>
        <command>dialog-update</command>
      </binding>
      </button>

      <button>
       <width>35</width>
       <height>26</height>
       <border>1</border>
       <legend>&lt;&lt;</legend>
       <binding>
        <command>property-adjust</command>
        <property>/instrumentation/altimeter/setting-inhg</property>
        <step type="double">-0.10</step>
       </binding>
       <binding>
        <command>nasal</command>
        <script>setprop("/instrumentation/altimeter/setting-hPa", getprop("/instrumentation/altimeter/setting-inhg")*33.86389);</script>
      </binding>
       <binding>
        <command>dialog-update</command>
       </binding>
      </button>
    </group>

    <input>
      <row>0</row>
      <col>3</col>
      <width>75</width>
      <height>25</height>
     <live>true</live>
      <property>/instrumentation/altimeter/setting-inhg</property>
      <binding>
        <command>dialog-apply</command>
      </binding>
      <binding>
        <command>nasal</command>
        <script>setprop("/instrumentation/altimeter/setting-hPa", getprop("/instrumentation/altimeter/setting-inhg")*33.86389);</script>
      </binding>
    </input>

    <text>
      <row>0</row>
      <col>4</col>
      <padding>0</padding>
      <halign>left</halign>
      <label>inHg</label>
    </text>

    <group>
      <layout>hbox</layout>
      <row>0</row>
      <col>5</col>
      <default-padding>0</default-padding>

      <button>
       <width>35</width>
       <height>26</height>
       <border>1</border>
       <legend>&gt;&gt;</legend>
       <binding>
        <command>property-adjust</command>
        <property>/instrumentation/altimeter/setting-inhg</property>
        <step type="double">0.10</step>
       </binding>
       <binding>
        <command>nasal</command>
        <script>setprop("/instrumentation/altimeter/setting-hPa", getprop("/instrumentation/altimeter/setting-inhg")*33.86389);</script>
      </binding>
       <binding>
        <command>dialog-update</command>
       </binding>
      </button>

      <button>
        <row>0</row>
        <col>6</col>
        <width>35</width>
        <height>26</height>
        <border>1</border>
        <legend>&gt;</legend>
        <binding>
          <command>property-adjust</command>
          <property>/instrumentation/altimeter/setting-inhg</property>
          <step type="double">0.01</step>
        </binding>
        <binding>
          <command>dialog-update</command>
        </binding>
      </button>
    </group>
<group>

      <row>1</row>
      <col>1</col>
      <layout>hbox</layout>
      <default-padding>0</default-padding>

      <button>
      <width>35</width>
      <height>26</height>
      <border>1</border>
      <legend>&lt;</legend>
      <binding>
        <command>property-adjust</command>
        <property>/instrumentation/altimeter/setting-hPa</property>
        <step type="double">-0.1</step>
      </binding>
      <binding>
        <command>nasal</command>
        <script>setprop("/instrumentation/altimeter/setting-inhg", getprop("/instrumentation/altimeter/setting-hPa")*0.02952998);</script>
      </binding>
      <binding>
        <command>dialog-update</command>
      </binding>
      </button>

      <button>
       <width>35</width>
       <height>26</height>
       <border>1</border>
       <legend>&lt;&lt;</legend>
       <binding>
        <command>property-adjust</command>
        <property>/instrumentation/altimeter/setting-hPa</property>
        <step type="double">-1</step>
       </binding>
      <binding>
        <command>nasal</command>
        <script>setprop("/instrumentation/altimeter/setting-inhg", getprop("/instrumentation/altimeter/setting-hPa")*0.02952998);</script>
      </binding>
       <binding>
        <command>dialog-update</command>
       </binding>
      </button>
    </group>

    <input>
      <row>1</row>
      <col>3</col>
      <width>75</width>
      <height>25</height>
     <live>true</live>
      <property>/instrumentation/altimeter/setting-hPa</property>
      <binding>
        <command>dialog-apply</command>
      </binding>
      <binding>
        <command>nasal</command>
        <script>setprop("/instrumentation/altimeter/setting-inhg", getprop("/instrumentation/altimeter/setting-hPa")*0.02952998);</script>
      </binding>
    </input>

    <text>
      <row>1</row>
      <col>4</col>
      <padding>0</padding>
      <halign>left</halign>
      <label>hPa</label>
    </text>

    <group>
      <layout>hbox</layout>
      <row>1</row>
      <col>5</col>
      <default-padding>0</default-padding>

      <button>
       <width>35</width>
       <height>26</height>
       <border>1</border>
       <legend>&gt;&gt;</legend>
       <binding>
        <command>property-adjust</command>
        <property>/instrumentation/altimeter/setting-hPa</property>
        <step type="double">1</step>
       </binding>
      <binding>
        <command>nasal</command>
        <script>setprop("/instrumentation/altimeter/setting-inhg", getprop("/instrumentation/altimeter/setting-hPa")*0.02952998);</script>
      </binding>
       <binding>
        <command>dialog-update</command>
       </binding>
      </button>

      <button>
        <row>1</row>
        <col>6</col>
        <width>35</width>
        <height>26</height>
        <border>1</border>
        <legend>&gt;</legend>
        <binding>
          <command>property-adjust</command>
          <property>/instrumentation/altimeter/setting-hPa</property>
          <step type="double">0.1</step>
        </binding>
      <binding>
        <command>nasal</command>
        <script>setprop("/instrumentation/altimeter/setting-inhg", getprop("/instrumentation/altimeter/setting-hPa")*0.02952998);</script>
      </binding>
        <binding>
          <command>dialog-update</command>
        </binding>
      </button>
    </group>
   
    <text>
      <row>2</row>
      <col>0</col>
      <halign>right</halign>
      <label>HI offset:</label>
    </text>

    <group>
      <layout>hbox</layout>
      <default-padding>0</default-padding>
      <row>2</row>
      <col>1</col>

      <button>
        <width>35</width>
        <height>26</height>
        <border>1</border>
        <legend>&lt;</legend>
        <binding>
          <command>property-adjust</command>
          <property>/instrumentation/heading-indicator/offset-deg</property>
          <step type="double">-1.0</step>
        </binding>
        <binding>
          <command>dialog-update</command>
        </binding>
      </button>

      <button>
       <width>35</width>
       <height>26</height>
       <border>1</border>
       <legend>&lt;&lt;</legend>
       <binding>
        <command>property-adjust</command>
        <property>/instrumentation/heading-indicator/offset-deg</property>
        <step type="double">-10.0</step>
       </binding>
       <binding>
        <command>dialog-update</command>
       </binding>
      </button>
    </group>

    <input>
      <row>2</row>
      <col>3</col>
      <width>75</width>
      <height>25</height>
     <live>true</live>
      <property>/instrumentation/heading-indicator/offset-deg</property>
      <binding>
        <command>dialog-apply</command>
      </binding>
    </input>

    <text>
      <row>2</row>
      <col>4</col>
      <padding>0</padding>
      <halign>left</halign>
      <label>deg</label>
    </text>

    <group>
      <layout>hbox</layout>
      <default-padding>0</default-padding>
      <row>2</row>
      <col>5</col>

      <button>
       <width>35</width>
       <height>26</height>
       <border>1</border>
       <legend>&gt;&gt;</legend>
       <binding>
        <command>property-adjust</command>
        <property>/instrumentation/heading-indicator/offset-deg</property>
        <step type="double">10.0</step>
       </binding>
       <binding>
        <command>dialog-update</command>
       </binding>
      </button>

      <button>
       <width>35</width>
       <height>26</height>
       <border>1</border>
       <legend>&gt;</legend>
       <binding>
        <command>property-adjust</command>
        <property>/instrumentation/heading-indicator/offset-deg</property>
        <step type="double">1.0</step>
       </binding>
       <binding>
        <command>dialog-update</command>
       </binding>
      </button>
     </group>

  </group>

  <hrule/>

  <button>
    <legend>Close</legend>
    <default>true</default>
    <key>Esc</key>
    <binding>
      <command>dialog-close</command>
    </binding>
  </button>

</PropertyList>


But what you really would like is some general setting that displays all units in different common standards depending on user choice.
jam007
 
Posts: 477
Joined: Sun Dec 16, 2012 10:04 am
Location: Uppsala, Sweden
Version: 2017.3.1
OS: Ubuntu 16.04

Re: hPa/mb input in instrument options

Postby Hooray » Tue May 28, 2013 9:09 am

equally, you could add a combo box of "units" and let the user decide - if the unit property is changed, just update/recompute all values. See README.gui in $FG_ROOT/Docs

I don't think this needs the Canvas or even C++ changes, just some Nasal or property rules :D
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11472
Joined: Tue Mar 25, 2008 8:40 am

Re: hPa/mb input in instrument options

Postby Omega » Tue May 28, 2013 9:51 pm

jam007, I tried your code and it works perfectly. That was exactly what I had in my mind.
I made a small change that adds the "QNH setting" label on the left, just in case this ends up in fgdata at its current state.
Combo box works just as well, but then you end up having to do more clicks just to change the value. :mrgreen:
Code: Select all
<?xml version="1.0"?>

<PropertyList>
<nasal>
    <open><![CDATA[
      setprop("/instrumentation/altimeter/setting-hPa", getprop("/instrumentation/altimeter/setting-inhg")*33.86389);
    ]]></open>

    <close><![CDATA[
    ]]></close>
  </nasal>
 
<name>instruments</name>
<modal>false</modal>
<layout>vbox</layout>

  <group>
    <layout>hbox</layout>
    <empty><stretch>1</stretch></empty>

    <text>
      <label>Instrument Settings</label>
    </text>

    <empty><stretch>1</stretch></empty>

    <button>
      <pref-width>16</pref-width>
      <pref-height>16</pref-height>
      <legend></legend>
      <keynum>27</keynum>
      <border>2</border>
      <binding>
        <command>dialog-close</command>
      </binding>
    </button>
  </group>

  <hrule/>

  <group>
    <layout>table</layout>
    <default-padding>5</default-padding>

    <text>
      <row>0</row>
      <col>0</col>
      <halign>right</halign>
      <label>ALT setting:</label>
    </text>

    <group>
      <row>0</row>
      <col>1</col>
      <layout>hbox</layout>
      <default-padding>0</default-padding>

      <button>
      <width>35</width>
      <height>26</height>
      <border>1</border>
      <legend>&lt;</legend>
      <binding>
        <command>property-adjust</command>
        <property>/instrumentation/altimeter/setting-inhg</property>
        <step type="double">-0.01</step>
      </binding>
      <binding>
        <command>nasal</command>
        <script>setprop("/instrumentation/altimeter/setting-hPa", getprop("/instrumentation/altimeter/setting-inhg")*33.86389);</script>
      </binding>
      <binding>
        <command>dialog-update</command>
      </binding>
      </button>

      <button>
       <width>35</width>
       <height>26</height>
       <border>1</border>
       <legend>&lt;&lt;</legend>
       <binding>
        <command>property-adjust</command>
        <property>/instrumentation/altimeter/setting-inhg</property>
        <step type="double">-0.10</step>
       </binding>
       <binding>
        <command>nasal</command>
        <script>setprop("/instrumentation/altimeter/setting-hPa", getprop("/instrumentation/altimeter/setting-inhg")*33.86389);</script>
      </binding>
       <binding>
        <command>dialog-update</command>
       </binding>
      </button>
    </group>

    <input>
      <row>0</row>
      <col>3</col>
      <width>75</width>
      <height>25</height>
     <live>true</live>
      <property>/instrumentation/altimeter/setting-inhg</property>
      <binding>
        <command>dialog-apply</command>
      </binding>
      <binding>
        <command>nasal</command>
        <script>setprop("/instrumentation/altimeter/setting-hPa", getprop("/instrumentation/altimeter/setting-inhg")*33.86389);</script>
      </binding>
    </input>

    <text>
      <row>0</row>
      <col>4</col>
      <padding>0</padding>
      <halign>left</halign>
      <label>inHg</label>
    </text>

    <group>
      <layout>hbox</layout>
      <row>0</row>
      <col>5</col>
      <default-padding>0</default-padding>

      <button>
       <width>35</width>
       <height>26</height>
       <border>1</border>
       <legend>&gt;&gt;</legend>
       <binding>
        <command>property-adjust</command>
        <property>/instrumentation/altimeter/setting-inhg</property>
        <step type="double">0.10</step>
       </binding>
       <binding>
        <command>nasal</command>
        <script>setprop("/instrumentation/altimeter/setting-hPa", getprop("/instrumentation/altimeter/setting-inhg")*33.86389);</script>
      </binding>
       <binding>
        <command>dialog-update</command>
       </binding>
      </button>

      <button>
        <row>0</row>
        <col>6</col>
        <width>35</width>
        <height>26</height>
        <border>1</border>
        <legend>&gt;</legend>
        <binding>
          <command>property-adjust</command>
          <property>/instrumentation/altimeter/setting-inhg</property>
          <step type="double">0.01</step>
        </binding>
        <binding>
          <command>dialog-update</command>
        </binding>
      </button>
    </group>
   
   <text>
      <row>1</row>
      <col>0</col>
      <halign>right</halign>
      <label>QNH setting:</label>
    </text>
   
<group>

      <row>1</row>
      <col>1</col>
      <layout>hbox</layout>
      <default-padding>0</default-padding>

      <button>
      <width>35</width>
      <height>26</height>
      <border>1</border>
      <legend>&lt;</legend>
      <binding>
        <command>property-adjust</command>
        <property>/instrumentation/altimeter/setting-hPa</property>
        <step type="double">-0.1</step>
      </binding>
      <binding>
        <command>nasal</command>
        <script>setprop("/instrumentation/altimeter/setting-inhg", getprop("/instrumentation/altimeter/setting-hPa")*0.02952998);</script>
      </binding>
      <binding>
        <command>dialog-update</command>
      </binding>
      </button>

      <button>
       <width>35</width>
       <height>26</height>
       <border>1</border>
       <legend>&lt;&lt;</legend>
       <binding>
        <command>property-adjust</command>
        <property>/instrumentation/altimeter/setting-hPa</property>
        <step type="double">-1</step>
       </binding>
      <binding>
        <command>nasal</command>
        <script>setprop("/instrumentation/altimeter/setting-inhg", getprop("/instrumentation/altimeter/setting-hPa")*0.02952998);</script>
      </binding>
       <binding>
        <command>dialog-update</command>
       </binding>
      </button>
    </group>

    <input>
      <row>1</row>
      <col>3</col>
      <width>75</width>
      <height>25</height>
     <live>true</live>
      <property>/instrumentation/altimeter/setting-hPa</property>
      <binding>
        <command>dialog-apply</command>
      </binding>
      <binding>
        <command>nasal</command>
        <script>setprop("/instrumentation/altimeter/setting-inhg", getprop("/instrumentation/altimeter/setting-hPa")*0.02952998);</script>
      </binding>
    </input>

    <text>
      <row>1</row>
      <col>4</col>
      <padding>0</padding>
      <halign>left</halign>
      <label>hPa</label>
    </text>

    <group>
      <layout>hbox</layout>
      <row>1</row>
      <col>5</col>
      <default-padding>0</default-padding>

      <button>
       <width>35</width>
       <height>26</height>
       <border>1</border>
       <legend>&gt;&gt;</legend>
       <binding>
        <command>property-adjust</command>
        <property>/instrumentation/altimeter/setting-hPa</property>
        <step type="double">1</step>
       </binding>
      <binding>
        <command>nasal</command>
        <script>setprop("/instrumentation/altimeter/setting-inhg", getprop("/instrumentation/altimeter/setting-hPa")*0.02952998);</script>
      </binding>
       <binding>
        <command>dialog-update</command>
       </binding>
      </button>

      <button>
        <row>1</row>
        <col>6</col>
        <width>35</width>
        <height>26</height>
        <border>1</border>
        <legend>&gt;</legend>
        <binding>
          <command>property-adjust</command>
          <property>/instrumentation/altimeter/setting-hPa</property>
          <step type="double">0.1</step>
        </binding>
      <binding>
        <command>nasal</command>
        <script>setprop("/instrumentation/altimeter/setting-inhg", getprop("/instrumentation/altimeter/setting-hPa")*0.02952998);</script>
      </binding>
        <binding>
          <command>dialog-update</command>
        </binding>
      </button>
    </group>
   
    <text>
      <row>2</row>
      <col>0</col>
      <halign>right</halign>
      <label>HI offset:</label>
    </text>

    <group>
      <layout>hbox</layout>
      <default-padding>0</default-padding>
      <row>2</row>
      <col>1</col>

      <button>
        <width>35</width>
        <height>26</height>
        <border>1</border>
        <legend>&lt;</legend>
        <binding>
          <command>property-adjust</command>
          <property>/instrumentation/heading-indicator/offset-deg</property>
          <step type="double">-1.0</step>
        </binding>
        <binding>
          <command>dialog-update</command>
        </binding>
      </button>

      <button>
       <width>35</width>
       <height>26</height>
       <border>1</border>
       <legend>&lt;&lt;</legend>
       <binding>
        <command>property-adjust</command>
        <property>/instrumentation/heading-indicator/offset-deg</property>
        <step type="double">-10.0</step>
       </binding>
       <binding>
        <command>dialog-update</command>
       </binding>
      </button>
    </group>

    <input>
      <row>2</row>
      <col>3</col>
      <width>75</width>
      <height>25</height>
     <live>true</live>
      <property>/instrumentation/heading-indicator/offset-deg</property>
      <binding>
        <command>dialog-apply</command>
      </binding>
    </input>

    <text>
      <row>2</row>
      <col>4</col>
      <padding>0</padding>
      <halign>left</halign>
      <label>deg</label>
    </text>

    <group>
      <layout>hbox</layout>
      <default-padding>0</default-padding>
      <row>2</row>
      <col>5</col>

      <button>
       <width>35</width>
       <height>26</height>
       <border>1</border>
       <legend>&gt;&gt;</legend>
       <binding>
        <command>property-adjust</command>
        <property>/instrumentation/heading-indicator/offset-deg</property>
        <step type="double">10.0</step>
       </binding>
       <binding>
        <command>dialog-update</command>
       </binding>
      </button>

      <button>
       <width>35</width>
       <height>26</height>
       <border>1</border>
       <legend>&gt;</legend>
       <binding>
        <command>property-adjust</command>
        <property>/instrumentation/heading-indicator/offset-deg</property>
        <step type="double">1.0</step>
       </binding>
       <binding>
        <command>dialog-update</command>
       </binding>
      </button>
     </group>

  </group>

  <hrule/>

  <button>
    <legend>Close</legend>
    <default>true</default>
    <key>Esc</key>
    <binding>
      <command>dialog-close</command>
    </binding>
  </button>

</PropertyList>
The engine is the heart of an aeroplane, but the pilot is its soul.
User avatar
Omega
 
Posts: 594
Joined: Sun Oct 10, 2010 1:46 pm
Callsign: Star,EHAA_CT,MIA0176
IRC name: Omega
Version: GIT
OS: Vista,7,Ubuntu 10.04

Re: hPa/mb input in instrument options

Postby Johan G » Tue May 28, 2013 10:36 pm

Omega wrote in Tue May 28, 2013 9:51 pm:I made a small change that adds the "QNH setting" label on the left, just in case this ends up in fgdata at its current state.

Please keep in mind that while one often sets the altimeter to QNH, which is a calculated sea level pressure, one sometimes sets the altimeter to QFE, which is the actual pressure at the airport, either at the aerodrome or near the threshold. I.e. the altimeter would read 0 ft on touchdown. :wink:
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)
Johan G
Moderator
 
Posts: 5546
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: hPa/mb input in instrument options

Postby Omega » Tue May 28, 2013 11:53 pm

QFE is mostly used in the UK for VFR flights, it's rarely used anywhere else. Plus in any metar/atis you see a QNH value only.
Therefore, there is only two ways to obtain a QFE value which are rarely used in the FG world:

1. Given by the ATC (never heard of that in FG :P )

2. Using a Jeppesen chart:

Image

E.g. Current QNH=1015
QFE = 1015 - 7
QFE = 1008

But you don't expect many FG pilots to do all that... :wink:
The engine is the heart of an aeroplane, but the pilot is its soul.
User avatar
Omega
 
Posts: 594
Joined: Sun Oct 10, 2010 1:46 pm
Callsign: Star,EHAA_CT,MIA0176
IRC name: Omega
Version: GIT
OS: Vista,7,Ubuntu 10.04

Re: hPa/mb input in instrument options

Postby jam007 » Wed May 29, 2013 7:36 am

Glad my code worked and might be useful.
I think Johan G has a point. The choice of basis for instrument setting is up to the pilot. So stating a specific basis in that dialog might not be a good choice.
jam007
 
Posts: 477
Joined: Sun Dec 16, 2012 10:04 am
Location: Uppsala, Sweden
Version: 2017.3.1
OS: Ubuntu 16.04

Re: hPa/mb input in instrument options

Postby Johan G » Wed May 29, 2013 10:51 am

I had the impression that it was standard procedure for Swedish GA flights to be given QFE on approach, but I don't know for sure (I'm no pilot). Looking into the current Swedish AIP it is stated in ENR 1.7.1.3 that QFE is given on request (with two exceptions: For precision approach runways and if the threshold is more than 7 ft lower than the aerodrome elevation).
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)
Johan G
Moderator
 
Posts: 5546
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: hPa/mb input in instrument options

Postby jam007 » Wed May 29, 2013 11:20 am

@Hooray
For the Instruments Settings dialog I think an combo box is unnecessary complicated compared to just having he two units shown and editable.
But for the Weight and Fuel Settings a combo box would be useful, choosing between metric and US units. (That dialog is dynamically created by Nasal). If you have a choice you would like to archive that between sessions. How do you easiest archive the user's choice?
jam007
 
Posts: 477
Joined: Sun Dec 16, 2012 10:04 am
Location: Uppsala, Sweden
Version: 2017.3.1
OS: Ubuntu 16.04

Re: hPa/mb input in instrument options

Postby Gijs » Wed May 29, 2013 11:33 am

Create a property through preferences.xml and set userarchive="y" on the tag. You'll find plenty of examples in preferences.xml ;-)
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9390
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: hPa/mb input in instrument options

Postby jam007 » Wed May 29, 2013 11:42 am

Thanks!
jam007
 
Posts: 477
Joined: Sun Dec 16, 2012 10:04 am
Location: Uppsala, Sweden
Version: 2017.3.1
OS: Ubuntu 16.04

Re: hPa/mb input in instrument options

Postby jam007 » Wed May 29, 2013 5:48 pm

Made a unit module and started working on the Fuel and Payload dialog when I realised that its much more complicated as the text-boxes are property dependent. Changing the labels based on the user's preference is easy but getting the values to update when moving the sliders gets more complicated (as they are directly referencing the property with a value in US units) and I have no clear idea how to solve that at the moment.

The unit module:
Code: Select all
var UnitSet = {
  new : func(name, weight_name, weight_abr, weight_conv, volume_name, volume_abr, volume_conv, length_name, length_abr, length_conv) {
    var m = {parents:[UnitSet] };
    m.name=name;
    m.weight_name=weight_name;
    m.weight_abr=weight_abr;
    m.weight_conv=weight_conv;
    m.volume_name=volume_name;
    m.volume_abr=volume_abr;
    m.volume_conv=volume_conv;
    m.length_name=length_name;
    m.length_abr=length_abr;
    m.length_conv=length_conv;
    return m;
  },
 
};

var unitset = UnitSet.new("US", "Pounds", "lbs", 1, "Gallons", "gal", 1, "Inches", "in", 1);

var update_unitset = func {
  if (getprop("/sim/units") == "SI") unitset = UnitSet.new("SI", "Kilos", "kg", 0.45454545 , "Litres", "l", 3.78541, "Meters", "m", 0.0254);
  else unitset = UnitSet.new("US", "Pounds", "lbs", 1, "Gallons", "gal", 1, "Inches", "in", 1);
}

update_unitset();
setlistener("/sim/units", update_unitset, 0, 0);
jam007
 
Posts: 477
Joined: Sun Dec 16, 2012 10:04 am
Location: Uppsala, Sweden
Version: 2017.3.1
OS: Ubuntu 16.04

Next

Return to New features

Who is online

Users browsing this forum: No registered users and 1 guest