Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure

core/planetsephems/elp82b.h

00001 /************************************************************************
00002 
00003 LUNAR SOLUTION ELP2000-82B
00004 by Chapront-Touze M., Chapront J.
00005 ftp://ftp.imcce.fr/pub/ephem/moon/elp82b
00006 
00007 I (Johannes Gajdosik) have just taken the Fortran code and data
00008 obtained from above and used it to create this piece of software.
00009 
00010 I can neigther allow nor forbid the usage of ELP2000-82B.
00011 The copyright notice below covers not the works of
00012 Chapront-Touze M. and Chapront J., but just my work,
00013 that is the compilation and rearrangement of
00014 the Fortran code and data obtained from above
00015 into the software supplied in this file.
00016 
00017 
00018 Copyright (c) 2005 Johannes Gajdosik
00019 
00020 Permission is hereby granted, free of charge, to any person obtaining a
00021 copy of this software and associated documentation files (the "Software"),
00022 to deal in the Software without restriction, including without limitation
00023 the rights to use, copy, modify, merge, publish, distribute, sublicense,
00024 and/or sell copies of the Software, and to permit persons to whom the
00025 Software is furnished to do so, subject to the following conditions:
00026 
00027 The above copyright notice and this permission notice shall be included
00028 in all copies or substantial portions of the Software.
00029 
00030 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00031 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00032 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
00033 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00034 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
00035 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
00036 SOFTWARE.
00037 
00038 My implementation of ELP2000-82B has the following modifications compared to
00039 the original Fortran code:
00040 1) fundamentally rearrange the series into optimized instructions
00041    for fast calculation of the results
00042 2) units are: julian day, AU
00043 
00044 ****************************************************************/
00045 
00046 
00047 #ifndef _ELP82B_H_
00048 #define _ELP82B_H_
00049 
00050 #ifdef __cplusplus
00051 extern "C" {
00052 #endif
00053 
00054 void GetElp82bCoor(double jd,double xyz[3]);
00055 
00056   /* Return the rectangular coordinates of the earths moon
00057      on the given julian date jd expressed in dynamical time (TAI+32.184s).
00058      The origin of the xyz-coordinates is the center of the earth.
00059      The reference frame is "dynamical equinox and ecliptic J2000",
00060      which is the reference frame in VSOP87 and VSOP87A.
00061 
00062      According to vsop87.doc VSOP87 coordinates can be transformed to FK5 by
00063        X       cos(psi) -sin(psi) 0   1        0         0   X
00064        Y     = sin(psi)  cos(psi) 0 * 0 cos(eps) -sin(eps) * Y
00065        Z FK5          0         0 1   0 sin(eps)  cos(eps)   Z VSOP87
00066      with psi = -0.0000275 degrees = -0.099 arcsec and
00067      eps = 23.4392803055556 degrees = 23d26m21.4091sec.
00068 
00069      http://ssd.jpl.nasa.gov/horizons_doc.html#frames says:
00070        "J2000" selects an Earth Mean-Equator and dynamical Equinox of
00071        Epoch J2000.0 inertial reference system, where the Epoch of J2000.0
00072        is the Julian date 2451545.0. "Mean" indicates nutation effects are
00073        ignored in the frame definition. The system is aligned with the
00074        IAU-sponsored J2000 frame of the Radio Source Catalog of the
00075        International Earth Rotational Service (ICRF).
00076        The ICRF is thought to differ from FK5 by at most 0.01 arcsec.
00077 
00078      From this I conclude that in the context of stellarium
00079      ICRF, J2000 and FK5 are the same, while the transformation
00080      ICRF <-> VSOP87 must be done with the matrix given above.
00081    */
00082      
00083 
00084 #ifdef __cplusplus
00085 };
00086 #endif
00087 
00088 #endif