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

<PropertyList>

  <scenario>

    <name>Bombable: Four HSP 75 near you</name>

    <description>
      This scenario puts Four HSP 75 in the skies near
      your position.

      Install this scenario in the FlightGear/data/AI directory.

      BARANGER Emmanuel 05/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,"HSP75*") ) {
              tanker.getNode("position/latitude-deg",1).setDoubleValue( position.lat() - (0.002 * rand()) );
              tanker.getNode("position/longitude-deg",1).setDoubleValue( position.lon() - (0.002 * rand()) );
              tanker.getNode("position/altitude-ft", 1).setDoubleValue( position.alt() + 3500 );
              }
          }
          debug.dump('HSP 75 scenario load script complete');
        ]]>
      </load>
    </nasal>

    <entry>
      <callsign type="string">HSP75Baron</callsign>
      <type>tanker</type>
      <class>tanker</class>
      <name     type="string">HSP75_1</name>
      <model    type="string">Aircraft/HS-P-75/Models/hsp75.xml</model>
      <speed    type="double">300.0</speed>
    </entry>

    <entry>
      <callsign type="string">HSP75Storm</callsign>
      <type>tanker</type>
      <class>tanker</class>
      <name     type="string">HSP75_2</name>
      <model    type="string">Aircraft/HS-P-75/Models/hsp75.xml</model>
      <speed    type="double">300.0</speed>
    </entry>

    <entry>
      <callsign type="string">HSP75Winger</callsign>
      <search-order>PREFER_AI</search-order>
      <type>tanker</type>
      <class>tanker</class>
      <name     type="string">HSP75_3</name>
      <model    type="string">Aircraft/HS-P-75/Models/hsp75.xml</model>
      <speed    type="double">300.0</speed>
    </entry>

    <entry>
      <callsign type="string">HSP75Support</callsign>
      <search-order>PREFER_AI</search-order>
      <type>tanker</type>
      <class>tanker</class>
      <name     type="string">HSP75_4</name>
      <model    type="string">Aircraft/HS-P-75/Models/hsp75.xml</model>
      <speed    type="double">300.0</speed>
    </entry>

  </scenario>

</PropertyList>
