Offset

Introduction

Offset is issued to change the telescope pointing.

Prologue

  1. Clear offset applied flag.
  2. If pseudo-monocular, use authorized instrument and focal station for pseudo-monocular passive offset. For passive side instrument offset, use supplied values.
  3. Check if passive and offsets not allowed. Set flag to generate warning later.
  4. Return error if not authorized.
  5. Return error if invalid or unsupported coordinate system.
  6. Return error if relative offset and coordinate system is AZALT or GALACTIC.
  7. Return error if CS offset and coordinate system is AZALT or GALACTIC.
  8. Return error if rotation angle is NAN, INF, or not in [-2PI.2PI].
  9. Return error if offset contains NAN, INF, or values out-of-range.
  10. Return error if an Offset command is already in progress.
  11. Return error if no active Preset.
  12. Return error for a PCS weight of zero.
  13. Return error for side 'both' when synchronous.
  14. Return error for duplicate synchronous Offset.
  15. Set target not OK for GetTrajectory.
  16. If asynchronous wait for any asynchronous Offset on the other side.
  17. If synchronous wait for both Offsets to arrive.
  18. Save information in the Data Dictionary.

Execution

  1. Return warning if passive and offsets not allowed.
  2. Tell PCS to stop accepting demands from the TCS and stop sending pointing corrections to the PSF.
  3. Tell PCS to expect two offsets for synchronous Offsets. Do not do more than once for each pair, and do not do on a release.
  4. Check for needed subsystems based on focal station and instrument.
    Return error if any needed subsystems are not running.
    • The PCS and MCS are always needed.
    • The PMC and PSF are needed for all instruments except the MAT.
    • The OSS is needed for all focal stations except PRIME.
    • The GCS is needed for focal stations BENTGREGORIANFRONT, BENTGREGORIANARGOS, BENTGREGORIANREARFIBERFEED, and DIRECTGREGORIAN if the simplemode is greater than TRACK and there are guidestars.
    • The AOS is needed if the mode is adaptive and the adaptive secondary mirror is present.
  5. Calculate the move size, and decide if collimation is needed.
    The collimation will always be done for 'optics' offsets; it will be done for 'mount' offsets (monocular or side 'both') if either
    • The time since the last collimation is greater than the threshold (default 120 sec)
    • The move size is greater than the threshold (default 2 arc-sec)
  6. Pause guiding and active optics if GCS is being used.
  7. Pause AO if AOS is being used.
    Return error if either GCS or AOS reported failure and not pseudo-monocular.
  8. Send offset to PCS.
    • This will start the mount moving.
  9. Check if canceled by a Preset.
    Wait for three PCS fast loop cycles.
    Set target OK for GetTrajectory.
    If asynchronous, unlock mutex.
    If synchronous, update flags.
    Return error if PCS reports failure, or offset was canceled by a Preset, or there are any accumulated pseudo-monocular errors..
  10. Set offset applied flag.
  11. Tell GCS about offset.
    Do not wait for the GCS.
    • This will start the guide probe moving.
  12. Tell AOS about the offset.
    Do not wait for the AOS.
    • This will start the AO stage moving.
  13. Perform secondary active optics offload calculation if step 5 requires it.
    Return error if PSF reports failure.
    • This will apply any held WFS correction.
    • This will block if there is another PSF command in progress.
  14. Set up mount balancing if binocular.
    Issue PSF adjustPointing with PCS mount altitude demand angle.
    Wait for three PCS fast loop cycles.
    Get optics tip/tilts from PCS and send them to the PSF but do not move the optics at this time.
  15. Start collimating the primary and/or secondary mirrors if step 5 requires it.
    • Use same altitude angle as step 13.
    • This will include any secondary offload and the PCS tip/tilts.
    • Note that if the collimation is skipped than mount balancing is also.
  16. Wait for telescope (elevation, azimuth, and rotators) to get there.
    Return error if wait times out or is aborted.
    • The wait time out is set in iif.conf (default 400 seconds) and can be aborted from the IIF GUI.
  17. Wait for GCS probe move to finish.
    Convert errors to warnings so if probe cannot reach position the offset will not fail, and set flag so resume will not be done.
  18. Wait for AOS stage move to finish.
    Convert errors to warnings for FLAO so if the stage cannot reach position the offset will not fail.
    ARGOS will return a warning in this case.
    Set flag to inhibit resume if not success.
    Return error if AOS reports failure.
  19. Wait for collimations to finish.
    Return error if PSF reports failure.
  20. Check the current elevation angle and collimate again if necessary.
    Return error if PSF reports failure.
    • If the difference between the current elevation angle and the one used in step 13 is more than 0.1 degree collimate again.
  21. Tell PCS to start accepting demands from the TCS and start sending pointing corrections to the PSF.
  22. Lock the PCS.
  23. Delay
    Always do 'mount' delay, which is a parameter in iif.conf, settable on the IIFGUI, and is normally zero.
    For 'optics' offsets the default is 6 seconds for large (greater than 5 arc-seconds) offsets, zero for less. Both the delay and size threshold are settable on the IIFGUI. Any mount delay will be included in the optics delay.
  24. Resume guiding if no error from GCS probe move. Otherwise leave guiding paused.
  25. Resume AO if no error (FLAO), or warning (ARGOS) from AOS stage move. Otherwise leave AO paused.
  26. Return error if GCS or AOS reports failure.
    Return success.

Epilogue

  1. Set up guiding:
    • If AO is in use and AO offset succeeded, disable GCS guide and WFS updates.
    • If AO is in use and AO offset failed, but GCS didn't, enable GCS guide if simplemode is GUIDE or higher and WFS updates if simplemode is ACTIVE.
    • If AO is in use and AO offset failed and GCS offset failed, telescope is open loop tracking.
    • If AO is not in use but guiding/active optics is and GCS offset succeeded, enable GCS guide and WFS updates.
    • If AO is not in use but guiding/active optics is and GCS offset failed, telescope is open loop tracking.
  2. Unlock synchronizing mutex and clean up wait flags.
  3. If command error or warning, make events from CommandReturn results.

-- ChrisBiddick - 18 Nov 2011
Topic revision: r32 - 16 May 2017, ChrisBiddick
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback