ApplyPointingModel

  1. Dish Leaf Node provides API for applying a GlobalPointingModel. The ApplyPointingModel command downloads a pointing model from a specified TelModel URI and applies it to the Dish Master.

  2. The Dish Leaf Node accepts the command if :—

    1. The Dish Master is online and responsive.

    2. No restriction on DishMode or PointingState — command is always allowed if the device is reachable.

  3. The following state requirements are applied for command execution :-

    1. Dish Master must be reachable via TANGO.

    2. The TelModel URI must be accessible and contain valid JSON.

  4. The Input JSON is validated as below, and command is rejected if not met :-

    1. Must be valid JSON.

    2. Must contain:

      • tm_data_sources: List of TelModel repository URLs (at least one).

      • tm_data_filepath: Path to the pointing model file (e.g., /gpm/Band_1/pointing_model.json).

    3. If either field is missing or empty → immediate ResultCode.FAILED.

  5. The command execution involves the following key operations :-

    1. Download Pointing Model JSON

      1. Uses ska_telmodel to fetch the file from the TelModel repository.

      2. 10-second timeout — if unreachable → ResultCode.FAILED.

    2. Validate File Existence

      • Checks that the file exists at the specified path in the repository.

      • If not found → ResultCode.FAILED.

    3. Extract Band and Version

      • Band (e.g., Band_1, Band_5a) from tm_data_filepath.

      • Version from URL query string in tm_data_sources.

      • Updates GPM version tracking in the component manager.

    4. Send to Dish Master

      • Full JSON is forwarded to Dish Master via ApplyPointingModel() command.

      • Returns immediately with QUEUED and a unique command ID.

  6. The TMC Dish Leaf Node monitors progress via long-running command results

    1. Command is successful when:

      • Dish Master reports ResultCode.OK via longRunningCommandResult.

      • GPM version is updated in the system.

      • Final status: ResultCode.OK.

    2. Command fails if any of the following occur:

      • TelModel URI unreachable or file not found.

      • Invalid JSON or missing fields.

      • Dish Master returns FAILED, REJECTED, or NOT_ALLOWED.

      • Timeout exceeds command_timeout.

      • Final status: ResultCode.FAILED with error message.

  7. Input Json Schema

    {

    “tm_data_sources”: [”https://ska-telmodel.skatelescope.org/gpm?interface=…”],

    “tm_data_filepath”: “/gpm/Band_1/pointing_model.json”

    }

    Full schema: https://developer.skao.int/projects/ska-telmodel/en/latest/schemas/dish/ska-dish.html