Read and interpolate the JPL planetary ephemeris file.

Namespace: ASCOM.Astrometry.NOVAS
Assembly: ASCOM.Astrometry (in ASCOM.Astrometry.dll) Version: 6.0.0.0 (6.1.1.2619)

Syntax

C#
public short State(
	ref double[] Jed,
	Target Target,
	ref double[] TargetPos,
	ref double[] TargetVel
)
Visual Basic
Public Function State ( _
	ByRef Jed As Double(), _
	Target As Target, _
	ByRef TargetPos As Double(), _
	ByRef TargetVel As Double() _
) As Short
Visual C++
public:
virtual short State(
	array<double>^% Jed, 
	Target Target, 
	array<double>^% TargetPos, 
	array<double>^% TargetVel
) sealed

Parameters

Jed
Type: array<System..::..Double>[]()[][]%
2-element Julian date (TDB) at which interpolation is wanted. Any combination of jed[0]+jed[1] which falls within the time span on the file is a permissible epoch. See Note 1 below.
Target
Type: ASCOM.Astrometry..::..Target
The requested body to get data for from the ephemeris file.
TargetPos
Type: array<System..::..Double>[]()[][]%
The barycentric position vector array of the requested object, in AU. (If target object is the Moon, then the vector is geocentric.)
TargetVel
Type: array<System..::..Double>[]()[][]%
The barycentric velocity vector array of the requested object, in AU/Day.

Return Value

 0 ...everything OK
 1 ...error reading ephemeris file
 2 ...epoch out of range.
 

Remarks

The target number designation of the astronomical bodies is:
         = 0: Mercury,               1: Venus, 
         = 2: Earth-Moon barycenter, 3: Mars, 
         = 4: Jupiter,               5: Saturn, 
         = 6: Uranus,                7: Neptune, 
         = 8: Pluto,                 9: geocentric Moon, 
         =10: Sun.
 

NOTE 1. For ease in programming, the user may put the entire epoch in jed[0] and set jed[1] = 0. For maximum interpolation accuracy, set jed[0] = the most recent midnight at or before interpolation epoch, and set jed[1] = fractional part of a day elapsed between jed[0] and epoch. As an alternative, it may prove convenient to set jed[0] = some fixed epoch, such as start of the integration and jed[1] = elapsed interval between then and epoch.

See Also