JEphem site
JEphem API

Class TestVSOP87

java.lang.Object
  |
  +--TestVSOP87
All Implemented Interfaces:
jephem.astro.SolarSystemConstants

public abstract class TestVSOP87
extends java.lang.Object
implements jephem.astro.SolarSystemConstants

Contains methods used to test package jephem.astro.planets.vsop87.
JEphem program doesn't use it ; it was used to build JEphem.
This class is dependant from jephem package, which must be in the classpath.
In this class, when arrays characterizing planetary data were needed (ex : for "planetNames"), the indexes of jephem.astro.SolarSystemConstants.java were used.


Field Summary
 
Fields inherited from interface jephem.astro.SolarSystemConstants
E0_1900, E0_1950, E0_2000, EARTH, JUPITER, KM_PER_AU, MARS, MERCURY, MOON, NB_BODIES, NEPTUNE, PLUTO, SATURN, SIDERAL_RATE, SUN, URANUS, VENUS
 
Constructor Summary
TestVSOP87()
           
 
Method Summary
static void main(java.lang.String[] args)
          Entry point to call the different methods of the class.
static void testJEphemPrecision(java.lang.String checkFile, java.lang.String strJD, java.lang.String strNbPlan, java.lang.String strFilter, java.lang.String outputType, java.lang.String outputFile)
          Method used to test results from JEphem compared with BDL text files.
static void testPerf(java.lang.String strNbDates, java.lang.String strBaseJD, java.lang.String strPrecision)
          Calls jephem.astro.planets.vsop87.VSOP87 several times and displays the time taken by the computations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestVSOP87

public TestVSOP87()
Method Detail

main

public static void main(java.lang.String[] args)
Entry point to call the different methods of the class.
If the first element of args is "testPerf", testPerf() is called.
Otherwise, testJEphemPrecision() is called.


testJEphemPrecision

public static void testJEphemPrecision(java.lang.String checkFile,
                                       java.lang.String strJD,
                                       java.lang.String strNbPlan,
                                       java.lang.String strFilter,
                                       java.lang.String outputType,
                                       java.lang.String outputFile)
Method used to test results from JEphem compared with BDL text files.
  • To work, the check file must be in the current directory.
  • This method assumes that the corresponding version is used by JEphem.
  • To make it run, jephem package must be in the classpath (a simple way is to use the 'classpath' option from the 'java' tool).
  • To work properly, all the tested planets must be computable by JEphem (for example, 'EARTH-MOON' was removed from the file to test VSOP87A).


  • It parses the .chk file, calls JEphem to compute the corresponding results (for all JDs and planets), put all these data in arrays. Output : a serie of tables, HTML formatted, permitting to compare the results of JEphem with tests provided by the BDL. Result can be seen on JEphemSite.

    Example of call : TestVSOP87 vsop87A.chk 10 8 FULL DETAIL,DIFF,SUMMARY test_jephem_full.htm

    Parameters:
    checkFile - : Name of a file containing extracts from ftp://ftp.bdl.fr/pub/planets/... VSOP87.chk, containing only the tests for the concerned version.
    'checkFile' name is assumed to start with "VSOP87X", where X represents the Version letter.
    strNbPlan - Number of planets concerned with the tests.
    strFilter - Part of JEphem to test (full precision, truncated). Can take the values "JEPHEM" or "BDL" or "FULL".
    outputType - Output to generate : can be :
  • "DETAIL" : comparison of each value of the tests with the values computed by JEphem, ordered by julian day ;
  • "DIFF" : differences between BDL results and JEphem, ordered by planet.
  • "SUMMARY" A summary table containing only the maximal geocentric errors.
  • To get more than one of these outputs, write the different values separated with comas, without space (ex : "DETAIL,DIFF").
    outputFile - Name of the file to be generated (HTML format).

    testPerf

    public static void testPerf(java.lang.String strNbDates,
                                java.lang.String strBaseJD,
                                java.lang.String strPrecision)
    Calls jephem.astro.planets.vsop87.VSOP87 several times and displays the time taken by the computations.


    JEphem site
    JEphem API