Welcome to the NavList Message Boards.

NavList:

A Community Devoted to the Preservation and Practice of Celestial Navigation and Other Methods of Traditional Wayfinding

Compose Your Message

Message:αβγ
Message:abc
Add Images & Files
    Name or NavList Code:
    Email:
       
    Reply
    Re: Skyfield
    From: Peter Monta
    Date: 2018 Oct 23, 23:19 -0700

    Using the method in skyfield.almanac I get:

    2018-Dec-21 22:22:44.1118 UT


    I used a generic solver and got a similar result:

    $ python solstice.py
    2018-12-21T22:22:44.1336Z
    $

    I wasn't aware of the almanac functions, so those may come in handy.  Thanks.  Here's my quick hack for comparison:

    from skyfield.api import load
    from scipy.optimize import fsolve

    planets = load('de421.bsp')
    earth,sun = planets['earth'],planets['sun']
    ts = load.timescale()

    def sun_ra_resid(dt):
      astrometric = earth.at(ts.utc(2018,12,21,0,0,dt[0])).observe(sun)
      ra,dec,dist = astrometric.apparent().radec(epoch='date')
      return ra.hours - 18

    dt_solstice = fsolve(sun_ra_resid,0)
    t_solstice = ts.utc(2018,12,21,0,0,dt_solstice[0])
    print(t_solstice.utc_iso(places=4))

    The small disparity in time, 0.022 second, might be due to the specific ephemeris in the DE4xx family, or the nutation model if that's separate.  I'm not 100% sure my code is set up correctly for the conventional definition of solstice.

    Cheers,
    Peter

       
    Reply
    Browse Files

    Drop Files

    NavList

    What is NavList?

    Get a NavList ID Code

    Name:
    (please, no nicknames or handles)
    Email:
    Do you want to receive all group messages by email?
    Yes No

    A NavList ID Code guarantees your identity in NavList posts and allows faster posting of messages.

    Retrieve a NavList ID Code

    Enter the email address associated with your NavList messages. Your NavList code will be emailed to you immediately.
    Email:

    Email Settings

    NavList ID Code:

    Custom Index

    Subject:
    Author:
    Start date: (yyyymm dd)
    End date: (yyyymm dd)

    Visit this site
    Visit this site
    Visit this site
    Visit this site
    Visit this site
    Visit this site