FUNCTION  fHtmXyzToEq

Convert Cartesian coordinates (x, y, z) to Ra, Dec

(x, y, z) will be normalized unless (x, y, z) is close to (0,0,0)
Parameters:
  • @x float, @y float, @z float, the cartesian normal vector
    Returns single row table containing the values (ra, dec) select * from dbo.fHtmXyzToEq(0.0, 0.0, -1.0)
    gives: ra dec
    0 -90
  • Input and output parameters

    nametypelengthinoutpnum
    @xfloat8input1
    @yfloat8input2
    @zfloat8input3
    rafloat8output1
    decfloat8output2