1# -*- coding: utf-8 -*- 2# Licensed under a 3-clause BSD style license - see LICENSE.rst 3 4from astropy.utils.decorators import format_doc 5from astropy.coordinates.representation import CartesianRepresentation, CartesianDifferential 6from astropy.coordinates.baseframe import BaseCoordinateFrame, base_doc 7from astropy.coordinates.attributes import TimeAttribute 8from .utils import DEFAULT_OBSTIME 9 10__all__ = ['ITRS'] 11 12 13@format_doc(base_doc, components="", footer="") 14class ITRS(BaseCoordinateFrame): 15 """ 16 A coordinate or frame in the International Terrestrial Reference System 17 (ITRS). This is approximately a geocentric system, although strictly it is 18 defined by a series of reference locations near the surface of the Earth. 19 For more background on the ITRS, see the references provided in the 20 :ref:`astropy:astropy-coordinates-seealso` section of the documentation. 21 """ 22 23 default_representation = CartesianRepresentation 24 default_differential = CartesianDifferential 25 26 obstime = TimeAttribute(default=DEFAULT_OBSTIME) 27 28 @property 29 def earth_location(self): 30 """ 31 The data in this frame as an `~astropy.coordinates.EarthLocation` class. 32 """ 33 from astropy.coordinates.earth import EarthLocation 34 35 cart = self.represent_as(CartesianRepresentation) 36 return EarthLocation(x=cart.x, y=cart.y, z=cart.z) 37 38# Self-transform is in intermediate_rotation_transforms.py with all the other 39# ITRS transforms 40