Canvas ND framework: Difference between revisions

Jump to navigation Jump to search
m
→‎Adding the navigation display to your aircraft: trying to clean up a few thigns here...
m (→‎Adding the navigation display to your aircraft: trying to clean up a few thigns here...)
Line 39: Line 39:
If you are facing problems with the steps outlined above, please get in touch via the article's talk page or the forum, so that the instructions can be improved accordingly. Thank you!
If you are facing problems with the steps outlined above, please get in touch via the article's talk page or the forum, so that the instructions can be improved accordingly. Thank you!


{{Note|The following section is currently work-in-progress, it is being written by 5H1N0B1 and drdavid, please get in touch to help reviewing/improving things.}}
A more detailed step-by-step guide can be [[#Step by Step|found below]].
More detailed instruction. See if it could help.
ND integration: How it was done on the Mirage 2000:
The integration is simple:
 
0) Have an updated version of FlightGear (V. 3.0+).
 
1) Set up the 3D model in this way:
 
To create a 3D MFD ->
  - a) Select a 3D Border (border of the screen, with screws, etc.)
  - b) Need to have a 3D Button/switch, molette, or turnable knob
  - c) A 3D Screen object, with:
    - correct dimensions
    - Single texture, -> with correct dimensions
    - Correct dimension of the UVmap
 
2) Copy and paste the ND.nas file to the appropriate folder (In the Mirage 2000 this was the "Center-mfd" folder).
  2.1) Add the ND.nas pathway to your base .xml file in the Nasal block.
 
3) Edit ND.nas :
  -a) Rename the screen to match the object in 1)c) if needed.
  -b) If installing a single MFD, you do not need another object, so suppress the line (when it's calling the object itself)
  -c) Keep the property's name -> it's ok. You just need to input it with the .xml button in 1)b)
 
4) Code the xml itself.
 
Really simple, it's just playing with properties. For example, see this for the airport property:
 
 
  <!--######################## Airports ############################-->
  <animation>
    <type>pick</type>
    <object-name>bt-h1</object-name>
    <visible>true</visible>
    <action>
        <button>0</button>
        <binding>
        <command>property-toggle</command>
        <property>/instrumentation/efis/inputs/arpt</property>
        </binding>
    </action>
  </animation>
 
 
Or here again for the range selection:
 
  <animation>
    <type>pick</type>
    <object-name>trim1</object-name>
    <action>
      <button>4</button>
      <!--  scroll up -->
      <repeatable>false</repeatable> 
      <binding>
                <command>property-cycle</command>
                <property>/instrumentation/efis/inputs/range-nm</property>
                <value>10</value>
                <value>20</value>
                <value>40</value>
                <value>80</value>
                <value>160</value>
                <value>320</value>
      </binding> 
    </action>
  </animation>
 
  <animation>
    <type>pick</type>
    <object-name>trim1</object-name>
    <action>
      <button>3</button>
      <!--  scroll up -->
      <repeatable>false</repeatable>
 
      <binding>
                <command>property-cycle</command>
                <property>/instrumentation/efis/inputs/range-nm</property>
                <value>320</value>
                <value>160</value>
                <value>80</value>
                <value>40</value>
                <value>20</value>
                <value>10</value>             
      </binding> 
    </action>
  </animation>
 
 
5) Then you can optionally add this:
  <animation>
  <type>pick</type>
  <object-name>blackbkd</object-name>
  <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>nasal</command>
        <script>mirage2000.showNd();</script>
      </binding>
  </action>
  </animation>
 
 
Where 'blackbkd' is the screen 1)c). This last option allows you to open a dialog box with what the actual canvas should display in your 1)c) screen. This is very useful to check all the different steps when something isn't working well.
 
 
Normally following these steps, you should have a working MFD.
 
 


=== Cockpit switches ===
=== Cockpit switches ===

Navigation menu