| 1 |
# Copyright 2020 Benedikt Wolf |
| 2 |
# This file is part of FlightGear. |
| 3 |
# |
| 4 |
# FlightGear is free software: you can redistribute it and/or modify |
| 5 |
# it under the terms of the GNU General Public License as published by |
| 6 |
# the Free Software Foundation, either version 2 of the License, or |
| 7 |
# (at your option) any later version. |
| 8 |
# |
| 9 |
# FlightGear is distributed in the hope that it will be useful, |
| 10 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
# GNU General Public License for more details. |
| 13 |
# |
| 14 |
# You should have received a copy of the GNU General Public License |
| 15 |
# along with FlightGear. If not, see <http://www.gnu.org/licenses/>. |
| 16 |
|
| 17 |
|
| 18 |
To install this instrument into your aircraft, you need to do the following: |
| 19 |
|
| 20 |
1. Add flarm.nas to your aircraft's list of included nasal files: |
| 21 |
<nasal> |
| 22 |
... |
| 23 |
<flarm> |
| 24 |
<file>Aircraft/Instruments-3d/glider/flarm/flarm.nas</file> |
| 25 |
</flarm> |
| 26 |
... |
| 27 |
</nasal> |
| 28 |
** Note that it is important to put the file into <flarm></flarm> tags, as the animation xml may in the future reference the instrument by that name |
| 29 |
2. Add the model to your aircraft: |
| 30 |
There are two models available, the standard, full-size FLARM and a smaller FLARM (v3) display for integration into a panel. |
| 31 |
You can use either or both of these: |
| 32 |
<model> |
| 33 |
<path>Aircraft/Instruments-3d/glider/flarm/v3_display/flarm_v3.xml</path> |
| 34 |
... |
| 35 |
</model> |
| 36 |
<model> |
| 37 |
<path>Aircraft/Instruments-3d/glider/flarm/traditional/flarm_traditional.xml</path> |
| 38 |
... |
| 39 |
</model> |
| 40 |
3. If you are using a custom electric system, make sure the FLARM is supplied at /systems/electrical/outputs/flarm when appropriate |
| 41 |
4. Add sound effects for this FLARM, e.g. by using the block below and adjusting it to fit: |
| 42 |
|
| 43 |
<flarm_info> |
| 44 |
<name>flarm new contact</name> |
| 45 |
<mode>once</mode> |
| 46 |
<path>Aircraft/Instruments-3d/glider/flarm/flarm_new_contact.wav</path> |
| 47 |
<condition> |
| 48 |
<and> |
| 49 |
<greater-than> |
| 50 |
<property>systems/electrical/outputs/flarm</property> |
| 51 |
<value>9</value> |
| 52 |
</greater-than> |
| 53 |
<equals> |
| 54 |
<property>instrumentation/flarm/new-contact</property> |
| 55 |
<value>0</value> |
| 56 |
</equals> |
| 57 |
</and> |
| 58 |
</condition> |
| 59 |
<!-- Put the position of your FLARM loudspeaker here --> |
| 60 |
<position> |
| 61 |
<x>-1.35</x> |
| 62 |
<y>0.0</y> |
| 63 |
<z>0.1</z> |
| 64 |
</position> |
| 65 |
</flarm_info> |
| 66 |
<flarm_info> |
| 67 |
<name>flarm new contact 2</name> |
| 68 |
<mode>once</mode> |
| 69 |
<path>Aircraft/Instruments-3d/glider/flarm/flarm_new_contact.wav</path> |
| 70 |
<condition> |
| 71 |
<and> |
| 72 |
<greater-than> |
| 73 |
<property>systems/electrical/outputs/flarm</property> |
| 74 |
<value>9</value> |
| 75 |
</greater-than> |
| 76 |
<equals> |
| 77 |
<property>instrumentation/flarm/new-contact</property> |
| 78 |
<value>1</value> |
| 79 |
</equals> |
| 80 |
</and> |
| 81 |
</condition> |
| 82 |
<!-- Put the position of your FLARM loudspeaker here --> |
| 83 |
<position> |
| 84 |
<x>-1.35</x> |
| 85 |
<y>0.0</y> |
| 86 |
<z>0.1</z> |
| 87 |
</position> |
| 88 |
</flarm_info> |
| 89 |
|
| 90 |
<flarm_warn> |
| 91 |
<name>flarm warn 1</name> |
| 92 |
<mode>looped</mode> |
| 93 |
<path>Aircraft/Instruments-3d/glider/flarm/flarm1.wav</path> |
| 94 |
<condition> |
| 95 |
<and> |
| 96 |
<greater-than> |
| 97 |
<property>systems/electrical/outputs/flarm</property> |
| 98 |
<value>9</value> |
| 99 |
</greater-than> |
| 100 |
<equals> |
| 101 |
<property>instrumentation/flarm/warn</property> |
| 102 |
<value>1</value> |
| 103 |
</equals> |
| 104 |
</and> |
| 105 |
</condition> |
| 106 |
<!-- Put the position of your FLARM loudspeaker here --> |
| 107 |
<position> |
| 108 |
<x>-1.35</x> |
| 109 |
<y>0.0</y> |
| 110 |
<z>0.1</z> |
| 111 |
</position> |
| 112 |
</flarm_warn> |
| 113 |
|
| 114 |
<flarm_warn> |
| 115 |
<name>flarm warn 2</name> |
| 116 |
<mode>looped</mode> |
| 117 |
<path>Aircraft/Instruments-3d/glider/flarm/flarm2.wav</path> |
| 118 |
<condition> |
| 119 |
<and> |
| 120 |
<greater-than> |
| 121 |
<property>systems/electrical/outputs/flarm</property> |
| 122 |
<value>9</value> |
| 123 |
</greater-than> |
| 124 |
<equals> |
| 125 |
<property>instrumentation/flarm/warn</property> |
| 126 |
<value>2</value> |
| 127 |
</equals> |
| 128 |
</and> |
| 129 |
</condition> |
| 130 |
<!-- Put the position of your FLARM loudspeaker here --> |
| 131 |
<position> |
| 132 |
<x>-1.35</x> |
| 133 |
<y>0.0</y> |
| 134 |
<z>0.1</z> |
| 135 |
</position> |
| 136 |
</flarm_warn> |
| 137 |
|
| 138 |
|
| 139 |
## Please report any bugs, issues and improvements either to the mailing list of FlightGear forum so they can be fixed/included in the shared version of this instrument |