<?xml version="1.0" encoding="ISO-8859-1"?>

<PropertyList>

  <scenario>

    <name>M1 Abrahams near you</name>

    <description>
      Places 8 M1 Abrahams.

      Based on ballon_demo of Brett Harrison.
      BARANGER Emmanuel 04/2025
    </description>

    <nasal>
      <load>
        <![CDATA[
          var position  = geo.aircraft_position();
          var elevation = geo.elevation( position.lat(), position.lon() );
          position.set_alt( elevation != nil ? elevation : 0.0 );

          foreach( var tanker; props.globals.getNode("/ai/models",1).getChildren("tanker") ) {
            var callsign = tanker.getNode("callsign").getValue();
            if ( callsign == nil ) {
              continue;
            }
            if ( string.match(callsign,"ballon*") ) {
              tanker.getNode("position/latitude-deg",1).setDoubleValue( position.lat() - 0.002 );
              tanker.getNode("position/longitude-deg",1).setDoubleValue( position.lon() - 0.002 );
              tanker.getNode("position/altitude-ft", 1 ).setDoubleValue( position.alt() );
            }
          }
          debug.dump('balloon scenario load script complete');
        ]]>
      </load>
    </nasal>

    <entry>
      <callsign>M1 01</callsign>
      <type>ship</type>
      <name>Tank_1</name>
      <model>Aircraft/M1-Abrams-Bombable/m1.xml</model>
      <speed>6.0</speed>
      <heading>355</heading>
    </entry>

    <entry>
      <callsign>M1 02</callsign>
      <type>ship</type>
      <name>Tank_2</name>
      <model>Aircraft/M1-Abrams-Bombable/m1.xml</model>
      <speed>6.0</speed>
      <heading>355</heading>
    </entry>

    <entry>
      <callsign>M1 03</callsign>
      <type>ship</type>
      <name>Tank_3</name>
      <model>Aircraft/M1-Abrams-Bombable/m1.xml</model>
      <speed>6.0</speed>
      <heading>355</heading>
    </entry>

    <entry>
      <callsign>M1 04</callsign>
      <type>ship</type>
      <name>Tank_4</name>
      <model>Aircraft/M1-Abrams-Bombable/m1.xml</model>
      <speed>6.0</speed>
      <heading>355</heading>
    </entry>

    <entry>
      <callsign>M1 05</callsign>
      <type>ship</type>
      <name>Tank_5</name>
      <model>Aircraft/M1-Abrams-Bombable/m1.xml</model>
      <speed>6.0</speed>
      <heading>355</heading>
    </entry>

    <entry>
      <callsign>M1 06</callsign>
      <type>ship</type>
      <name>Tank_6</name>
      <model>Aircraft/M1-Abrams-Bombable/m1.xml</model>
      <speed>6.0</speed>
      <heading>355</heading>
    </entry>

    <entry>
      <callsign>M1 07</callsign>
      <type>ship</type>
      <name>Tank_7</name>
      <model>Aircraft/M1-Abrams-Bombable/m1.xml</model>
      <speed>6.0</speed>
      <heading>355</heading>
    </entry>

    <entry>
      <callsign>M1 08</callsign>
      <type>ship</type>
      <name>Tank_8</name>
      <model>Aircraft/M1-Abrams-Bombable/m1.xml</model>
      <speed>6.0</speed>
      <heading>355</heading>
    </entry>

  </scenario>

</PropertyList>
