Index

PointingOffset sky_to_ra(Declination dec, PointingOffset angle)

Return the Right Ascension offset that corresponds to a given great-circle distance.

Arguments:
Declination dec
The declination at which to compute the Right Ascension offset.
PointingOffset angle
The desired great-circle angular distance on the sky.

Example 1:
The following example indicates how to move the telescope to a position that is 5 degrees from jupiter, in the direction of decreasing Right Ascension. This makes the telescope point where jupiter will be in 5/360*24*3600 seconds time.
  radec_offset ra=$sky_to_ra($declination(jupiter), -5)
  track jupiter

Context:
At a declination of zero degrees, offseting a telescope in Right Ascension, relative to a source, by a given number of degrees, moves its pointing along the sky by the same number of degrees. At higher declinations, however, the distance moved on the sky by an offset of a given number of degrees of Right Ascension, is compressed by a factor of roughly 1/cos(declination). For example, one has to offset roughly twice as far in Right Ascension at 60 degrees declination, as one does at 0 degrees declination, to cross the same distance on the sky.

The sky_to_ra() function returns the Right Ascension distance that one needs to offset the telescope, at a given declination, to cross a specified great-circle distance on the sky.

Whereas ra_angle = sky_angle/cos(declination) is a good enough approximation for small angles and low declinations, the sky_to_ra() function uses the following formal spherical trignonometry equation.

      cos(ra_angle) = 1 + (cos(sky_angle) - 1.0) / cos(dec)**2)

Note that the maximum sky distance that can be achieved at a particular declination, is the great-circle distance between Right Ascensions that are 180 degrees apart. Thus the maximum sky angle that can be accomodated at declination, dec, is given by:

     max_sky_angle = 2*(90-dec)
If larger angles than this are requested, then the sky_to_ra() function returns an Right Ascension distance of 180 degrees.

Martin Shepherd (19-Sep-2008)