UTM conversion
==============

This modifier converts the coordinates generated by the MORSE simulator to use
UTM global coordinates. This is achieved by setting the offset of the Blender
origin with respect to the UTM reference. The offset is stored as three
properties of the ``Scene_Script_Holder`` object of the scene: ``UTMXOffset``,
``UTMYOffset`` and ``UTMZOffset``.

.. note:: Due to limitation in Blender, to pass offset outside of range
  [-10000.0, 10000.0], you need to pass the offset value as a string.

.. code-block:: python

	from morse.builder import *

	env = Environment('indoors-1/indoor-1')
	env.configure_service('socket')
	env.properties(UTMXOffset='123456789.0', UTMYOffset=-4242.0, UTMZOffset=421.0)

Files
-----

- Python: ``$MORSE_ROOT/src/morse/modifiers/utm.py``

Modified data
-------------

Modifiers work over a dictionary called ``local_data`` of the components.
The names of the variables affected are the following:

- **x**: X coordinate of the component
- **y**: Y coordinate of the component
- **z**: Z coordinate of the component

Available methods
-----------------

- ``blender_to_utm``: Used for the :doc:`GPS sensor <../sensors/gps>`
- ``utm_to_blender``: Used for the :doc:`straight motion <../actuators/destination>` 
  and :doc:`waypoint motion <../actuators/waypoint>` actuators
