Location in global frame (a :py:class:`LocationGlobal`). The latitude and longitude are relative to the `WGS84 coordinate system `_. The altitude is relative to mean sea-level (MSL). This is accessed throu
(self)
| 924 | |
| 925 | @property |
| 926 | def global_frame(self): |
| 927 | """ |
| 928 | Location in global frame (a :py:class:`LocationGlobal`). |
| 929 | |
| 930 | The latitude and longitude are relative to the |
| 931 | `WGS84 coordinate system <http://en.wikipedia.org/wiki/World_Geodetic_System>`_. |
| 932 | The altitude is relative to mean sea-level (MSL). |
| 933 | |
| 934 | This is accessed through the :py:attr:`Vehicle.location` attribute: |
| 935 | |
| 936 | .. code-block:: python |
| 937 | |
| 938 | print "Global Location: %s" % vehicle.location.global_frame |
| 939 | print "Sea level altitude is: %s" % vehicle.location.global_frame.alt |
| 940 | |
| 941 | Its ``lat`` and ``lon`` attributes are populated shortly after GPS becomes available. |
| 942 | The ``alt`` can take several seconds longer to populate (from the barometer). |
| 943 | Listeners are not notified of changes to this attribute until it has fully populated. |
| 944 | |
| 945 | To watch for changes you can use :py:func:`Vehicle.on_attribute` decorator or |
| 946 | :py:func:`add_attribute_listener` (decorator approach shown below): |
| 947 | |
| 948 | .. code-block:: python |
| 949 | |
| 950 | @vehicle.on_attribute('location.global_frame') |
| 951 | def listener(self, attr_name, value): |
| 952 | print " Global: %s" % value |
| 953 | |
| 954 | #Alternatively, use decorator: ``@vehicle.location.on_attribute('global_frame')``. |
| 955 | """ |
| 956 | return LocationGlobal(self._lat, self._lon, self._alt) |
| 957 | |
| 958 | @property |
| 959 | def global_relative_frame(self): |
nothing calls this directly
no test coverage detected