MCPcopy Index your code
hub / github.com/dronekit/dronekit-python / global_relative_frame

Method global_relative_frame

dronekit/__init__.py:959–975  ·  view source on GitHub ↗

Location in global frame, with altitude relative to the home location (a :py:class:`LocationGlobalRelative`). The latitude and longitude are relative to the `WGS84 coordinate system `_. The altitude is rela

(self)

Source from the content-addressed store, hash-verified

957
958 @property
959 def global_relative_frame(self):
960 """
961 Location in global frame, with altitude relative to the home location
962 (a :py:class:`LocationGlobalRelative`).
963
964 The latitude and longitude are relative to the
965 `WGS84 coordinate system <http://en.wikipedia.org/wiki/World_Geodetic_System>`_.
966 The altitude is relative to :py:attr:`home location <Vehicle.home_location>`.
967
968 This is accessed through the :py:attr:`Vehicle.location` attribute:
969
970 .. code-block:: python
971
972 print "Global Location (relative altitude): %s" % vehicle.location.global_relative_frame
973 print "Altitude relative to home_location: %s" % vehicle.location.global_relative_frame.alt
974 """
975 return LocationGlobalRelative(self._lat, self._lon, self._relative_alt)
976
977
978class Vehicle(HasObservers):

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected