Index

PointingOffset sky_to_az(Elevation el, PointingOffset angle)

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

Arguments:
Elevation el
The elevation at which to compute the azimuth offset.
PointingOffset angle
The desired great-circle angular distance on the sky.

Example 1:
The following example indicates how to command a scan whose azimuthal amplitude is calculated to have a great-circle amplitude on the sky, of 5 degrees, at an elevation of 60 degrees.
  azscan $sky_to_az(60, 5)

Context:
At an elevation of zero degrees, rotating a telescope in azimuth by a given number of degrees, moves its pointing along the sky by the same number of degrees. At higher elevations, however, the distance moved on the sky by a rotation of a given number of degrees in azimuth, is compressed by a factor of roughly 1/cos(elevation). For example, one has to move roughly twice as far in azimuth at 60 degrees elevation, as one does at 0 degrees elevation, to cross the same distance on the sky.

The sky_to_az() function returns the azimuthal distance that one needs to turn the telescope, at a given elevation, to cross a specified great-circle distance on the sky.

Whereas az_angle = sky_angle/cos(elevation) is a good enough approximation for small angles and low elevations, the sky_to_az() function uses the following formal spherical trignonometry equation.

      cos(az_angle) = 1 + (cos(sky_angle) - 1.0) / cos(el)**2)

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

     max_sky_angle = 2*(90-el)
If larger angles than this are requested, then the sky_to_az() function returns an azimuth distance of 180 degrees.

Martin Shepherd (19-Sep-2008)