RemoteTech#

Provides functionality to interact with the RemoteTech mod. Tested with RemoteTech 1.9.12. Provides the following classes:

Example#

The following example sets the target of a dish on the active vessel then prints out the signal delay to the active vessel.

import krpc.client.Connection;
import krpc.client.services.RemoteTech;
import krpc.client.services.RemoteTech.Antenna;
import krpc.client.services.RemoteTech.Comms;
import krpc.client.services.SpaceCenter;
import krpc.client.services.SpaceCenter.Part;
import krpc.client.services.SpaceCenter.Vessel;


public class RemoteTechExample {
    public static void main(String[] args) {
        Connection connection =
            Connection.newInstance("RemoteTech Example");
        SpaceCenter sc = SpaceCenter.newInstance(connection);
        RemoteTech rt = RemoteTech.newInstance(connection);
        Vessel vessel = sc.getActiveVessel();

        // Set a dish target
        Part part = vessel.getParts().withTitle("Reflectron KR-7").get(0);
        Antenna antenna = rt.antenna(part);
        antenna.setTargetBody(sc.getBodies().get("Jool"));

        // Get info about the vessels communications
        Comms comms = rt.comms(vessel);
        System.out.printf(
            "Signal delay = %.1f seconds\n", comms.getSignalDelay());
        connection.close();
    }
}