Converts (RA, Dec) to (x, y, z).

Namespace: Spherical
Assembly: SphericalLib (in SphericalLib.dll) Version: 1.0.5951.32246 (1.0.0.0)

Syntax

C#
public static void Radec2Xyz(
	double ra,
	double dec,
	out double x,
	out double y,
	out double z
)
Visual C++
public:
static void Radec2Xyz(
	double ra, 
	double dec, 
	[OutAttribute] double% x, 
	[OutAttribute] double% y, 
	[OutAttribute] double% z
)
F#
static member Radec2Xyz : 
        ra:float * 
        dec:float * 
        x:float byref * 
        y:float byref * 
        z:float byref -> unit 

Parameters

ra
Type: System..::..Double
Right Ascension in degrees
dec
Type: System..::..Double
Declination in degrees
x
Type: System..::..Double%
Coordinate (out)
y
Type: System..::..Double%
Coordinate (out)
z
Type: System..::..Double%
Coordinate (out)

Remarks

The equations of the conversion are essentially as below
CopyC#
x = Cos(Dec)*Cos(RA)
y = Cos(Dec)*Sin(RA)
z = Sin(Dec)

See Also