3

I am trying to compare the position of the Earth in heliocentric system given by Astropy, with that of JPL's Horizons. I find remarkable differences and I don't know what they may be due....

I want to do this way because my purpose is to convert from geographic coordinates to heliocentric one.

    from astropy.coordinates import SkyCoord
    from astropy.time import Time
    from astropy import units as u
    from astroquery.jplhorizons import Horizons
    
    time = '2015-03-30T21:33:52.000'
    JD = Time(time).jd
    
    observing_time = Time(time, format='isot', scale='utc')
    
    #ASTROPY
    c = SkyCoord(x=0,y=0,z=0, unit='au', representation_type='cartesian', frame='gcrs', obstime=time)
    
    cc = c.transform_to("heliocentriceclipticiau76")
    print(cc.cartesian.x, cc.cartesian.y, cc.cartesian.z)
    
    cc = c.transform_to("heliocentricmeanecliptic")
    print(cc.cartesian.x, cc.cartesian.y, cc.cartesian.z)
    
    cc = c.transform_to("heliocentrictrueecliptic")
    print(cc.cartesian.x, cc.cartesian.y, cc.cartesian.z)
    
    #JPL'S HORIZONS
    obj = Horizons(id="Geocenter", location="@sun", epochs=JD, id_type='id').vectors()
    print(obj['x'], obj['y'], obj['z'])

0 Answers0