Welcome to the NavList Message Boards.


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

Compose Your Message

Add Images & Files
    Re: Astronomy: Calculating Positions
    From: Paul Hirose
    Date: 2008 Apr 06, 16:22 -0700

    The "Astronomical Almanac" has formulas for computing topocentric
    position, including the effect of dinural parallax and dinural
    aberration. The latter is caused by Earth's rotation giving the observer
    a velocity with respect to the geocenter, and is only about .3" at most.
    I have a free Windows positional astronomy DLL online which does these
    things. There's also a C++ example which uses the DLL to compute
    geocentric and topocentric positions of a star and the Moon.
    There's very little math in the main program. Basically, it just sets up
    function calls to the DLL, where the real work is done. Almost all the
    function calls in the sample program are documented here:
    Because the algorithms are in the DLL, you have to study its source code
    to understand how it works. All the source code is at the site, but it
    may be easier to use formulas from a book, especially if you prefer to
    use spherical trig. The DLL and sample program use spherical coordinates
    only for input and output. Internally, the computatation uses vectors.
    The basic process is to get the geocentric rectangular coordinates of
    the body with respect to the true equator of date, i.e., RA and
    declination converted to xyz. Get the observer coords in the same
    system. Then do (body - observer) to get the relative position of the
    body with respect to the observer.
    For the observer coordinates, the key routine is called psh_cobsvec().
    Inputs are latitude, longitude, height, and the properties of the
    ellipsoid: equatorial radius and flattening. Outputs are the observer's
    xyz coordinates. These are constant for a given observing position. But
    to put those coords into the same system as the body, you must rotate
    about the z axis by UT1 expressed as an angle. This is performed by
    psh_cobspv(), which outputs the position and velocity of the observer in
    vector form. These vectors are one of the inputs to psh_jplanet(), which
    outputs the apparent position of the desired body. The interfaces of
    these functions are explained on a web page at the site (the second link
    above), but to see the implementations you have to go to the Downloads
    section on the main page and get the second zip file. As I said, it may
    be easier to just look in the Astronomical Almanac! (Sections B and K)
    By the way, I'm rewriting the DLL for the Microsoft .NET Framework. The
    present form is inconvenient because the documentation and function call
    convention favors C or C++ programmers. In addition, the DLL isn't
    object-oriented. E.g., there's no "vector" object so you can add two
    vectors with the + operator.
    With the new DLL, any .NET Framework language (such as Visual Basic,
    C++, or C#) will have full access to a variety of positional astronomy
    classes such as vectors, rotation matrices, Julian dates, and the like.
    The user won't even be able to tell what languages were used to write
    the DLL.
    So far I've ported and tested the IAU SOFA library and JPL planetary
    ephemerides, and created all the supporting classes. There's a lot more
    to do, though.
    I block messages that contain attachments or HTML.
    Navigation List archive: www.fer3.com/arc
    To post, email NavList@fer3.com
    To unsubscribe, email NavList-unsubscribe@fer3.com

    Browse Files

    Drop Files


    What is NavList?

    Join NavList

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

    You can also join by posting. Your first on-topic post automatically makes you a member.

    Posting Code

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

    Email Settings

    Posting Code:

    Custom Index

    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