Computes the total gravitational deflection of light for the observed object due to the major gravitating bodies in the solar system.

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

Syntax

C#
public short GravDef(
	double JdTdb,
	EarthDeflection LocCode,
	Accuracy Accuracy,
	double[] Pos1,
	double[] PosObs,
	ref double[] Pos2
)
Visual Basic
Public Function GravDef ( _
	JdTdb As Double, _
	LocCode As EarthDeflection, _
	Accuracy As Accuracy, _
	Pos1 As Double(), _
	PosObs As Double(), _
	ByRef Pos2 As Double() _
) As Short
Visual C++
public:
virtual short GravDef(
	double JdTdb, 
	EarthDeflection LocCode, 
	Accuracy Accuracy, 
	array<double>^ Pos1, 
	array<double>^ PosObs, 
	array<double>^% Pos2
) sealed

Parameters

JdTdb
Type: System..::..Double
TDB Julian date of observation.
LocCode
Type: ASCOM.Astrometry..::..EarthDeflection
Code for location of observer, determining whether the gravitational deflection due to the earth itself is applied.
Accuracy
Type: ASCOM.Astrometry..::..Accuracy
Selection for accuracy
Pos1
Type: array<System..::..Double>[]()[][]
Position vector of observed object, with respect to origin at observer (or the geocenter), referred to ICRS axes, components in AU.
PosObs
Type: array<System..::..Double>[]()[][]
Position vector of observer (or the geocenter), with respect to origin at solar system barycenter, referred to ICRS axes, components in AU.
Pos2
Type: array<System..::..Double>[]()[][]%
Position vector of observed object, with respect to origin at observer (or the geocenter), referred to ICRS axes, corrected for gravitational deflection, components in AU.

Return Value

    0 ... Everything OK
 < 30 ... Error from function 'Ephemeris'; 
 > 30 ... Error from function 'MakeObject'.
 

Remarks

This function valid for an observed body within the solar system as well as for a star.

If 'Accuracy' is set to zero (full accuracy), three bodies (Sun, Jupiter, and Saturn) are used in the calculation. If the reduced-accuracy option is set, only the Sun is used in the calculation. In both cases, if the observer is not at the geocenter, the deflection due to the Earth is included.

See Also