necst.ctrl.antenna.pid_controller

class AntennaPIDController[source]

Bases: AlertHandlerNode

NodeName = 'controller'
Namespace = '/necst/OMU1P85M/ctrl/antenna'
update_command(msg)[source]

Receive an altaz command message and enqueue it.

Notes

  • Most of the time msg.time is monotonically increasing, but mode switches or network jitter may occasionally reorder messages.

  • We avoid sorting on every callback; if out-of-order is detected, we mark the buffer “unsorted” and sort once on the next consumption.

  • Each enqueued command carries a local append sequence number. This is used to detect the arrival of the first command of a new control epoch.

Parameters:

msg (CoordMsg) –

Return type:

None

update_encoder_reading(msg)[source]
Parameters:

msg (CoordMsg) –

Return type:

None

update_control_status(msg)[source]

Request epoch cutover when control ID changes.

We DO NOT clear command_list here. The new altaz_cmd messages may still be in flight. Instead, we record the local append-sequence boundary and perform the actual buffer cutover later, inside speed_command(), once at least one post-status-change command is confirmed to have arrived.

Return type:

None

immediate_stop_no_resume()[source]
Return type:

None

speed_command()[source]
Return type:

None

change_pid_param(msg)[source]
Parameters:

msg (PIDMsg) –

Return type:

None