Return true if the current time is within a given window of time.
- Arguments:
-
Time start
- The start time of the window (hours).
Time end
- The end time of the window (hours).
TimeScale scale
- The timescale of $start and $end, from:
- utc - Universal Coordinated Time.
- lst - Local Sidereal Time.
- Example 1:
- The following example tests whether the local sidereal time is between
03:45 and 04:45. If not, it waits until 03:45 is reached, then
procedes to observe 3C345 until 04:45 LST.
until $between(03:45, 04:45, LST)
track 3c345
until $after(04:45, LST)
- Example 2:
- The following example tests whether the time of day (UTC) is between 03:45
and 04:45. If not, it waits until 03:45 is reached, then stows
the telescope until 04:45.
until $between(03:45, 04:45, UTC)
track stow
until $after(04:45, UTC)
- Context:
- This function is designed for the situation where one wants to
allocate a specific window in LST or UTC to observing a given
source. Note that if the end time is numerically less than the
start time, then the end time is interpretted as being an LST on
the next day. Thus if one swapped the times in the above example:
until $between(04:45, 03:45, LST)
then this would actually return true for times between 04:45 and 23:59
as well as from 00:00 to 03:45. This is precisely the opposite
of the original example.