Index

record_misc slot, values, [scale=?]

Record one or more values in the mount.frame.misc register.

Arguments:
Count slot
The index of the mount.frame.misc register in which to record the first of the listed values. The rest will be written to elements that follow this. The value of this argument, plus the number of elements in the list of values that are to be recorded, must not exceed the number of elements in the mount.frame.misc register, which is currently 10.
listof Double values
The list of floating point values to be rounded to the nearest integer and recorded in the mount.frame.misc register.

Example:
The following example would record the current azimuth and elevation of the moon, along with the distance of the moon from the current source, in successive elements of the mount.frame.misc register, recording the first value in element 0 of this register. Since only integer values can be recorded, and each of the the azimuth(), elevation(), and separation() functions return angles in degree units, the optional scale factor argument is used to have the floating point values scaled to arcseconds before they are written to the mount.frame.misc register.
  record_misc 0, {$azimuth(moon), $elevation(moon), $separation(moon,current)}, scale=3600

Context:
The record_misc command provides a way for a schedule to record one or more arbitrary integral numeric values in the archive. This is useful to record quantities that schedules calculate, such as the results of pointing fits.

Like all other registers in the archive, the elements of the mount.frame.misc register are 32-bit integers. Thus the floating point value that is passed to the record_misc command, is rounded to the nearest integer before it is recorded in the archive. In order to record a number that has a fractional part, the schedule should scale the number up to the desired precision. If all of the numbers to be recorded need the same scale factor, then this can be passed via the optional scale argument. Otherwise, appropriately numbers should be provided in the list of values to be written.

The mount.frame.misc register contains a number of elements. The initial slot argument of the record_misc command indicates the index of the element in which the first of the listed values should be recorded. The rest of the listed numbers are recorded in the corresponding number of subsequent elements of the register. If there are fewer values to be written than elements in the register, then the values of the remaining elements are left unchanged.

The mount.frame.misc register can be used in various ways by different schedules and schedule procedures. Thus some way is needed to indicate to offline software what the current contents mean. The following example shows an example of how this may be done.

  label "moon_posn"
  record_misc 0, {$azimuth($moon), $elevation($moon)}, scale=3600
  mark one, f0
  until $acquired(mark)
  label ""
This example records the string "moon_posn" in the mount.frame.label register, to indicate textually what is being recorded. It then records the azimuth, and elevation of the moon, in elements 0 and 1 of the mount.frame.misc[] register. Finally it sets bit 0 of the mount.frame.features register for one archive frame, waits for the control system to indicate that this has been recorded in the archive, then clears the label register. The offline software can then look for frames where the mount.frame.label register contains the string "moon_posn", and the mount.frame.features register has its first bit set, to know which frame contains the moon positional information.

Martin Shepherd (16-Dec-2010)