[AstroPy] conversion from ECI o HCRS

Daniel Evans d.f.evans at keele.ac.uk
Mon Oct 9 13:36:02 EDT 2017


> I tried the following code that should convert Earth center in
heliocentric coordinates:

Without defining a frame of reference, SkyCoord() defaults to ICRS, which
is centred on the barycentre. The distance of 1,147,012km is about the
difference I'd expect from Barycentric to Heliocentric coordinates.

Assuming the the Geocentric Celestial Reference System (GCRS) is the frame
your satellite positions are specified in, you would specify it as follows:

>>> c = SkyCoord(x=0,y=0,z=0,unit='km', representation='cartesian',
frame='gcrs')
>>> c.transform_to("hcrs").distance.astronomical_unit
0.9833276664706555

Regards,
Daniel

On 9 October 2017 at 17:09, Stefano Della Torre <
Stefano.DellaTorre at mib.infn.it> wrote:

> Hello, I'm looking a way to transform a spacecraft position expressed in
> ECI in a heliocentric reference system.
>
> I tried the following code that should convert Earth center in heliocentri
> coordinates:
>
>
> c = SkyCoord(x=0,y=0,z=0,unit='km', representation='cartesian')
> <SkyCoord (ICRS): (x, y, z) in km
>     ( 0.,  0.,  0.)>
>
> d=c.transform_to('hcrs')
> <SkyCoord (HCRS: obstime=J2000.000): (ra, dec, distance) in (deg, deg, km)
>     ( 20.35057636,  6.91379769,  1147012.53061733)>
>
> In [105]: d.distance.astronomical_unit
> Out[105]: 0.0076673051912451405
>
> The so obtained distance in Astronomical unit is far from the expected
> value 1 AU.
> I'm doing something wrong in the conversion?
>
> Best regards
> Stefano
>
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at python.org
> https://mail.python.org/mailman/listinfo/astropy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20171009/3e0e219c/attachment.html>


More information about the AstroPy mailing list