LET @schedule = @schedule CONTRACTED (1:2){ LEFT @number[left] | RIGHT @number[right] }
The CONTRACT command reduces (contracts) the size of a schedule by decreasing
the size of each of its intervals. In particular, a specified number of
seconds is added to the left endpoint of each interval, and another specified
number of seconds is subtracted from the right endpoint of each interval.
Intervals for which the sum of the decrements is greater than the length of
the interval are eliminated from the schedule.
A graphical description of the CONTRACT command is shown below.
Left decrement - Right decrement -- Input schedule ------ --------- -- - ---- Output schedule --- ------ -
The CONTRACT command is normally used to reduce intervals of opportunity in
order to provide a margin for error. In the following example, the intervals
in a schedule are contracted to allow for differences caused by shifting the
observer from Earth to HST.
FIND ECL ECLIPSE OF IO BY JUPITER FROM EARTH WITHIN CONSTRAINTS STEP SIZE 30 MINUTES; LET ECL = ECL CONTRACTED LEFT 15 SECONDS;
Compare with EXPAND, which increases the lengths of intervals (instead of
decreasing them).