<?xml version="1.0" ?>
<sdf version="1.6">
  <world name="wind_demo">
    <gravity>0 0 0</gravity>

    <physics name="fast" type="ignored">
      <real_time_factor>0</real_time_factor>
    </physics>

    <plugin
      filename="ignition-gazebo-physics-system"
      name="ignition::gazebo::systems::Physics">
    </plugin>
    <plugin
      filename="ignition-gazebo-user-commands-system"
      name="ignition::gazebo::systems::UserCommands">
    </plugin>

    <plugin
      filename="ignition-gazebo-wind-effects-system"
      name="ignition::gazebo::systems::WindEffects">
      <force_approximation_scaling_factor>1</force_approximation_scaling_factor>
      <horizontal>
        <magnitude>
          <time_for_rise>1</time_for_rise>
          <sin>
            <amplitude_percent>0.05</amplitude_percent>
            <period>60</period>
          </sin>
        </magnitude>
        <direction>
          <time_for_rise>1</time_for_rise>
          <sin>
            <amplitude>5</amplitude>
            <period>20</period>
          </sin>
        </direction>
      </horizontal>
    </plugin>

    <wind>
      <linear_velocity>1 0 1</linear_velocity>
    </wind>

    <model name="wind_test1">
      <enable_wind>true</enable_wind>
      <link name="box_test1">
        <pose>0 0 1 0 0 0</pose>
        <inertial>
          <mass>1</mass>
          <inertia>
            <ixx>0.667</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>0.667</iyy>
            <iyz>0</iyz>
            <izz>0.667</izz>
          </inertia>
        </inertial>
        <collision name="collision">
          <geometry>
            <box>
              <size>2.0 2.0 2.0</size>
            </box>
          </geometry>
          <surface>
            <friction>
              <ode>
                <mu>0.0</mu>
                <mu2>0.0</mu2>
              </ode>
            </friction>
          </surface>
        </collision>
        <visual name="visual">
          <geometry>
            <box>
              <size>2.0 2.0 2.0</size>
            </box>
          </geometry>
          <material>
            <ambient>1.0 0.0 0.0 1</ambient>
            <diffuse>1.0 0.0 0.0 1</diffuse>
            <specular>1.0 0.0 0.0 1</specular>
          </material>
        </visual>
      </link>
    </model>

    <model name="wind_test2">
      <pose>0 4 1 0 0 0</pose>
      <link name="box_test2">
        <enable_wind>true</enable_wind>
        <pose>0 0 1 0 0 0</pose>
        <inertial>
          <mass>1</mass>
          <inertia>
            <ixx>0.667</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>0.667</iyy>
            <iyz>0</iyz>
            <izz>0.667</izz>
          </inertia>
        </inertial>
        <collision name="collision">
          <geometry>
            <box>
              <size>2.0 2.0 2.0</size>
            </box>
          </geometry>
          <surface>
            <friction>
              <ode>
                <mu>0.0</mu>
                <mu2>0.0</mu2>
              </ode>
            </friction>
          </surface>
        </collision>
        <visual name="visual">
          <geometry>
            <box>
              <size>2.0 2.0 2.0</size>
            </box>
          </geometry>
          <material>
            <ambient>1.0 0.0 0.0 1</ambient>
            <diffuse>1.0 0.0 0.0 1</diffuse>
            <specular>1.0 0.0 0.0 1</specular>
          </material>
        </visual>
      </link>
    </model>
  </world>
</sdf>
