| 1 | <?xml version="1.0"?> |
| 2 | |
| 3 | <PropertyList> |
| 4 | |
| 5 | <scenario> |
| 6 | |
| 7 | <name>Flying balloons</name> |
| 8 | <description> |
| 9 | Places 7 balloons that will drift with the wind. |
| 10 | nasal code by Detlef Faber and Torsten Dreyer |
| 11 | needs balloon.nas in the data/Nasal directory to place |
| 12 | the models initially at your position. |
| 13 | This file Modified from refueling_demo.xml by Dave Culp |
| 14 | |
| 15 | Brett Harrison Feb. 2009 |
| 16 | </description> |
| 17 | |
| 18 | <nasal> |
| 19 | <load><![CDATA[ |
| 20 | var position = geo.aircraft_position(); |
| 21 | var elevation = geo.elevation( position.lat(), position.lon() ); |
| 22 | position.set_alt( elevation != nil ? elevation : 0.0 ); |
| 23 | |
| 24 | foreach( var tanker; props.globals.getNode("/ai/models",1).getChildren("tanker") ) { |
| 25 | var callsign = tanker.getNode("callsign").getValue(); |
| 26 | if( callsign == nil ) continue; |
| 27 | if( string.match(callsign,"ballon*") ) { |
| 28 | tanker.getNode("position/latitude-deg",1).setDoubleValue( position.lat() - 0.002 ); |
| 29 | tanker.getNode("position/longitude-deg",1).setDoubleValue( position.lon() - 0.002 ); |
| 30 | tanker.getNode("position/altitude-ft", 1 ).setDoubleValue( position.alt() ); |
| 31 | } |
| 32 | } |
| 33 | debug.dump('balloon scenario load script complete'); |
| 34 | ]]> |
| 35 | </load> |
| 36 | </nasal> |
| 37 | |
| 38 | <entry> |
| 39 | <callsign>ballon01</callsign> |
| 40 | <type>tanker</type> |
| 41 | <class>tanker</class> |
| 42 | <model>Aircraft/balloon/flightgear.xml</model> |
| 43 | </entry> |
| 44 | |
| 45 | <entry> |
| 46 | <callsign>ballon02</callsign> |
| 47 | <type>tanker</type> |
| 48 | <class>tanker</class> |
| 49 | <model>Aircraft/balloon/balloon4.xml</model> |
| 50 | </entry> |
| 51 | |
| 52 | |
| 53 | <entry> |
| 54 | <callsign>ballon03</callsign> |
| 55 | <type>tanker</type> |
| 56 | <class>tanker</class> |
| 57 | <model>Aircraft/balloon/balloon3.xml</model> |
| 58 | </entry> |
| 59 | |
| 60 | <entry> |
| 61 | <callsign>ballon04</callsign> |
| 62 | <type>tanker</type> |
| 63 | <class>tanker</class> |
| 64 | <model>Aircraft/balloon/balloon2.xml</model> |
| 65 | </entry> |
| 66 | |
| 67 | |
| 68 | <entry> |
| 69 | <callsign>ballon05</callsign> |
| 70 | <type>tanker</type> |
| 71 | <class>tanker</class> |
| 72 | <model>Aircraft/balloon/balloon5.xml</model> |
| 73 | </entry> |
| 74 | |
| 75 | |
| 76 | <entry> |
| 77 | <callsign>ballon06</callsign> |
| 78 | <type>tanker</type> |
| 79 | <class>tanker</class> |
| 80 | <model>Aircraft/balloon/miss-velma.xml</model> |
| 81 | </entry> |
| 82 | |
| 83 | <entry> |
| 84 | <callsign>ballon07</callsign> |
| 85 | <type>tanker</type> |
| 86 | <class>tanker</class> |
| 87 | <model>Aircraft/balloon/iva.xml</model> |
| 88 | </entry> |
| 89 | |
| 90 | <entry> |
| 91 | <callsign>ballon08</callsign> |
| 92 | <type>tanker</type> |
| 93 | <class>tanker</class> |
| 94 | <model>Aircraft/balloon/appleoon.xml</model> |
| 95 | </entry> |
| 96 | |
| 97 | <entry> |
| 98 | <callsign>ballon09</callsign> |
| 99 | <type>tanker</type> |
| 100 | <class>tanker</class> |
| 101 | <model>Aircraft/balloon/tuxalloon.xml</model> |
| 102 | </entry> |
| 103 | |
| 104 | </scenario> |
| 105 | |
| 106 | |
| 107 | </PropertyList> |