/  Python Yamcs Client  /  Time Correlation (TCO)  /  Client

Client

class yamcs.tco.client.TCOClient(ctx: Context, instance: str, service: str)

Client for interacting with a Time Correlation service managed by Yamcs.

add_tof_interval(start: datetime, stop: datetime, polynomial: List[float])

Defines a ToF interval for the ERT range [start, stop], specifying a polynomial function of the form: tof = a + bx + cx^2 + … where x is ERT minus the provided start date.

Parameters:
  • start – ERT start

  • stop – ERT stop

  • polynomial – Coefficients in the order [a, b, c, ...]

add_tof_intervals(intervals: List[TofInterval])

Adds multiple ToF intervals at once.

Parameters:

intervals – List of ToF intervals.

get_status() TCOStatus

Retrieve the TCO status.

override_coefficients(utc: datetime, obt: int, gradient: float = 0, offset: float = 0)

Manually override the assocation between UTC and onboard time.

Note

If later on you want to revert to automatically computed coefficients, use reset_coefficients().

Parameters:
  • utc – UTC

  • obt – Onboard time

  • gradient – Gradient

  • offset – Offset

reconfigure(accuracy: Optional[float] = None, validity: Optional[float] = None, ob_delay: Optional[float] = None, default_tof: Optional[float] = None)

Updates one or more TCO options

Parameters:
  • accuracy – Accuracy in seconds.

  • validity – Validity in seconds.

  • ob_delay – Onboard delay in seconds.

  • default_tof – Default ToF in seconds. This value is used if the ToF estimator does not find a matching interval.

remove_tof_intervals(start: datetime, stop: datetime)

Removes previously registered ToF intervals whose start date falls in the specified range [start, stop].

Parameters:
  • start – ERT start

  • stop – ERT stop

reset_coefficients()

Resets current TCO coefficients, as well as any collected samples.