Interval
sky_to_time(Declination dec, PointingOffset angle, TimeScale scale)
Return how long a source takes to drift across a given great-circle distance.
Declination dec
PointingOffset angle
TimeScale scale
track jupiter until $acquired(source) radec_offset ra=-$sky_to_ra($declination(jupiter), 5) until $acquired(source) halt until $elapsed($sky_to_time($declination(jupiter), 5, utc)) print "Jupiter is now drifting through the bore-sight of the telescope." until $elapsed($sky_to_time($declination(jupiter), 5, utc))
The sky_to_time()
function returns the time that it takes
a source at a given declination to drift across a given angular
distance on the sky. First it calculates the hour-angle offset
that corresponds to the specified angular offset, using the
following equation:
cos(ha_angle) = 1 + (cos(sky_angle) - 1.0) / cos(dec)**2)It then converts this to a time, by dividing by the number of radians in a circle, and then multiplying by the number of hours in a day. Finally, since this calculates a sidereal time interval, if a UTC time is requested, then it multiplies this by the number of UT seconds per mean sidereal second.
Note that the maximum sky distance that can be achieved at
a particular declination, is the great-circle distance between
hour-angles 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_time()
function returns a time of 12 hours.