Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Position of the Sun and Moon in ECEF coordinates

  1. Jun 21, 2012 #1
    I was just wondering if anyone knows where I can find a software/algorithm that can give me the postion of the sun and the moon in ECEF coordinates?

    If not, do you have any clues to how I might start building one? I am an engeneering student, so I don't have a lot of knowlegde about astrophysics, but I am very willing to learn!
    Thank you for your time!
  2. jcsd
  3. Jun 21, 2012 #2


    User Avatar
    Science Advisor

    The JPL Horizons web site will give coordinates for any solar system body in a variety of different coordinates systems. One of them is Cartesian coordinates centered on any point you choose, which I think is the same as ECEF.
  4. Jun 21, 2012 #3

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    ECEF means "Earth Centered, Earth Fixed". Horizons does not provide that system. It does provide the ability to represent data in a frame based on a point on the surface of the Earth, so that's close (the coordinates of a point on the surface of the Earth in ECEF is nearly constant, and the variations are very small).

    This may or may not work, depending on the OP's needs. To the OP: How many data points are needed, does the system need to be dynamic, to what accuracy do you want the data?

    If you need a dynamic system with high accuracy you have a lot of work cut out for you. You'll need
    • An ephemeris model such as the Development Ephemeris from JPL. This comprises software and data. You can download both from the Horizons site. The software provided isn't very good (typical academic quality software written in an ancient version of Fortran) but you can rewrite it.
    • An Earth rotation model, which you can get from SOFA (and this is of good quality).
    • A model of time. The JPL ephemeris uses JPL's Teph, which is a MIT/JPL relativistic time scale. To within a couple of milliseconds, Teph is Terrestrial Time (TT), which in turn is a fixed offset from International Atomic Time (TAI). The SOFA model needs time in TT, UT1, and GMST. There are shortcuts if you don't mind loss of precision.
    The ephemeris model will let you calculate the position of the Sun, Earth, and Moon in ITRF coordinates. Ignoring relativistic effects, this is the information you need to calculate the Earth Centered Inertial coordinates (ICRF axes, which are about the same as J2000) of the Sun and Moon. The Earth rotation model gives the transform from ECI to ECEF.
  5. Jun 21, 2012 #4


    User Avatar
    Science Advisor

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook