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

core/planetsephems/vsop87.h

00001 /************************************************************************
00002 
00003 The PLANETARY SOLUTION VSOP87 by Bretagnon P. and Francou G. can be found at
00004 ftp://ftp.imcce.fr/pub/ephem/planets/vsop87
00005 
00006 I (Johannes Gajdosik) have just taken the data obtained from above
00007 (VSOP87.mer,...,VSOP87.nep) and rearranged it into this piece of software.
00008 
00009 I can neigther allow nor forbid the usage of VSOP87.
00010 The copyright notice below covers not the work of Bretagnon P. and Francou G.
00011 but just my work, that is the compilation of the VSOP87 data
00012 into the software supplied in this file.
00013 
00014 
00015 Copyright (c) 2006 Johannes Gajdosik
00016 
00017 Permission is hereby granted, free of charge, to any person obtaining a
00018 copy of this software and associated documentation files (the "Software"),
00019 to deal in the Software without restriction, including without limitation
00020 the rights to use, copy, modify, merge, publish, distribute, sublicense,
00021 and/or sell copies of the Software, and to permit persons to whom the
00022 Software is furnished to do so, subject to the following conditions:
00023 
00024 The above copyright notice and this permission notice shall be included
00025 in all copies or substantial portions of the Software.
00026 
00027 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00028 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00029 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
00030 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00031 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
00032 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
00033 SOFTWARE.
00034 
00035 This is my implementation of the VSOP87 planetary solution.
00036 I tried to optimize for speed by rearranging the terms so that
00037 for a given touple of (a[0],a[1],...,a[11]) the values
00038   (cos,sin)(a[0]*lambda[0](T)+...a[11]*lambda[11](T))
00039 have only to be calculated once.
00040 Furthermore I used the addition formulas
00041   (cos,sin)(x+y) = ...
00042 so that for given T the functions cos and sin have only to be called 12 times.
00043 
00044 ****************************************************************/
00045 
00046 
00047 #ifndef _VSOP87_H_
00048 #define _VSOP87_H_
00049 
00050 #ifdef __cplusplus
00051 extern "C" {
00052 #endif
00053 
00054 #define VSOP87_MERCURY  0
00055 #define VSOP87_VENUS    1
00056 #define VSOP87_EMB      2
00057 #define VSOP87_MARS     3
00058 #define VSOP87_JUPITER  4
00059 #define VSOP87_SATURN   5
00060 #define VSOP87_URANUS   6
00061 #define VSOP87_NEPTUNE  7
00062 
00063 void GetVsop87Coor(double jd,int body,double *xyz);
00064   /* Return the rectangular coordinates of the given planet
00065      and the given julian date jd expressed in dynamical time (TAI+32.184s).
00066      The origin of the xyz-coordinates is the center of the sun.
00067      The reference frame is "dynamical equinox and ecliptic J2000",
00068      which is the reference frame in VSOP87 and VSOP87A.
00069   */
00070 
00071 void GetVsop87OsculatingCoor(double jd0,double jd,int body,double *xyz);
00072   /* The oculating orbit of epoch jd0, evatuated at jd, is returned.
00073   */
00074 
00075 #ifdef __cplusplus
00076 }
00077 #endif
00078 
00079 #endif