How to add JulianDate objects or offsets in Skyfield

后端 未结 1 1770
你的背包
你的背包 2021-01-15 18:14

The JulianDate object in Skyfield is a handy way to quickly produce and hold a set of time values in Julian Days, and pass them to Skyfield\'s at()

相关标签:
1条回答
  • 2021-01-15 18:40

    Reference here,

    My solution is as follows:

    from skyfield.api import load
    import numpy as np
        
    data  = load('de421.bsp')
    earth = data['earth']
        
    ts=load.timescale()
    t=ts.utc(2016, 1, np.linspace(17.4329,77.4329,61), 22.8, 4, 39.3)
        
    p=earth.at(t)
        
    p0  = p.position.au[:,0]
    p60 = p.position.au[:,60]
        
    dot = (p0*p60).sum()
        
    cos_theta = dot / np.sqrt( (p0**2).sum() * (p60**2).sum() )
        
    print((180./np.pi) * np.arccos(cos_theta))
    print("should be roughly 60 degrees")
    
    0 讨论(0)
提交回复
热议问题