ADCS.remote.controller_rpc module¶
- class ADCS.remote.controller_rpc.ComponentLocation(*values)[source]¶
Bases:
str,Enum- LOCAL = 'local'¶
- REMOTE = 'remote'¶
- class ADCS.remote.controller_rpc.RemoteAttitudeEstimatorProxy(*, host, port, timeout_s=0.25, retries=0)[source]¶
Bases:
objectClient-side proxy exposing attitude-estimator-compatible update calls.
- Parameters:
host (str)
port (int)
timeout_s (float)
retries (int)
- ping()[source]¶
Ping the remote server used by this attitude-estimator proxy.
- Returns:
Trueif the remote endpoint responds.- Return type:
bool
- update(u, sensors, os)[source]¶
Execute one remote attitude-estimator update.
- Parameters:
u (numpy.ndarray) – Applied control command vector.
sensors (list[numpy.ndarray]) – Sensor measurement list for the estimator update.
os (
Orbital_State) – Orbital-state estimate used by the estimator.
- Returns:
Updated attitude-state estimate vector.
- Return type:
numpy.ndarray
- property host: str¶
- property last_roundtrip_s: float | None¶
- property last_server_s: float | None¶
- property port: int¶
- property roundtrip_hist: list[float]¶
- property server_hist: list[float]¶
- class ADCS.remote.controller_rpc.RemoteControllerProxy(*, host, port, timeout_s=0.25, retries=0)[source]¶
Bases:
objectClient-side proxy exposing controller-compatible find_u calls.
- Parameters:
host (str)
port (int)
timeout_s (float)
retries (int)
- find_u(x_hat, sens, est_sat, os_hat, goal=None)[source]¶
Execute remote controller command synthesis.
- Parameters:
x_hat (numpy.ndarray) – Estimated state vector for controller input.
sens (numpy.ndarray) – Sensor measurement vector for controller input.
est_sat (Any) – Estimated satellite model (unused for transport parity).
os_hat (
Orbital_State) – Orbital state estimate.goal (
Goalor None) – Active guidance goal for the current step.
- Returns:
Control command vector from the remote controller.
- Return type:
numpy.ndarray
- ping()[source]¶
Ping the remote server used by this controller proxy.
- Returns:
Trueif the remote endpoint responds.- Return type:
bool
- property host: str¶
- property last_roundtrip_s: float | None¶
- property last_server_s: float | None¶
- property port: int¶
- property roundtrip_hist: list[float]¶
- property server_hist: list[float]¶
- class ADCS.remote.controller_rpc.RemoteOrbitEstimatorProxy(*, host, port, timeout_s=0.25, retries=0)[source]¶
Bases:
objectClient-side proxy exposing orbit-estimator-compatible update calls.
- Parameters:
host (str)
port (int)
timeout_s (float)
retries (int)
- ping()[source]¶
Ping the remote server used by this orbit-estimator proxy.
- Returns:
Trueif the remote endpoint responds.- Return type:
bool
- update(GPS_measurements, J2000)[source]¶
Execute one remote orbit-estimator update.
- Parameters:
GPS_measurements (list[numpy.ndarray]) – List of GPS measurement vectors.
J2000 (float) – Current simulation time in Julian centuries from J2000.
- Returns:
Updated estimated orbital state.
- Return type:
EstimatedOrbital_State
- property host: str¶
- property last_roundtrip_s: float | None¶
- property last_server_s: float | None¶
- property port: int¶
- property roundtrip_hist: list[float]¶
- property server_hist: list[float]¶
- class ADCS.remote.controller_rpc.RemoteSimulationConfig(controller: 'ComponentLocation' = <ComponentLocation.REMOTE: 'remote'>, estimator: 'ComponentLocation' = <ComponentLocation.LOCAL: 'local'>, orbit_estimator: 'ComponentLocation' = <ComponentLocation.LOCAL: 'local'>, host: 'str' = '10.77.0.4', port: 'int' = 5000, timeout_s: 'float' = 0.25, retries: 'int' = 0, fallback: 'str' = 'raise')[source]¶
Bases:
object- Parameters:
controller (ComponentLocation)
estimator (ComponentLocation)
orbit_estimator (ComponentLocation)
host (str)
port (int)
timeout_s (float)
retries (int)
fallback (str)
- controller: ComponentLocation = 'remote'¶
- estimator: ComponentLocation = 'local'¶
- fallback: str = 'raise'¶
- host: str = '10.77.0.4'¶
- orbit_estimator: ComponentLocation = 'local'¶
- port: int = 5000¶
- retries: int = 0¶
- timeout_s: float = 0.25¶
- ADCS.remote.controller_rpc.serve_remote_component(component, *, host='0.0.0.0', port=5000)[source]¶
Serve one ADCS component by dispatching to the composite helper.
- Parameters:
component (Any) – Component instance to serve.
host (str) – Bind address for the server.
port (int) – Bind port for the server.
- Raises:
TypeError – If
componentis not one of the supported ADCS component classes.- Return type:
None
- ADCS.remote.controller_rpc.serve_remote_components(*, controller=None, estimator=None, orbit_estimator=None, host='0.0.0.0', port=5000)[source]¶
Serve any combination of ADCS components over a single XML-RPC endpoint.
- Parameters:
controller (
Controlleror None) – Optional controller component handlingfind_urequests.estimator (
Attitude_Estimatoror None) – Optional attitude estimator handling attitudeupdaterequests.orbit_estimator (
Orbit_Estimatoror None) – Optional orbit estimator handling orbitupdaterequests.host (str) – Bind address for the server.
port (int) – Bind port for the server.
- Raises:
ValueError – If no components are provided.
- Return type:
None
- ADCS.remote.controller_rpc.serve_remote_controller(controller, *, host='0.0.0.0', port=5000)[source]¶
Backward-compatible controller-only server entry point.
- Parameters:
controller (Any) – Controller instance to serve.
host (str) – Bind address for the server.
port (int) – Bind port for the server.
- Return type:
None