JEphem site
JEphem API

Class BuildVSOP87

java.lang.Object
  |
  +--BuildVSOP87

public abstract class BuildVSOP87
extends java.lang.Object

Contains methods used to build VSOP87 data classes. The main method is transformVSOP87().
This class is independant from jephem and tig packages, can be compiled separately.
JEphem program doesn't use it, it was just used to build JEphem.
It can be useful to developpers who want to transform BDL VSOP87 files.
In this class, when arrays characterizing planetary data were needed (ex : for "a0s", "eccs"), the indexes of jephem.astro.SolarSystemConstants.java were used.

Warning : to make transformVSOP87() work, BDL files need to be checked ; if there are no terms for a couple {variable, power of time}, there is no comment line in the BDL file. It is then necessary to add a comment line with "0 TERMS" in it (this problem occurs with Uranus and Neptune in VSOP87A).
These modified data files must be in the current directory.


Field Summary
static java.lang.String ARG_CALC_ALPHA_MAX
          Argument to pass to main() to call calcAlphaMax()
static java.lang.String ARG_CALC_ERR_MAX
          Argument to pass to main() to call getBdlCommentLines()
static java.lang.String ARG_GET_COMMENT_LINES
          Argument to pass to main() to call calcErrMax()
static java.lang.String ARG_TRANSFORM
          Argument to pass to main() to call transformVSOP87()
static double RAD_TO_ARCSEC
          Constant to convert radians to arc seconds, whose value is 180 * 3600 / p.
 
Constructor Summary
BuildVSOP87()
          Useless as all the methods are static.
 
Method Summary
static void calcAlphaMax(java.lang.String strAlpha0, java.lang.String strAlpha1)
          Intermediate calculation to know maximal geocentric angular error admissible for a planet to finally get 1 arcsecond of precision (only useful when JEphem truncation method is used).
static void calcErrMax()
          Calculation of maximal error in cartesian heliocentric position (only useful when JEphem truncation method is used).
static void getBdlCommentLines()
          Produces an output with only comment lines of BDL files.
static void main(java.lang.String[] args)
          Dispatches the call to different methods, depending on first argument.
static void transformVSOP87(java.lang.String inputFile, java.lang.String strPlanetIndex, java.lang.String strVersion, java.lang.String strFilter, java.lang.String strOutputType)
          Method to transform a VSOP87 data file for a particular planet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ARG_CALC_ALPHA_MAX

public static final java.lang.String ARG_CALC_ALPHA_MAX
Argument to pass to main() to call calcAlphaMax()

See Also:
Constant Field Values

ARG_CALC_ERR_MAX

public static final java.lang.String ARG_CALC_ERR_MAX
Argument to pass to main() to call getBdlCommentLines()

See Also:
Constant Field Values

ARG_GET_COMMENT_LINES

public static final java.lang.String ARG_GET_COMMENT_LINES
Argument to pass to main() to call calcErrMax()

See Also:
Constant Field Values

ARG_TRANSFORM

public static final java.lang.String ARG_TRANSFORM
Argument to pass to main() to call transformVSOP87()

See Also:
Constant Field Values

RAD_TO_ARCSEC

public static final double RAD_TO_ARCSEC
Constant to convert radians to arc seconds, whose value is 180 * 3600 / p.

See Also:
Constant Field Values
Constructor Detail

BuildVSOP87

public BuildVSOP87()
Useless as all the methods are static.

Method Detail

calcAlphaMax

public static void calcAlphaMax(java.lang.String strAlpha0,
                                java.lang.String strAlpha1)
Intermediate calculation to know maximal geocentric angular error admissible for a planet to finally get 1 arcsecond of precision (only useful when JEphem truncation method is used).
Used to fill 'errMax' array of transformVSOP87(), when JEphem truncation method is employed.

Parameters:
strAlpha0 - and strAlpha1 represent the values in arc seconds

calcErrMax

public static void calcErrMax()
Calculation of maximal error in cartesian heliocentric position (only useful when JEphem truncation method is used).
Results of calcAlphaMax are used (array alphaMax).
Results written into a file ('errMax.txt') in order to incorporate to transformVSOP87 code.


getBdlCommentLines

public static void getBdlCommentLines()
Produces an output with only comment lines of BDL files.
Method used to check validity of nbTerms arrays in classes "DataVSOP87C_Full_xxx".
Input files must be in the current directory. The input files must be called VSOP87X.xxx.txt (ex : "VSOP87C.ear.txt") with X = version letter ; xxx = planet short name.


main

public static void main(java.lang.String[] args)
Dispatches the call to different methods, depending on first argument.

Parameters:
args - The first argument must be one of ARG_XXX constants ; indicates which method will be called. The following arguments are passed to the called method.

transformVSOP87

public static void transformVSOP87(java.lang.String inputFile,
                                   java.lang.String strPlanetIndex,
                                   java.lang.String strVersion,
                                   java.lang.String strFilter,
                                   java.lang.String strOutputType)
Method to transform a VSOP87 data file for a particular planet.
Produces a java class, an ASCII file or a binary file from a BDL original file (see parameter 'strOutputType').
A selection of terms can be done or not (see parameter 'strFilter').

Example of call used to generate jephem.astro.planets.vsop87.DataVSOP87A_JEphem_Earth.java :
VSOP87Transform("VSOP87A.ear.txt", "4", "A", "JEPHEM", "JAVA") : 'VSOP87A.ear.txt' designates the name of the original BDL file ; '4' designates the index of the planet (the Earth) ; 'JEPHEM' is the "filter" ; 'JAVA' tells that a java class must be generated.
Example of call used to generate jephem.astro.planets.vsop87.DataVSOP87A_Full_Earth :
VSOP87Transform("VSOP87A.ear.txt", "4", "A", "FULL", "BINARY")

Parameters:
inputFile - name of BDL file containing data for the planet (must be in the current directory).
strPlanetIndex - Index of the planet, in coherence with jephem.astro.ISolarSystem.java constants (2 = Mercury ... 9 = Neptune).
strVersion - VSOP87 Version used ("A", "B", "C", "D" or "E"). To use raw VSOP87 version, strVersion must be "VSOP87".
strFilter - Indicates the method used to remove terms :
  - "FULL" : no filter, all terms are retained.
  - "JEPHEM" : filter used for JEphem classes (see JEphem website for explanation).
  - "BDL" : filter explained in astron. astroph. 202 p, 314.
strOutputType - Indicates what output file produce :
  - "JAVA" : produces a java class.
  - "TEXT" : produces a text file containing the terms.
  - "BINARY" : produces a binary file containing the terms.

JEphem site
JEphem API