org.hermit.astro
Class Util

java.lang.Object
  extended by org.hermit.astro.Util
All Implemented Interfaces:
AstroConstants

public class Util
extends java.lang.Object
implements AstroConstants

This class contains an implementation of Meeus' interpolation methods.

Author:
Ian Cameron Smith

Field Summary
 
Fields inherited from interface org.hermit.astro.AstroConstants
ABERRATION, AU, HALFPI, J1900, J1990, J2000, JD_UNIX, REFRACTION, SECS_PER_DAY, SIDEREAL_RATIO, SIDEREAL_YEAR, TROPICAL_YEAR, TWILIGHT, TWOPI, ε_2000
 
Method Summary
static double interpolate(double[] args, double[] values, double index)
          Interpolate in a table to find a good interpolated value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

interpolate

public static double interpolate(double[] args,
                                 double[] values,
                                 double index)
Interpolate in a table to find a good interpolated value. From AA chapter 3.

Parameters:
args - The arguments of the table. Each element is an index in the table (e.g. a time).
values - The values of the table. Each element is the value for the corresponding argument in args[].
index - The argument for which we want the interpolated value.
Returns:
The value of the table at index, interpolated from the point values.